bluefin_api 1.13.0

Bluefin API
Documentation
/*
 * Bluefin API
 *
 * Bluefin API
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 * Generated by: https://openapi-generator.tech
 */

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

/// AccountCommandFailureUpdate : Details about a failure during an account command execution.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AccountCommandFailureUpdate {
    /// The reason for the failure.
    #[serde(rename = "reason")]
    pub reason: String,
    #[serde(rename = "reasonCode", skip_serializing_if = "Option::is_none")]
    pub reason_code: Option<models::CommandFailureReasonCode>,
    /// The type of command that failed.
    #[serde(rename = "failedCommandType")]
    pub failed_command_type: String,
    #[serde(rename = "failedCommandTypeCode", skip_serializing_if = "Option::is_none")]
    pub failed_command_type_code: Option<models::FailedCommandType>,
    /// The timestamp when the command failed in milliseconds.
    #[serde(rename = "failedAtMillis")]
    pub failed_at_millis: u64,
}

impl AccountCommandFailureUpdate {
    /// Details about a failure during an account command execution.
    pub fn new(reason: String, failed_command_type: String, failed_at_millis: u64) -> AccountCommandFailureUpdate {
        AccountCommandFailureUpdate {
            reason,
            reason_code: None,
            failed_command_type,
            failed_command_type_code: None,
            failed_at_millis,
        }
    }
}