// This file is @generated by prost-build.
/// Order submission request
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubmitOrderRequest {
    #[prost(string, tag = "1")]
    pub symbol: ::prost::alloc::string::String,
    #[prost(enumeration = "OrderSide", tag = "2")]
    pub side: i32,
    #[prost(enumeration = "OrderType", tag = "3")]
    pub order_type: i32,
    #[prost(double, tag = "4")]
    pub quantity: f64,
    #[prost(double, optional, tag = "5")]
    pub price: ::core::option::Option<f64>,
    #[prost(double, optional, tag = "6")]
    pub stop_price: ::core::option::Option<f64>,
    #[prost(string, tag = "7")]
    pub time_in_force: ::prost::alloc::string::String,
    #[prost(string, tag = "8")]
    pub client_order_id: ::prost::alloc::string::String,
}
/// Order submission response
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SubmitOrderResponse {
    #[prost(bool, tag = "1")]
    pub success: bool,
    #[prost(string, tag = "2")]
    pub order_id: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub message: ::prost::alloc::string::String,
    #[prost(int64, tag = "4")]
    pub timestamp_unix_nanos: i64,
}
/// Order cancellation request
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelOrderRequest {
    #[prost(string, tag = "1")]
    pub order_id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub symbol: ::prost::alloc::string::String,
}
/// Order cancellation response
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelOrderResponse {
    #[prost(bool, tag = "1")]
    pub success: bool,
    #[prost(string, tag = "2")]
    pub message: ::prost::alloc::string::String,
    #[prost(int64, tag = "3")]
    pub timestamp_unix_nanos: i64,
}
/// Order status request
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetOrderStatusRequest {
    #[prost(string, tag = "1")]
    pub order_id: ::prost::alloc::string::String,
}
/// Order status response
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetOrderStatusResponse {
    #[prost(string, tag = "1")]
    pub order_id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub symbol: ::prost::alloc::string::String,
    #[prost(enumeration = "OrderSide", tag = "3")]
    pub side: i32,
    #[prost(enumeration = "OrderType", tag = "4")]
    pub order_type: i32,
    #[prost(double, tag = "5")]
    pub quantity: f64,
    #[prost(double, tag = "6")]
    pub filled_quantity: f64,
    #[prost(double, tag = "7")]
    pub remaining_quantity: f64,
    #[prost(double, tag = "8")]
    pub average_price: f64,
    #[prost(enumeration = "OrderStatus", tag = "9")]
    pub status: i32,
    #[prost(int64, tag = "10")]
    pub created_at_unix_nanos: i64,
    #[prost(int64, tag = "11")]
    pub updated_at_unix_nanos: i64,
}
/// Account information request
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetAccountInfoRequest {
    #[prost(string, tag = "1")]
    pub account_id: ::prost::alloc::string::String,
}
/// Account information response
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAccountInfoResponse {
    #[prost(string, tag = "1")]
    pub account_id: ::prost::alloc::string::String,
    #[prost(double, tag = "2")]
    pub total_value: f64,
    #[prost(double, tag = "3")]
    pub cash_balance: f64,
    #[prost(double, tag = "4")]
    pub buying_power: f64,
    #[prost(double, tag = "5")]
    pub maintenance_margin: f64,
    #[prost(double, tag = "6")]
    pub day_trading_buying_power: f64,
}
/// Positions request
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetPositionsRequest {
    /// Filter by symbol if provided
    #[prost(string, optional, tag = "1")]
    pub symbol: ::core::option::Option<::prost::alloc::string::String>,
}
/// Positions response
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPositionsResponse {
    #[prost(message, repeated, tag = "1")]
    pub positions: ::prost::alloc::vec::Vec<Position>,
}
/// Position information
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Position {
    #[prost(string, tag = "1")]
    pub symbol: ::prost::alloc::string::String,
    #[prost(double, tag = "2")]
    pub quantity: f64,
    #[prost(double, tag = "3")]
    pub market_price: f64,
    #[prost(double, tag = "4")]
    pub market_value: f64,
    #[prost(double, tag = "5")]
    pub average_cost: f64,
    #[prost(double, tag = "6")]
    pub unrealized_pnl: f64,
    #[prost(double, tag = "7")]
    pub realized_pnl: f64,
}
/// Market data subscription request
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SubscribeMarketDataRequest {
    #[prost(string, repeated, tag = "1")]
    pub symbols: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(enumeration = "MarketDataType", repeated, tag = "2")]
    pub data_types: ::prost::alloc::vec::Vec<i32>,
}
/// Market data event
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MarketDataEvent {
    #[prost(oneof = "market_data_event::Event", tags = "1, 2, 3, 4")]
    pub event: ::core::option::Option<market_data_event::Event>,
}
/// Nested message and enum types in `MarketDataEvent`.
pub mod market_data_event {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Event {
        #[prost(message, tag = "1")]
        Tick(super::TickData),
        #[prost(message, tag = "2")]
        Quote(super::QuoteData),
        #[prost(message, tag = "3")]
        Trade(super::TradeData),
        #[prost(message, tag = "4")]
        Bar(super::BarData),
    }
}
/// Tick data
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TickData {
    #[prost(string, tag = "1")]
    pub symbol: ::prost::alloc::string::String,
    #[prost(int64, tag = "2")]
    pub timestamp_unix_nanos: i64,
    #[prost(double, tag = "3")]
    pub price: f64,
    #[prost(uint64, tag = "4")]
    pub size: u64,
    #[prost(string, tag = "5")]
    pub exchange: ::prost::alloc::string::String,
}
/// Quote data
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QuoteData {
    #[prost(string, tag = "1")]
    pub symbol: ::prost::alloc::string::String,
    #[prost(int64, tag = "2")]
    pub timestamp_unix_nanos: i64,
    #[prost(double, tag = "3")]
    pub bid_price: f64,
    #[prost(uint64, tag = "4")]
    pub bid_size: u64,
    #[prost(double, tag = "5")]
    pub ask_price: f64,
    #[prost(uint64, tag = "6")]
    pub ask_size: u64,
    #[prost(string, tag = "7")]
    pub exchange: ::prost::alloc::string::String,
}
/// Trade data
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TradeData {
    #[prost(string, tag = "1")]
    pub symbol: ::prost::alloc::string::String,
    #[prost(int64, tag = "2")]
    pub timestamp_unix_nanos: i64,
    #[prost(double, tag = "3")]
    pub price: f64,
    #[prost(uint64, tag = "4")]
    pub size: u64,
    #[prost(string, tag = "5")]
    pub trade_id: ::prost::alloc::string::String,
    #[prost(string, tag = "6")]
    pub exchange: ::prost::alloc::string::String,
}
/// Bar data
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BarData {
    #[prost(string, tag = "1")]
    pub symbol: ::prost::alloc::string::String,
    #[prost(int64, tag = "2")]
    pub timestamp_unix_nanos: i64,
    #[prost(string, tag = "3")]
    pub timeframe: ::prost::alloc::string::String,
    #[prost(double, tag = "4")]
    pub open: f64,
    #[prost(double, tag = "5")]
    pub high: f64,
    #[prost(double, tag = "6")]
    pub low: f64,
    #[prost(double, tag = "7")]
    pub close: f64,
    #[prost(uint64, tag = "8")]
    pub volume: u64,
    #[prost(double, optional, tag = "9")]
    pub vwap: ::core::option::Option<f64>,
}
/// Order updates subscription request
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SubscribeOrderUpdatesRequest {
    #[prost(string, optional, tag = "1")]
    pub account_id: ::core::option::Option<::prost::alloc::string::String>,
}
/// Order update event
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OrderUpdateEvent {
    #[prost(string, tag = "1")]
    pub order_id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub symbol: ::prost::alloc::string::String,
    #[prost(enumeration = "OrderStatus", tag = "3")]
    pub status: i32,
    #[prost(double, tag = "4")]
    pub filled_quantity: f64,
    #[prost(double, tag = "5")]
    pub remaining_quantity: f64,
    #[prost(double, tag = "6")]
    pub last_fill_price: f64,
    #[prost(uint64, tag = "7")]
    pub last_fill_quantity: u64,
    #[prost(int64, tag = "8")]
    pub timestamp_unix_nanos: i64,
    #[prost(string, tag = "9")]
    pub message: ::prost::alloc::string::String,
}
/// Monitoring messages
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetMetricsRequest {
    #[prost(string, repeated, tag = "1")]
    pub metric_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(int64, optional, tag = "2")]
    pub start_time_unix_nanos: ::core::option::Option<i64>,
    #[prost(int64, optional, tag = "3")]
    pub end_time_unix_nanos: ::core::option::Option<i64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMetricsResponse {
    #[prost(message, repeated, tag = "1")]
    pub metrics: ::prost::alloc::vec::Vec<Metric>,
    #[prost(int64, tag = "2")]
    pub timestamp_unix_nanos: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Metric {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    #[prost(double, tag = "2")]
    pub value: f64,
    #[prost(string, tag = "3")]
    pub unit: ::prost::alloc::string::String,
    #[prost(map = "string, string", tag = "4")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    #[prost(int64, tag = "5")]
    pub timestamp_unix_nanos: i64,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetLatencyRequest {
    #[prost(string, optional, tag = "1")]
    pub service_name: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "2")]
    pub operation: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(int64, optional, tag = "3")]
    pub start_time_unix_nanos: ::core::option::Option<i64>,
    #[prost(int64, optional, tag = "4")]
    pub end_time_unix_nanos: ::core::option::Option<i64>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetLatencyResponse {
    #[prost(double, tag = "1")]
    pub p50_micros: f64,
    #[prost(double, tag = "2")]
    pub p95_micros: f64,
    #[prost(double, tag = "3")]
    pub p99_micros: f64,
    #[prost(double, tag = "4")]
    pub p999_micros: f64,
    #[prost(double, tag = "5")]
    pub avg_micros: f64,
    #[prost(double, tag = "6")]
    pub max_micros: f64,
    #[prost(double, tag = "7")]
    pub min_micros: f64,
    #[prost(uint64, tag = "8")]
    pub sample_count: u64,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetThroughputRequest {
    #[prost(string, optional, tag = "1")]
    pub service_name: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "2")]
    pub operation: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(int64, optional, tag = "3")]
    pub start_time_unix_nanos: ::core::option::Option<i64>,
    #[prost(int64, optional, tag = "4")]
    pub end_time_unix_nanos: ::core::option::Option<i64>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetThroughputResponse {
    #[prost(double, tag = "1")]
    pub requests_per_second: f64,
    #[prost(double, tag = "2")]
    pub bytes_per_second: f64,
    #[prost(uint64, tag = "3")]
    pub total_requests: u64,
    #[prost(uint64, tag = "4")]
    pub total_bytes: u64,
    #[prost(uint64, tag = "5")]
    pub error_count: u64,
    #[prost(double, tag = "6")]
    pub error_rate: f64,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SubscribeMetricsRequest {
    #[prost(string, repeated, tag = "1")]
    pub metric_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(uint32, tag = "2")]
    pub interval_seconds: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MetricsEvent {
    #[prost(message, repeated, tag = "1")]
    pub metrics: ::prost::alloc::vec::Vec<Metric>,
    #[prost(int64, tag = "2")]
    pub timestamp_unix_nanos: i64,
}
/// Configuration messages
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateParametersRequest {
    #[prost(map = "string, string", tag = "1")]
    pub parameters: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    #[prost(bool, tag = "2")]
    pub persist: bool,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UpdateParametersResponse {
    #[prost(bool, tag = "1")]
    pub success: bool,
    #[prost(string, tag = "2")]
    pub message: ::prost::alloc::string::String,
    #[prost(string, repeated, tag = "3")]
    pub updated_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetConfigRequest {
    /// Empty to get all config
    #[prost(string, repeated, tag = "1")]
    pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetConfigResponse {
    #[prost(map = "string, string", tag = "1")]
    pub config: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    #[prost(int64, tag = "2")]
    pub version: i64,
    #[prost(int64, tag = "3")]
    pub last_updated_unix_nanos: i64,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SubscribeConfigRequest {
    /// Empty to watch all config changes
    #[prost(string, repeated, tag = "1")]
    pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ConfigEvent {
    #[prost(string, tag = "1")]
    pub key: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub value: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub old_value: ::prost::alloc::string::String,
    #[prost(int64, tag = "4")]
    pub timestamp_unix_nanos: i64,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetSystemStatusRequest {
    /// Empty to get all services
    #[prost(string, repeated, tag = "1")]
    pub service_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSystemStatusResponse {
    #[prost(enumeration = "SystemStatus", tag = "1")]
    pub overall_status: i32,
    #[prost(message, repeated, tag = "2")]
    pub services: ::prost::alloc::vec::Vec<ServiceStatus>,
    #[prost(int64, tag = "3")]
    pub timestamp_unix_nanos: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ServiceStatus {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    #[prost(enumeration = "SystemStatus", tag = "2")]
    pub status: i32,
    #[prost(string, tag = "3")]
    pub message: ::prost::alloc::string::String,
    #[prost(int64, tag = "4")]
    pub last_check_unix_nanos: i64,
    #[prost(map = "string, string", tag = "5")]
    pub details: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SubscribeSystemStatusRequest {
    #[prost(string, repeated, tag = "1")]
    pub service_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SystemStatusEvent {
    #[prost(string, tag = "1")]
    pub service_name: ::prost::alloc::string::String,
    #[prost(enumeration = "SystemStatus", tag = "2")]
    pub status: i32,
    #[prost(enumeration = "SystemStatus", tag = "3")]
    pub previous_status: i32,
    #[prost(string, tag = "4")]
    pub message: ::prost::alloc::string::String,
    #[prost(int64, tag = "5")]
    pub timestamp_unix_nanos: i64,
}
/// VaR calculation request
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetVaRRequest {
    #[prost(string, repeated, tag = "1")]
    pub symbols: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// e.g., 0.95, 0.99
    #[prost(double, tag = "2")]
    pub confidence_level: f64,
    #[prost(uint32, tag = "3")]
    pub lookback_days: u32,
    #[prost(enumeration = "VaRMethodology", tag = "4")]
    pub methodology: i32,
}
/// VaR calculation response
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetVaRResponse {
    #[prost(double, tag = "1")]
    pub portfolio_var: f64,
    #[prost(message, repeated, tag = "2")]
    pub symbol_vars: ::prost::alloc::vec::Vec<SymbolVaR>,
    #[prost(int64, tag = "3")]
    pub timestamp_unix_nanos: i64,
    #[prost(string, tag = "4")]
    pub methodology_used: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SymbolVaR {
    #[prost(string, tag = "1")]
    pub symbol: ::prost::alloc::string::String,
    #[prost(double, tag = "2")]
    pub var_amount: f64,
    #[prost(double, tag = "3")]
    pub contribution_percent: f64,
}
/// Position risk analysis
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetPositionRiskRequest {
    /// Empty for all positions
    #[prost(string, optional, tag = "1")]
    pub symbol: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPositionRiskResponse {
    #[prost(message, repeated, tag = "1")]
    pub positions: ::prost::alloc::vec::Vec<PositionRisk>,
    #[prost(double, tag = "2")]
    pub total_exposure: f64,
    #[prost(double, tag = "3")]
    pub concentration_risk: f64,
    #[prost(int64, tag = "4")]
    pub timestamp_unix_nanos: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PositionRisk {
    #[prost(string, tag = "1")]
    pub symbol: ::prost::alloc::string::String,
    #[prost(double, tag = "2")]
    pub position_size: f64,
    #[prost(double, tag = "3")]
    pub market_value: f64,
    #[prost(double, tag = "4")]
    pub var_contribution: f64,
    #[prost(double, tag = "5")]
    pub concentration_percent: f64,
    #[prost(enumeration = "RiskLevel", tag = "6")]
    pub risk_level: i32,
}
/// Order validation request
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValidateOrderRequest {
    #[prost(string, tag = "1")]
    pub symbol: ::prost::alloc::string::String,
    #[prost(enumeration = "OrderSide", tag = "2")]
    pub side: i32,
    #[prost(double, tag = "3")]
    pub quantity: f64,
    #[prost(double, tag = "4")]
    pub price: f64,
    #[prost(string, tag = "5")]
    pub account_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValidateOrderResponse {
    #[prost(bool, tag = "1")]
    pub approved: bool,
    #[prost(string, tag = "2")]
    pub reason: ::prost::alloc::string::String,
    #[prost(message, repeated, tag = "3")]
    pub violations: ::prost::alloc::vec::Vec<RiskViolation>,
    #[prost(double, tag = "4")]
    pub projected_exposure: f64,
    #[prost(double, tag = "5")]
    pub margin_impact: f64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RiskViolation {
    #[prost(enumeration = "ViolationType", tag = "1")]
    pub r#type: i32,
    #[prost(string, tag = "2")]
    pub description: ::prost::alloc::string::String,
    #[prost(double, tag = "3")]
    pub limit_value: f64,
    #[prost(double, tag = "4")]
    pub current_value: f64,
    #[prost(enumeration = "RiskSeverity", tag = "5")]
    pub severity: i32,
}
/// Risk metrics request
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetRiskMetricsRequest {
    #[prost(string, optional, tag = "1")]
    pub portfolio_id: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(int64, optional, tag = "2")]
    pub start_time_unix_nanos: ::core::option::Option<i64>,
    #[prost(int64, optional, tag = "3")]
    pub end_time_unix_nanos: ::core::option::Option<i64>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetRiskMetricsResponse {
    #[prost(double, tag = "1")]
    pub sharpe_ratio: f64,
    #[prost(double, tag = "2")]
    pub max_drawdown: f64,
    #[prost(double, tag = "3")]
    pub current_drawdown: f64,
    #[prost(double, tag = "4")]
    pub volatility: f64,
    #[prost(double, tag = "5")]
    pub beta: f64,
    #[prost(double, tag = "6")]
    pub alpha: f64,
    #[prost(double, tag = "7")]
    pub value_at_risk: f64,
    #[prost(double, tag = "8")]
    pub expected_shortfall: f64,
    #[prost(int64, tag = "9")]
    pub timestamp_unix_nanos: i64,
}
/// Risk alerts subscription
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SubscribeRiskAlertsRequest {
    #[prost(enumeration = "RiskSeverity", repeated, tag = "1")]
    pub min_severity: ::prost::alloc::vec::Vec<i32>,
    /// Empty for all symbols
    #[prost(string, repeated, tag = "2")]
    pub symbols: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RiskAlertEvent {
    #[prost(string, tag = "1")]
    pub alert_id: ::prost::alloc::string::String,
    #[prost(enumeration = "RiskSeverity", tag = "2")]
    pub severity: i32,
    #[prost(string, tag = "3")]
    pub symbol: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub message: ::prost::alloc::string::String,
    #[prost(double, tag = "5")]
    pub threshold_value: f64,
    #[prost(double, tag = "6")]
    pub current_value: f64,
    #[prost(int64, tag = "7")]
    pub timestamp_unix_nanos: i64,
    #[prost(bool, tag = "8")]
    pub requires_action: bool,
}
/// Emergency stop
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct EmergencyStopRequest {
    #[prost(enumeration = "EmergencyStopType", tag = "1")]
    pub stop_type: i32,
    #[prost(string, tag = "2")]
    pub reason: ::prost::alloc::string::String,
    /// Empty for all
    #[prost(string, repeated, tag = "3")]
    pub symbols: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(bool, tag = "4")]
    pub confirm: bool,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct EmergencyStopResponse {
    #[prost(bool, tag = "1")]
    pub success: bool,
    #[prost(string, tag = "2")]
    pub message: ::prost::alloc::string::String,
    #[prost(uint32, tag = "3")]
    pub orders_cancelled: u32,
    #[prost(uint32, tag = "4")]
    pub positions_closed: u32,
    #[prost(int64, tag = "5")]
    pub timestamp_unix_nanos: i64,
}
/// Start backtest request
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartBacktestRequest {
    #[prost(string, tag = "1")]
    pub strategy_name: ::prost::alloc::string::String,
    #[prost(string, repeated, tag = "2")]
    pub symbols: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(int64, tag = "3")]
    pub start_date_unix_nanos: i64,
    #[prost(int64, tag = "4")]
    pub end_date_unix_nanos: i64,
    #[prost(double, tag = "5")]
    pub initial_capital: f64,
    #[prost(map = "string, string", tag = "6")]
    pub parameters: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    #[prost(bool, tag = "7")]
    pub save_results: bool,
    #[prost(string, tag = "8")]
    pub description: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StartBacktestResponse {
    #[prost(bool, tag = "1")]
    pub success: bool,
    #[prost(string, tag = "2")]
    pub backtest_id: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub message: ::prost::alloc::string::String,
    #[prost(int64, tag = "4")]
    pub estimated_duration_seconds: i64,
}
/// Backtest status
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetBacktestStatusRequest {
    #[prost(string, tag = "1")]
    pub backtest_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBacktestStatusResponse {
    #[prost(string, tag = "1")]
    pub backtest_id: ::prost::alloc::string::String,
    #[prost(enumeration = "BacktestStatus", tag = "2")]
    pub status: i32,
    #[prost(double, tag = "3")]
    pub progress_percentage: f64,
    #[prost(string, tag = "4")]
    pub current_date: ::prost::alloc::string::String,
    #[prost(uint64, tag = "5")]
    pub trades_executed: u64,
    #[prost(double, tag = "6")]
    pub current_pnl: f64,
    #[prost(int64, tag = "7")]
    pub started_at_unix_nanos: i64,
    #[prost(int64, optional, tag = "8")]
    pub completed_at_unix_nanos: ::core::option::Option<i64>,
    #[prost(string, optional, tag = "9")]
    pub error_message: ::core::option::Option<::prost::alloc::string::String>,
}
/// Backtest results
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetBacktestResultsRequest {
    #[prost(string, tag = "1")]
    pub backtest_id: ::prost::alloc::string::String,
    #[prost(bool, tag = "2")]
    pub include_trades: bool,
    #[prost(bool, tag = "3")]
    pub include_metrics: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBacktestResultsResponse {
    #[prost(string, tag = "1")]
    pub backtest_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub metrics: ::core::option::Option<BacktestMetrics>,
    #[prost(message, repeated, tag = "3")]
    pub trades: ::prost::alloc::vec::Vec<Trade>,
    #[prost(message, repeated, tag = "4")]
    pub equity_curve: ::prost::alloc::vec::Vec<EquityCurvePoint>,
    #[prost(message, repeated, tag = "5")]
    pub drawdown_periods: ::prost::alloc::vec::Vec<DrawdownPeriod>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct BacktestMetrics {
    #[prost(double, tag = "1")]
    pub total_return: f64,
    #[prost(double, tag = "2")]
    pub annualized_return: f64,
    #[prost(double, tag = "3")]
    pub sharpe_ratio: f64,
    #[prost(double, tag = "4")]
    pub sortino_ratio: f64,
    #[prost(double, tag = "5")]
    pub max_drawdown: f64,
    #[prost(double, tag = "6")]
    pub volatility: f64,
    #[prost(double, tag = "7")]
    pub win_rate: f64,
    #[prost(double, tag = "8")]
    pub profit_factor: f64,
    #[prost(uint64, tag = "9")]
    pub total_trades: u64,
    #[prost(uint64, tag = "10")]
    pub winning_trades: u64,
    #[prost(uint64, tag = "11")]
    pub losing_trades: u64,
    #[prost(double, tag = "12")]
    pub avg_win: f64,
    #[prost(double, tag = "13")]
    pub avg_loss: f64,
    #[prost(double, tag = "14")]
    pub largest_win: f64,
    #[prost(double, tag = "15")]
    pub largest_loss: f64,
    #[prost(double, tag = "16")]
    pub calmar_ratio: f64,
    #[prost(int64, tag = "17")]
    pub backtest_duration_nanos: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Trade {
    #[prost(string, tag = "1")]
    pub trade_id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub symbol: ::prost::alloc::string::String,
    #[prost(enumeration = "OrderSide", tag = "3")]
    pub side: i32,
    #[prost(double, tag = "4")]
    pub quantity: f64,
    #[prost(double, tag = "5")]
    pub entry_price: f64,
    #[prost(double, tag = "6")]
    pub exit_price: f64,
    #[prost(int64, tag = "7")]
    pub entry_time_unix_nanos: i64,
    #[prost(int64, tag = "8")]
    pub exit_time_unix_nanos: i64,
    #[prost(double, tag = "9")]
    pub pnl: f64,
    #[prost(double, tag = "10")]
    pub return_percent: f64,
    #[prost(string, tag = "11")]
    pub entry_signal: ::prost::alloc::string::String,
    #[prost(string, tag = "12")]
    pub exit_signal: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct EquityCurvePoint {
    #[prost(int64, tag = "1")]
    pub timestamp_unix_nanos: i64,
    #[prost(double, tag = "2")]
    pub equity: f64,
    #[prost(double, tag = "3")]
    pub drawdown: f64,
    #[prost(double, tag = "4")]
    pub benchmark_equity: f64,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DrawdownPeriod {
    #[prost(int64, tag = "1")]
    pub start_time_unix_nanos: i64,
    #[prost(int64, tag = "2")]
    pub end_time_unix_nanos: i64,
    #[prost(double, tag = "3")]
    pub peak_value: f64,
    #[prost(double, tag = "4")]
    pub trough_value: f64,
    #[prost(double, tag = "5")]
    pub drawdown_percent: f64,
    #[prost(uint32, tag = "6")]
    pub duration_days: u32,
}
/// List backtests
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListBacktestsRequest {
    #[prost(uint32, tag = "1")]
    pub limit: u32,
    #[prost(uint32, tag = "2")]
    pub offset: u32,
    #[prost(string, optional, tag = "3")]
    pub strategy_name: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(enumeration = "BacktestStatus", optional, tag = "4")]
    pub status_filter: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBacktestsResponse {
    #[prost(message, repeated, tag = "1")]
    pub backtests: ::prost::alloc::vec::Vec<BacktestSummary>,
    #[prost(uint32, tag = "2")]
    pub total_count: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BacktestSummary {
    #[prost(string, tag = "1")]
    pub backtest_id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub strategy_name: ::prost::alloc::string::String,
    #[prost(string, repeated, tag = "3")]
    pub symbols: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(enumeration = "BacktestStatus", tag = "4")]
    pub status: i32,
    #[prost(double, tag = "5")]
    pub total_return: f64,
    #[prost(double, tag = "6")]
    pub sharpe_ratio: f64,
    #[prost(double, tag = "7")]
    pub max_drawdown: f64,
    #[prost(int64, tag = "8")]
    pub created_at_unix_nanos: i64,
    #[prost(int64, tag = "9")]
    pub start_date_unix_nanos: i64,
    #[prost(int64, tag = "10")]
    pub end_date_unix_nanos: i64,
    #[prost(string, tag = "11")]
    pub description: ::prost::alloc::string::String,
}
/// Backtest progress subscription
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SubscribeBacktestProgressRequest {
    #[prost(string, tag = "1")]
    pub backtest_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BacktestProgressEvent {
    #[prost(string, tag = "1")]
    pub backtest_id: ::prost::alloc::string::String,
    #[prost(double, tag = "2")]
    pub progress_percentage: f64,
    #[prost(string, tag = "3")]
    pub current_date: ::prost::alloc::string::String,
    #[prost(uint64, tag = "4")]
    pub trades_executed: u64,
    #[prost(double, tag = "5")]
    pub current_pnl: f64,
    #[prost(double, tag = "6")]
    pub current_equity: f64,
    #[prost(enumeration = "BacktestStatus", tag = "7")]
    pub status: i32,
    #[prost(int64, tag = "8")]
    pub timestamp_unix_nanos: i64,
}
/// Stop backtest
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StopBacktestRequest {
    #[prost(string, tag = "1")]
    pub backtest_id: ::prost::alloc::string::String,
    #[prost(bool, tag = "2")]
    pub save_partial_results: bool,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StopBacktestResponse {
    #[prost(bool, tag = "1")]
    pub success: bool,
    #[prost(string, tag = "2")]
    pub message: ::prost::alloc::string::String,
    #[prost(bool, tag = "3")]
    pub results_saved: bool,
}
/// Submit ML-powered order request
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SubmitMlOrderRequest {
    /// Trading symbol (e.g., "ES.FUT")
    #[prost(string, tag = "1")]
    pub symbol: ::prost::alloc::string::String,
    /// Trading account identifier
    #[prost(string, tag = "2")]
    pub account_id: ::prost::alloc::string::String,
    /// Optional model filter: "DQN", "MAMBA2", "PPO", "TFT", or null for ensemble
    #[prost(string, optional, tag = "3")]
    pub model_filter: ::core::option::Option<::prost::alloc::string::String>,
}
/// Submit ML-powered order response
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubmitMlOrderResponse {
    /// Order ID if executed
    #[prost(string, tag = "1")]
    pub order_id: ::prost::alloc::string::String,
    /// Trading symbol
    #[prost(string, tag = "2")]
    pub symbol: ::prost::alloc::string::String,
    /// "Ensemble" or specific model name
    #[prost(string, tag = "3")]
    pub model_used: ::prost::alloc::string::String,
    /// Action taken: BUY, SELL, HOLD
    #[prost(string, tag = "4")]
    pub predicted_action: ::prost::alloc::string::String,
    /// Prediction confidence (0.0-1.0)
    #[prost(double, tag = "5")]
    pub confidence: f64,
    /// Order quantity
    #[prost(int32, tag = "6")]
    pub quantity: i32,
    /// True if order was submitted
    #[prost(bool, tag = "7")]
    pub executed: bool,
    /// Status message
    #[prost(string, tag = "8")]
    pub message: ::prost::alloc::string::String,
}
/// Get ML predictions request
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetMlPredictionsRequest {
    /// Trading symbol to filter by
    #[prost(string, tag = "1")]
    pub symbol: ::prost::alloc::string::String,
    /// Optional model filter
    #[prost(string, optional, tag = "2")]
    pub model_filter: ::core::option::Option<::prost::alloc::string::String>,
    /// Maximum predictions to return (default: 10)
    #[prost(int32, optional, tag = "3")]
    pub limit: ::core::option::Option<i32>,
}
/// Get ML predictions response
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMlPredictionsResponse {
    /// List of predictions with outcomes
    #[prost(message, repeated, tag = "1")]
    pub predictions: ::prost::alloc::vec::Vec<MlPrediction>,
}
/// Single ML prediction with outcome
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MlPrediction {
    /// Prediction timestamp (ISO 8601)
    #[prost(string, tag = "1")]
    pub timestamp: ::prost::alloc::string::String,
    /// Model identifier
    #[prost(string, tag = "2")]
    pub model_id: ::prost::alloc::string::String,
    /// Trading symbol
    #[prost(string, tag = "3")]
    pub symbol: ::prost::alloc::string::String,
    /// Predicted action: BUY, SELL, HOLD
    #[prost(string, tag = "4")]
    pub predicted_action: ::prost::alloc::string::String,
    /// Prediction confidence (0.0-1.0)
    #[prost(double, tag = "5")]
    pub confidence: f64,
    /// Actual return if outcome known
    #[prost(double, optional, tag = "6")]
    pub actual_return: ::core::option::Option<f64>,
}
/// Get ML performance request
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetMlPerformanceRequest {
    /// Optional model filter
    #[prost(string, optional, tag = "1")]
    pub model_filter: ::core::option::Option<::prost::alloc::string::String>,
}
/// Get ML performance response
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMlPerformanceResponse {
    /// Performance metrics per model
    #[prost(message, repeated, tag = "1")]
    pub models: ::prost::alloc::vec::Vec<ModelPerformance>,
    /// Ensemble confidence threshold
    #[prost(double, tag = "2")]
    pub ensemble_threshold: f64,
    /// Number of active models
    #[prost(int32, tag = "3")]
    pub active_models: i32,
    /// Total number of models
    #[prost(int32, tag = "4")]
    pub total_models: i32,
}
/// Performance metrics for a single model
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModelPerformance {
    /// Model identifier
    #[prost(string, tag = "1")]
    pub model_id: ::prost::alloc::string::String,
    /// Accuracy rate (0.0-1.0)
    #[prost(double, tag = "2")]
    pub accuracy: f64,
    /// Total predictions made
    #[prost(int64, tag = "3")]
    pub total_predictions: i64,
    /// Risk-adjusted return
    #[prost(double, tag = "4")]
    pub sharpe_ratio: f64,
    /// Average return per prediction
    #[prost(double, tag = "5")]
    pub avg_return: f64,
    /// Maximum drawdown
    #[prost(double, tag = "6")]
    pub max_drawdown: f64,
}
/// Request to get current regime state
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetRegimeStateRequest {
    /// Trading symbol to query
    #[prost(string, tag = "1")]
    pub symbol: ::prost::alloc::string::String,
}
/// Response containing current regime state
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRegimeStateResponse {
    /// Trading symbol
    #[prost(string, tag = "1")]
    pub symbol: ::prost::alloc::string::String,
    /// Current regime: TRENDING, RANGING, VOLATILE, CRISIS
    #[prost(string, tag = "2")]
    pub current_regime: ::prost::alloc::string::String,
    /// Regime confidence (0.0-1.0)
    #[prost(double, tag = "3")]
    pub confidence: f64,
    /// CUSUM S+ statistic
    #[prost(double, tag = "4")]
    pub cusum_s_plus: f64,
    /// CUSUM S- statistic
    #[prost(double, tag = "5")]
    pub cusum_s_minus: f64,
    /// Average Directional Index
    #[prost(double, tag = "6")]
    pub adx: f64,
    /// Regime stability score (0.0-1.0)
    #[prost(double, tag = "7")]
    pub stability: f64,
    /// Transition entropy (0.0-1.0)
    #[prost(double, tag = "8")]
    pub entropy: f64,
    /// Last update timestamp
    #[prost(int64, tag = "9")]
    pub updated_at_unix_nanos: i64,
}
/// Request to get regime transition history
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetRegimeTransitionsRequest {
    /// Trading symbol to query
    #[prost(string, tag = "1")]
    pub symbol: ::prost::alloc::string::String,
    /// Maximum transitions to return (default: 100)
    #[prost(int32, tag = "2")]
    pub limit: i32,
}
/// Response containing regime transition history
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRegimeTransitionsResponse {
    /// List of regime transitions
    #[prost(message, repeated, tag = "1")]
    pub transitions: ::prost::alloc::vec::Vec<RegimeTransition>,
}
/// Single regime transition record
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegimeTransition {
    /// Previous regime
    #[prost(string, tag = "1")]
    pub from_regime: ::prost::alloc::string::String,
    /// New regime
    #[prost(string, tag = "2")]
    pub to_regime: ::prost::alloc::string::String,
    /// Duration in previous regime (bars)
    #[prost(int32, tag = "3")]
    pub duration_bars: i32,
    /// Transition probability from matrix
    #[prost(double, tag = "4")]
    pub transition_probability: f64,
    /// Transition timestamp
    #[prost(int64, tag = "5")]
    pub timestamp_unix_nanos: i64,
}
/// Order direction for trading operations
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum OrderSide {
    /// Default/unknown side
    Unspecified = 0,
    /// Buy order (long position)
    Buy = 1,
    /// Sell order (short position)
    Sell = 2,
}
impl OrderSide {
    /// 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 => "ORDER_SIDE_UNSPECIFIED",
            Self::Buy => "ORDER_SIDE_BUY",
            Self::Sell => "ORDER_SIDE_SELL",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "ORDER_SIDE_UNSPECIFIED" => Some(Self::Unspecified),
            "ORDER_SIDE_BUY" => Some(Self::Buy),
            "ORDER_SIDE_SELL" => Some(Self::Sell),
            _ => None,
        }
    }
}
/// Order execution type
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum OrderType {
    /// Default/unknown type
    Unspecified = 0,
    /// Execute immediately at market price
    Market = 1,
    /// Execute only at specified price or better
    Limit = 2,
    /// Market order triggered at stop price
    Stop = 3,
    /// Limit order triggered at stop price
    StopLimit = 4,
}
impl OrderType {
    /// 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 => "ORDER_TYPE_UNSPECIFIED",
            Self::Market => "ORDER_TYPE_MARKET",
            Self::Limit => "ORDER_TYPE_LIMIT",
            Self::Stop => "ORDER_TYPE_STOP",
            Self::StopLimit => "ORDER_TYPE_STOP_LIMIT",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "ORDER_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "ORDER_TYPE_MARKET" => Some(Self::Market),
            "ORDER_TYPE_LIMIT" => Some(Self::Limit),
            "ORDER_TYPE_STOP" => Some(Self::Stop),
            "ORDER_TYPE_STOP_LIMIT" => Some(Self::StopLimit),
            _ => None,
        }
    }
}
/// Current lifecycle status of orders
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum OrderStatus {
    /// Default/unknown status
    Unspecified = 0,
    /// Order created and submitted
    New = 1,
    /// Order partially executed
    PartiallyFilled = 2,
    /// Order completely executed
    Filled = 3,
    /// Order cancelled
    Cancelled = 4,
    /// Order rejected by exchange or system
    Rejected = 5,
    /// Cancellation request pending
    PendingCancel = 6,
}
impl OrderStatus {
    /// 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 => "ORDER_STATUS_UNSPECIFIED",
            Self::New => "ORDER_STATUS_NEW",
            Self::PartiallyFilled => "ORDER_STATUS_PARTIALLY_FILLED",
            Self::Filled => "ORDER_STATUS_FILLED",
            Self::Cancelled => "ORDER_STATUS_CANCELLED",
            Self::Rejected => "ORDER_STATUS_REJECTED",
            Self::PendingCancel => "ORDER_STATUS_PENDING_CANCEL",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "ORDER_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
            "ORDER_STATUS_NEW" => Some(Self::New),
            "ORDER_STATUS_PARTIALLY_FILLED" => Some(Self::PartiallyFilled),
            "ORDER_STATUS_FILLED" => Some(Self::Filled),
            "ORDER_STATUS_CANCELLED" => Some(Self::Cancelled),
            "ORDER_STATUS_REJECTED" => Some(Self::Rejected),
            "ORDER_STATUS_PENDING_CANCEL" => Some(Self::PendingCancel),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum MarketDataType {
    Unspecified = 0,
    Ticks = 1,
    Quotes = 2,
    Trades = 3,
    Bars = 4,
}
impl MarketDataType {
    /// 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 => "MARKET_DATA_TYPE_UNSPECIFIED",
            Self::Ticks => "MARKET_DATA_TYPE_TICKS",
            Self::Quotes => "MARKET_DATA_TYPE_QUOTES",
            Self::Trades => "MARKET_DATA_TYPE_TRADES",
            Self::Bars => "MARKET_DATA_TYPE_BARS",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "MARKET_DATA_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "MARKET_DATA_TYPE_TICKS" => Some(Self::Ticks),
            "MARKET_DATA_TYPE_QUOTES" => Some(Self::Quotes),
            "MARKET_DATA_TYPE_TRADES" => Some(Self::Trades),
            "MARKET_DATA_TYPE_BARS" => Some(Self::Bars),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SystemStatus {
    Unknown = 0,
    Healthy = 1,
    Degraded = 2,
    Unhealthy = 3,
    Critical = 4,
}
impl SystemStatus {
    /// 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::Unknown => "SYSTEM_STATUS_UNKNOWN",
            Self::Healthy => "SYSTEM_STATUS_HEALTHY",
            Self::Degraded => "SYSTEM_STATUS_DEGRADED",
            Self::Unhealthy => "SYSTEM_STATUS_UNHEALTHY",
            Self::Critical => "SYSTEM_STATUS_CRITICAL",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "SYSTEM_STATUS_UNKNOWN" => Some(Self::Unknown),
            "SYSTEM_STATUS_HEALTHY" => Some(Self::Healthy),
            "SYSTEM_STATUS_DEGRADED" => Some(Self::Degraded),
            "SYSTEM_STATUS_UNHEALTHY" => Some(Self::Unhealthy),
            "SYSTEM_STATUS_CRITICAL" => Some(Self::Critical),
            _ => None,
        }
    }
}
/// Additional enums for risk and backtesting
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum VaRMethodology {
    VarMethodologyUnspecified = 0,
    VarMethodologyHistorical = 1,
    VarMethodologyMonteCarlo = 2,
    VarMethodologyParametric = 3,
    VarMethodologyExpectedShortfall = 4,
}
impl VaRMethodology {
    /// 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::VarMethodologyUnspecified => "VAR_METHODOLOGY_UNSPECIFIED",
            Self::VarMethodologyHistorical => "VAR_METHODOLOGY_HISTORICAL",
            Self::VarMethodologyMonteCarlo => "VAR_METHODOLOGY_MONTE_CARLO",
            Self::VarMethodologyParametric => "VAR_METHODOLOGY_PARAMETRIC",
            Self::VarMethodologyExpectedShortfall => "VAR_METHODOLOGY_EXPECTED_SHORTFALL",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "VAR_METHODOLOGY_UNSPECIFIED" => Some(Self::VarMethodologyUnspecified),
            "VAR_METHODOLOGY_HISTORICAL" => Some(Self::VarMethodologyHistorical),
            "VAR_METHODOLOGY_MONTE_CARLO" => Some(Self::VarMethodologyMonteCarlo),
            "VAR_METHODOLOGY_PARAMETRIC" => Some(Self::VarMethodologyParametric),
            "VAR_METHODOLOGY_EXPECTED_SHORTFALL" => {
                Some(Self::VarMethodologyExpectedShortfall)
            }
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum RiskLevel {
    Unspecified = 0,
    Low = 1,
    Medium = 2,
    High = 3,
    Critical = 4,
}
impl RiskLevel {
    /// 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 => "RISK_LEVEL_UNSPECIFIED",
            Self::Low => "RISK_LEVEL_LOW",
            Self::Medium => "RISK_LEVEL_MEDIUM",
            Self::High => "RISK_LEVEL_HIGH",
            Self::Critical => "RISK_LEVEL_CRITICAL",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "RISK_LEVEL_UNSPECIFIED" => Some(Self::Unspecified),
            "RISK_LEVEL_LOW" => Some(Self::Low),
            "RISK_LEVEL_MEDIUM" => Some(Self::Medium),
            "RISK_LEVEL_HIGH" => Some(Self::High),
            "RISK_LEVEL_CRITICAL" => Some(Self::Critical),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ViolationType {
    Unspecified = 0,
    PositionLimit = 1,
    Concentration = 2,
    VarLimit = 3,
    Margin = 4,
    Drawdown = 5,
}
impl ViolationType {
    /// 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 => "VIOLATION_TYPE_UNSPECIFIED",
            Self::PositionLimit => "VIOLATION_TYPE_POSITION_LIMIT",
            Self::Concentration => "VIOLATION_TYPE_CONCENTRATION",
            Self::VarLimit => "VIOLATION_TYPE_VAR_LIMIT",
            Self::Margin => "VIOLATION_TYPE_MARGIN",
            Self::Drawdown => "VIOLATION_TYPE_DRAWDOWN",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "VIOLATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "VIOLATION_TYPE_POSITION_LIMIT" => Some(Self::PositionLimit),
            "VIOLATION_TYPE_CONCENTRATION" => Some(Self::Concentration),
            "VIOLATION_TYPE_VAR_LIMIT" => Some(Self::VarLimit),
            "VIOLATION_TYPE_MARGIN" => Some(Self::Margin),
            "VIOLATION_TYPE_DRAWDOWN" => Some(Self::Drawdown),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum RiskSeverity {
    Unspecified = 0,
    Info = 1,
    Warning = 2,
    Critical = 3,
    Emergency = 4,
}
impl RiskSeverity {
    /// 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 => "RISK_SEVERITY_UNSPECIFIED",
            Self::Info => "RISK_SEVERITY_INFO",
            Self::Warning => "RISK_SEVERITY_WARNING",
            Self::Critical => "RISK_SEVERITY_CRITICAL",
            Self::Emergency => "RISK_SEVERITY_EMERGENCY",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "RISK_SEVERITY_UNSPECIFIED" => Some(Self::Unspecified),
            "RISK_SEVERITY_INFO" => Some(Self::Info),
            "RISK_SEVERITY_WARNING" => Some(Self::Warning),
            "RISK_SEVERITY_CRITICAL" => Some(Self::Critical),
            "RISK_SEVERITY_EMERGENCY" => Some(Self::Emergency),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum EmergencyStopType {
    Unspecified = 0,
    CancelOrders = 1,
    ClosePositions = 2,
    FullShutdown = 3,
}
impl EmergencyStopType {
    /// 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 => "EMERGENCY_STOP_TYPE_UNSPECIFIED",
            Self::CancelOrders => "EMERGENCY_STOP_TYPE_CANCEL_ORDERS",
            Self::ClosePositions => "EMERGENCY_STOP_TYPE_CLOSE_POSITIONS",
            Self::FullShutdown => "EMERGENCY_STOP_TYPE_FULL_SHUTDOWN",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "EMERGENCY_STOP_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "EMERGENCY_STOP_TYPE_CANCEL_ORDERS" => Some(Self::CancelOrders),
            "EMERGENCY_STOP_TYPE_CLOSE_POSITIONS" => Some(Self::ClosePositions),
            "EMERGENCY_STOP_TYPE_FULL_SHUTDOWN" => Some(Self::FullShutdown),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum BacktestStatus {
    Unspecified = 0,
    Queued = 1,
    Running = 2,
    Completed = 3,
    Failed = 4,
    Cancelled = 5,
    Paused = 6,
}
impl BacktestStatus {
    /// 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 => "BACKTEST_STATUS_UNSPECIFIED",
            Self::Queued => "BACKTEST_STATUS_QUEUED",
            Self::Running => "BACKTEST_STATUS_RUNNING",
            Self::Completed => "BACKTEST_STATUS_COMPLETED",
            Self::Failed => "BACKTEST_STATUS_FAILED",
            Self::Cancelled => "BACKTEST_STATUS_CANCELLED",
            Self::Paused => "BACKTEST_STATUS_PAUSED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "BACKTEST_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
            "BACKTEST_STATUS_QUEUED" => Some(Self::Queued),
            "BACKTEST_STATUS_RUNNING" => Some(Self::Running),
            "BACKTEST_STATUS_COMPLETED" => Some(Self::Completed),
            "BACKTEST_STATUS_FAILED" => Some(Self::Failed),
            "BACKTEST_STATUS_CANCELLED" => Some(Self::Cancelled),
            "BACKTEST_STATUS_PAUSED" => Some(Self::Paused),
            _ => None,
        }
    }
}
/// Generated client implementations.
#[allow(unused_qualifications)]
pub mod trading_service_client {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// TLI Trading Service provides a unified client interface for all HFT trading operations.
    /// This service integrates trading, risk management, monitoring, and configuration capabilities
    /// into a single comprehensive API for the Terminal Line Interface (TLI) client application.
    #[derive(Debug, Clone)]
    pub struct TradingServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl TradingServiceClient<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> TradingServiceClient<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,
        ) -> TradingServiceClient<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,
        {
            TradingServiceClient::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
        }
        /// Core Trading Operations
        /// Submit a new trading order with validation
        pub async fn submit_order(
            &mut self,
            request: impl tonic::IntoRequest<super::SubmitOrderRequest>,
        ) -> std::result::Result<
            tonic::Response<super::SubmitOrderResponse>,
            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(
                "/foxhunt.tli.TradingService/SubmitOrder",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("foxhunt.tli.TradingService", "SubmitOrder"));
            self.inner.unary(req, path, codec).await
        }
        /// Cancel an existing order by ID
        pub async fn cancel_order(
            &mut self,
            request: impl tonic::IntoRequest<super::CancelOrderRequest>,
        ) -> std::result::Result<
            tonic::Response<super::CancelOrderResponse>,
            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(
                "/foxhunt.tli.TradingService/CancelOrder",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("foxhunt.tli.TradingService", "CancelOrder"));
            self.inner.unary(req, path, codec).await
        }
        /// Get current status of a specific order
        pub async fn get_order_status(
            &mut self,
            request: impl tonic::IntoRequest<super::GetOrderStatusRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetOrderStatusResponse>,
            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(
                "/foxhunt.tli.TradingService/GetOrderStatus",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("foxhunt.tli.TradingService", "GetOrderStatus"));
            self.inner.unary(req, path, codec).await
        }
        /// Get account information and balances
        pub async fn get_account_info(
            &mut self,
            request: impl tonic::IntoRequest<super::GetAccountInfoRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetAccountInfoResponse>,
            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(
                "/foxhunt.tli.TradingService/GetAccountInfo",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("foxhunt.tli.TradingService", "GetAccountInfo"));
            self.inner.unary(req, path, codec).await
        }
        /// Get current portfolio positions
        pub async fn get_positions(
            &mut self,
            request: impl tonic::IntoRequest<super::GetPositionsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetPositionsResponse>,
            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(
                "/foxhunt.tli.TradingService/GetPositions",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("foxhunt.tli.TradingService", "GetPositions"));
            self.inner.unary(req, path, codec).await
        }
        /// Subscribe to real-time market data feeds
        pub async fn subscribe_market_data(
            &mut self,
            request: impl tonic::IntoRequest<super::SubscribeMarketDataRequest>,
        ) -> std::result::Result<
            tonic::Response<tonic::codec::Streaming<super::MarketDataEvent>>,
            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(
                "/foxhunt.tli.TradingService/SubscribeMarketData",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("foxhunt.tli.TradingService", "SubscribeMarketData"),
                );
            self.inner.server_streaming(req, path, codec).await
        }
        /// Subscribe to real-time order status updates
        pub async fn subscribe_order_updates(
            &mut self,
            request: impl tonic::IntoRequest<super::SubscribeOrderUpdatesRequest>,
        ) -> std::result::Result<
            tonic::Response<tonic::codec::Streaming<super::OrderUpdateEvent>>,
            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(
                "/foxhunt.tli.TradingService/SubscribeOrderUpdates",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "foxhunt.tli.TradingService",
                        "SubscribeOrderUpdates",
                    ),
                );
            self.inner.server_streaming(req, path, codec).await
        }
        /// Integrated Risk Management
        /// Calculate portfolio Value at Risk (VaR)
        pub async fn get_va_r(
            &mut self,
            request: impl tonic::IntoRequest<super::GetVaRRequest>,
        ) -> std::result::Result<tonic::Response<super::GetVaRResponse>, 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(
                "/foxhunt.tli.TradingService/GetVaR",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("foxhunt.tli.TradingService", "GetVaR"));
            self.inner.unary(req, path, codec).await
        }
        /// Analyze position-level risk exposure
        pub async fn get_position_risk(
            &mut self,
            request: impl tonic::IntoRequest<super::GetPositionRiskRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetPositionRiskResponse>,
            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(
                "/foxhunt.tli.TradingService/GetPositionRisk",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("foxhunt.tli.TradingService", "GetPositionRisk"),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Validate order against risk limits before submission
        pub async fn validate_order(
            &mut self,
            request: impl tonic::IntoRequest<super::ValidateOrderRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ValidateOrderResponse>,
            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(
                "/foxhunt.tli.TradingService/ValidateOrder",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("foxhunt.tli.TradingService", "ValidateOrder"));
            self.inner.unary(req, path, codec).await
        }
        /// Get comprehensive portfolio risk metrics
        pub async fn get_risk_metrics(
            &mut self,
            request: impl tonic::IntoRequest<super::GetRiskMetricsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetRiskMetricsResponse>,
            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(
                "/foxhunt.tli.TradingService/GetRiskMetrics",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("foxhunt.tli.TradingService", "GetRiskMetrics"));
            self.inner.unary(req, path, codec).await
        }
        /// Subscribe to real-time risk alerts and violations
        pub async fn subscribe_risk_alerts(
            &mut self,
            request: impl tonic::IntoRequest<super::SubscribeRiskAlertsRequest>,
        ) -> std::result::Result<
            tonic::Response<tonic::codec::Streaming<super::RiskAlertEvent>>,
            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(
                "/foxhunt.tli.TradingService/SubscribeRiskAlerts",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("foxhunt.tli.TradingService", "SubscribeRiskAlerts"),
                );
            self.inner.server_streaming(req, path, codec).await
        }
        /// Emergency stop with immediate trading halt
        pub async fn emergency_stop(
            &mut self,
            request: impl tonic::IntoRequest<super::EmergencyStopRequest>,
        ) -> std::result::Result<
            tonic::Response<super::EmergencyStopResponse>,
            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(
                "/foxhunt.tli.TradingService/EmergencyStop",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("foxhunt.tli.TradingService", "EmergencyStop"));
            self.inner.unary(req, path, codec).await
        }
        /// Integrated System Monitoring
        /// Get system performance metrics
        pub async fn get_metrics(
            &mut self,
            request: impl tonic::IntoRequest<super::GetMetricsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetMetricsResponse>,
            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(
                "/foxhunt.tli.TradingService/GetMetrics",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("foxhunt.tli.TradingService", "GetMetrics"));
            self.inner.unary(req, path, codec).await
        }
        /// Get latency performance statistics
        pub async fn get_latency(
            &mut self,
            request: impl tonic::IntoRequest<super::GetLatencyRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetLatencyResponse>,
            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(
                "/foxhunt.tli.TradingService/GetLatency",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("foxhunt.tli.TradingService", "GetLatency"));
            self.inner.unary(req, path, codec).await
        }
        /// Get throughput and capacity metrics
        pub async fn get_throughput(
            &mut self,
            request: impl tonic::IntoRequest<super::GetThroughputRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetThroughputResponse>,
            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(
                "/foxhunt.tli.TradingService/GetThroughput",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("foxhunt.tli.TradingService", "GetThroughput"));
            self.inner.unary(req, path, codec).await
        }
        /// Subscribe to real-time performance metrics
        pub async fn subscribe_metrics(
            &mut self,
            request: impl tonic::IntoRequest<super::SubscribeMetricsRequest>,
        ) -> std::result::Result<
            tonic::Response<tonic::codec::Streaming<super::MetricsEvent>>,
            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(
                "/foxhunt.tli.TradingService/SubscribeMetrics",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("foxhunt.tli.TradingService", "SubscribeMetrics"),
                );
            self.inner.server_streaming(req, path, codec).await
        }
        /// Integrated Configuration Management
        /// Update system parameters and settings
        pub async fn update_parameters(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateParametersRequest>,
        ) -> std::result::Result<
            tonic::Response<super::UpdateParametersResponse>,
            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(
                "/foxhunt.tli.TradingService/UpdateParameters",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("foxhunt.tli.TradingService", "UpdateParameters"),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Get current configuration values
        pub async fn get_config(
            &mut self,
            request: impl tonic::IntoRequest<super::GetConfigRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetConfigResponse>,
            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(
                "/foxhunt.tli.TradingService/GetConfig",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("foxhunt.tli.TradingService", "GetConfig"));
            self.inner.unary(req, path, codec).await
        }
        /// Subscribe to configuration changes
        pub async fn subscribe_config(
            &mut self,
            request: impl tonic::IntoRequest<super::SubscribeConfigRequest>,
        ) -> std::result::Result<
            tonic::Response<tonic::codec::Streaming<super::ConfigEvent>>,
            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(
                "/foxhunt.tli.TradingService/SubscribeConfig",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("foxhunt.tli.TradingService", "SubscribeConfig"),
                );
            self.inner.server_streaming(req, path, codec).await
        }
        /// Integrated System Health Monitoring
        /// Get overall system health and service status
        pub async fn get_system_status(
            &mut self,
            request: impl tonic::IntoRequest<super::GetSystemStatusRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetSystemStatusResponse>,
            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(
                "/foxhunt.tli.TradingService/GetSystemStatus",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("foxhunt.tli.TradingService", "GetSystemStatus"),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Subscribe to system status changes and alerts
        pub async fn subscribe_system_status(
            &mut self,
            request: impl tonic::IntoRequest<super::SubscribeSystemStatusRequest>,
        ) -> std::result::Result<
            tonic::Response<tonic::codec::Streaming<super::SystemStatusEvent>>,
            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(
                "/foxhunt.tli.TradingService/SubscribeSystemStatus",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "foxhunt.tli.TradingService",
                        "SubscribeSystemStatus",
                    ),
                );
            self.inner.server_streaming(req, path, codec).await
        }
        /// ML Trading Operations
        /// Submit ML-powered trading order with ensemble predictions
        pub async fn submit_ml_order(
            &mut self,
            request: impl tonic::IntoRequest<super::SubmitMlOrderRequest>,
        ) -> std::result::Result<
            tonic::Response<super::SubmitMlOrderResponse>,
            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(
                "/foxhunt.tli.TradingService/SubmitMLOrder",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("foxhunt.tli.TradingService", "SubmitMLOrder"));
            self.inner.unary(req, path, codec).await
        }
        /// Get ML prediction history with outcomes
        pub async fn get_ml_predictions(
            &mut self,
            request: impl tonic::IntoRequest<super::GetMlPredictionsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetMlPredictionsResponse>,
            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(
                "/foxhunt.tli.TradingService/GetMLPredictions",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("foxhunt.tli.TradingService", "GetMLPredictions"),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Get ML model performance metrics
        pub async fn get_ml_performance(
            &mut self,
            request: impl tonic::IntoRequest<super::GetMlPerformanceRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetMlPerformanceResponse>,
            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(
                "/foxhunt.tli.TradingService/GetMLPerformance",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("foxhunt.tli.TradingService", "GetMLPerformance"),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Wave D: Regime Detection Operations
        /// Get current regime state for a symbol
        pub async fn get_regime_state(
            &mut self,
            request: impl tonic::IntoRequest<super::GetRegimeStateRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetRegimeStateResponse>,
            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(
                "/foxhunt.tli.TradingService/GetRegimeState",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("foxhunt.tli.TradingService", "GetRegimeState"));
            self.inner.unary(req, path, codec).await
        }
        /// Get regime transition history for a symbol
        pub async fn get_regime_transitions(
            &mut self,
            request: impl tonic::IntoRequest<super::GetRegimeTransitionsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetRegimeTransitionsResponse>,
            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(
                "/foxhunt.tli.TradingService/GetRegimeTransitions",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("foxhunt.tli.TradingService", "GetRegimeTransitions"),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
/// Generated client implementations.
#[allow(unused_qualifications)]
pub mod backtesting_service_client {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// Backtesting Service provides comprehensive strategy backtesting capabilities for the TLI.
    /// This service allows users to test trading strategies against historical data with detailed
    /// performance analytics, risk metrics, and trade-by-trade analysis.
    #[derive(Debug, Clone)]
    pub struct BacktestingServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl BacktestingServiceClient<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> BacktestingServiceClient<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,
        ) -> BacktestingServiceClient<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,
        {
            BacktestingServiceClient::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
        }
        /// Backtest Execution Management
        /// Start a new strategy backtest with historical data
        pub async fn start_backtest(
            &mut self,
            request: impl tonic::IntoRequest<super::StartBacktestRequest>,
        ) -> std::result::Result<
            tonic::Response<super::StartBacktestResponse>,
            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(
                "/foxhunt.tli.BacktestingService/StartBacktest",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("foxhunt.tli.BacktestingService", "StartBacktest"),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Get current status of a running backtest
        pub async fn get_backtest_status(
            &mut self,
            request: impl tonic::IntoRequest<super::GetBacktestStatusRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetBacktestStatusResponse>,
            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(
                "/foxhunt.tli.BacktestingService/GetBacktestStatus",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "foxhunt.tli.BacktestingService",
                        "GetBacktestStatus",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Get comprehensive backtest results and analytics
        pub async fn get_backtest_results(
            &mut self,
            request: impl tonic::IntoRequest<super::GetBacktestResultsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetBacktestResultsResponse>,
            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(
                "/foxhunt.tli.BacktestingService/GetBacktestResults",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "foxhunt.tli.BacktestingService",
                        "GetBacktestResults",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// List historical backtest runs with filtering
        pub async fn list_backtests(
            &mut self,
            request: impl tonic::IntoRequest<super::ListBacktestsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListBacktestsResponse>,
            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(
                "/foxhunt.tli.BacktestingService/ListBacktests",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("foxhunt.tli.BacktestingService", "ListBacktests"),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Subscribe to real-time backtest progress updates
        pub async fn subscribe_backtest_progress(
            &mut self,
            request: impl tonic::IntoRequest<super::SubscribeBacktestProgressRequest>,
        ) -> std::result::Result<
            tonic::Response<tonic::codec::Streaming<super::BacktestProgressEvent>>,
            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(
                "/foxhunt.tli.BacktestingService/SubscribeBacktestProgress",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "foxhunt.tli.BacktestingService",
                        "SubscribeBacktestProgress",
                    ),
                );
            self.inner.server_streaming(req, path, codec).await
        }
        /// Stop a running backtest and optionally save partial results
        pub async fn stop_backtest(
            &mut self,
            request: impl tonic::IntoRequest<super::StopBacktestRequest>,
        ) -> std::result::Result<
            tonic::Response<super::StopBacktestResponse>,
            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(
                "/foxhunt.tli.BacktestingService/StopBacktest",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("foxhunt.tli.BacktestingService", "StopBacktest"),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
