/*
 * 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::{manual_models::error_code::ErrorCode, models};
use serde::{Deserialize, Serialize};

/// ErrorResponseError : Error code and message.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ErrorResponseError {
    #[serde(rename = "code")]
    pub code: ErrorCode,
    #[serde(rename = "message")]
    pub message: String,
}

impl ErrorResponseError {
    /// Error code and message.
    pub fn new(code: ErrorCode, message: String) -> ErrorResponseError {
        ErrorResponseError { code, message }
    }
}
