1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// Fireblocks API
//
// 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)
//
// The version of the OpenAPI document: 1.8.0
// Contact: developers@fireblocks.com
// Generated by: https://openapi-generator.tech
use {
crate::models,
serde::{Deserialize, Serialize},
};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Provider {
/// The ID of the provider
#[serde(rename = "id")]
pub id: String,
/// Name of the provider
#[serde(rename = "providerName")]
pub provider_name: String,
/// An array of objects that includes chain descriptors and the
/// corresponding fee percentages for validators supported by the provider
#[serde(rename = "validators")]
pub validators: Vec<models::Validator>,
/// URL to the validator's icon
#[serde(rename = "iconUrl", skip_serializing_if = "Option::is_none")]
pub icon_url: Option<String>,
/// URL to the terms of service
#[serde(rename = "termsOfServiceUrl", skip_serializing_if = "Option::is_none")]
pub terms_of_service_url: Option<String>,
/// Indicates whether the terms of service are approved
#[serde(rename = "isTermsOfServiceApproved")]
pub is_terms_of_service_approved: bool,
/// Is the provider private, i.e created by the user
#[serde(rename = "isPrivate", skip_serializing_if = "Option::is_none")]
pub is_private: Option<bool>,
/// Is the provider a liquid staking provider
#[serde(rename = "isLiquidStaking")]
pub is_liquid_staking: bool,
}
impl Provider {
pub fn new(
id: String,
provider_name: String,
validators: Vec<models::Validator>,
is_terms_of_service_approved: bool,
is_liquid_staking: bool,
) -> Provider {
Provider {
id,
provider_name,
validators,
icon_url: None,
terms_of_service_url: None,
is_terms_of_service_approved,
is_private: None,
is_liquid_staking,
}
}
}