/*
 * 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 AmendParams {
    /// Exactly one of `client_order_id` or `order_id` must be specified.
    #[serde(rename = "client_order_id", skip_serializing_if = "Option::is_none")]
    pub client_order_id: Option<i32>,
    /// Exactly one of `client_order_id` or `order_id` must be specified.
    #[serde(rename = "order_id", skip_serializing_if = "Option::is_none")]
    pub order_id: Option<String>,
    #[serde(rename = "price")]
    pub price: rust_decimal::Decimal,
    #[serde(rename = "amount")]
    pub amount: rust_decimal::Decimal,
    #[serde(rename = "collar", skip_serializing_if = "Option::is_none")]
    pub collar: Option<models::CollarEnum>,
}

impl AmendParams {
    pub fn new(price: rust_decimal::Decimal, amount: rust_decimal::Decimal) -> AmendParams {
        AmendParams {
            client_order_id: None,
            order_id: None,
            price,
            amount,
            collar: None,
        }
    }
}
