/*
 * Thalex RPC API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.0
 *
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct OrderHistoryParams {
    /// Max results to return.
    #[serde(rename = "limit", skip_serializing_if = "Option::is_none")]
    pub limit: Option<i32>,
    /// Start time (Unix timestamp) defaults to 90 days ago.
    #[serde(rename = "time_low", skip_serializing_if = "Option::is_none")]
    pub time_low: Option<i64>,
    /// End time (Unix timestamp) defaults to now.
    #[serde(rename = "time_high", skip_serializing_if = "Option::is_none")]
    pub time_high: Option<i64>,
    /// Set to bookmark from previous call to get next page.
    #[serde(rename = "bookmark", skip_serializing_if = "Option::is_none")]
    pub bookmark: Option<String>,
    #[serde(rename = "sort", skip_serializing_if = "Option::is_none")]
    pub sort: Option<models::SortEnum>,
    /// Comma-separated list of instrument names to request order history for. If omitted, order history for all instruments is returned.
    #[serde(rename = "instrument_names", skip_serializing_if = "Option::is_none")]
    pub instrument_names: Option<String>,
    /// Optional comma-separated list of bot IDs to request order history history for.
    #[serde(rename = "bot_ids", skip_serializing_if = "Option::is_none")]
    pub bot_ids: Option<String>,
    /// Optional comma-separated list of conditional orders IDs to request order history history for.
    #[serde(
        rename = "conditional_order_ids",
        skip_serializing_if = "Option::is_none"
    )]
    pub conditional_order_ids: Option<String>,
    #[serde(rename = "direction", skip_serializing_if = "Option::is_none")]
    pub direction: Option<models::DirectionEnum>,
    /// Label supplied with insert.
    #[serde(rename = "label", skip_serializing_if = "Option::is_none")]
    pub label: Option<String>,
}

impl OrderHistoryParams {
    pub fn new() -> OrderHistoryParams {
        OrderHistoryParams {
            limit: None,
            time_low: None,
            time_high: None,
            bookmark: None,
            sort: None,
            instrument_names: None,
            bot_ids: None,
            conditional_order_ids: None,
            direction: None,
            label: None,
        }
    }
}
