fireblocks_sdk/models/
collection_link_dto.rs1use {
10 crate::models,
11 serde::{Deserialize, Serialize},
12};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct CollectionLinkDto {
16 #[serde(rename = "id")]
18 pub id: String,
19 #[serde(rename = "status")]
21 pub status: Status,
22 #[serde(rename = "type")]
23 pub r#type: models::CollectionType,
24 #[serde(rename = "displayName", skip_serializing_if = "Option::is_none")]
27 pub display_name: Option<String>,
28 #[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#[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}