fireblocks_sdk/models/
create_vault_account_connection_request.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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct CreateVaultAccountConnectionRequest {
16    /// The ID of the vault to connect to the dApp.
17    #[serde(rename = "vaultAccountId")]
18    pub vault_account_id: f64,
19    /// The default fee level. Valid values are `MEDIUM` and `HIGH`.
20    #[serde(rename = "feeLevel")]
21    pub fee_level: FeeLevel,
22    /// The WalletConnect uri provided by the dapp.
23    #[serde(rename = "uri")]
24    pub uri: String,
25    /// The IDs of the blockchain networks used in the dApp connection.
26    #[serde(rename = "chainIds", skip_serializing_if = "Option::is_none")]
27    pub chain_ids: Option<Vec<String>>,
28}
29
30impl CreateVaultAccountConnectionRequest {
31    pub fn new(
32        vault_account_id: f64,
33        fee_level: FeeLevel,
34        uri: String,
35    ) -> CreateVaultAccountConnectionRequest {
36        CreateVaultAccountConnectionRequest {
37            vault_account_id,
38            fee_level,
39            uri,
40            chain_ids: None,
41        }
42    }
43}
44/// The default fee level. Valid values are `MEDIUM` and `HIGH`.
45#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
46pub enum FeeLevel {
47    #[serde(rename = "MEDIUM")]
48    Medium,
49    #[serde(rename = "HIGH")]
50    High,
51}
52
53impl Default for FeeLevel {
54    fn default() -> FeeLevel {
55        Self::Medium
56    }
57}