#[allow(unused_imports)]
use serde_json::Value;
#[derive(Debug, Serialize, Deserialize)]
pub struct OrderData {
#[serde(rename = "account")]
account: Option<String>,
#[serde(rename = "avgPrice")]
avg_price: Option<String>,
#[serde(rename = "clientOrderId")]
client_order_id: Option<String>,
#[serde(rename = "commCurr")]
comm_curr: Option<String>,
#[serde(rename = "comms")]
comms: Option<String>,
#[serde(rename = "conid")]
conid: Option<String>,
#[serde(rename = "cumQty")]
cum_qty: Option<String>,
#[serde(rename = "currency")]
currency: Option<String>,
#[serde(rename = "exchange")]
exchange: Option<String>,
#[serde(rename = "execId")]
exec_id: Option<String>,
#[serde(rename = "execType")]
exec_type: Option<String>,
#[serde(rename = "lastPrice")]
last_price: Option<String>,
#[serde(rename = "lastShares")]
last_shares: Option<String>,
#[serde(rename = "leavesQty")]
leaves_qty: Option<String>,
#[serde(rename = "listingExchange")]
listing_exchange: Option<String>,
#[serde(rename = "orderId")]
order_id: Option<String>,
#[serde(rename = "orderQty")]
order_qty: Option<String>,
#[serde(rename = "orderStatus")]
order_status: Option<String>,
#[serde(rename = "orderType")]
order_type: Option<String>,
#[serde(rename = "price")]
price: Option<String>,
#[serde(rename = "rcptTime")]
rcpt_time: Option<String>,
#[serde(rename = "realizedPnl")]
realized_pnl: Option<String>,
#[serde(rename = "secType")]
sec_type: Option<String>,
#[serde(rename = "side")]
side: Option<String>,
#[serde(rename = "symbol")]
symbol: Option<String>,
#[serde(rename = "text")]
text: Option<f32>,
#[serde(rename = "tif")]
tif: Option<String>,
#[serde(rename = "txTime")]
tx_time: Option<String>,
#[serde(rename = "warnings")]
warnings: Option<::models::OrderdataWarnings>
}
impl OrderData {
pub fn new() -> OrderData {
OrderData {
account: None,
avg_price: None,
client_order_id: None,
comm_curr: None,
comms: None,
conid: None,
cum_qty: None,
currency: None,
exchange: None,
exec_id: None,
exec_type: None,
last_price: None,
last_shares: None,
leaves_qty: None,
listing_exchange: None,
order_id: None,
order_qty: None,
order_status: None,
order_type: None,
price: None,
rcpt_time: None,
realized_pnl: None,
sec_type: None,
side: None,
symbol: None,
text: None,
tif: None,
tx_time: None,
warnings: None
}
}
pub fn set_account(&mut self, account: String) {
self.account = Some(account);
}
pub fn with_account(mut self, account: String) -> OrderData {
self.account = Some(account);
self
}
pub fn account(&self) -> Option<&String> {
self.account.as_ref()
}
pub fn reset_account(&mut self) {
self.account = None;
}
pub fn set_avg_price(&mut self, avg_price: String) {
self.avg_price = Some(avg_price);
}
pub fn with_avg_price(mut self, avg_price: String) -> OrderData {
self.avg_price = Some(avg_price);
self
}
pub fn avg_price(&self) -> Option<&String> {
self.avg_price.as_ref()
}
pub fn reset_avg_price(&mut self) {
self.avg_price = None;
}
pub fn set_client_order_id(&mut self, client_order_id: String) {
self.client_order_id = Some(client_order_id);
}
pub fn with_client_order_id(mut self, client_order_id: String) -> OrderData {
self.client_order_id = Some(client_order_id);
self
}
pub fn client_order_id(&self) -> Option<&String> {
self.client_order_id.as_ref()
}
pub fn reset_client_order_id(&mut self) {
self.client_order_id = None;
}
pub fn set_comm_curr(&mut self, comm_curr: String) {
self.comm_curr = Some(comm_curr);
}
pub fn with_comm_curr(mut self, comm_curr: String) -> OrderData {
self.comm_curr = Some(comm_curr);
self
}
pub fn comm_curr(&self) -> Option<&String> {
self.comm_curr.as_ref()
}
pub fn reset_comm_curr(&mut self) {
self.comm_curr = None;
}
pub fn set_comms(&mut self, comms: String) {
self.comms = Some(comms);
}
pub fn with_comms(mut self, comms: String) -> OrderData {
self.comms = Some(comms);
self
}
pub fn comms(&self) -> Option<&String> {
self.comms.as_ref()
}
pub fn reset_comms(&mut self) {
self.comms = None;
}
pub fn set_conid(&mut self, conid: String) {
self.conid = Some(conid);
}
pub fn with_conid(mut self, conid: String) -> OrderData {
self.conid = Some(conid);
self
}
pub fn conid(&self) -> Option<&String> {
self.conid.as_ref()
}
pub fn reset_conid(&mut self) {
self.conid = None;
}
pub fn set_cum_qty(&mut self, cum_qty: String) {
self.cum_qty = Some(cum_qty);
}
pub fn with_cum_qty(mut self, cum_qty: String) -> OrderData {
self.cum_qty = Some(cum_qty);
self
}
pub fn cum_qty(&self) -> Option<&String> {
self.cum_qty.as_ref()
}
pub fn reset_cum_qty(&mut self) {
self.cum_qty = None;
}
pub fn set_currency(&mut self, currency: String) {
self.currency = Some(currency);
}
pub fn with_currency(mut self, currency: String) -> OrderData {
self.currency = Some(currency);
self
}
pub fn currency(&self) -> Option<&String> {
self.currency.as_ref()
}
pub fn reset_currency(&mut self) {
self.currency = None;
}
pub fn set_exchange(&mut self, exchange: String) {
self.exchange = Some(exchange);
}
pub fn with_exchange(mut self, exchange: String) -> OrderData {
self.exchange = Some(exchange);
self
}
pub fn exchange(&self) -> Option<&String> {
self.exchange.as_ref()
}
pub fn reset_exchange(&mut self) {
self.exchange = None;
}
pub fn set_exec_id(&mut self, exec_id: String) {
self.exec_id = Some(exec_id);
}
pub fn with_exec_id(mut self, exec_id: String) -> OrderData {
self.exec_id = Some(exec_id);
self
}
pub fn exec_id(&self) -> Option<&String> {
self.exec_id.as_ref()
}
pub fn reset_exec_id(&mut self) {
self.exec_id = None;
}
pub fn set_exec_type(&mut self, exec_type: String) {
self.exec_type = Some(exec_type);
}
pub fn with_exec_type(mut self, exec_type: String) -> OrderData {
self.exec_type = Some(exec_type);
self
}
pub fn exec_type(&self) -> Option<&String> {
self.exec_type.as_ref()
}
pub fn reset_exec_type(&mut self) {
self.exec_type = None;
}
pub fn set_last_price(&mut self, last_price: String) {
self.last_price = Some(last_price);
}
pub fn with_last_price(mut self, last_price: String) -> OrderData {
self.last_price = Some(last_price);
self
}
pub fn last_price(&self) -> Option<&String> {
self.last_price.as_ref()
}
pub fn reset_last_price(&mut self) {
self.last_price = None;
}
pub fn set_last_shares(&mut self, last_shares: String) {
self.last_shares = Some(last_shares);
}
pub fn with_last_shares(mut self, last_shares: String) -> OrderData {
self.last_shares = Some(last_shares);
self
}
pub fn last_shares(&self) -> Option<&String> {
self.last_shares.as_ref()
}
pub fn reset_last_shares(&mut self) {
self.last_shares = None;
}
pub fn set_leaves_qty(&mut self, leaves_qty: String) {
self.leaves_qty = Some(leaves_qty);
}
pub fn with_leaves_qty(mut self, leaves_qty: String) -> OrderData {
self.leaves_qty = Some(leaves_qty);
self
}
pub fn leaves_qty(&self) -> Option<&String> {
self.leaves_qty.as_ref()
}
pub fn reset_leaves_qty(&mut self) {
self.leaves_qty = None;
}
pub fn set_listing_exchange(&mut self, listing_exchange: String) {
self.listing_exchange = Some(listing_exchange);
}
pub fn with_listing_exchange(mut self, listing_exchange: String) -> OrderData {
self.listing_exchange = Some(listing_exchange);
self
}
pub fn listing_exchange(&self) -> Option<&String> {
self.listing_exchange.as_ref()
}
pub fn reset_listing_exchange(&mut self) {
self.listing_exchange = None;
}
pub fn set_order_id(&mut self, order_id: String) {
self.order_id = Some(order_id);
}
pub fn with_order_id(mut self, order_id: String) -> OrderData {
self.order_id = Some(order_id);
self
}
pub fn order_id(&self) -> Option<&String> {
self.order_id.as_ref()
}
pub fn reset_order_id(&mut self) {
self.order_id = None;
}
pub fn set_order_qty(&mut self, order_qty: String) {
self.order_qty = Some(order_qty);
}
pub fn with_order_qty(mut self, order_qty: String) -> OrderData {
self.order_qty = Some(order_qty);
self
}
pub fn order_qty(&self) -> Option<&String> {
self.order_qty.as_ref()
}
pub fn reset_order_qty(&mut self) {
self.order_qty = None;
}
pub fn set_order_status(&mut self, order_status: String) {
self.order_status = Some(order_status);
}
pub fn with_order_status(mut self, order_status: String) -> OrderData {
self.order_status = Some(order_status);
self
}
pub fn order_status(&self) -> Option<&String> {
self.order_status.as_ref()
}
pub fn reset_order_status(&mut self) {
self.order_status = None;
}
pub fn set_order_type(&mut self, order_type: String) {
self.order_type = Some(order_type);
}
pub fn with_order_type(mut self, order_type: String) -> OrderData {
self.order_type = Some(order_type);
self
}
pub fn order_type(&self) -> Option<&String> {
self.order_type.as_ref()
}
pub fn reset_order_type(&mut self) {
self.order_type = None;
}
pub fn set_price(&mut self, price: String) {
self.price = Some(price);
}
pub fn with_price(mut self, price: String) -> OrderData {
self.price = Some(price);
self
}
pub fn price(&self) -> Option<&String> {
self.price.as_ref()
}
pub fn reset_price(&mut self) {
self.price = None;
}
pub fn set_rcpt_time(&mut self, rcpt_time: String) {
self.rcpt_time = Some(rcpt_time);
}
pub fn with_rcpt_time(mut self, rcpt_time: String) -> OrderData {
self.rcpt_time = Some(rcpt_time);
self
}
pub fn rcpt_time(&self) -> Option<&String> {
self.rcpt_time.as_ref()
}
pub fn reset_rcpt_time(&mut self) {
self.rcpt_time = None;
}
pub fn set_realized_pnl(&mut self, realized_pnl: String) {
self.realized_pnl = Some(realized_pnl);
}
pub fn with_realized_pnl(mut self, realized_pnl: String) -> OrderData {
self.realized_pnl = Some(realized_pnl);
self
}
pub fn realized_pnl(&self) -> Option<&String> {
self.realized_pnl.as_ref()
}
pub fn reset_realized_pnl(&mut self) {
self.realized_pnl = None;
}
pub fn set_sec_type(&mut self, sec_type: String) {
self.sec_type = Some(sec_type);
}
pub fn with_sec_type(mut self, sec_type: String) -> OrderData {
self.sec_type = Some(sec_type);
self
}
pub fn sec_type(&self) -> Option<&String> {
self.sec_type.as_ref()
}
pub fn reset_sec_type(&mut self) {
self.sec_type = None;
}
pub fn set_side(&mut self, side: String) {
self.side = Some(side);
}
pub fn with_side(mut self, side: String) -> OrderData {
self.side = Some(side);
self
}
pub fn side(&self) -> Option<&String> {
self.side.as_ref()
}
pub fn reset_side(&mut self) {
self.side = None;
}
pub fn set_symbol(&mut self, symbol: String) {
self.symbol = Some(symbol);
}
pub fn with_symbol(mut self, symbol: String) -> OrderData {
self.symbol = Some(symbol);
self
}
pub fn symbol(&self) -> Option<&String> {
self.symbol.as_ref()
}
pub fn reset_symbol(&mut self) {
self.symbol = None;
}
pub fn set_text(&mut self, text: f32) {
self.text = Some(text);
}
pub fn with_text(mut self, text: f32) -> OrderData {
self.text = Some(text);
self
}
pub fn text(&self) -> Option<&f32> {
self.text.as_ref()
}
pub fn reset_text(&mut self) {
self.text = None;
}
pub fn set_tif(&mut self, tif: String) {
self.tif = Some(tif);
}
pub fn with_tif(mut self, tif: String) -> OrderData {
self.tif = Some(tif);
self
}
pub fn tif(&self) -> Option<&String> {
self.tif.as_ref()
}
pub fn reset_tif(&mut self) {
self.tif = None;
}
pub fn set_tx_time(&mut self, tx_time: String) {
self.tx_time = Some(tx_time);
}
pub fn with_tx_time(mut self, tx_time: String) -> OrderData {
self.tx_time = Some(tx_time);
self
}
pub fn tx_time(&self) -> Option<&String> {
self.tx_time.as_ref()
}
pub fn reset_tx_time(&mut self) {
self.tx_time = None;
}
pub fn set_warnings(&mut self, warnings: ::models::OrderdataWarnings) {
self.warnings = Some(warnings);
}
pub fn with_warnings(mut self, warnings: ::models::OrderdataWarnings) -> OrderData {
self.warnings = Some(warnings);
self
}
pub fn warnings(&self) -> Option<&::models::OrderdataWarnings> {
self.warnings.as_ref()
}
pub fn reset_warnings(&mut self) {
self.warnings = None;
}
}