harbor_api/models/
artifact.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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct Artifact {
16    /// The ID of the artifact
17    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
18    pub id: Option<i64>,
19    /// The type of the artifact, e.g. image, chart, etc
20    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
21    pub r#type: Option<String>,
22    /// The media type of the artifact
23    #[serde(rename = "media_type", skip_serializing_if = "Option::is_none")]
24    pub media_type: Option<String>,
25    /// The manifest media type of the artifact
26    #[serde(rename = "manifest_media_type", skip_serializing_if = "Option::is_none")]
27    pub manifest_media_type: Option<String>,
28    /// The artifact_type in the manifest of the artifact
29    #[serde(rename = "artifact_type", skip_serializing_if = "Option::is_none")]
30    pub artifact_type: Option<String>,
31    /// The ID of the project that the artifact belongs to
32    #[serde(rename = "project_id", skip_serializing_if = "Option::is_none")]
33    pub project_id: Option<i64>,
34    /// The ID of the repository that the artifact belongs to
35    #[serde(rename = "repository_id", skip_serializing_if = "Option::is_none")]
36    pub repository_id: Option<i64>,
37    /// The name of the repository that the artifact belongs to
38    #[serde(rename = "repository_name", skip_serializing_if = "Option::is_none")]
39    pub repository_name: Option<String>,
40    /// The digest of the artifact
41    #[serde(rename = "digest", skip_serializing_if = "Option::is_none")]
42    pub digest: Option<String>,
43    /// The size of the artifact
44    #[serde(rename = "size", skip_serializing_if = "Option::is_none")]
45    pub size: Option<i64>,
46    /// The digest of the icon
47    #[serde(rename = "icon", skip_serializing_if = "Option::is_none")]
48    pub icon: Option<String>,
49    /// The push time of the artifact
50    #[serde(rename = "push_time", skip_serializing_if = "Option::is_none")]
51    pub push_time: Option<String>,
52    /// The latest pull time of the artifact
53    #[serde(rename = "pull_time", skip_serializing_if = "Option::is_none")]
54    pub pull_time: Option<String>,
55    #[serde(rename = "extra_attrs", skip_serializing_if = "Option::is_none")]
56    pub extra_attrs: Option<std::collections::HashMap<String, serde_json::Value>>,
57    #[serde(rename = "annotations", skip_serializing_if = "Option::is_none")]
58    pub annotations: Option<std::collections::HashMap<String, String>>,
59    #[serde(rename = "references", skip_serializing_if = "Option::is_none")]
60    pub references: Option<Vec<models::Reference>>,
61    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
62    pub tags: Option<Vec<models::Tag>>,
63    #[serde(rename = "addition_links", skip_serializing_if = "Option::is_none")]
64    pub addition_links: Option<std::collections::HashMap<String, models::AdditionLink>>,
65    #[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
66    pub labels: Option<Vec<models::Label>>,
67    /// The scan overview attached in the metadata of tag
68    #[serde(rename = "scan_overview", skip_serializing_if = "Option::is_none")]
69    pub scan_overview: Option<std::collections::HashMap<String, models::NativeReportSummary>>,
70    #[serde(rename = "sbom_overview", skip_serializing_if = "Option::is_none")]
71    pub sbom_overview: Option<Box<models::SbomOverview>>,
72    #[serde(rename = "accessories", skip_serializing_if = "Option::is_none")]
73    pub accessories: Option<Vec<models::Accessory>>,
74}
75
76impl Artifact {
77    pub fn new() -> Artifact {
78        Artifact {
79            id: None,
80            r#type: None,
81            media_type: None,
82            manifest_media_type: None,
83            artifact_type: None,
84            project_id: None,
85            repository_id: None,
86            repository_name: None,
87            digest: None,
88            size: None,
89            icon: None,
90            push_time: None,
91            pull_time: None,
92            extra_attrs: None,
93            annotations: None,
94            references: None,
95            tags: None,
96            addition_links: None,
97            labels: None,
98            scan_overview: None,
99            sbom_overview: None,
100            accessories: None,
101        }
102    }
103}
104