fireblocks_sdk/models/
provider.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 Provider {
16    /// The ID of the provider
17    #[serde(rename = "id")]
18    pub id: String,
19    /// Name of the provider
20    #[serde(rename = "providerName")]
21    pub provider_name: String,
22    /// An array of objects that includes chain descriptors and the
23    /// corresponding fee percentages for validators supported by the provider
24    #[serde(rename = "validators")]
25    pub validators: Vec<models::Validator>,
26    /// URL to the validator's icon
27    #[serde(rename = "iconUrl", skip_serializing_if = "Option::is_none")]
28    pub icon_url: Option<String>,
29    /// URL to the terms of service
30    #[serde(rename = "termsOfServiceUrl", skip_serializing_if = "Option::is_none")]
31    pub terms_of_service_url: Option<String>,
32    /// Indicates whether the terms of service are approved
33    #[serde(rename = "isTermsOfServiceApproved")]
34    pub is_terms_of_service_approved: bool,
35    /// Is the provider private, i.e created by the user
36    #[serde(rename = "isPrivate", skip_serializing_if = "Option::is_none")]
37    pub is_private: Option<bool>,
38    /// Is the provider a liquid staking provider
39    #[serde(rename = "isLiquidStaking")]
40    pub is_liquid_staking: bool,
41}
42
43impl Provider {
44    pub fn new(
45        id: String,
46        provider_name: String,
47        validators: Vec<models::Validator>,
48        is_terms_of_service_approved: bool,
49        is_liquid_staking: bool,
50    ) -> Provider {
51        Provider {
52            id,
53            provider_name,
54            validators,
55            icon_url: None,
56            terms_of_service_url: None,
57            is_terms_of_service_approved,
58            is_private: None,
59            is_liquid_staking,
60        }
61    }
62}