fireblocks_sdk/models/
connected_accounts_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/// ConnectedAccountsErrorResponseError : Error details describing the failure.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ConnectedAccountsErrorResponseError {
17    /// High-level error category.
18    #[serde(rename = "type")]
19    pub r#type: Type,
20    /// Human-readable error description.
21    #[serde(rename = "message")]
22    pub message: String,
23    /// Service-specific error code for troubleshooting.
24    #[serde(rename = "errorCode", skip_serializing_if = "Option::is_none")]
25    pub error_code: Option<String>,
26}
27
28impl ConnectedAccountsErrorResponseError {
29    /// Error details describing the failure.
30    pub fn new(r#type: Type, message: String) -> ConnectedAccountsErrorResponseError {
31        ConnectedAccountsErrorResponseError {
32            r#type,
33            message,
34            error_code: None,
35        }
36    }
37}
38/// High-level error category.
39#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
40pub enum Type {
41    #[serde(rename = "INTERNAL")]
42    Internal,
43    #[serde(rename = "AUTHENTICATION")]
44    Authentication,
45    #[serde(rename = "AUTHORIZATION")]
46    Authorization,
47    #[serde(rename = "VALIDATION")]
48    Validation,
49    #[serde(rename = "NOT_FOUND")]
50    NotFound,
51    #[serde(rename = "UNPROCESSABLE_ENTITY")]
52    UnprocessableEntity,
53    #[serde(rename = "FORBIDDEN")]
54    Forbidden,
55}
56
57impl Default for Type {
58    fn default() -> Type {
59        Self::Internal
60    }
61}