bluefin_api 1.8.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};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Error {
    /// A code representing the type of error.
    #[serde(rename = "errorCode", skip_serializing_if = "Option::is_none")]
    pub error_code: Option<String>,
    /// A human-readable message describing the error.
    #[serde(rename = "message")]
    pub message: String,
    /// Additional structured details about the error.
    #[serde(rename = "details", skip_serializing_if = "Option::is_none")]
    pub details: Option<std::collections::HashMap<String, serde_json::Value>>,
}

impl Error {
    pub fn new(message: String) -> Error {
        Error {
            error_code: None,
            message,
            details: None,
        }
    }
}