fireblocks_sdk/models/
asset.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 Asset {
16    /// The ID of the asset
17    #[serde(rename = "id")]
18    pub id: String,
19    /// The Legacy ID of the asset
20    #[serde(rename = "legacyId")]
21    pub legacy_id: String,
22    /// The ID of the asset's blockchain
23    #[serde(rename = "blockchainId", skip_serializing_if = "Option::is_none")]
24    pub blockchain_id: Option<String>,
25    /// Asset's display name
26    #[serde(rename = "displayName")]
27    pub display_name: String,
28    /// Asset's display symbol
29    #[serde(rename = "displaySymbol")]
30    pub display_symbol: String,
31    #[serde(rename = "assetClass")]
32    pub asset_class: models::AssetClass,
33    #[serde(rename = "onchain", skip_serializing_if = "Option::is_none")]
34    pub onchain: Option<models::AssetDetailsOnchain>,
35    #[serde(rename = "metadata")]
36    pub metadata: models::AssetDetailsMetadata,
37}
38
39impl Asset {
40    pub fn new(
41        id: String,
42        legacy_id: String,
43        display_name: String,
44        display_symbol: String,
45        asset_class: models::AssetClass,
46        metadata: models::AssetDetailsMetadata,
47    ) -> Asset {
48        Asset {
49            id,
50            legacy_id,
51            blockchain_id: None,
52            display_name,
53            display_symbol,
54            asset_class,
55            onchain: None,
56            metadata,
57        }
58    }
59}