harbor_api/models/
accessory.rs

1/*
2 * Harbor API
3 *
4 * These APIs provide services for manipulating Harbor project.
5 *
6 * The version of the OpenAPI document: 2.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// Accessory : The accessory of the artifact
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Accessory {
17    /// The ID of the accessory
18    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
19    pub id: Option<i64>,
20    /// The artifact id of the accessory
21    #[serde(rename = "artifact_id", skip_serializing_if = "Option::is_none")]
22    pub artifact_id: Option<i64>,
23    /// Going to be deprecated, use repo and digest for insteand. The subject artifact id of the accessory.
24    #[serde(rename = "subject_artifact_id", skip_serializing_if = "Option::is_none")]
25    pub subject_artifact_id: Option<i64>,
26    /// The subject artifact digest of the accessory
27    #[serde(rename = "subject_artifact_digest", skip_serializing_if = "Option::is_none")]
28    pub subject_artifact_digest: Option<String>,
29    /// The subject artifact repository name of the accessory
30    #[serde(rename = "subject_artifact_repo", skip_serializing_if = "Option::is_none")]
31    pub subject_artifact_repo: Option<String>,
32    /// The artifact size of the accessory
33    #[serde(rename = "size", skip_serializing_if = "Option::is_none")]
34    pub size: Option<i64>,
35    /// The artifact digest of the accessory
36    #[serde(rename = "digest", skip_serializing_if = "Option::is_none")]
37    pub digest: Option<String>,
38    /// The artifact size of the accessory
39    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
40    pub r#type: Option<String>,
41    /// The icon of the accessory
42    #[serde(rename = "icon", skip_serializing_if = "Option::is_none")]
43    pub icon: Option<String>,
44    /// The creation time of the accessory
45    #[serde(rename = "creation_time", skip_serializing_if = "Option::is_none")]
46    pub creation_time: Option<String>,
47}
48
49impl Accessory {
50    /// The accessory of the artifact
51    pub fn new() -> Accessory {
52        Accessory {
53            id: None,
54            artifact_id: None,
55            subject_artifact_id: None,
56            subject_artifact_digest: None,
57            subject_artifact_repo: None,
58            size: None,
59            digest: None,
60            r#type: None,
61            icon: None,
62            creation_time: None,
63        }
64    }
65}
66