1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
// Fireblocks API
//
// 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)
//
// The version of the OpenAPI document: 1.8.0
// Contact: developers@fireblocks.com
// Generated by: https://openapi-generator.tech
use {
crate::models,
serde::{Deserialize, Serialize},
};
/// PolicyRuleErrorV2 : Rule validation result error
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PolicyRuleErrorV2 {
/// Error message
#[serde(rename = "errorMessage")]
pub error_message: String,
/// error code
#[serde(rename = "errorCode")]
pub error_code: f64,
/// error code name
#[serde(rename = "errorCodeName")]
pub error_code_name: String,
/// The field which the error relates to: * operator - transaction initiator
/// * operators - transaction initiators * authorizationGroups - transaction
/// authorizer groups * designatedSigner - transaction signer *
/// designatedSigners - transaction signers * contractMethods - contract
/// methods * amountAggregation - transaction amount aggregation
/// configuration * src - transaction source asset configuration * dst -
/// transaction destination asset configuration
#[serde(rename = "errorField")]
pub error_field: ErrorField,
}
impl PolicyRuleErrorV2 {
/// Rule validation result error
pub fn new(
error_message: String,
error_code: f64,
error_code_name: String,
error_field: ErrorField,
) -> PolicyRuleErrorV2 {
PolicyRuleErrorV2 {
error_message,
error_code,
error_code_name,
error_field,
}
}
}
/// The field which the error relates to: * operator - transaction initiator *
/// operators - transaction initiators * authorizationGroups - transaction
/// authorizer groups * designatedSigner - transaction signer *
/// designatedSigners - transaction signers * contractMethods - contract methods
/// * amountAggregation - transaction amount aggregation configuration * src -
/// transaction source asset configuration * dst - transaction destination asset
/// configuration
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ErrorField {
#[serde(rename = "operator")]
Operator,
#[serde(rename = "operators")]
Operators,
#[serde(rename = "authorizationGroups")]
AuthorizationGroups,
#[serde(rename = "designatedSigner")]
DesignatedSigner,
#[serde(rename = "designatedSigners")]
DesignatedSigners,
#[serde(rename = "contractMethods")]
ContractMethods,
#[serde(rename = "amountAggregation")]
AmountAggregation,
#[serde(rename = "src")]
Src,
#[serde(rename = "dst")]
Dst,
}
impl Default for ErrorField {
fn default() -> ErrorField {
Self::Operator
}
}