fireblocks_sdk/models/policy_rule_operators.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/// PolicyRuleOperators : Defines users/groups who can initiate the type of
15/// transaction to which the rule applies.
16#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
17pub struct PolicyRuleOperators {
18 /// If used then this property should appear as the only child property *
19 /// \"*\" - All users are allowed
20 #[serde(rename = "wildcard", skip_serializing_if = "Option::is_none")]
21 pub wildcard: Option<Wildcard>,
22 /// Set of users ids
23 #[serde(rename = "users", skip_serializing_if = "Option::is_none")]
24 pub users: Option<Vec<String>>,
25 /// Set of group ids
26 #[serde(rename = "usersGroups", skip_serializing_if = "Option::is_none")]
27 pub users_groups: Option<Vec<String>>,
28 /// set of services to initiate transactions
29 #[serde(rename = "services", skip_serializing_if = "Option::is_none")]
30 pub services: Option<Vec<String>>,
31}
32
33impl PolicyRuleOperators {
34 /// Defines users/groups who can initiate the type of transaction to which
35 /// the rule applies.
36 pub fn new() -> PolicyRuleOperators {
37 PolicyRuleOperators {
38 wildcard: None,
39 users: None,
40 users_groups: None,
41 services: None,
42 }
43 }
44}
45/// If used then this property should appear as the only child property * \"*\"
46/// - All users are allowed
47#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
48pub enum Wildcard {
49 #[serde(rename = "*")]
50 Star,
51}
52
53impl Default for Wildcard {
54 fn default() -> Wildcard {
55 Self::Star
56 }
57}