fireblocks_sdk/models/
trading_error_response_error.rs

1// Fireblocks API
2//
3// Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain.  - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com)
4//
5// The version of the OpenAPI document: 1.8.0
6// Contact: developers@fireblocks.com
7// Generated by: https://openapi-generator.tech
8
9use {
10    crate::models,
11    serde::{Deserialize, Serialize},
12};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct TradingErrorResponseError {
16    #[serde(rename = "type")]
17    pub r#type: Type,
18    #[serde(rename = "message")]
19    pub message: String,
20    #[serde(rename = "errorCode", skip_serializing_if = "Option::is_none")]
21    pub error_code: Option<models::ErrorCodes>,
22}
23
24impl TradingErrorResponseError {
25    pub fn new(r#type: Type, message: String) -> TradingErrorResponseError {
26        TradingErrorResponseError {
27            r#type,
28            message,
29            error_code: None,
30        }
31    }
32}
33///
34#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
35pub enum Type {
36    #[serde(rename = "INTERNAL")]
37    Internal,
38    #[serde(rename = "AUTHENTICATION")]
39    Authentication,
40    #[serde(rename = "AUTHORIZATION")]
41    Authorization,
42    #[serde(rename = "VALIDATION")]
43    Validation,
44    #[serde(rename = "NOT_FOUND")]
45    NotFound,
46    #[serde(rename = "UNPROCESSABLE_ENTITY")]
47    UnprocessableEntity,
48    #[serde(rename = "FORBIDDEN")]
49    Forbidden,
50}
51
52impl Default for Type {
53    fn default() -> Type {
54        Self::Internal
55    }
56}