fireblocks_sdk/models/
direct_access_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 DirectAccessProvider {
16    /// Unique identifier for the provider
17    #[serde(rename = "id")]
18    pub id: String,
19    /// Display name of the provider
20    #[serde(rename = "name")]
21    pub name: String,
22    /// URL to the logo image of the provider
23    #[serde(rename = "logo", skip_serializing_if = "Option::is_none")]
24    pub logo: Option<String>,
25    /// Indicates whether the provider access model is through accounts or
26    /// directly
27    #[serde(rename = "accountBased")]
28    pub account_based: bool,
29    /// Whether the provider was approved for use
30    #[serde(rename = "approved", skip_serializing_if = "Option::is_none")]
31    pub approved: Option<bool>,
32    /// Whether the provider has terms of service
33    #[serde(rename = "hasTermsOfService")]
34    pub has_terms_of_service: bool,
35    /// URL to the terms of service document
36    #[serde(rename = "termsOfServiceUrl", skip_serializing_if = "Option::is_none")]
37    pub terms_of_service_url: Option<String>,
38}
39
40impl DirectAccessProvider {
41    pub fn new(
42        id: String,
43        name: String,
44        account_based: bool,
45        has_terms_of_service: bool,
46    ) -> DirectAccessProvider {
47        DirectAccessProvider {
48            id,
49            name,
50            logo: None,
51            account_based,
52            approved: None,
53            has_terms_of_service,
54            terms_of_service_url: None,
55        }
56    }
57}