fireblocks_sdk/models/
verdict_config_v2.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/// VerdictConfigV2 : Verdict configuration
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct VerdictConfigV2 {
17    /// Verdict action
18    #[serde(rename = "action")]
19    pub action: Action,
20    #[serde(rename = "approvers", skip_serializing_if = "Option::is_none")]
21    pub approvers: Option<models::ApproversConfigV2>,
22    #[serde(rename = "designatedSigners", skip_serializing_if = "Option::is_none")]
23    pub designated_signers: Option<models::DesignatedSignersConfigV2>,
24}
25
26impl VerdictConfigV2 {
27    /// Verdict configuration
28    pub fn new(action: Action) -> VerdictConfigV2 {
29        VerdictConfigV2 {
30            action,
31            approvers: None,
32            designated_signers: None,
33        }
34    }
35}
36/// Verdict action
37#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
38pub enum Action {
39    #[serde(rename = "ALLOW")]
40    Allow,
41    #[serde(rename = "BLOCK")]
42    Block,
43    #[serde(rename = "2-TIER")]
44    Variant2Tier,
45    #[serde(rename = "ACCEPT")]
46    Accept,
47    #[serde(rename = "REJECT")]
48    Reject,
49    #[serde(rename = "ALERT")]
50    Alert,
51    #[serde(rename = "SCREEN")]
52    Screen,
53    #[serde(rename = "PASS")]
54    Pass,
55    #[serde(rename = "WAIT")]
56    Wait,
57    #[serde(rename = "FREEZE")]
58    Freeze,
59    #[serde(rename = "CANCEL")]
60    Cancel,
61}
62
63impl Default for Action {
64    fn default() -> Action {
65        Self::Allow
66    }
67}