fireblocks_sdk/models/
account_access.rs1use {
10 crate::models,
11 serde::{Deserialize, Serialize},
12};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct AccountAccess {
16 #[serde(rename = "type")]
18 pub r#type: Type,
19 #[serde(rename = "providerId", skip_serializing_if = "Option::is_none")]
21 pub provider_id: Option<String>,
22 #[serde(rename = "accountId")]
24 pub account_id: String,
25}
26
27impl AccountAccess {
28 pub fn new(r#type: Type, account_id: String) -> AccountAccess {
29 AccountAccess {
30 r#type,
31 provider_id: None,
32 account_id,
33 }
34 }
35}
36#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
38pub enum Type {
39 #[serde(rename = "PROVIDER_ACCOUNT")]
40 ProviderAccount,
41}
42
43impl Default for Type {
44 fn default() -> Type {
45 Self::ProviderAccount
46 }
47}