fireblocks_sdk/models/policy_rule_check_result.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/// PolicyRuleCheckResult : The rule validation result
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct PolicyRuleCheckResult {
17 /// Rule index number in the policy
18 #[serde(rename = "index")]
19 pub index: f64,
20 /// Validation status
21 #[serde(rename = "status")]
22 pub status: Status,
23 /// A set of rule validation error objects
24 #[serde(rename = "errors")]
25 pub errors: Vec<models::PolicyRuleError>,
26}
27
28impl PolicyRuleCheckResult {
29 /// The rule validation result
30 pub fn new(
31 index: f64,
32 status: Status,
33 errors: Vec<models::PolicyRuleError>,
34 ) -> PolicyRuleCheckResult {
35 PolicyRuleCheckResult {
36 index,
37 status,
38 errors,
39 }
40 }
41}
42/// Validation status
43#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
44pub enum Status {
45 #[serde(rename = "ok")]
46 Ok,
47 #[serde(rename = "failure")]
48 Failure,
49}
50
51impl Default for Status {
52 fn default() -> Status {
53 Self::Ok
54 }
55}