#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Basket {
#[prost(string, tag="1")]
pub name: ::prost::alloc::string::String,
#[prost(int32, tag="2")]
pub id: i32,
#[prost(string, tag="3")]
pub display_name: ::prost::alloc::string::String,
#[prost(enumeration="BasketType", tag="4")]
pub basket_type: i32,
#[prost(message, repeated, tag="5")]
pub items: ::prost::alloc::vec::Vec<BasketItem>,
#[prost(message, optional, tag="6")]
pub execution_config: ::core::option::Option<ExecutionConfig>,
#[prost(message, optional, tag="11")]
pub create_time: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
#[prost(message, optional, tag="12")]
pub update_time: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
#[prost(oneof="basket::TypeConfig", tags="7, 8")]
pub type_config: ::core::option::Option<basket::TypeConfig>,
}
pub mod basket {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum TypeConfig {
#[prost(message, tag="7")]
EtfConstituent(super::EtfConstituentConfig),
#[prost(message, tag="8")]
Liquidation(super::LiquidationConfig),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EtfConstituentConfig {
#[prost(string, tag="1")]
pub etf_symbol: ::prost::alloc::string::String,
#[prost(int64, tag="2")]
pub quantity: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct LiquidationConfig {
#[prost(message, optional, tag="1")]
pub target_time: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BasketItem {
#[prost(string, tag="1")]
pub symbol: ::prost::alloc::string::String,
#[prost(int64, tag="2")]
pub quantity: i64,
#[prost(enumeration="PriceSource", tag="3")]
pub price_source: i32,
#[prost(double, tag="4")]
pub multiple: f64,
#[prost(string, tag="5")]
pub fund_code: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecutionConfig {
#[prost(uint32, tag="1")]
pub rounds: u32,
#[prost(uint64, tag="2")]
pub round_delay_ms: u64,
#[prost(double, tag="3")]
pub fill_threshold_pct: f64,
#[prost(enumeration="OrderType", tag="4")]
pub order_type: i32,
#[prost(map="string, message", tag="5")]
pub pricing_configs: ::std::collections::HashMap<::prost::alloc::string::String, SymbolPricingConfig>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SymbolPricingConfig {
#[prost(enumeration="PriceSource", tag="1")]
pub buy_price_source: i32,
#[prost(enumeration="PriceSource", tag="2")]
pub sell_price_source: i32,
#[prost(int32, tag="3")]
pub price_offset_ticks: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BasketValue {
#[prost(string, tag="1")]
pub name: ::prost::alloc::string::String,
#[prost(int32, tag="2")]
pub id: i32,
#[prost(int64, tag="3")]
pub total_value: i64,
#[prost(message, repeated, tag="4")]
pub item_values: ::prost::alloc::vec::Vec<BasketItemValue>,
#[prost(message, optional, tag="5")]
pub calculated_at: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BasketItemValue {
#[prost(string, tag="1")]
pub symbol: ::prost::alloc::string::String,
#[prost(int64, tag="2")]
pub quantity: i64,
#[prost(string, tag="3")]
pub price: ::prost::alloc::string::String,
#[prost(enumeration="PriceSource", tag="4")]
pub price_source: i32,
#[prost(double, tag="5")]
pub multiple: f64,
#[prost(int64, tag="6")]
pub value: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBasketRequest {
#[prost(string, tag="1")]
pub basket: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBasketsRequest {
#[prost(int32, optional, tag="1")]
pub page_size: ::core::option::Option<i32>,
#[prost(string, optional, tag="2")]
pub page_token: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, tag="3")]
pub filter: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBasketsResponse {
#[prost(message, repeated, tag="1")]
pub baskets: ::prost::alloc::vec::Vec<Basket>,
#[prost(string, tag="2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateBasketRequest {
#[prost(message, optional, tag="1")]
pub basket: ::core::option::Option<Basket>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateBasketRequest {
#[prost(message, optional, tag="1")]
pub basket: ::core::option::Option<Basket>,
#[prost(message, optional, tag="2")]
pub update_mask: ::core::option::Option<super::super::super::google::protobuf::FieldMask>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteBasketRequest {
#[prost(string, tag="1")]
pub basket: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBasketValueRequest {
#[prost(string, tag="1")]
pub basket: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum BasketType {
Unspecified = 0,
EtfConstituent = 1,
Liquidation = 2,
Custom = 3,
}
impl BasketType {
pub fn as_str_name(&self) -> &'static str {
match self {
BasketType::Unspecified => "BASKET_TYPE_UNSPECIFIED",
BasketType::EtfConstituent => "BASKET_TYPE_ETF_CONSTITUENT",
BasketType::Liquidation => "BASKET_TYPE_LIQUIDATION",
BasketType::Custom => "BASKET_TYPE_CUSTOM",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"BASKET_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"BASKET_TYPE_ETF_CONSTITUENT" => Some(Self::EtfConstituent),
"BASKET_TYPE_LIQUIDATION" => Some(Self::Liquidation),
"BASKET_TYPE_CUSTOM" => Some(Self::Custom),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PriceSource {
Unspecified = 0,
MidPrice = 1,
Bid1 = 2,
Ask1 = 3,
Bid2 = 4,
Ask2 = 5,
LastPrice = 6,
Bid3 = 7,
Ask3 = 8,
}
impl PriceSource {
pub fn as_str_name(&self) -> &'static str {
match self {
PriceSource::Unspecified => "PRICE_SOURCE_UNSPECIFIED",
PriceSource::MidPrice => "PRICE_SOURCE_MID_PRICE",
PriceSource::Bid1 => "PRICE_SOURCE_BID1",
PriceSource::Ask1 => "PRICE_SOURCE_ASK1",
PriceSource::Bid2 => "PRICE_SOURCE_BID2",
PriceSource::Ask2 => "PRICE_SOURCE_ASK2",
PriceSource::LastPrice => "PRICE_SOURCE_LAST_PRICE",
PriceSource::Bid3 => "PRICE_SOURCE_BID3",
PriceSource::Ask3 => "PRICE_SOURCE_ASK3",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"PRICE_SOURCE_UNSPECIFIED" => Some(Self::Unspecified),
"PRICE_SOURCE_MID_PRICE" => Some(Self::MidPrice),
"PRICE_SOURCE_BID1" => Some(Self::Bid1),
"PRICE_SOURCE_ASK1" => Some(Self::Ask1),
"PRICE_SOURCE_BID2" => Some(Self::Bid2),
"PRICE_SOURCE_ASK2" => Some(Self::Ask2),
"PRICE_SOURCE_LAST_PRICE" => Some(Self::LastPrice),
"PRICE_SOURCE_BID3" => Some(Self::Bid3),
"PRICE_SOURCE_ASK3" => Some(Self::Ask3),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum OrderType {
Unspecified = 0,
Market = 1,
Limit = 2,
Aggressive = 3,
}
impl OrderType {
pub fn as_str_name(&self) -> &'static str {
match self {
OrderType::Unspecified => "ORDER_TYPE_UNSPECIFIED",
OrderType::Market => "ORDER_TYPE_MARKET",
OrderType::Limit => "ORDER_TYPE_LIMIT",
OrderType::Aggressive => "ORDER_TYPE_AGGRESSIVE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ORDER_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"ORDER_TYPE_MARKET" => Some(Self::Market),
"ORDER_TYPE_LIMIT" => Some(Self::Limit),
"ORDER_TYPE_AGGRESSIVE" => Some(Self::Aggressive),
_ => None,
}
}
}
include!("kdo.v1.basket.tonic.rs");
include!("kdo.v1.basket.serde.rs");