1#[allow(clippy::derive_partial_eq_without_eq)]
4#[derive(Clone, PartialEq, ::prost::Message)]
5pub struct Etf {
6 #[prost(uint64, tag="1")]
8 pub id: u64,
9 #[prost(string, tag="2")]
11 pub symbol: ::prost::alloc::string::String,
12 #[prost(string, tag="3")]
14 pub code: ::prost::alloc::string::String,
15 #[prost(string, tag="4")]
17 pub name: ::prost::alloc::string::String,
18 #[prost(string, tag="5")]
20 pub prev_close: ::prost::alloc::string::String,
21 #[prost(string, tag="6")]
22 pub last_price: ::prost::alloc::string::String,
23 #[prost(string, tag="7")]
24 pub prev_nav: ::prost::alloc::string::String,
25 #[prost(string, tag="8")]
26 pub last_inav: ::prost::alloc::string::String,
27 #[prost(map="string, message", tag="10")]
29 pub constituents: ::std::collections::HashMap<::prost::alloc::string::String, EtfPdfConstituent>,
30 #[prost(int64, tag="11")]
32 pub creation_unit: i64,
33 #[prost(enumeration="ReplicationMethod", tag="12")]
35 pub replication_method: i32,
36 #[prost(int64, tag="13")]
38 pub tick_size: i64,
39 #[prost(int64, tag="14")]
41 pub listed_quantity: i64,
42 #[prost(float, tag="15")]
43 pub leverage: f32,
44 #[prost(bool, tag="16")]
45 pub tradable: bool,
46 #[prost(bool, tag="17")]
47 pub short_sellable: bool,
48 #[prost(bool, tag="23")]
49 pub cash_creditable: bool,
50 #[prost(int64, tag="24")]
51 pub cash_creation_amount: i64,
52}
53#[allow(clippy::derive_partial_eq_without_eq)]
54#[derive(Clone, PartialEq, ::prost::Message)]
55pub struct EtfConstituent {
56 #[prost(oneof="etf_constituent::ConstituentType", tags="1, 2, 3")]
57 pub constituent_type: ::core::option::Option<etf_constituent::ConstituentType>,
58}
59pub mod etf_constituent {
61 #[allow(clippy::derive_partial_eq_without_eq)]
62#[derive(Clone, PartialEq, ::prost::Oneof)]
63 pub enum ConstituentType {
64 #[prost(message, tag="1")]
65 Stock(super::StockConstituent),
66 #[prost(message, tag="2")]
67 Futures(super::FuturesConstituent),
68 #[prost(message, tag="3")]
69 Cash(super::CashConstituent),
70 }
71}
72#[allow(clippy::derive_partial_eq_without_eq)]
73#[derive(Clone, PartialEq, ::prost::Message)]
74pub struct StockConstituent {
75 #[prost(string, tag="1")]
76 pub symbol: ::prost::alloc::string::String,
77 #[prost(string, tag="2")]
78 pub prev_close: ::prost::alloc::string::String,
79 #[prost(string, tag="3")]
80 pub last_price: ::prost::alloc::string::String,
81 #[prost(int64, tag="4")]
82 pub quantity: i64,
83 #[prost(int64, tag="5")]
84 pub last_valuation: i64,
85 #[prost(int64, tag="6")]
86 pub notional_amount: i64,
87 #[prost(uint32, tag="7")]
88 pub num_members: u32,
89}
90#[allow(clippy::derive_partial_eq_without_eq)]
91#[derive(Clone, PartialEq, ::prost::Message)]
92pub struct FuturesConstituent {
93 #[prost(string, tag="1")]
94 pub symbol: ::prost::alloc::string::String,
95 #[prost(string, tag="2")]
96 pub prev_close: ::prost::alloc::string::String,
97 #[prost(string, tag="3")]
98 pub last_price: ::prost::alloc::string::String,
99 #[prost(float, tag="4")]
100 pub quantity: f32,
101 #[prost(double, tag="5")]
102 pub multiple: f64,
103 #[prost(int64, tag="6")]
104 pub last_valuation: i64,
105 #[prost(int64, tag="7")]
106 pub notional_amount: i64,
107 #[prost(uint32, tag="8")]
108 pub num_members: u32,
109}
110#[allow(clippy::derive_partial_eq_without_eq)]
111#[derive(Clone, PartialEq, ::prost::Message)]
112pub struct CashConstituent {
113 #[prost(string, tag="1")]
114 pub symbol: ::prost::alloc::string::String,
115 #[prost(int64, tag="2")]
116 pub prev_valuation: i64,
117 #[prost(uint32, tag="3")]
118 pub num_members: u32,
119}
120#[allow(clippy::derive_partial_eq_without_eq)]
122#[derive(Clone, PartialEq, ::prost::Message)]
123pub struct EtfPdfConstituent {
124 #[prost(string, tag="1")]
128 pub symbol: ::prost::alloc::string::String,
129 #[prost(string, tag="2")]
131 pub name: ::prost::alloc::string::String,
132 #[prost(enumeration="ProductType", tag="3")]
134 pub product_type: i32,
135 #[prost(int64, tag="4")]
137 pub quantity: i64,
138}
139#[allow(clippy::derive_partial_eq_without_eq)]
143#[derive(Clone, PartialEq, ::prost::Message)]
144pub struct GetEtfRequest {
145 #[prost(string, tag="1")]
146 pub etf: ::prost::alloc::string::String,
147}
148#[allow(clippy::derive_partial_eq_without_eq)]
150#[derive(Clone, PartialEq, ::prost::Message)]
151pub struct ListEtfsRequest {
152 #[prost(uint32, optional, tag="1")]
154 pub page_size: ::core::option::Option<u32>,
155 #[prost(string, optional, tag="2")]
157 pub page_token: ::core::option::Option<::prost::alloc::string::String>,
158 #[prost(string, tag="3")]
160 pub filter: ::prost::alloc::string::String,
161}
162#[allow(clippy::derive_partial_eq_without_eq)]
163#[derive(Clone, PartialEq, ::prost::Message)]
164pub struct ListEtfsResponse {
165 #[prost(message, repeated, tag="1")]
167 pub etfs: ::prost::alloc::vec::Vec<Etf>,
168 #[prost(string, tag="2")]
170 pub next_page_token: ::prost::alloc::string::String,
171}
172#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
174#[repr(i32)]
175pub enum ProductType {
176 Unspecified = 0,
177 Stock = 1,
178 Futures = 2,
179 Etf = 3,
180 Cash = 4,
181}
182impl ProductType {
183 pub fn as_str_name(&self) -> &'static str {
188 match self {
189 ProductType::Unspecified => "PRODUCT_TYPE_UNSPECIFIED",
190 ProductType::Stock => "PRODUCT_TYPE_STOCK",
191 ProductType::Futures => "PRODUCT_TYPE_FUTURES",
192 ProductType::Etf => "PRODUCT_TYPE_ETF",
193 ProductType::Cash => "PRODUCT_TYPE_CASH",
194 }
195 }
196 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
198 match value {
199 "PRODUCT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
200 "PRODUCT_TYPE_STOCK" => Some(Self::Stock),
201 "PRODUCT_TYPE_FUTURES" => Some(Self::Futures),
202 "PRODUCT_TYPE_ETF" => Some(Self::Etf),
203 "PRODUCT_TYPE_CASH" => Some(Self::Cash),
204 _ => None,
205 }
206 }
207}
208#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
210#[repr(i32)]
211pub enum ReplicationMethod {
212 Unspecified = 0,
213 Active = 1,
214 Physical = 2,
215 Synthetic = 3,
216}
217impl ReplicationMethod {
218 pub fn as_str_name(&self) -> &'static str {
223 match self {
224 ReplicationMethod::Unspecified => "REPLICATION_METHOD_UNSPECIFIED",
225 ReplicationMethod::Active => "REPLICATION_METHOD_ACTIVE",
226 ReplicationMethod::Physical => "REPLICATION_METHOD_PHYSICAL",
227 ReplicationMethod::Synthetic => "REPLICATION_METHOD_SYNTHETIC",
228 }
229 }
230 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
232 match value {
233 "REPLICATION_METHOD_UNSPECIFIED" => Some(Self::Unspecified),
234 "REPLICATION_METHOD_ACTIVE" => Some(Self::Active),
235 "REPLICATION_METHOD_PHYSICAL" => Some(Self::Physical),
236 "REPLICATION_METHOD_SYNTHETIC" => Some(Self::Synthetic),
237 _ => None,
238 }
239 }
240}
241include!("master_sync.v1.etf.tonic.rs");
242include!("master_sync.v1.etf.serde.rs");
243