fireblocks_sdk/models/
collection_link_dto.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 CollectionLinkDto {
16    /// The collection id
17    #[serde(rename = "id")]
18    pub id: String,
19    /// The collection status
20    #[serde(rename = "status")]
21    pub status: Status,
22    #[serde(rename = "type")]
23    pub r#type: models::CollectionType,
24    /// The display name of the collection. If was not provided, would be taken
25    /// from the contract template
26    #[serde(rename = "displayName", skip_serializing_if = "Option::is_none")]
27    pub display_name: Option<String>,
28    /// The collection's metadata
29    #[serde(rename = "collectionMetadata", skip_serializing_if = "Option::is_none")]
30    pub collection_metadata: Option<models::CollectionMetadataDto>,
31}
32
33impl CollectionLinkDto {
34    pub fn new(id: String, status: Status, r#type: models::CollectionType) -> CollectionLinkDto {
35        CollectionLinkDto {
36            id,
37            status,
38            r#type,
39            display_name: None,
40            collection_metadata: None,
41        }
42    }
43}
44/// The collection status
45#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
46pub enum Status {
47    #[serde(rename = "PENDING")]
48    Pending,
49    #[serde(rename = "COMPLETED")]
50    Completed,
51}
52
53impl Default for Status {
54    fn default() -> Status {
55        Self::Pending
56    }
57}