// This file is @generated by prost-build.
/// Configuration CRUD Messages
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetConfigurationRequest {
    #[prost(string, optional, tag = "1")]
    pub category: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "2")]
    pub key: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "3")]
    pub environment: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetConfigurationResponse {
    #[prost(message, repeated, tag = "1")]
    pub settings: ::prost::alloc::vec::Vec<ConfigurationSetting>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UpdateConfigurationRequest {
    #[prost(string, tag = "1")]
    pub category: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub key: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub value: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub changed_by: ::prost::alloc::string::String,
    #[prost(string, optional, tag = "5")]
    pub change_reason: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "6")]
    pub environment: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateConfigurationResponse {
    #[prost(bool, tag = "1")]
    pub success: bool,
    #[prost(string, tag = "2")]
    pub message: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub validation_result: ::core::option::Option<ValidationResult>,
    #[prost(int64, tag = "4")]
    pub timestamp: i64,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteConfigurationRequest {
    #[prost(string, tag = "1")]
    pub category: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub key: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub deleted_by: ::prost::alloc::string::String,
    #[prost(string, optional, tag = "4")]
    pub delete_reason: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteConfigurationResponse {
    #[prost(bool, tag = "1")]
    pub success: bool,
    #[prost(string, tag = "2")]
    pub message: ::prost::alloc::string::String,
    #[prost(int64, tag = "3")]
    pub timestamp: i64,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListCategoriesRequest {
    #[prost(string, optional, tag = "1")]
    pub parent_category: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCategoriesResponse {
    #[prost(message, repeated, tag = "1")]
    pub categories: ::prost::alloc::vec::Vec<ConfigurationCategory>,
}
/// Streaming Messages
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StreamConfigChangesRequest {
    #[prost(string, repeated, tag = "1")]
    pub categories: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(string, repeated, tag = "2")]
    pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Validation Messages
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ValidateConfigurationRequest {
    #[prost(string, tag = "1")]
    pub category: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub key: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub value: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValidateConfigurationResponse {
    #[prost(bool, tag = "1")]
    pub is_valid: bool,
    #[prost(message, optional, tag = "2")]
    pub validation_result: ::core::option::Option<ValidationResult>,
}
/// History Messages
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetConfigurationHistoryRequest {
    #[prost(string, optional, tag = "1")]
    pub category: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "2")]
    pub key: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(int64, optional, tag = "3")]
    pub start_time: ::core::option::Option<i64>,
    #[prost(int64, optional, tag = "4")]
    pub end_time: ::core::option::Option<i64>,
    #[prost(int32, optional, tag = "5")]
    pub limit: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetConfigurationHistoryResponse {
    #[prost(message, repeated, tag = "1")]
    pub history: ::prost::alloc::vec::Vec<ConfigurationHistoryEntry>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RollbackConfigurationRequest {
    #[prost(string, tag = "1")]
    pub category: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub key: ::prost::alloc::string::String,
    #[prost(int64, tag = "3")]
    pub rollback_to_timestamp: i64,
    #[prost(string, tag = "4")]
    pub rolled_back_by: ::prost::alloc::string::String,
    #[prost(string, optional, tag = "5")]
    pub rollback_reason: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RollbackConfigurationResponse {
    #[prost(bool, tag = "1")]
    pub success: bool,
    #[prost(string, tag = "2")]
    pub message: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub restored_setting: ::core::option::Option<ConfigurationSetting>,
    #[prost(int64, tag = "4")]
    pub timestamp: i64,
}
/// Import/Export Messages
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ExportConfigurationRequest {
    #[prost(string, repeated, tag = "1")]
    pub categories: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "2")]
    pub environment: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(enumeration = "ExportFormat", tag = "3")]
    pub format: i32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ExportConfigurationResponse {
    #[prost(string, tag = "1")]
    pub exported_data: ::prost::alloc::string::String,
    #[prost(enumeration = "ExportFormat", tag = "2")]
    pub format: i32,
    #[prost(int32, tag = "3")]
    pub settings_count: i32,
    #[prost(int64, tag = "4")]
    pub exported_at: i64,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ImportConfigurationRequest {
    #[prost(string, tag = "1")]
    pub imported_data: ::prost::alloc::string::String,
    #[prost(enumeration = "ExportFormat", tag = "2")]
    pub format: i32,
    #[prost(string, tag = "3")]
    pub imported_by: ::prost::alloc::string::String,
    #[prost(bool, tag = "4")]
    pub dry_run: bool,
    #[prost(bool, tag = "5")]
    pub overwrite_existing: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ImportConfigurationResponse {
    #[prost(bool, tag = "1")]
    pub success: bool,
    #[prost(string, tag = "2")]
    pub message: ::prost::alloc::string::String,
    #[prost(message, repeated, tag = "3")]
    pub import_results: ::prost::alloc::vec::Vec<ImportResult>,
    #[prost(int32, tag = "4")]
    pub imported_count: i32,
    #[prost(int32, tag = "5")]
    pub skipped_count: i32,
    #[prost(int32, tag = "6")]
    pub error_count: i32,
}
/// Schema Messages
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetConfigSchemaRequest {
    #[prost(string, optional, tag = "1")]
    pub category: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetConfigSchemaResponse {
    #[prost(message, repeated, tag = "1")]
    pub schemas: ::prost::alloc::vec::Vec<ConfigurationSchema>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UpdateConfigSchemaRequest {
    #[prost(string, tag = "1")]
    pub schema_name: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub schema_definition: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub updated_by: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UpdateConfigSchemaResponse {
    #[prost(bool, tag = "1")]
    pub success: bool,
    #[prost(string, tag = "2")]
    pub message: ::prost::alloc::string::String,
    #[prost(int64, tag = "3")]
    pub timestamp: i64,
}
/// Complete configuration setting with metadata and validation rules
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConfigurationSetting {
    /// Unique setting identifier
    #[prost(int64, tag = "1")]
    pub id: i64,
    /// Configuration category (e.g., "trading.limits")
    #[prost(string, tag = "2")]
    pub category: ::prost::alloc::string::String,
    /// Configuration key (e.g., "max_position_size")
    #[prost(string, tag = "3")]
    pub key: ::prost::alloc::string::String,
    /// Current configuration value
    #[prost(string, tag = "4")]
    pub value: ::prost::alloc::string::String,
    /// Data type (string, number, boolean, etc.)
    #[prost(enumeration = "ConfigDataType", tag = "5")]
    pub data_type: i32,
    /// Whether changes trigger hot-reload
    #[prost(bool, tag = "6")]
    pub hot_reload: bool,
    /// Human-readable description
    #[prost(string, tag = "7")]
    pub description: ::prost::alloc::string::String,
    /// Default value if not set
    #[prost(string, optional, tag = "8")]
    pub default_value: ::core::option::Option<::prost::alloc::string::String>,
    /// Whether this setting is required
    #[prost(bool, tag = "9")]
    pub required: bool,
    /// Whether value contains sensitive data
    #[prost(bool, tag = "10")]
    pub sensitive: bool,
    /// Validation rule expression
    #[prost(string, optional, tag = "11")]
    pub validation_rule: ::core::option::Option<::prost::alloc::string::String>,
    /// Environment-specific override
    #[prost(string, optional, tag = "12")]
    pub environment_override: ::core::option::Option<::prost::alloc::string::String>,
    /// Minimum numeric value
    #[prost(double, optional, tag = "13")]
    pub min_value: ::core::option::Option<f64>,
    /// Maximum numeric value
    #[prost(double, optional, tag = "14")]
    pub max_value: ::core::option::Option<f64>,
    /// Allowed enum values (comma-separated)
    #[prost(string, optional, tag = "15")]
    pub enum_values: ::core::option::Option<::prost::alloc::string::String>,
    /// Dependencies on other settings
    #[prost(string, repeated, tag = "16")]
    pub depends_on: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Tags for categorization
    #[prost(string, repeated, tag = "17")]
    pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Display order in UI
    #[prost(int32, tag = "18")]
    pub display_order: i32,
    /// Creation timestamp
    #[prost(int64, tag = "19")]
    pub created_at: i64,
    /// Last modification timestamp
    #[prost(int64, tag = "20")]
    pub modified_at: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConfigurationCategory {
    #[prost(int64, tag = "1")]
    pub id: i64,
    #[prost(string, tag = "2")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub description: ::prost::alloc::string::String,
    #[prost(int64, optional, tag = "4")]
    pub parent_id: ::core::option::Option<i64>,
    #[prost(int32, tag = "5")]
    pub display_order: i32,
    #[prost(string, optional, tag = "6")]
    pub icon: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(int64, tag = "7")]
    pub created_at: i64,
    #[prost(message, repeated, tag = "8")]
    pub children: ::prost::alloc::vec::Vec<ConfigurationCategory>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConfigurationHistoryEntry {
    #[prost(int64, tag = "1")]
    pub id: i64,
    #[prost(int64, tag = "2")]
    pub setting_id: i64,
    #[prost(string, optional, tag = "3")]
    pub old_value: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, tag = "4")]
    pub new_value: ::prost::alloc::string::String,
    #[prost(string, optional, tag = "5")]
    pub change_reason: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, tag = "6")]
    pub changed_by: ::prost::alloc::string::String,
    #[prost(int64, tag = "7")]
    pub changed_at: i64,
    #[prost(string, tag = "8")]
    pub change_source: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "9")]
    pub validation_result: ::core::option::Option<ValidationResult>,
    #[prost(int64, optional, tag = "10")]
    pub rollback_id: ::core::option::Option<i64>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ConfigurationSchema {
    #[prost(int64, tag = "1")]
    pub id: i64,
    #[prost(string, tag = "2")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub schema_definition: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub description: ::prost::alloc::string::String,
    #[prost(int64, tag = "5")]
    pub created_at: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValidationResult {
    #[prost(bool, tag = "1")]
    pub is_valid: bool,
    #[prost(message, repeated, tag = "2")]
    pub errors: ::prost::alloc::vec::Vec<ValidationError>,
    #[prost(message, repeated, tag = "3")]
    pub warnings: ::prost::alloc::vec::Vec<ValidationWarning>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ValidationError {
    #[prost(string, tag = "1")]
    pub field: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub message: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub error_code: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ValidationWarning {
    #[prost(string, tag = "1")]
    pub field: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub message: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub warning_code: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ImportResult {
    #[prost(string, tag = "1")]
    pub category: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub key: ::prost::alloc::string::String,
    #[prost(enumeration = "ImportStatus", tag = "3")]
    pub status: i32,
    #[prost(string, optional, tag = "4")]
    pub error_message: ::core::option::Option<::prost::alloc::string::String>,
}
/// Event Messages
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ConfigChangeEvent {
    #[prost(int64, tag = "1")]
    pub setting_id: i64,
    #[prost(string, tag = "2")]
    pub category: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub key: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub old_value: ::prost::alloc::string::String,
    #[prost(string, tag = "5")]
    pub new_value: ::prost::alloc::string::String,
    #[prost(string, tag = "6")]
    pub changed_by: ::prost::alloc::string::String,
    #[prost(int64, tag = "7")]
    pub timestamp: i64,
    #[prost(enumeration = "ConfigChangeType", tag = "8")]
    pub change_type: i32,
    #[prost(bool, tag = "9")]
    pub hot_reload: bool,
}
/// Data types for configuration values
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ConfigDataType {
    /// Default/unknown type
    Unspecified = 0,
    /// Text string value
    String = 1,
    /// Numeric value (int or float)
    Number = 2,
    /// Boolean true/false value
    Boolean = 3,
    /// JSON object or array
    Json = 4,
    /// Encrypted sensitive value
    Encrypted = 5,
}
impl ConfigDataType {
    /// 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::Unspecified => "CONFIG_DATA_TYPE_UNSPECIFIED",
            Self::String => "CONFIG_DATA_TYPE_STRING",
            Self::Number => "CONFIG_DATA_TYPE_NUMBER",
            Self::Boolean => "CONFIG_DATA_TYPE_BOOLEAN",
            Self::Json => "CONFIG_DATA_TYPE_JSON",
            Self::Encrypted => "CONFIG_DATA_TYPE_ENCRYPTED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "CONFIG_DATA_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "CONFIG_DATA_TYPE_STRING" => Some(Self::String),
            "CONFIG_DATA_TYPE_NUMBER" => Some(Self::Number),
            "CONFIG_DATA_TYPE_BOOLEAN" => Some(Self::Boolean),
            "CONFIG_DATA_TYPE_JSON" => Some(Self::Json),
            "CONFIG_DATA_TYPE_ENCRYPTED" => Some(Self::Encrypted),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ExportFormat {
    Unspecified = 0,
    Json = 1,
    Yaml = 2,
    Toml = 3,
    Env = 4,
}
impl ExportFormat {
    /// 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::Unspecified => "EXPORT_FORMAT_UNSPECIFIED",
            Self::Json => "EXPORT_FORMAT_JSON",
            Self::Yaml => "EXPORT_FORMAT_YAML",
            Self::Toml => "EXPORT_FORMAT_TOML",
            Self::Env => "EXPORT_FORMAT_ENV",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "EXPORT_FORMAT_UNSPECIFIED" => Some(Self::Unspecified),
            "EXPORT_FORMAT_JSON" => Some(Self::Json),
            "EXPORT_FORMAT_YAML" => Some(Self::Yaml),
            "EXPORT_FORMAT_TOML" => Some(Self::Toml),
            "EXPORT_FORMAT_ENV" => Some(Self::Env),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ImportStatus {
    Unspecified = 0,
    Success = 1,
    Skipped = 2,
    Error = 3,
    ValidationFailed = 4,
}
impl ImportStatus {
    /// 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::Unspecified => "IMPORT_STATUS_UNSPECIFIED",
            Self::Success => "IMPORT_STATUS_SUCCESS",
            Self::Skipped => "IMPORT_STATUS_SKIPPED",
            Self::Error => "IMPORT_STATUS_ERROR",
            Self::ValidationFailed => "IMPORT_STATUS_VALIDATION_FAILED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "IMPORT_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
            "IMPORT_STATUS_SUCCESS" => Some(Self::Success),
            "IMPORT_STATUS_SKIPPED" => Some(Self::Skipped),
            "IMPORT_STATUS_ERROR" => Some(Self::Error),
            "IMPORT_STATUS_VALIDATION_FAILED" => Some(Self::ValidationFailed),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ConfigChangeType {
    Unspecified = 0,
    Created = 1,
    Updated = 2,
    Deleted = 3,
    Rollback = 4,
}
impl ConfigChangeType {
    /// 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::Unspecified => "CONFIG_CHANGE_TYPE_UNSPECIFIED",
            Self::Created => "CONFIG_CHANGE_TYPE_CREATED",
            Self::Updated => "CONFIG_CHANGE_TYPE_UPDATED",
            Self::Deleted => "CONFIG_CHANGE_TYPE_DELETED",
            Self::Rollback => "CONFIG_CHANGE_TYPE_ROLLBACK",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "CONFIG_CHANGE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "CONFIG_CHANGE_TYPE_CREATED" => Some(Self::Created),
            "CONFIG_CHANGE_TYPE_UPDATED" => Some(Self::Updated),
            "CONFIG_CHANGE_TYPE_DELETED" => Some(Self::Deleted),
            "CONFIG_CHANGE_TYPE_ROLLBACK" => Some(Self::Rollback),
            _ => None,
        }
    }
}
/// Generated client implementations.
#[allow(unused_qualifications)]
pub mod config_service_client {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// Configuration Service provides centralized, PostgreSQL-based configuration management with hot-reload capabilities.
    /// This service supports real-time configuration updates, validation, history tracking, and import/export functionality
    /// for all trading system components with comprehensive audit trails and rollback capabilities.
    #[derive(Debug, Clone)]
    pub struct ConfigServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl ConfigServiceClient<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> ConfigServiceClient<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,
        ) -> ConfigServiceClient<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,
        {
            ConfigServiceClient::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
        }
        /// Configuration CRUD Operations
        /// Get configuration settings by category, key, or environment
        pub async fn get_configuration(
            &mut self,
            request: impl tonic::IntoRequest<super::GetConfigurationRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetConfigurationResponse>,
            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(
                "/config.ConfigService/GetConfiguration",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("config.ConfigService", "GetConfiguration"));
            self.inner.unary(req, path, codec).await
        }
        /// Update configuration value with validation and audit logging
        pub async fn update_configuration(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateConfigurationRequest>,
        ) -> std::result::Result<
            tonic::Response<super::UpdateConfigurationResponse>,
            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(
                "/config.ConfigService/UpdateConfiguration",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("config.ConfigService", "UpdateConfiguration"));
            self.inner.unary(req, path, codec).await
        }
        /// Delete configuration setting with audit trail
        pub async fn delete_configuration(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteConfigurationRequest>,
        ) -> std::result::Result<
            tonic::Response<super::DeleteConfigurationResponse>,
            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(
                "/config.ConfigService/DeleteConfiguration",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("config.ConfigService", "DeleteConfiguration"));
            self.inner.unary(req, path, codec).await
        }
        /// List available configuration categories
        pub async fn list_categories(
            &mut self,
            request: impl tonic::IntoRequest<super::ListCategoriesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListCategoriesResponse>,
            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(
                "/config.ConfigService/ListCategories",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("config.ConfigService", "ListCategories"));
            self.inner.unary(req, path, codec).await
        }
        /// Real-time Configuration Streaming
        /// Stream real-time configuration changes with hot-reload support
        pub async fn stream_config_changes(
            &mut self,
            request: impl tonic::IntoRequest<super::StreamConfigChangesRequest>,
        ) -> std::result::Result<
            tonic::Response<tonic::codec::Streaming<super::ConfigChangeEvent>>,
            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(
                "/config.ConfigService/StreamConfigChanges",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("config.ConfigService", "StreamConfigChanges"));
            self.inner.server_streaming(req, path, codec).await
        }
        /// Configuration Management Operations
        /// Validate configuration value against schema and rules
        pub async fn validate_configuration(
            &mut self,
            request: impl tonic::IntoRequest<super::ValidateConfigurationRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ValidateConfigurationResponse>,
            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(
                "/config.ConfigService/ValidateConfiguration",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("config.ConfigService", "ValidateConfiguration"),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Get configuration change history with audit details
        pub async fn get_configuration_history(
            &mut self,
            request: impl tonic::IntoRequest<super::GetConfigurationHistoryRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetConfigurationHistoryResponse>,
            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(
                "/config.ConfigService/GetConfigurationHistory",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("config.ConfigService", "GetConfigurationHistory"),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Rollback configuration to previous value
        pub async fn rollback_configuration(
            &mut self,
            request: impl tonic::IntoRequest<super::RollbackConfigurationRequest>,
        ) -> std::result::Result<
            tonic::Response<super::RollbackConfigurationResponse>,
            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(
                "/config.ConfigService/RollbackConfiguration",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("config.ConfigService", "RollbackConfiguration"),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Export configuration data in various formats
        pub async fn export_configuration(
            &mut self,
            request: impl tonic::IntoRequest<super::ExportConfigurationRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ExportConfigurationResponse>,
            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(
                "/config.ConfigService/ExportConfiguration",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("config.ConfigService", "ExportConfiguration"));
            self.inner.unary(req, path, codec).await
        }
        /// Import configuration data with validation
        pub async fn import_configuration(
            &mut self,
            request: impl tonic::IntoRequest<super::ImportConfigurationRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ImportConfigurationResponse>,
            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(
                "/config.ConfigService/ImportConfiguration",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("config.ConfigService", "ImportConfiguration"));
            self.inner.unary(req, path, codec).await
        }
        /// Schema Management Operations
        /// Get configuration schema definitions
        pub async fn get_config_schema(
            &mut self,
            request: impl tonic::IntoRequest<super::GetConfigSchemaRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetConfigSchemaResponse>,
            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(
                "/config.ConfigService/GetConfigSchema",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("config.ConfigService", "GetConfigSchema"));
            self.inner.unary(req, path, codec).await
        }
        /// Update configuration schema with validation rules
        pub async fn update_config_schema(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateConfigSchemaRequest>,
        ) -> std::result::Result<
            tonic::Response<super::UpdateConfigSchemaResponse>,
            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(
                "/config.ConfigService/UpdateConfigSchema",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("config.ConfigService", "UpdateConfigSchema"));
            self.inner.unary(req, path, codec).await
        }
    }
}
