#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Etf {
#[prost(uint64, tag="1")]
pub id: u64,
#[prost(string, tag="2")]
pub symbol: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub code: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag="5")]
pub prev_close: ::prost::alloc::string::String,
#[prost(string, tag="6")]
pub last_price: ::prost::alloc::string::String,
#[prost(string, tag="7")]
pub prev_close_nav: ::prost::alloc::string::String,
#[prost(string, tag="8")]
pub last_ask_inav: ::prost::alloc::string::String,
#[prost(string, tag="9")]
pub last_bid_inav: ::prost::alloc::string::String,
#[prost(map="string, message", tag="10")]
pub constituents: ::std::collections::HashMap<::prost::alloc::string::String, EtfPdfConstituent>,
#[prost(int64, tag="11")]
pub creation_unit: i64,
#[prost(enumeration="ReplicationMethod", tag="12")]
pub replication_method: i32,
#[prost(int64, tag="13")]
pub tick_size: i64,
#[prost(int64, tag="14")]
pub listed_quantity: i64,
#[prost(float, tag="15")]
pub leverage: f32,
#[prost(bool, tag="16")]
pub tradable: bool,
#[prost(bool, tag="17")]
pub short_sellable: bool,
#[prost(bool, tag="23")]
pub cash_creditable: bool,
#[prost(int64, tag="24")]
pub cash_creation_amount: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EtfConstituent {
#[prost(oneof="etf_constituent::ConstituentType", tags="1, 2, 3")]
pub constituent_type: ::core::option::Option<etf_constituent::ConstituentType>,
}
pub mod etf_constituent {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ConstituentType {
#[prost(message, tag="1")]
Stock(super::StockConstituent),
#[prost(message, tag="2")]
Futures(super::FuturesConstituent),
#[prost(message, tag="3")]
Cash(super::CashConstituent),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StockConstituent {
#[prost(string, tag="1")]
pub symbol: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub prev_close: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub last_price: ::prost::alloc::string::String,
#[prost(int64, tag="4")]
pub quantity: i64,
#[prost(int64, tag="5")]
pub last_valuation: i64,
#[prost(int64, tag="6")]
pub notional_amount: i64,
#[prost(uint32, tag="7")]
pub num_members: u32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FuturesConstituent {
#[prost(string, tag="1")]
pub symbol: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub prev_close: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub last_price: ::prost::alloc::string::String,
#[prost(float, tag="4")]
pub quantity: f32,
#[prost(double, tag="5")]
pub multiple: f64,
#[prost(int64, tag="6")]
pub last_valuation: i64,
#[prost(int64, tag="7")]
pub notional_amount: i64,
#[prost(uint32, tag="8")]
pub num_members: u32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CashConstituent {
#[prost(string, tag="1")]
pub symbol: ::prost::alloc::string::String,
#[prost(int64, tag="2")]
pub prev_valuation: i64,
#[prost(uint32, tag="3")]
pub num_members: u32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EtfPdfConstituent {
#[prost(string, tag="1")]
pub symbol: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub name: ::prost::alloc::string::String,
#[prost(enumeration="ProductType", tag="3")]
pub product_type: i32,
#[prost(int64, tag="4")]
pub quantity: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetEtfRequest {
#[prost(string, tag="1")]
pub etf: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListEtfsRequest {
#[prost(uint32, optional, tag="1")]
pub page_size: ::core::option::Option<u32>,
#[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 ListEtfsResponse {
#[prost(message, repeated, tag="1")]
pub etfs: ::prost::alloc::vec::Vec<Etf>,
#[prost(string, tag="2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ProductType {
Unspecified = 0,
Stock = 1,
Futures = 2,
Etf = 3,
Cash = 4,
}
impl ProductType {
pub fn as_str_name(&self) -> &'static str {
match self {
ProductType::Unspecified => "PRODUCT_TYPE_UNSPECIFIED",
ProductType::Stock => "PRODUCT_TYPE_STOCK",
ProductType::Futures => "PRODUCT_TYPE_FUTURES",
ProductType::Etf => "PRODUCT_TYPE_ETF",
ProductType::Cash => "PRODUCT_TYPE_CASH",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"PRODUCT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"PRODUCT_TYPE_STOCK" => Some(Self::Stock),
"PRODUCT_TYPE_FUTURES" => Some(Self::Futures),
"PRODUCT_TYPE_ETF" => Some(Self::Etf),
"PRODUCT_TYPE_CASH" => Some(Self::Cash),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ReplicationMethod {
Unspecified = 0,
Active = 1,
Physical = 2,
Synthetic = 3,
}
impl ReplicationMethod {
pub fn as_str_name(&self) -> &'static str {
match self {
ReplicationMethod::Unspecified => "REPLICATION_METHOD_UNSPECIFIED",
ReplicationMethod::Active => "REPLICATION_METHOD_ACTIVE",
ReplicationMethod::Physical => "REPLICATION_METHOD_PHYSICAL",
ReplicationMethod::Synthetic => "REPLICATION_METHOD_SYNTHETIC",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"REPLICATION_METHOD_UNSPECIFIED" => Some(Self::Unspecified),
"REPLICATION_METHOD_ACTIVE" => Some(Self::Active),
"REPLICATION_METHOD_PHYSICAL" => Some(Self::Physical),
"REPLICATION_METHOD_SYNTHETIC" => Some(Self::Synthetic),
_ => None,
}
}
}
include!("master_sync.v1.etf.tonic.rs");
include!("master_sync.v1.etf.serde.rs");