#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Futures {
#[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 underlying_symbol: ::prost::alloc::string::String,
#[prost(string, tag="8")]
pub underlying_name: ::prost::alloc::string::String,
#[prost(string, tag="9")]
pub expiry_date: ::prost::alloc::string::String,
#[prost(double, tag="10")]
pub multiplier: f64,
#[prost(double, tag="11")]
pub tick_size: f64,
#[prost(int64, tag="12")]
pub tick_value: i64,
#[prost(enumeration="SettlementType", tag="13")]
pub settlement_type: i32,
#[prost(bool, tag="14")]
pub tradable: bool,
#[prost(string, tag="15")]
pub last_trading_date: ::prost::alloc::string::String,
#[prost(enumeration="FuturesProductType", tag="16")]
pub product_type: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetFuturesRequest {
#[prost(string, tag="1")]
pub futures: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListFuturesRequest {
#[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 ListFuturesResponse {
#[prost(message, repeated, tag="1")]
pub futures: ::prost::alloc::vec::Vec<Futures>,
#[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 SettlementType {
Unspecified = 0,
Cash = 1,
Physical = 2,
}
impl SettlementType {
pub fn as_str_name(&self) -> &'static str {
match self {
SettlementType::Unspecified => "SETTLEMENT_TYPE_UNSPECIFIED",
SettlementType::Cash => "SETTLEMENT_TYPE_CASH",
SettlementType::Physical => "SETTLEMENT_TYPE_PHYSICAL",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SETTLEMENT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"SETTLEMENT_TYPE_CASH" => Some(Self::Cash),
"SETTLEMENT_TYPE_PHYSICAL" => Some(Self::Physical),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum FuturesProductType {
Unspecified = 0,
Index = 1,
Stock = 2,
Bond = 3,
Currency = 4,
Commodity = 5,
}
impl FuturesProductType {
pub fn as_str_name(&self) -> &'static str {
match self {
FuturesProductType::Unspecified => "FUTURES_PRODUCT_TYPE_UNSPECIFIED",
FuturesProductType::Index => "FUTURES_PRODUCT_TYPE_INDEX",
FuturesProductType::Stock => "FUTURES_PRODUCT_TYPE_STOCK",
FuturesProductType::Bond => "FUTURES_PRODUCT_TYPE_BOND",
FuturesProductType::Currency => "FUTURES_PRODUCT_TYPE_CURRENCY",
FuturesProductType::Commodity => "FUTURES_PRODUCT_TYPE_COMMODITY",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"FUTURES_PRODUCT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"FUTURES_PRODUCT_TYPE_INDEX" => Some(Self::Index),
"FUTURES_PRODUCT_TYPE_STOCK" => Some(Self::Stock),
"FUTURES_PRODUCT_TYPE_BOND" => Some(Self::Bond),
"FUTURES_PRODUCT_TYPE_CURRENCY" => Some(Self::Currency),
"FUTURES_PRODUCT_TYPE_COMMODITY" => Some(Self::Commodity),
_ => None,
}
}
}
include!("master_sync.v1.futures.tonic.rs");
include!("master_sync.v1.futures.serde.rs");