// @generated
impl serde::Serialize for GetHedgePairDetailRequest {
    #[allow(deprecated)]
    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        use serde::ser::SerializeStruct;
        let mut len = 0;
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        let mut struct_ser = serializer.serialize_struct("kdo.v1.order_log.GetHedgePairDetailRequest", len)?;
        if true {
            #[allow(clippy::needless_borrow)]
            #[allow(clippy::needless_borrows_for_generic_args)]
            struct_ser.serialize_field("order_id", ToString::to_string(&self.order_id).as_str())?;
        }
        if let Some(v) = self.date.as_ref() {
            struct_ser.serialize_field("date", v)?;
        }
        struct_ser.end()
    }
}
impl<'de> serde::Deserialize<'de> for GetHedgePairDetailRequest {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "order_id",
            "orderId",
            "date",
        ];

        #[allow(clippy::enum_variant_names)]
        enum GeneratedField {
            OrderId,
            Date,
            __SkipField__,
        }
        impl<'de> serde::Deserialize<'de> for GeneratedField {
            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
            where
                D: serde::Deserializer<'de>,
            {
                struct GeneratedVisitor;

                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
                    type Value = GeneratedField;

                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                        write!(formatter, "expected one of: {:?}", &FIELDS)
                    }

                    #[allow(unused_variables)]
                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
                    where
                        E: serde::de::Error,
                    {
                        match value {
                            "orderId" | "order_id" => Ok(GeneratedField::OrderId),
                            "date" => Ok(GeneratedField::Date),
                            _ => Ok(GeneratedField::__SkipField__),
                        }
                    }
                }
                deserializer.deserialize_identifier(GeneratedVisitor)
            }
        }
        struct GeneratedVisitor;
        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
            type Value = GetHedgePairDetailRequest;

            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                formatter.write_str("struct kdo.v1.order_log.GetHedgePairDetailRequest")
            }

            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetHedgePairDetailRequest, V::Error>
                where
                    V: serde::de::MapAccess<'de>,
            {
                let mut order_id__ = None;
                let mut date__ = None;
                while let Some(k) = map_.next_key()? {
                    match k {
                        GeneratedField::OrderId => {
                            if order_id__.is_some() {
                                return Err(serde::de::Error::duplicate_field("orderId"));
                            }
                            order_id__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::Date => {
                            if date__.is_some() {
                                return Err(serde::de::Error::duplicate_field("date"));
                            }
                            date__ = 
                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
                            ;
                        }
                        GeneratedField::__SkipField__ => {
                            let _ = map_.next_value::<serde::de::IgnoredAny>()?;
                        }
                    }
                }
                Ok(GetHedgePairDetailRequest {
                    order_id: order_id__.unwrap_or_default(),
                    date: date__,
                })
            }
        }
        deserializer.deserialize_struct("kdo.v1.order_log.GetHedgePairDetailRequest", FIELDS, GeneratedVisitor)
    }
}
impl serde::Serialize for GetOrderChainRequest {
    #[allow(deprecated)]
    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        use serde::ser::SerializeStruct;
        let mut len = 0;
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        let mut struct_ser = serializer.serialize_struct("kdo.v1.order_log.GetOrderChainRequest", len)?;
        if true {
            #[allow(clippy::needless_borrow)]
            #[allow(clippy::needless_borrows_for_generic_args)]
            struct_ser.serialize_field("order_id", ToString::to_string(&self.order_id).as_str())?;
        }
        if let Some(v) = self.date.as_ref() {
            struct_ser.serialize_field("date", v)?;
        }
        struct_ser.end()
    }
}
impl<'de> serde::Deserialize<'de> for GetOrderChainRequest {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "order_id",
            "orderId",
            "date",
        ];

        #[allow(clippy::enum_variant_names)]
        enum GeneratedField {
            OrderId,
            Date,
            __SkipField__,
        }
        impl<'de> serde::Deserialize<'de> for GeneratedField {
            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
            where
                D: serde::Deserializer<'de>,
            {
                struct GeneratedVisitor;

                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
                    type Value = GeneratedField;

                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                        write!(formatter, "expected one of: {:?}", &FIELDS)
                    }

                    #[allow(unused_variables)]
                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
                    where
                        E: serde::de::Error,
                    {
                        match value {
                            "orderId" | "order_id" => Ok(GeneratedField::OrderId),
                            "date" => Ok(GeneratedField::Date),
                            _ => Ok(GeneratedField::__SkipField__),
                        }
                    }
                }
                deserializer.deserialize_identifier(GeneratedVisitor)
            }
        }
        struct GeneratedVisitor;
        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
            type Value = GetOrderChainRequest;

            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                formatter.write_str("struct kdo.v1.order_log.GetOrderChainRequest")
            }

            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetOrderChainRequest, V::Error>
                where
                    V: serde::de::MapAccess<'de>,
            {
                let mut order_id__ = None;
                let mut date__ = None;
                while let Some(k) = map_.next_key()? {
                    match k {
                        GeneratedField::OrderId => {
                            if order_id__.is_some() {
                                return Err(serde::de::Error::duplicate_field("orderId"));
                            }
                            order_id__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::Date => {
                            if date__.is_some() {
                                return Err(serde::de::Error::duplicate_field("date"));
                            }
                            date__ = 
                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
                            ;
                        }
                        GeneratedField::__SkipField__ => {
                            let _ = map_.next_value::<serde::de::IgnoredAny>()?;
                        }
                    }
                }
                Ok(GetOrderChainRequest {
                    order_id: order_id__.unwrap_or_default(),
                    date: date__,
                })
            }
        }
        deserializer.deserialize_struct("kdo.v1.order_log.GetOrderChainRequest", FIELDS, GeneratedVisitor)
    }
}
impl serde::Serialize for GetOrderChainResponse {
    #[allow(deprecated)]
    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        use serde::ser::SerializeStruct;
        let mut len = 0;
        if true {
            len += 1;
        }
        let mut struct_ser = serializer.serialize_struct("kdo.v1.order_log.GetOrderChainResponse", len)?;
        if true {
            struct_ser.serialize_field("order_logs", &self.order_logs)?;
        }
        struct_ser.end()
    }
}
impl<'de> serde::Deserialize<'de> for GetOrderChainResponse {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "order_logs",
            "orderLogs",
        ];

        #[allow(clippy::enum_variant_names)]
        enum GeneratedField {
            OrderLogs,
            __SkipField__,
        }
        impl<'de> serde::Deserialize<'de> for GeneratedField {
            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
            where
                D: serde::Deserializer<'de>,
            {
                struct GeneratedVisitor;

                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
                    type Value = GeneratedField;

                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                        write!(formatter, "expected one of: {:?}", &FIELDS)
                    }

                    #[allow(unused_variables)]
                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
                    where
                        E: serde::de::Error,
                    {
                        match value {
                            "orderLogs" | "order_logs" => Ok(GeneratedField::OrderLogs),
                            _ => Ok(GeneratedField::__SkipField__),
                        }
                    }
                }
                deserializer.deserialize_identifier(GeneratedVisitor)
            }
        }
        struct GeneratedVisitor;
        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
            type Value = GetOrderChainResponse;

            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                formatter.write_str("struct kdo.v1.order_log.GetOrderChainResponse")
            }

            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetOrderChainResponse, V::Error>
                where
                    V: serde::de::MapAccess<'de>,
            {
                let mut order_logs__ = None;
                while let Some(k) = map_.next_key()? {
                    match k {
                        GeneratedField::OrderLogs => {
                            if order_logs__.is_some() {
                                return Err(serde::de::Error::duplicate_field("orderLogs"));
                            }
                            order_logs__ = Some(map_.next_value()?);
                        }
                        GeneratedField::__SkipField__ => {
                            let _ = map_.next_value::<serde::de::IgnoredAny>()?;
                        }
                    }
                }
                Ok(GetOrderChainResponse {
                    order_logs: order_logs__.unwrap_or_default(),
                })
            }
        }
        deserializer.deserialize_struct("kdo.v1.order_log.GetOrderChainResponse", FIELDS, GeneratedVisitor)
    }
}
impl serde::Serialize for GetOrderLogStatisticsRequest {
    #[allow(deprecated)]
    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        use serde::ser::SerializeStruct;
        let mut len = 0;
        if true {
            len += 1;
        }
        let mut struct_ser = serializer.serialize_struct("kdo.v1.order_log.GetOrderLogStatisticsRequest", len)?;
        if true {
            struct_ser.serialize_field("filter", &self.filter)?;
        }
        struct_ser.end()
    }
}
impl<'de> serde::Deserialize<'de> for GetOrderLogStatisticsRequest {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "filter",
        ];

        #[allow(clippy::enum_variant_names)]
        enum GeneratedField {
            Filter,
            __SkipField__,
        }
        impl<'de> serde::Deserialize<'de> for GeneratedField {
            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
            where
                D: serde::Deserializer<'de>,
            {
                struct GeneratedVisitor;

                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
                    type Value = GeneratedField;

                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                        write!(formatter, "expected one of: {:?}", &FIELDS)
                    }

                    #[allow(unused_variables)]
                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
                    where
                        E: serde::de::Error,
                    {
                        match value {
                            "filter" => Ok(GeneratedField::Filter),
                            _ => Ok(GeneratedField::__SkipField__),
                        }
                    }
                }
                deserializer.deserialize_identifier(GeneratedVisitor)
            }
        }
        struct GeneratedVisitor;
        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
            type Value = GetOrderLogStatisticsRequest;

            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                formatter.write_str("struct kdo.v1.order_log.GetOrderLogStatisticsRequest")
            }

            fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetOrderLogStatisticsRequest, V::Error>
                where
                    V: serde::de::MapAccess<'de>,
            {
                let mut filter__ = None;
                while let Some(k) = map_.next_key()? {
                    match k {
                        GeneratedField::Filter => {
                            if filter__.is_some() {
                                return Err(serde::de::Error::duplicate_field("filter"));
                            }
                            filter__ = Some(map_.next_value()?);
                        }
                        GeneratedField::__SkipField__ => {
                            let _ = map_.next_value::<serde::de::IgnoredAny>()?;
                        }
                    }
                }
                Ok(GetOrderLogStatisticsRequest {
                    filter: filter__.unwrap_or_default(),
                })
            }
        }
        deserializer.deserialize_struct("kdo.v1.order_log.GetOrderLogStatisticsRequest", FIELDS, GeneratedVisitor)
    }
}
impl serde::Serialize for HedgePairDetail {
    #[allow(deprecated)]
    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        use serde::ser::SerializeStruct;
        let mut len = 0;
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        let mut struct_ser = serializer.serialize_struct("kdo.v1.order_log.HedgePairDetail", len)?;
        if true {
            #[allow(clippy::needless_borrow)]
            #[allow(clippy::needless_borrows_for_generic_args)]
            struct_ser.serialize_field("quote_order_id", ToString::to_string(&self.quote_order_id).as_str())?;
        }
        if true {
            struct_ser.serialize_field("quote_symbol", &self.quote_symbol)?;
        }
        if true {
            let v = super::common::OrderSide::try_from(self.quote_side)
                .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.quote_side)))?;
            struct_ser.serialize_field("quote_side", &v)?;
        }
        if true {
            #[allow(clippy::needless_borrow)]
            #[allow(clippy::needless_borrows_for_generic_args)]
            struct_ser.serialize_field("quote_filled_quantity", ToString::to_string(&self.quote_filled_quantity).as_str())?;
        }
        if true {
            struct_ser.serialize_field("quote_avg_price", &self.quote_avg_price)?;
        }
        if true {
            struct_ser.serialize_field("hedge_symbol", &self.hedge_symbol)?;
        }
        if true {
            #[allow(clippy::needless_borrow)]
            #[allow(clippy::needless_borrows_for_generic_args)]
            struct_ser.serialize_field("hedge_filled_quantity", ToString::to_string(&self.hedge_filled_quantity).as_str())?;
        }
        if true {
            struct_ser.serialize_field("hedge_avg_price", &self.hedge_avg_price)?;
        }
        if true {
            struct_ser.serialize_field("spread", &self.spread)?;
        }
        if true {
            struct_ser.serialize_field("fund_code", &self.fund_code)?;
        }
        if true {
            struct_ser.serialize_field("date", &self.date)?;
        }
        if true {
            #[allow(clippy::needless_borrow)]
            #[allow(clippy::needless_borrows_for_generic_args)]
            struct_ser.serialize_field("hedge_exchange_time", ToString::to_string(&self.hedge_exchange_time).as_str())?;
        }
        struct_ser.end()
    }
}
impl<'de> serde::Deserialize<'de> for HedgePairDetail {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "quote_order_id",
            "quoteOrderId",
            "quote_symbol",
            "quoteSymbol",
            "quote_side",
            "quoteSide",
            "quote_filled_quantity",
            "quoteFilledQuantity",
            "quote_avg_price",
            "quoteAvgPrice",
            "hedge_symbol",
            "hedgeSymbol",
            "hedge_filled_quantity",
            "hedgeFilledQuantity",
            "hedge_avg_price",
            "hedgeAvgPrice",
            "spread",
            "fund_code",
            "fundCode",
            "date",
            "hedge_exchange_time",
            "hedgeExchangeTime",
        ];

        #[allow(clippy::enum_variant_names)]
        enum GeneratedField {
            QuoteOrderId,
            QuoteSymbol,
            QuoteSide,
            QuoteFilledQuantity,
            QuoteAvgPrice,
            HedgeSymbol,
            HedgeFilledQuantity,
            HedgeAvgPrice,
            Spread,
            FundCode,
            Date,
            HedgeExchangeTime,
            __SkipField__,
        }
        impl<'de> serde::Deserialize<'de> for GeneratedField {
            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
            where
                D: serde::Deserializer<'de>,
            {
                struct GeneratedVisitor;

                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
                    type Value = GeneratedField;

                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                        write!(formatter, "expected one of: {:?}", &FIELDS)
                    }

                    #[allow(unused_variables)]
                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
                    where
                        E: serde::de::Error,
                    {
                        match value {
                            "quoteOrderId" | "quote_order_id" => Ok(GeneratedField::QuoteOrderId),
                            "quoteSymbol" | "quote_symbol" => Ok(GeneratedField::QuoteSymbol),
                            "quoteSide" | "quote_side" => Ok(GeneratedField::QuoteSide),
                            "quoteFilledQuantity" | "quote_filled_quantity" => Ok(GeneratedField::QuoteFilledQuantity),
                            "quoteAvgPrice" | "quote_avg_price" => Ok(GeneratedField::QuoteAvgPrice),
                            "hedgeSymbol" | "hedge_symbol" => Ok(GeneratedField::HedgeSymbol),
                            "hedgeFilledQuantity" | "hedge_filled_quantity" => Ok(GeneratedField::HedgeFilledQuantity),
                            "hedgeAvgPrice" | "hedge_avg_price" => Ok(GeneratedField::HedgeAvgPrice),
                            "spread" => Ok(GeneratedField::Spread),
                            "fundCode" | "fund_code" => Ok(GeneratedField::FundCode),
                            "date" => Ok(GeneratedField::Date),
                            "hedgeExchangeTime" | "hedge_exchange_time" => Ok(GeneratedField::HedgeExchangeTime),
                            _ => Ok(GeneratedField::__SkipField__),
                        }
                    }
                }
                deserializer.deserialize_identifier(GeneratedVisitor)
            }
        }
        struct GeneratedVisitor;
        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
            type Value = HedgePairDetail;

            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                formatter.write_str("struct kdo.v1.order_log.HedgePairDetail")
            }

            fn visit_map<V>(self, mut map_: V) -> std::result::Result<HedgePairDetail, V::Error>
                where
                    V: serde::de::MapAccess<'de>,
            {
                let mut quote_order_id__ = None;
                let mut quote_symbol__ = None;
                let mut quote_side__ = None;
                let mut quote_filled_quantity__ = None;
                let mut quote_avg_price__ = None;
                let mut hedge_symbol__ = None;
                let mut hedge_filled_quantity__ = None;
                let mut hedge_avg_price__ = None;
                let mut spread__ = None;
                let mut fund_code__ = None;
                let mut date__ = None;
                let mut hedge_exchange_time__ = None;
                while let Some(k) = map_.next_key()? {
                    match k {
                        GeneratedField::QuoteOrderId => {
                            if quote_order_id__.is_some() {
                                return Err(serde::de::Error::duplicate_field("quoteOrderId"));
                            }
                            quote_order_id__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::QuoteSymbol => {
                            if quote_symbol__.is_some() {
                                return Err(serde::de::Error::duplicate_field("quoteSymbol"));
                            }
                            quote_symbol__ = Some(map_.next_value()?);
                        }
                        GeneratedField::QuoteSide => {
                            if quote_side__.is_some() {
                                return Err(serde::de::Error::duplicate_field("quoteSide"));
                            }
                            quote_side__ = Some(map_.next_value::<super::common::OrderSide>()? as i32);
                        }
                        GeneratedField::QuoteFilledQuantity => {
                            if quote_filled_quantity__.is_some() {
                                return Err(serde::de::Error::duplicate_field("quoteFilledQuantity"));
                            }
                            quote_filled_quantity__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::QuoteAvgPrice => {
                            if quote_avg_price__.is_some() {
                                return Err(serde::de::Error::duplicate_field("quoteAvgPrice"));
                            }
                            quote_avg_price__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::HedgeSymbol => {
                            if hedge_symbol__.is_some() {
                                return Err(serde::de::Error::duplicate_field("hedgeSymbol"));
                            }
                            hedge_symbol__ = Some(map_.next_value()?);
                        }
                        GeneratedField::HedgeFilledQuantity => {
                            if hedge_filled_quantity__.is_some() {
                                return Err(serde::de::Error::duplicate_field("hedgeFilledQuantity"));
                            }
                            hedge_filled_quantity__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::HedgeAvgPrice => {
                            if hedge_avg_price__.is_some() {
                                return Err(serde::de::Error::duplicate_field("hedgeAvgPrice"));
                            }
                            hedge_avg_price__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::Spread => {
                            if spread__.is_some() {
                                return Err(serde::de::Error::duplicate_field("spread"));
                            }
                            spread__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::FundCode => {
                            if fund_code__.is_some() {
                                return Err(serde::de::Error::duplicate_field("fundCode"));
                            }
                            fund_code__ = Some(map_.next_value()?);
                        }
                        GeneratedField::Date => {
                            if date__.is_some() {
                                return Err(serde::de::Error::duplicate_field("date"));
                            }
                            date__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::HedgeExchangeTime => {
                            if hedge_exchange_time__.is_some() {
                                return Err(serde::de::Error::duplicate_field("hedgeExchangeTime"));
                            }
                            hedge_exchange_time__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::__SkipField__ => {
                            let _ = map_.next_value::<serde::de::IgnoredAny>()?;
                        }
                    }
                }
                Ok(HedgePairDetail {
                    quote_order_id: quote_order_id__.unwrap_or_default(),
                    quote_symbol: quote_symbol__.unwrap_or_default(),
                    quote_side: quote_side__.unwrap_or_default(),
                    quote_filled_quantity: quote_filled_quantity__.unwrap_or_default(),
                    quote_avg_price: quote_avg_price__.unwrap_or_default(),
                    hedge_symbol: hedge_symbol__.unwrap_or_default(),
                    hedge_filled_quantity: hedge_filled_quantity__.unwrap_or_default(),
                    hedge_avg_price: hedge_avg_price__.unwrap_or_default(),
                    spread: spread__.unwrap_or_default(),
                    fund_code: fund_code__.unwrap_or_default(),
                    date: date__.unwrap_or_default(),
                    hedge_exchange_time: hedge_exchange_time__.unwrap_or_default(),
                })
            }
        }
        deserializer.deserialize_struct("kdo.v1.order_log.HedgePairDetail", FIELDS, GeneratedVisitor)
    }
}
impl serde::Serialize for LegFillSummary {
    #[allow(deprecated)]
    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        use serde::ser::SerializeStruct;
        let mut len = 0;
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        let mut struct_ser = serializer.serialize_struct("kdo.v1.order_log.LegFillSummary", len)?;
        if true {
            struct_ser.serialize_field("fund_code", &self.fund_code)?;
        }
        if true {
            struct_ser.serialize_field("symbol", &self.symbol)?;
        }
        if let Some(v) = self.bid.as_ref() {
            struct_ser.serialize_field("bid", v)?;
        }
        if let Some(v) = self.ask.as_ref() {
            struct_ser.serialize_field("ask", v)?;
        }
        struct_ser.end()
    }
}
impl<'de> serde::Deserialize<'de> for LegFillSummary {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "fund_code",
            "fundCode",
            "symbol",
            "bid",
            "ask",
        ];

        #[allow(clippy::enum_variant_names)]
        enum GeneratedField {
            FundCode,
            Symbol,
            Bid,
            Ask,
            __SkipField__,
        }
        impl<'de> serde::Deserialize<'de> for GeneratedField {
            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
            where
                D: serde::Deserializer<'de>,
            {
                struct GeneratedVisitor;

                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
                    type Value = GeneratedField;

                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                        write!(formatter, "expected one of: {:?}", &FIELDS)
                    }

                    #[allow(unused_variables)]
                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
                    where
                        E: serde::de::Error,
                    {
                        match value {
                            "fundCode" | "fund_code" => Ok(GeneratedField::FundCode),
                            "symbol" => Ok(GeneratedField::Symbol),
                            "bid" => Ok(GeneratedField::Bid),
                            "ask" => Ok(GeneratedField::Ask),
                            _ => Ok(GeneratedField::__SkipField__),
                        }
                    }
                }
                deserializer.deserialize_identifier(GeneratedVisitor)
            }
        }
        struct GeneratedVisitor;
        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
            type Value = LegFillSummary;

            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                formatter.write_str("struct kdo.v1.order_log.LegFillSummary")
            }

            fn visit_map<V>(self, mut map_: V) -> std::result::Result<LegFillSummary, V::Error>
                where
                    V: serde::de::MapAccess<'de>,
            {
                let mut fund_code__ = None;
                let mut symbol__ = None;
                let mut bid__ = None;
                let mut ask__ = None;
                while let Some(k) = map_.next_key()? {
                    match k {
                        GeneratedField::FundCode => {
                            if fund_code__.is_some() {
                                return Err(serde::de::Error::duplicate_field("fundCode"));
                            }
                            fund_code__ = Some(map_.next_value()?);
                        }
                        GeneratedField::Symbol => {
                            if symbol__.is_some() {
                                return Err(serde::de::Error::duplicate_field("symbol"));
                            }
                            symbol__ = Some(map_.next_value()?);
                        }
                        GeneratedField::Bid => {
                            if bid__.is_some() {
                                return Err(serde::de::Error::duplicate_field("bid"));
                            }
                            bid__ = map_.next_value()?;
                        }
                        GeneratedField::Ask => {
                            if ask__.is_some() {
                                return Err(serde::de::Error::duplicate_field("ask"));
                            }
                            ask__ = map_.next_value()?;
                        }
                        GeneratedField::__SkipField__ => {
                            let _ = map_.next_value::<serde::de::IgnoredAny>()?;
                        }
                    }
                }
                Ok(LegFillSummary {
                    fund_code: fund_code__.unwrap_or_default(),
                    symbol: symbol__.unwrap_or_default(),
                    bid: bid__,
                    ask: ask__,
                })
            }
        }
        deserializer.deserialize_struct("kdo.v1.order_log.LegFillSummary", FIELDS, GeneratedVisitor)
    }
}
impl serde::Serialize for ListHedgePairDetailsRequest {
    #[allow(deprecated)]
    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        use serde::ser::SerializeStruct;
        let mut len = 0;
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        let mut struct_ser = serializer.serialize_struct("kdo.v1.order_log.ListHedgePairDetailsRequest", len)?;
        if true {
            struct_ser.serialize_field("symbol", &self.symbol)?;
        }
        if let Some(v) = self.fund_code.as_ref() {
            struct_ser.serialize_field("fund_code", v)?;
        }
        if let Some(v) = self.hedge_symbol.as_ref() {
            struct_ser.serialize_field("hedge_symbol", v)?;
        }
        if let Some(v) = self.quote_side.as_ref() {
            let v = super::common::OrderSide::try_from(*v)
                .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", *v)))?;
            struct_ser.serialize_field("quote_side", &v)?;
        }
        if let Some(v) = self.date.as_ref() {
            struct_ser.serialize_field("date", v)?;
        }
        if let Some(v) = self.since_hedge_exchange_time_us.as_ref() {
            #[allow(clippy::needless_borrow)]
            #[allow(clippy::needless_borrows_for_generic_args)]
            struct_ser.serialize_field("since_hedge_exchange_time_us", ToString::to_string(&v).as_str())?;
        }
        if true {
            struct_ser.serialize_field("page_size", &self.page_size)?;
        }
        if true {
            struct_ser.serialize_field("page_token", &self.page_token)?;
        }
        struct_ser.end()
    }
}
impl<'de> serde::Deserialize<'de> for ListHedgePairDetailsRequest {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "symbol",
            "fund_code",
            "fundCode",
            "hedge_symbol",
            "hedgeSymbol",
            "quote_side",
            "quoteSide",
            "date",
            "since_hedge_exchange_time_us",
            "sinceHedgeExchangeTimeUs",
            "page_size",
            "pageSize",
            "page_token",
            "pageToken",
        ];

        #[allow(clippy::enum_variant_names)]
        enum GeneratedField {
            Symbol,
            FundCode,
            HedgeSymbol,
            QuoteSide,
            Date,
            SinceHedgeExchangeTimeUs,
            PageSize,
            PageToken,
            __SkipField__,
        }
        impl<'de> serde::Deserialize<'de> for GeneratedField {
            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
            where
                D: serde::Deserializer<'de>,
            {
                struct GeneratedVisitor;

                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
                    type Value = GeneratedField;

                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                        write!(formatter, "expected one of: {:?}", &FIELDS)
                    }

                    #[allow(unused_variables)]
                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
                    where
                        E: serde::de::Error,
                    {
                        match value {
                            "symbol" => Ok(GeneratedField::Symbol),
                            "fundCode" | "fund_code" => Ok(GeneratedField::FundCode),
                            "hedgeSymbol" | "hedge_symbol" => Ok(GeneratedField::HedgeSymbol),
                            "quoteSide" | "quote_side" => Ok(GeneratedField::QuoteSide),
                            "date" => Ok(GeneratedField::Date),
                            "sinceHedgeExchangeTimeUs" | "since_hedge_exchange_time_us" => Ok(GeneratedField::SinceHedgeExchangeTimeUs),
                            "pageSize" | "page_size" => Ok(GeneratedField::PageSize),
                            "pageToken" | "page_token" => Ok(GeneratedField::PageToken),
                            _ => Ok(GeneratedField::__SkipField__),
                        }
                    }
                }
                deserializer.deserialize_identifier(GeneratedVisitor)
            }
        }
        struct GeneratedVisitor;
        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
            type Value = ListHedgePairDetailsRequest;

            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                formatter.write_str("struct kdo.v1.order_log.ListHedgePairDetailsRequest")
            }

            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ListHedgePairDetailsRequest, V::Error>
                where
                    V: serde::de::MapAccess<'de>,
            {
                let mut symbol__ = None;
                let mut fund_code__ = None;
                let mut hedge_symbol__ = None;
                let mut quote_side__ = None;
                let mut date__ = None;
                let mut since_hedge_exchange_time_us__ = None;
                let mut page_size__ = None;
                let mut page_token__ = None;
                while let Some(k) = map_.next_key()? {
                    match k {
                        GeneratedField::Symbol => {
                            if symbol__.is_some() {
                                return Err(serde::de::Error::duplicate_field("symbol"));
                            }
                            symbol__ = Some(map_.next_value()?);
                        }
                        GeneratedField::FundCode => {
                            if fund_code__.is_some() {
                                return Err(serde::de::Error::duplicate_field("fundCode"));
                            }
                            fund_code__ = map_.next_value()?;
                        }
                        GeneratedField::HedgeSymbol => {
                            if hedge_symbol__.is_some() {
                                return Err(serde::de::Error::duplicate_field("hedgeSymbol"));
                            }
                            hedge_symbol__ = map_.next_value()?;
                        }
                        GeneratedField::QuoteSide => {
                            if quote_side__.is_some() {
                                return Err(serde::de::Error::duplicate_field("quoteSide"));
                            }
                            quote_side__ = map_.next_value::<::std::option::Option<super::common::OrderSide>>()?.map(|x| x as i32);
                        }
                        GeneratedField::Date => {
                            if date__.is_some() {
                                return Err(serde::de::Error::duplicate_field("date"));
                            }
                            date__ = 
                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
                            ;
                        }
                        GeneratedField::SinceHedgeExchangeTimeUs => {
                            if since_hedge_exchange_time_us__.is_some() {
                                return Err(serde::de::Error::duplicate_field("sinceHedgeExchangeTimeUs"));
                            }
                            since_hedge_exchange_time_us__ = 
                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
                            ;
                        }
                        GeneratedField::PageSize => {
                            if page_size__.is_some() {
                                return Err(serde::de::Error::duplicate_field("pageSize"));
                            }
                            page_size__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::PageToken => {
                            if page_token__.is_some() {
                                return Err(serde::de::Error::duplicate_field("pageToken"));
                            }
                            page_token__ = Some(map_.next_value()?);
                        }
                        GeneratedField::__SkipField__ => {
                            let _ = map_.next_value::<serde::de::IgnoredAny>()?;
                        }
                    }
                }
                Ok(ListHedgePairDetailsRequest {
                    symbol: symbol__.unwrap_or_default(),
                    fund_code: fund_code__,
                    hedge_symbol: hedge_symbol__,
                    quote_side: quote_side__,
                    date: date__,
                    since_hedge_exchange_time_us: since_hedge_exchange_time_us__,
                    page_size: page_size__.unwrap_or_default(),
                    page_token: page_token__.unwrap_or_default(),
                })
            }
        }
        deserializer.deserialize_struct("kdo.v1.order_log.ListHedgePairDetailsRequest", FIELDS, GeneratedVisitor)
    }
}
impl serde::Serialize for ListHedgePairDetailsResponse {
    #[allow(deprecated)]
    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        use serde::ser::SerializeStruct;
        let mut len = 0;
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        let mut struct_ser = serializer.serialize_struct("kdo.v1.order_log.ListHedgePairDetailsResponse", len)?;
        if true {
            struct_ser.serialize_field("details", &self.details)?;
        }
        if true {
            struct_ser.serialize_field("next_page_token", &self.next_page_token)?;
        }
        struct_ser.end()
    }
}
impl<'de> serde::Deserialize<'de> for ListHedgePairDetailsResponse {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "details",
            "next_page_token",
            "nextPageToken",
        ];

        #[allow(clippy::enum_variant_names)]
        enum GeneratedField {
            Details,
            NextPageToken,
            __SkipField__,
        }
        impl<'de> serde::Deserialize<'de> for GeneratedField {
            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
            where
                D: serde::Deserializer<'de>,
            {
                struct GeneratedVisitor;

                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
                    type Value = GeneratedField;

                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                        write!(formatter, "expected one of: {:?}", &FIELDS)
                    }

                    #[allow(unused_variables)]
                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
                    where
                        E: serde::de::Error,
                    {
                        match value {
                            "details" => Ok(GeneratedField::Details),
                            "nextPageToken" | "next_page_token" => Ok(GeneratedField::NextPageToken),
                            _ => Ok(GeneratedField::__SkipField__),
                        }
                    }
                }
                deserializer.deserialize_identifier(GeneratedVisitor)
            }
        }
        struct GeneratedVisitor;
        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
            type Value = ListHedgePairDetailsResponse;

            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                formatter.write_str("struct kdo.v1.order_log.ListHedgePairDetailsResponse")
            }

            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ListHedgePairDetailsResponse, V::Error>
                where
                    V: serde::de::MapAccess<'de>,
            {
                let mut details__ = None;
                let mut next_page_token__ = None;
                while let Some(k) = map_.next_key()? {
                    match k {
                        GeneratedField::Details => {
                            if details__.is_some() {
                                return Err(serde::de::Error::duplicate_field("details"));
                            }
                            details__ = Some(map_.next_value()?);
                        }
                        GeneratedField::NextPageToken => {
                            if next_page_token__.is_some() {
                                return Err(serde::de::Error::duplicate_field("nextPageToken"));
                            }
                            next_page_token__ = Some(map_.next_value()?);
                        }
                        GeneratedField::__SkipField__ => {
                            let _ = map_.next_value::<serde::de::IgnoredAny>()?;
                        }
                    }
                }
                Ok(ListHedgePairDetailsResponse {
                    details: details__.unwrap_or_default(),
                    next_page_token: next_page_token__.unwrap_or_default(),
                })
            }
        }
        deserializer.deserialize_struct("kdo.v1.order_log.ListHedgePairDetailsResponse", FIELDS, GeneratedVisitor)
    }
}
impl serde::Serialize for ListOrderLogsRequest {
    #[allow(deprecated)]
    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        use serde::ser::SerializeStruct;
        let mut len = 0;
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        let mut struct_ser = serializer.serialize_struct("kdo.v1.order_log.ListOrderLogsRequest", len)?;
        if let Some(v) = self.page_size.as_ref() {
            struct_ser.serialize_field("page_size", v)?;
        }
        if let Some(v) = self.page_token.as_ref() {
            struct_ser.serialize_field("page_token", v)?;
        }
        if true {
            struct_ser.serialize_field("filter", &self.filter)?;
        }
        if true {
            struct_ser.serialize_field("order_by", &self.order_by)?;
        }
        struct_ser.end()
    }
}
impl<'de> serde::Deserialize<'de> for ListOrderLogsRequest {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "page_size",
            "pageSize",
            "page_token",
            "pageToken",
            "filter",
            "order_by",
            "orderBy",
        ];

        #[allow(clippy::enum_variant_names)]
        enum GeneratedField {
            PageSize,
            PageToken,
            Filter,
            OrderBy,
            __SkipField__,
        }
        impl<'de> serde::Deserialize<'de> for GeneratedField {
            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
            where
                D: serde::Deserializer<'de>,
            {
                struct GeneratedVisitor;

                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
                    type Value = GeneratedField;

                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                        write!(formatter, "expected one of: {:?}", &FIELDS)
                    }

                    #[allow(unused_variables)]
                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
                    where
                        E: serde::de::Error,
                    {
                        match value {
                            "pageSize" | "page_size" => Ok(GeneratedField::PageSize),
                            "pageToken" | "page_token" => Ok(GeneratedField::PageToken),
                            "filter" => Ok(GeneratedField::Filter),
                            "orderBy" | "order_by" => Ok(GeneratedField::OrderBy),
                            _ => Ok(GeneratedField::__SkipField__),
                        }
                    }
                }
                deserializer.deserialize_identifier(GeneratedVisitor)
            }
        }
        struct GeneratedVisitor;
        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
            type Value = ListOrderLogsRequest;

            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                formatter.write_str("struct kdo.v1.order_log.ListOrderLogsRequest")
            }

            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ListOrderLogsRequest, V::Error>
                where
                    V: serde::de::MapAccess<'de>,
            {
                let mut page_size__ = None;
                let mut page_token__ = None;
                let mut filter__ = None;
                let mut order_by__ = None;
                while let Some(k) = map_.next_key()? {
                    match k {
                        GeneratedField::PageSize => {
                            if page_size__.is_some() {
                                return Err(serde::de::Error::duplicate_field("pageSize"));
                            }
                            page_size__ = 
                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
                            ;
                        }
                        GeneratedField::PageToken => {
                            if page_token__.is_some() {
                                return Err(serde::de::Error::duplicate_field("pageToken"));
                            }
                            page_token__ = map_.next_value()?;
                        }
                        GeneratedField::Filter => {
                            if filter__.is_some() {
                                return Err(serde::de::Error::duplicate_field("filter"));
                            }
                            filter__ = Some(map_.next_value()?);
                        }
                        GeneratedField::OrderBy => {
                            if order_by__.is_some() {
                                return Err(serde::de::Error::duplicate_field("orderBy"));
                            }
                            order_by__ = Some(map_.next_value()?);
                        }
                        GeneratedField::__SkipField__ => {
                            let _ = map_.next_value::<serde::de::IgnoredAny>()?;
                        }
                    }
                }
                Ok(ListOrderLogsRequest {
                    page_size: page_size__,
                    page_token: page_token__,
                    filter: filter__.unwrap_or_default(),
                    order_by: order_by__.unwrap_or_default(),
                })
            }
        }
        deserializer.deserialize_struct("kdo.v1.order_log.ListOrderLogsRequest", FIELDS, GeneratedVisitor)
    }
}
impl serde::Serialize for ListOrderLogsResponse {
    #[allow(deprecated)]
    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        use serde::ser::SerializeStruct;
        let mut len = 0;
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        let mut struct_ser = serializer.serialize_struct("kdo.v1.order_log.ListOrderLogsResponse", len)?;
        if true {
            struct_ser.serialize_field("order_logs", &self.order_logs)?;
        }
        if true {
            struct_ser.serialize_field("next_page_token", &self.next_page_token)?;
        }
        struct_ser.end()
    }
}
impl<'de> serde::Deserialize<'de> for ListOrderLogsResponse {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "order_logs",
            "orderLogs",
            "next_page_token",
            "nextPageToken",
        ];

        #[allow(clippy::enum_variant_names)]
        enum GeneratedField {
            OrderLogs,
            NextPageToken,
            __SkipField__,
        }
        impl<'de> serde::Deserialize<'de> for GeneratedField {
            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
            where
                D: serde::Deserializer<'de>,
            {
                struct GeneratedVisitor;

                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
                    type Value = GeneratedField;

                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                        write!(formatter, "expected one of: {:?}", &FIELDS)
                    }

                    #[allow(unused_variables)]
                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
                    where
                        E: serde::de::Error,
                    {
                        match value {
                            "orderLogs" | "order_logs" => Ok(GeneratedField::OrderLogs),
                            "nextPageToken" | "next_page_token" => Ok(GeneratedField::NextPageToken),
                            _ => Ok(GeneratedField::__SkipField__),
                        }
                    }
                }
                deserializer.deserialize_identifier(GeneratedVisitor)
            }
        }
        struct GeneratedVisitor;
        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
            type Value = ListOrderLogsResponse;

            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                formatter.write_str("struct kdo.v1.order_log.ListOrderLogsResponse")
            }

            fn visit_map<V>(self, mut map_: V) -> std::result::Result<ListOrderLogsResponse, V::Error>
                where
                    V: serde::de::MapAccess<'de>,
            {
                let mut order_logs__ = None;
                let mut next_page_token__ = None;
                while let Some(k) = map_.next_key()? {
                    match k {
                        GeneratedField::OrderLogs => {
                            if order_logs__.is_some() {
                                return Err(serde::de::Error::duplicate_field("orderLogs"));
                            }
                            order_logs__ = Some(map_.next_value()?);
                        }
                        GeneratedField::NextPageToken => {
                            if next_page_token__.is_some() {
                                return Err(serde::de::Error::duplicate_field("nextPageToken"));
                            }
                            next_page_token__ = Some(map_.next_value()?);
                        }
                        GeneratedField::__SkipField__ => {
                            let _ = map_.next_value::<serde::de::IgnoredAny>()?;
                        }
                    }
                }
                Ok(ListOrderLogsResponse {
                    order_logs: order_logs__.unwrap_or_default(),
                    next_page_token: next_page_token__.unwrap_or_default(),
                })
            }
        }
        deserializer.deserialize_struct("kdo.v1.order_log.ListOrderLogsResponse", FIELDS, GeneratedVisitor)
    }
}
impl serde::Serialize for OrderLog {
    #[allow(deprecated)]
    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        use serde::ser::SerializeStruct;
        let mut len = 0;
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        let mut struct_ser = serializer.serialize_struct("kdo.v1.order_log.OrderLog", len)?;
        if true {
            #[allow(clippy::needless_borrow)]
            #[allow(clippy::needless_borrows_for_generic_args)]
            struct_ser.serialize_field("id", ToString::to_string(&self.id).as_str())?;
        }
        if true {
            #[allow(clippy::needless_borrow)]
            #[allow(clippy::needless_borrows_for_generic_args)]
            struct_ser.serialize_field("order_id", ToString::to_string(&self.order_id).as_str())?;
        }
        if let Some(v) = self.original_order_id.as_ref() {
            #[allow(clippy::needless_borrow)]
            #[allow(clippy::needless_borrows_for_generic_args)]
            struct_ser.serialize_field("original_order_id", ToString::to_string(&v).as_str())?;
        }
        if true {
            struct_ser.serialize_field("fund_code", &self.fund_code)?;
        }
        if true {
            struct_ser.serialize_field("symbol", &self.symbol)?;
        }
        if true {
            let v = OrderLogType::try_from(self.log_type)
                .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.log_type)))?;
            struct_ser.serialize_field("log_type", &v)?;
        }
        if true {
            let v = super::common::OrderSide::try_from(self.side)
                .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.side)))?;
            struct_ser.serialize_field("side", &v)?;
        }
        if true {
            let v = OrderType::try_from(self.order_type)
                .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.order_type)))?;
            struct_ser.serialize_field("order_type", &v)?;
        }
        if true {
            struct_ser.serialize_field("price", &self.price)?;
        }
        if true {
            struct_ser.serialize_field("quantity", &self.quantity)?;
        }
        if let Some(v) = self.filled_price.as_ref() {
            struct_ser.serialize_field("filled_price", v)?;
        }
        if let Some(v) = self.filled_quantity.as_ref() {
            struct_ser.serialize_field("filled_quantity", v)?;
        }
        if let Some(v) = self.filled_amount.as_ref() {
            struct_ser.serialize_field("filled_amount", v)?;
        }
        if let Some(v) = self.rejection_code.as_ref() {
            struct_ser.serialize_field("rejection_code", v)?;
        }
        if let Some(v) = self.error_message.as_ref() {
            struct_ser.serialize_field("error_message", v)?;
        }
        if true {
            #[allow(clippy::needless_borrow)]
            #[allow(clippy::needless_borrows_for_generic_args)]
            struct_ser.serialize_field("exchange_time", ToString::to_string(&self.exchange_time).as_str())?;
        }
        if true {
            #[allow(clippy::needless_borrow)]
            #[allow(clippy::needless_borrows_for_generic_args)]
            struct_ser.serialize_field("receive_time", ToString::to_string(&self.receive_time).as_str())?;
        }
        if let Some(v) = self.created_at.as_ref() {
            struct_ser.serialize_field("created_at", v)?;
        }
        if true {
            let v = super::common::MarketType::try_from(self.market_type)
                .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.market_type)))?;
            struct_ser.serialize_field("market_type", &v)?;
        }
        if true {
            struct_ser.serialize_field("date", &self.date)?;
        }
        if let Some(v) = self.user_area.as_ref() {
            struct_ser.serialize_field("user_area", v)?;
        }
        struct_ser.end()
    }
}
impl<'de> serde::Deserialize<'de> for OrderLog {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "id",
            "order_id",
            "orderId",
            "original_order_id",
            "originalOrderId",
            "fund_code",
            "fundCode",
            "symbol",
            "log_type",
            "logType",
            "side",
            "order_type",
            "orderType",
            "price",
            "quantity",
            "filled_price",
            "filledPrice",
            "filled_quantity",
            "filledQuantity",
            "filled_amount",
            "filledAmount",
            "rejection_code",
            "rejectionCode",
            "error_message",
            "errorMessage",
            "exchange_time",
            "exchangeTime",
            "receive_time",
            "receiveTime",
            "created_at",
            "createdAt",
            "market_type",
            "marketType",
            "date",
            "user_area",
            "userArea",
        ];

        #[allow(clippy::enum_variant_names)]
        enum GeneratedField {
            Id,
            OrderId,
            OriginalOrderId,
            FundCode,
            Symbol,
            LogType,
            Side,
            OrderType,
            Price,
            Quantity,
            FilledPrice,
            FilledQuantity,
            FilledAmount,
            RejectionCode,
            ErrorMessage,
            ExchangeTime,
            ReceiveTime,
            CreatedAt,
            MarketType,
            Date,
            UserArea,
            __SkipField__,
        }
        impl<'de> serde::Deserialize<'de> for GeneratedField {
            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
            where
                D: serde::Deserializer<'de>,
            {
                struct GeneratedVisitor;

                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
                    type Value = GeneratedField;

                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                        write!(formatter, "expected one of: {:?}", &FIELDS)
                    }

                    #[allow(unused_variables)]
                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
                    where
                        E: serde::de::Error,
                    {
                        match value {
                            "id" => Ok(GeneratedField::Id),
                            "orderId" | "order_id" => Ok(GeneratedField::OrderId),
                            "originalOrderId" | "original_order_id" => Ok(GeneratedField::OriginalOrderId),
                            "fundCode" | "fund_code" => Ok(GeneratedField::FundCode),
                            "symbol" => Ok(GeneratedField::Symbol),
                            "logType" | "log_type" => Ok(GeneratedField::LogType),
                            "side" => Ok(GeneratedField::Side),
                            "orderType" | "order_type" => Ok(GeneratedField::OrderType),
                            "price" => Ok(GeneratedField::Price),
                            "quantity" => Ok(GeneratedField::Quantity),
                            "filledPrice" | "filled_price" => Ok(GeneratedField::FilledPrice),
                            "filledQuantity" | "filled_quantity" => Ok(GeneratedField::FilledQuantity),
                            "filledAmount" | "filled_amount" => Ok(GeneratedField::FilledAmount),
                            "rejectionCode" | "rejection_code" => Ok(GeneratedField::RejectionCode),
                            "errorMessage" | "error_message" => Ok(GeneratedField::ErrorMessage),
                            "exchangeTime" | "exchange_time" => Ok(GeneratedField::ExchangeTime),
                            "receiveTime" | "receive_time" => Ok(GeneratedField::ReceiveTime),
                            "createdAt" | "created_at" => Ok(GeneratedField::CreatedAt),
                            "marketType" | "market_type" => Ok(GeneratedField::MarketType),
                            "date" => Ok(GeneratedField::Date),
                            "userArea" | "user_area" => Ok(GeneratedField::UserArea),
                            _ => Ok(GeneratedField::__SkipField__),
                        }
                    }
                }
                deserializer.deserialize_identifier(GeneratedVisitor)
            }
        }
        struct GeneratedVisitor;
        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
            type Value = OrderLog;

            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                formatter.write_str("struct kdo.v1.order_log.OrderLog")
            }

            fn visit_map<V>(self, mut map_: V) -> std::result::Result<OrderLog, V::Error>
                where
                    V: serde::de::MapAccess<'de>,
            {
                let mut id__ = None;
                let mut order_id__ = None;
                let mut original_order_id__ = None;
                let mut fund_code__ = None;
                let mut symbol__ = None;
                let mut log_type__ = None;
                let mut side__ = None;
                let mut order_type__ = None;
                let mut price__ = None;
                let mut quantity__ = None;
                let mut filled_price__ = None;
                let mut filled_quantity__ = None;
                let mut filled_amount__ = None;
                let mut rejection_code__ = None;
                let mut error_message__ = None;
                let mut exchange_time__ = None;
                let mut receive_time__ = None;
                let mut created_at__ = None;
                let mut market_type__ = None;
                let mut date__ = None;
                let mut user_area__ = None;
                while let Some(k) = map_.next_key()? {
                    match k {
                        GeneratedField::Id => {
                            if id__.is_some() {
                                return Err(serde::de::Error::duplicate_field("id"));
                            }
                            id__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::OrderId => {
                            if order_id__.is_some() {
                                return Err(serde::de::Error::duplicate_field("orderId"));
                            }
                            order_id__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::OriginalOrderId => {
                            if original_order_id__.is_some() {
                                return Err(serde::de::Error::duplicate_field("originalOrderId"));
                            }
                            original_order_id__ = 
                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
                            ;
                        }
                        GeneratedField::FundCode => {
                            if fund_code__.is_some() {
                                return Err(serde::de::Error::duplicate_field("fundCode"));
                            }
                            fund_code__ = Some(map_.next_value()?);
                        }
                        GeneratedField::Symbol => {
                            if symbol__.is_some() {
                                return Err(serde::de::Error::duplicate_field("symbol"));
                            }
                            symbol__ = Some(map_.next_value()?);
                        }
                        GeneratedField::LogType => {
                            if log_type__.is_some() {
                                return Err(serde::de::Error::duplicate_field("logType"));
                            }
                            log_type__ = Some(map_.next_value::<OrderLogType>()? as i32);
                        }
                        GeneratedField::Side => {
                            if side__.is_some() {
                                return Err(serde::de::Error::duplicate_field("side"));
                            }
                            side__ = Some(map_.next_value::<super::common::OrderSide>()? as i32);
                        }
                        GeneratedField::OrderType => {
                            if order_type__.is_some() {
                                return Err(serde::de::Error::duplicate_field("orderType"));
                            }
                            order_type__ = Some(map_.next_value::<OrderType>()? as i32);
                        }
                        GeneratedField::Price => {
                            if price__.is_some() {
                                return Err(serde::de::Error::duplicate_field("price"));
                            }
                            price__ = Some(map_.next_value()?);
                        }
                        GeneratedField::Quantity => {
                            if quantity__.is_some() {
                                return Err(serde::de::Error::duplicate_field("quantity"));
                            }
                            quantity__ = Some(map_.next_value()?);
                        }
                        GeneratedField::FilledPrice => {
                            if filled_price__.is_some() {
                                return Err(serde::de::Error::duplicate_field("filledPrice"));
                            }
                            filled_price__ = map_.next_value()?;
                        }
                        GeneratedField::FilledQuantity => {
                            if filled_quantity__.is_some() {
                                return Err(serde::de::Error::duplicate_field("filledQuantity"));
                            }
                            filled_quantity__ = map_.next_value()?;
                        }
                        GeneratedField::FilledAmount => {
                            if filled_amount__.is_some() {
                                return Err(serde::de::Error::duplicate_field("filledAmount"));
                            }
                            filled_amount__ = map_.next_value()?;
                        }
                        GeneratedField::RejectionCode => {
                            if rejection_code__.is_some() {
                                return Err(serde::de::Error::duplicate_field("rejectionCode"));
                            }
                            rejection_code__ = map_.next_value()?;
                        }
                        GeneratedField::ErrorMessage => {
                            if error_message__.is_some() {
                                return Err(serde::de::Error::duplicate_field("errorMessage"));
                            }
                            error_message__ = map_.next_value()?;
                        }
                        GeneratedField::ExchangeTime => {
                            if exchange_time__.is_some() {
                                return Err(serde::de::Error::duplicate_field("exchangeTime"));
                            }
                            exchange_time__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::ReceiveTime => {
                            if receive_time__.is_some() {
                                return Err(serde::de::Error::duplicate_field("receiveTime"));
                            }
                            receive_time__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::CreatedAt => {
                            if created_at__.is_some() {
                                return Err(serde::de::Error::duplicate_field("createdAt"));
                            }
                            created_at__ = map_.next_value()?;
                        }
                        GeneratedField::MarketType => {
                            if market_type__.is_some() {
                                return Err(serde::de::Error::duplicate_field("marketType"));
                            }
                            market_type__ = Some(map_.next_value::<super::common::MarketType>()? as i32);
                        }
                        GeneratedField::Date => {
                            if date__.is_some() {
                                return Err(serde::de::Error::duplicate_field("date"));
                            }
                            date__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::UserArea => {
                            if user_area__.is_some() {
                                return Err(serde::de::Error::duplicate_field("userArea"));
                            }
                            user_area__ = map_.next_value()?;
                        }
                        GeneratedField::__SkipField__ => {
                            let _ = map_.next_value::<serde::de::IgnoredAny>()?;
                        }
                    }
                }
                Ok(OrderLog {
                    id: id__.unwrap_or_default(),
                    order_id: order_id__.unwrap_or_default(),
                    original_order_id: original_order_id__,
                    fund_code: fund_code__.unwrap_or_default(),
                    symbol: symbol__.unwrap_or_default(),
                    log_type: log_type__.unwrap_or_default(),
                    side: side__.unwrap_or_default(),
                    order_type: order_type__.unwrap_or_default(),
                    price: price__.unwrap_or_default(),
                    quantity: quantity__.unwrap_or_default(),
                    filled_price: filled_price__,
                    filled_quantity: filled_quantity__,
                    filled_amount: filled_amount__,
                    rejection_code: rejection_code__,
                    error_message: error_message__,
                    exchange_time: exchange_time__.unwrap_or_default(),
                    receive_time: receive_time__.unwrap_or_default(),
                    created_at: created_at__,
                    market_type: market_type__.unwrap_or_default(),
                    date: date__.unwrap_or_default(),
                    user_area: user_area__,
                })
            }
        }
        deserializer.deserialize_struct("kdo.v1.order_log.OrderLog", FIELDS, GeneratedVisitor)
    }
}
impl serde::Serialize for OrderLogFillStatistics {
    #[allow(deprecated)]
    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        use serde::ser::SerializeStruct;
        let mut len = 0;
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        let mut struct_ser = serializer.serialize_struct("kdo.v1.order_log.OrderLogFillStatistics", len)?;
        if true {
            #[allow(clippy::needless_borrow)]
            #[allow(clippy::needless_borrows_for_generic_args)]
            struct_ser.serialize_field("total_fills", ToString::to_string(&self.total_fills).as_str())?;
        }
        if true {
            #[allow(clippy::needless_borrow)]
            #[allow(clippy::needless_borrows_for_generic_args)]
            struct_ser.serialize_field("total_quantity", ToString::to_string(&self.total_quantity).as_str())?;
        }
        if true {
            #[allow(clippy::needless_borrow)]
            #[allow(clippy::needless_borrows_for_generic_args)]
            struct_ser.serialize_field("total_amount", ToString::to_string(&self.total_amount).as_str())?;
        }
        if true {
            #[allow(clippy::needless_borrow)]
            #[allow(clippy::needless_borrows_for_generic_args)]
            struct_ser.serialize_field("buy_count", ToString::to_string(&self.buy_count).as_str())?;
        }
        if true {
            #[allow(clippy::needless_borrow)]
            #[allow(clippy::needless_borrows_for_generic_args)]
            struct_ser.serialize_field("sell_count", ToString::to_string(&self.sell_count).as_str())?;
        }
        struct_ser.end()
    }
}
impl<'de> serde::Deserialize<'de> for OrderLogFillStatistics {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "total_fills",
            "totalFills",
            "total_quantity",
            "totalQuantity",
            "total_amount",
            "totalAmount",
            "buy_count",
            "buyCount",
            "sell_count",
            "sellCount",
        ];

        #[allow(clippy::enum_variant_names)]
        enum GeneratedField {
            TotalFills,
            TotalQuantity,
            TotalAmount,
            BuyCount,
            SellCount,
            __SkipField__,
        }
        impl<'de> serde::Deserialize<'de> for GeneratedField {
            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
            where
                D: serde::Deserializer<'de>,
            {
                struct GeneratedVisitor;

                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
                    type Value = GeneratedField;

                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                        write!(formatter, "expected one of: {:?}", &FIELDS)
                    }

                    #[allow(unused_variables)]
                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
                    where
                        E: serde::de::Error,
                    {
                        match value {
                            "totalFills" | "total_fills" => Ok(GeneratedField::TotalFills),
                            "totalQuantity" | "total_quantity" => Ok(GeneratedField::TotalQuantity),
                            "totalAmount" | "total_amount" => Ok(GeneratedField::TotalAmount),
                            "buyCount" | "buy_count" => Ok(GeneratedField::BuyCount),
                            "sellCount" | "sell_count" => Ok(GeneratedField::SellCount),
                            _ => Ok(GeneratedField::__SkipField__),
                        }
                    }
                }
                deserializer.deserialize_identifier(GeneratedVisitor)
            }
        }
        struct GeneratedVisitor;
        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
            type Value = OrderLogFillStatistics;

            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                formatter.write_str("struct kdo.v1.order_log.OrderLogFillStatistics")
            }

            fn visit_map<V>(self, mut map_: V) -> std::result::Result<OrderLogFillStatistics, V::Error>
                where
                    V: serde::de::MapAccess<'de>,
            {
                let mut total_fills__ = None;
                let mut total_quantity__ = None;
                let mut total_amount__ = None;
                let mut buy_count__ = None;
                let mut sell_count__ = None;
                while let Some(k) = map_.next_key()? {
                    match k {
                        GeneratedField::TotalFills => {
                            if total_fills__.is_some() {
                                return Err(serde::de::Error::duplicate_field("totalFills"));
                            }
                            total_fills__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::TotalQuantity => {
                            if total_quantity__.is_some() {
                                return Err(serde::de::Error::duplicate_field("totalQuantity"));
                            }
                            total_quantity__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::TotalAmount => {
                            if total_amount__.is_some() {
                                return Err(serde::de::Error::duplicate_field("totalAmount"));
                            }
                            total_amount__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::BuyCount => {
                            if buy_count__.is_some() {
                                return Err(serde::de::Error::duplicate_field("buyCount"));
                            }
                            buy_count__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::SellCount => {
                            if sell_count__.is_some() {
                                return Err(serde::de::Error::duplicate_field("sellCount"));
                            }
                            sell_count__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::__SkipField__ => {
                            let _ = map_.next_value::<serde::de::IgnoredAny>()?;
                        }
                    }
                }
                Ok(OrderLogFillStatistics {
                    total_fills: total_fills__.unwrap_or_default(),
                    total_quantity: total_quantity__.unwrap_or_default(),
                    total_amount: total_amount__.unwrap_or_default(),
                    buy_count: buy_count__.unwrap_or_default(),
                    sell_count: sell_count__.unwrap_or_default(),
                })
            }
        }
        deserializer.deserialize_struct("kdo.v1.order_log.OrderLogFillStatistics", FIELDS, GeneratedVisitor)
    }
}
impl serde::Serialize for OrderLogType {
    #[allow(deprecated)]
    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        let variant = match self {
            Self::Unspecified => "ORDER_LOG_TYPE_UNSPECIFIED",
            Self::Received => "RECEIVED",
            Self::Rejected => "REJECTED",
            Self::MeritzRejected => "MERITZ_REJECTED",
            Self::Filled => "FILLED",
            Self::AutoCancelled => "AUTO_CANCELLED",
        };
        serializer.serialize_str(variant)
    }
}
impl<'de> serde::Deserialize<'de> for OrderLogType {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "ORDER_LOG_TYPE_UNSPECIFIED",
            "RECEIVED",
            "REJECTED",
            "MERITZ_REJECTED",
            "FILLED",
            "AUTO_CANCELLED",
        ];

        struct GeneratedVisitor;

        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
            type Value = OrderLogType;

            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                write!(formatter, "expected one of: {:?}", &FIELDS)
            }

            fn visit_i64<E>(self, v: i64) -> std::result::Result<Self::Value, E>
            where
                E: serde::de::Error,
            {
                i32::try_from(v)
                    .ok()
                    .and_then(|x| x.try_into().ok())
                    .ok_or_else(|| {
                        serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)
                    })
            }

            fn visit_u64<E>(self, v: u64) -> std::result::Result<Self::Value, E>
            where
                E: serde::de::Error,
            {
                i32::try_from(v)
                    .ok()
                    .and_then(|x| x.try_into().ok())
                    .ok_or_else(|| {
                        serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)
                    })
            }

            fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
            where
                E: serde::de::Error,
            {
                match value {
                    "ORDER_LOG_TYPE_UNSPECIFIED" => Ok(OrderLogType::Unspecified),
                    "RECEIVED" => Ok(OrderLogType::Received),
                    "REJECTED" => Ok(OrderLogType::Rejected),
                    "MERITZ_REJECTED" => Ok(OrderLogType::MeritzRejected),
                    "FILLED" => Ok(OrderLogType::Filled),
                    "AUTO_CANCELLED" => Ok(OrderLogType::AutoCancelled),
                    _ => Err(serde::de::Error::unknown_variant(value, FIELDS)),
                }
            }
        }
        deserializer.deserialize_any(GeneratedVisitor)
    }
}
impl serde::Serialize for OrderType {
    #[allow(deprecated)]
    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        let variant = match self {
            Self::Unspecified => "ORDER_TYPE_UNSPECIFIED",
            Self::New => "NEW",
            Self::Amend => "AMEND",
            Self::Cancel => "CANCEL",
        };
        serializer.serialize_str(variant)
    }
}
impl<'de> serde::Deserialize<'de> for OrderType {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "ORDER_TYPE_UNSPECIFIED",
            "NEW",
            "AMEND",
            "CANCEL",
        ];

        struct GeneratedVisitor;

        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
            type Value = OrderType;

            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                write!(formatter, "expected one of: {:?}", &FIELDS)
            }

            fn visit_i64<E>(self, v: i64) -> std::result::Result<Self::Value, E>
            where
                E: serde::de::Error,
            {
                i32::try_from(v)
                    .ok()
                    .and_then(|x| x.try_into().ok())
                    .ok_or_else(|| {
                        serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)
                    })
            }

            fn visit_u64<E>(self, v: u64) -> std::result::Result<Self::Value, E>
            where
                E: serde::de::Error,
            {
                i32::try_from(v)
                    .ok()
                    .and_then(|x| x.try_into().ok())
                    .ok_or_else(|| {
                        serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)
                    })
            }

            fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
            where
                E: serde::de::Error,
            {
                match value {
                    "ORDER_TYPE_UNSPECIFIED" => Ok(OrderType::Unspecified),
                    "NEW" => Ok(OrderType::New),
                    "AMEND" => Ok(OrderType::Amend),
                    "CANCEL" => Ok(OrderType::Cancel),
                    _ => Err(serde::de::Error::unknown_variant(value, FIELDS)),
                }
            }
        }
        deserializer.deserialize_any(GeneratedVisitor)
    }
}
impl serde::Serialize for PairFillSummary {
    #[allow(deprecated)]
    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        use serde::ser::SerializeStruct;
        let mut len = 0;
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        let mut struct_ser = serializer.serialize_struct("kdo.v1.order_log.PairFillSummary", len)?;
        if let Some(v) = self.quote.as_ref() {
            struct_ser.serialize_field("quote", v)?;
        }
        if let Some(v) = self.hedge.as_ref() {
            struct_ser.serialize_field("hedge", v)?;
        }
        if true {
            struct_ser.serialize_field("date", &self.date)?;
        }
        struct_ser.end()
    }
}
impl<'de> serde::Deserialize<'de> for PairFillSummary {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "quote",
            "hedge",
            "date",
        ];

        #[allow(clippy::enum_variant_names)]
        enum GeneratedField {
            Quote,
            Hedge,
            Date,
            __SkipField__,
        }
        impl<'de> serde::Deserialize<'de> for GeneratedField {
            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
            where
                D: serde::Deserializer<'de>,
            {
                struct GeneratedVisitor;

                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
                    type Value = GeneratedField;

                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                        write!(formatter, "expected one of: {:?}", &FIELDS)
                    }

                    #[allow(unused_variables)]
                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
                    where
                        E: serde::de::Error,
                    {
                        match value {
                            "quote" => Ok(GeneratedField::Quote),
                            "hedge" => Ok(GeneratedField::Hedge),
                            "date" => Ok(GeneratedField::Date),
                            _ => Ok(GeneratedField::__SkipField__),
                        }
                    }
                }
                deserializer.deserialize_identifier(GeneratedVisitor)
            }
        }
        struct GeneratedVisitor;
        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
            type Value = PairFillSummary;

            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                formatter.write_str("struct kdo.v1.order_log.PairFillSummary")
            }

            fn visit_map<V>(self, mut map_: V) -> std::result::Result<PairFillSummary, V::Error>
                where
                    V: serde::de::MapAccess<'de>,
            {
                let mut quote__ = None;
                let mut hedge__ = None;
                let mut date__ = None;
                while let Some(k) = map_.next_key()? {
                    match k {
                        GeneratedField::Quote => {
                            if quote__.is_some() {
                                return Err(serde::de::Error::duplicate_field("quote"));
                            }
                            quote__ = map_.next_value()?;
                        }
                        GeneratedField::Hedge => {
                            if hedge__.is_some() {
                                return Err(serde::de::Error::duplicate_field("hedge"));
                            }
                            hedge__ = map_.next_value()?;
                        }
                        GeneratedField::Date => {
                            if date__.is_some() {
                                return Err(serde::de::Error::duplicate_field("date"));
                            }
                            date__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::__SkipField__ => {
                            let _ = map_.next_value::<serde::de::IgnoredAny>()?;
                        }
                    }
                }
                Ok(PairFillSummary {
                    quote: quote__,
                    hedge: hedge__,
                    date: date__.unwrap_or_default(),
                })
            }
        }
        deserializer.deserialize_struct("kdo.v1.order_log.PairFillSummary", FIELDS, GeneratedVisitor)
    }
}
impl serde::Serialize for SideFillSummary {
    #[allow(deprecated)]
    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        use serde::ser::SerializeStruct;
        let mut len = 0;
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        let mut struct_ser = serializer.serialize_struct("kdo.v1.order_log.SideFillSummary", len)?;
        if true {
            #[allow(clippy::needless_borrow)]
            #[allow(clippy::needless_borrows_for_generic_args)]
            struct_ser.serialize_field("fill_count", ToString::to_string(&self.fill_count).as_str())?;
        }
        if true {
            #[allow(clippy::needless_borrow)]
            #[allow(clippy::needless_borrows_for_generic_args)]
            struct_ser.serialize_field("filled_quantity", ToString::to_string(&self.filled_quantity).as_str())?;
        }
        if true {
            struct_ser.serialize_field("avg_price", &self.avg_price)?;
        }
        if true {
            struct_ser.serialize_field("amount", &self.amount)?;
        }
        if true {
            #[allow(clippy::needless_borrow)]
            #[allow(clippy::needless_borrows_for_generic_args)]
            struct_ser.serialize_field("last_exchange_time", ToString::to_string(&self.last_exchange_time).as_str())?;
        }
        struct_ser.end()
    }
}
impl<'de> serde::Deserialize<'de> for SideFillSummary {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "fill_count",
            "fillCount",
            "filled_quantity",
            "filledQuantity",
            "avg_price",
            "avgPrice",
            "amount",
            "last_exchange_time",
            "lastExchangeTime",
        ];

        #[allow(clippy::enum_variant_names)]
        enum GeneratedField {
            FillCount,
            FilledQuantity,
            AvgPrice,
            Amount,
            LastExchangeTime,
            __SkipField__,
        }
        impl<'de> serde::Deserialize<'de> for GeneratedField {
            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
            where
                D: serde::Deserializer<'de>,
            {
                struct GeneratedVisitor;

                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
                    type Value = GeneratedField;

                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                        write!(formatter, "expected one of: {:?}", &FIELDS)
                    }

                    #[allow(unused_variables)]
                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
                    where
                        E: serde::de::Error,
                    {
                        match value {
                            "fillCount" | "fill_count" => Ok(GeneratedField::FillCount),
                            "filledQuantity" | "filled_quantity" => Ok(GeneratedField::FilledQuantity),
                            "avgPrice" | "avg_price" => Ok(GeneratedField::AvgPrice),
                            "amount" => Ok(GeneratedField::Amount),
                            "lastExchangeTime" | "last_exchange_time" => Ok(GeneratedField::LastExchangeTime),
                            _ => Ok(GeneratedField::__SkipField__),
                        }
                    }
                }
                deserializer.deserialize_identifier(GeneratedVisitor)
            }
        }
        struct GeneratedVisitor;
        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
            type Value = SideFillSummary;

            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                formatter.write_str("struct kdo.v1.order_log.SideFillSummary")
            }

            fn visit_map<V>(self, mut map_: V) -> std::result::Result<SideFillSummary, V::Error>
                where
                    V: serde::de::MapAccess<'de>,
            {
                let mut fill_count__ = None;
                let mut filled_quantity__ = None;
                let mut avg_price__ = None;
                let mut amount__ = None;
                let mut last_exchange_time__ = None;
                while let Some(k) = map_.next_key()? {
                    match k {
                        GeneratedField::FillCount => {
                            if fill_count__.is_some() {
                                return Err(serde::de::Error::duplicate_field("fillCount"));
                            }
                            fill_count__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::FilledQuantity => {
                            if filled_quantity__.is_some() {
                                return Err(serde::de::Error::duplicate_field("filledQuantity"));
                            }
                            filled_quantity__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::AvgPrice => {
                            if avg_price__.is_some() {
                                return Err(serde::de::Error::duplicate_field("avgPrice"));
                            }
                            avg_price__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::Amount => {
                            if amount__.is_some() {
                                return Err(serde::de::Error::duplicate_field("amount"));
                            }
                            amount__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::LastExchangeTime => {
                            if last_exchange_time__.is_some() {
                                return Err(serde::de::Error::duplicate_field("lastExchangeTime"));
                            }
                            last_exchange_time__ = 
                                Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
                            ;
                        }
                        GeneratedField::__SkipField__ => {
                            let _ = map_.next_value::<serde::de::IgnoredAny>()?;
                        }
                    }
                }
                Ok(SideFillSummary {
                    fill_count: fill_count__.unwrap_or_default(),
                    filled_quantity: filled_quantity__.unwrap_or_default(),
                    avg_price: avg_price__.unwrap_or_default(),
                    amount: amount__.unwrap_or_default(),
                    last_exchange_time: last_exchange_time__.unwrap_or_default(),
                })
            }
        }
        deserializer.deserialize_struct("kdo.v1.order_log.SideFillSummary", FIELDS, GeneratedVisitor)
    }
}
impl serde::Serialize for StreamHedgePairDetailRequest {
    #[allow(deprecated)]
    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        use serde::ser::SerializeStruct;
        let mut len = 0;
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        let mut struct_ser = serializer.serialize_struct("kdo.v1.order_log.StreamHedgePairDetailRequest", len)?;
        if true {
            struct_ser.serialize_field("symbol", &self.symbol)?;
        }
        if let Some(v) = self.fund_code.as_ref() {
            struct_ser.serialize_field("fund_code", v)?;
        }
        if let Some(v) = self.hedge_symbol.as_ref() {
            struct_ser.serialize_field("hedge_symbol", v)?;
        }
        if let Some(v) = self.quote_side.as_ref() {
            let v = super::common::OrderSide::try_from(*v)
                .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", *v)))?;
            struct_ser.serialize_field("quote_side", &v)?;
        }
        if let Some(v) = self.since_hedge_exchange_time_us.as_ref() {
            #[allow(clippy::needless_borrow)]
            #[allow(clippy::needless_borrows_for_generic_args)]
            struct_ser.serialize_field("since_hedge_exchange_time_us", ToString::to_string(&v).as_str())?;
        }
        struct_ser.end()
    }
}
impl<'de> serde::Deserialize<'de> for StreamHedgePairDetailRequest {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "symbol",
            "fund_code",
            "fundCode",
            "hedge_symbol",
            "hedgeSymbol",
            "quote_side",
            "quoteSide",
            "since_hedge_exchange_time_us",
            "sinceHedgeExchangeTimeUs",
        ];

        #[allow(clippy::enum_variant_names)]
        enum GeneratedField {
            Symbol,
            FundCode,
            HedgeSymbol,
            QuoteSide,
            SinceHedgeExchangeTimeUs,
            __SkipField__,
        }
        impl<'de> serde::Deserialize<'de> for GeneratedField {
            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
            where
                D: serde::Deserializer<'de>,
            {
                struct GeneratedVisitor;

                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
                    type Value = GeneratedField;

                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                        write!(formatter, "expected one of: {:?}", &FIELDS)
                    }

                    #[allow(unused_variables)]
                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
                    where
                        E: serde::de::Error,
                    {
                        match value {
                            "symbol" => Ok(GeneratedField::Symbol),
                            "fundCode" | "fund_code" => Ok(GeneratedField::FundCode),
                            "hedgeSymbol" | "hedge_symbol" => Ok(GeneratedField::HedgeSymbol),
                            "quoteSide" | "quote_side" => Ok(GeneratedField::QuoteSide),
                            "sinceHedgeExchangeTimeUs" | "since_hedge_exchange_time_us" => Ok(GeneratedField::SinceHedgeExchangeTimeUs),
                            _ => Ok(GeneratedField::__SkipField__),
                        }
                    }
                }
                deserializer.deserialize_identifier(GeneratedVisitor)
            }
        }
        struct GeneratedVisitor;
        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
            type Value = StreamHedgePairDetailRequest;

            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                formatter.write_str("struct kdo.v1.order_log.StreamHedgePairDetailRequest")
            }

            fn visit_map<V>(self, mut map_: V) -> std::result::Result<StreamHedgePairDetailRequest, V::Error>
                where
                    V: serde::de::MapAccess<'de>,
            {
                let mut symbol__ = None;
                let mut fund_code__ = None;
                let mut hedge_symbol__ = None;
                let mut quote_side__ = None;
                let mut since_hedge_exchange_time_us__ = None;
                while let Some(k) = map_.next_key()? {
                    match k {
                        GeneratedField::Symbol => {
                            if symbol__.is_some() {
                                return Err(serde::de::Error::duplicate_field("symbol"));
                            }
                            symbol__ = Some(map_.next_value()?);
                        }
                        GeneratedField::FundCode => {
                            if fund_code__.is_some() {
                                return Err(serde::de::Error::duplicate_field("fundCode"));
                            }
                            fund_code__ = map_.next_value()?;
                        }
                        GeneratedField::HedgeSymbol => {
                            if hedge_symbol__.is_some() {
                                return Err(serde::de::Error::duplicate_field("hedgeSymbol"));
                            }
                            hedge_symbol__ = map_.next_value()?;
                        }
                        GeneratedField::QuoteSide => {
                            if quote_side__.is_some() {
                                return Err(serde::de::Error::duplicate_field("quoteSide"));
                            }
                            quote_side__ = map_.next_value::<::std::option::Option<super::common::OrderSide>>()?.map(|x| x as i32);
                        }
                        GeneratedField::SinceHedgeExchangeTimeUs => {
                            if since_hedge_exchange_time_us__.is_some() {
                                return Err(serde::de::Error::duplicate_field("sinceHedgeExchangeTimeUs"));
                            }
                            since_hedge_exchange_time_us__ = 
                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
                            ;
                        }
                        GeneratedField::__SkipField__ => {
                            let _ = map_.next_value::<serde::de::IgnoredAny>()?;
                        }
                    }
                }
                Ok(StreamHedgePairDetailRequest {
                    symbol: symbol__.unwrap_or_default(),
                    fund_code: fund_code__,
                    hedge_symbol: hedge_symbol__,
                    quote_side: quote_side__,
                    since_hedge_exchange_time_us: since_hedge_exchange_time_us__,
                })
            }
        }
        deserializer.deserialize_struct("kdo.v1.order_log.StreamHedgePairDetailRequest", FIELDS, GeneratedVisitor)
    }
}
impl serde::Serialize for StreamPairFillSummaryRequest {
    #[allow(deprecated)]
    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        use serde::ser::SerializeStruct;
        let mut len = 0;
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        if true {
            len += 1;
        }
        let mut struct_ser = serializer.serialize_struct("kdo.v1.order_log.StreamPairFillSummaryRequest", len)?;
        if true {
            struct_ser.serialize_field("quote_fund_code", &self.quote_fund_code)?;
        }
        if true {
            struct_ser.serialize_field("quote_symbol", &self.quote_symbol)?;
        }
        if true {
            struct_ser.serialize_field("hedge_fund_code", &self.hedge_fund_code)?;
        }
        if true {
            struct_ser.serialize_field("hedge_symbol", &self.hedge_symbol)?;
        }
        if let Some(v) = self.date.as_ref() {
            struct_ser.serialize_field("date", v)?;
        }
        struct_ser.end()
    }
}
impl<'de> serde::Deserialize<'de> for StreamPairFillSummaryRequest {
    #[allow(deprecated)]
    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        const FIELDS: &[&str] = &[
            "quote_fund_code",
            "quoteFundCode",
            "quote_symbol",
            "quoteSymbol",
            "hedge_fund_code",
            "hedgeFundCode",
            "hedge_symbol",
            "hedgeSymbol",
            "date",
        ];

        #[allow(clippy::enum_variant_names)]
        enum GeneratedField {
            QuoteFundCode,
            QuoteSymbol,
            HedgeFundCode,
            HedgeSymbol,
            Date,
            __SkipField__,
        }
        impl<'de> serde::Deserialize<'de> for GeneratedField {
            fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
            where
                D: serde::Deserializer<'de>,
            {
                struct GeneratedVisitor;

                impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
                    type Value = GeneratedField;

                    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                        write!(formatter, "expected one of: {:?}", &FIELDS)
                    }

                    #[allow(unused_variables)]
                    fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
                    where
                        E: serde::de::Error,
                    {
                        match value {
                            "quoteFundCode" | "quote_fund_code" => Ok(GeneratedField::QuoteFundCode),
                            "quoteSymbol" | "quote_symbol" => Ok(GeneratedField::QuoteSymbol),
                            "hedgeFundCode" | "hedge_fund_code" => Ok(GeneratedField::HedgeFundCode),
                            "hedgeSymbol" | "hedge_symbol" => Ok(GeneratedField::HedgeSymbol),
                            "date" => Ok(GeneratedField::Date),
                            _ => Ok(GeneratedField::__SkipField__),
                        }
                    }
                }
                deserializer.deserialize_identifier(GeneratedVisitor)
            }
        }
        struct GeneratedVisitor;
        impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
            type Value = StreamPairFillSummaryRequest;

            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                formatter.write_str("struct kdo.v1.order_log.StreamPairFillSummaryRequest")
            }

            fn visit_map<V>(self, mut map_: V) -> std::result::Result<StreamPairFillSummaryRequest, V::Error>
                where
                    V: serde::de::MapAccess<'de>,
            {
                let mut quote_fund_code__ = None;
                let mut quote_symbol__ = None;
                let mut hedge_fund_code__ = None;
                let mut hedge_symbol__ = None;
                let mut date__ = None;
                while let Some(k) = map_.next_key()? {
                    match k {
                        GeneratedField::QuoteFundCode => {
                            if quote_fund_code__.is_some() {
                                return Err(serde::de::Error::duplicate_field("quoteFundCode"));
                            }
                            quote_fund_code__ = Some(map_.next_value()?);
                        }
                        GeneratedField::QuoteSymbol => {
                            if quote_symbol__.is_some() {
                                return Err(serde::de::Error::duplicate_field("quoteSymbol"));
                            }
                            quote_symbol__ = Some(map_.next_value()?);
                        }
                        GeneratedField::HedgeFundCode => {
                            if hedge_fund_code__.is_some() {
                                return Err(serde::de::Error::duplicate_field("hedgeFundCode"));
                            }
                            hedge_fund_code__ = Some(map_.next_value()?);
                        }
                        GeneratedField::HedgeSymbol => {
                            if hedge_symbol__.is_some() {
                                return Err(serde::de::Error::duplicate_field("hedgeSymbol"));
                            }
                            hedge_symbol__ = Some(map_.next_value()?);
                        }
                        GeneratedField::Date => {
                            if date__.is_some() {
                                return Err(serde::de::Error::duplicate_field("date"));
                            }
                            date__ = 
                                map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0)
                            ;
                        }
                        GeneratedField::__SkipField__ => {
                            let _ = map_.next_value::<serde::de::IgnoredAny>()?;
                        }
                    }
                }
                Ok(StreamPairFillSummaryRequest {
                    quote_fund_code: quote_fund_code__.unwrap_or_default(),
                    quote_symbol: quote_symbol__.unwrap_or_default(),
                    hedge_fund_code: hedge_fund_code__.unwrap_or_default(),
                    hedge_symbol: hedge_symbol__.unwrap_or_default(),
                    date: date__,
                })
            }
        }
        deserializer.deserialize_struct("kdo.v1.order_log.StreamPairFillSummaryRequest", FIELDS, GeneratedVisitor)
    }
}
