harbor_api/models/
reference.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 Reference {
16    /// The parent ID of the reference
17    #[serde(rename = "parent_id", skip_serializing_if = "Option::is_none")]
18    pub parent_id: Option<i64>,
19    /// The child ID of the reference
20    #[serde(rename = "child_id", skip_serializing_if = "Option::is_none")]
21    pub child_id: Option<i64>,
22    /// The digest of the child artifact
23    #[serde(rename = "child_digest", skip_serializing_if = "Option::is_none")]
24    pub child_digest: Option<String>,
25    #[serde(rename = "platform", skip_serializing_if = "Option::is_none")]
26    pub platform: Option<Box<models::Platform>>,
27    #[serde(rename = "annotations", skip_serializing_if = "Option::is_none")]
28    pub annotations: Option<std::collections::HashMap<String, String>>,
29    /// The download URLs
30    #[serde(rename = "urls", skip_serializing_if = "Option::is_none")]
31    pub urls: Option<Vec<String>>,
32}
33
34impl Reference {
35    pub fn new() -> Reference {
36        Reference {
37            parent_id: None,
38            child_id: None,
39            child_digest: None,
40            platform: None,
41            annotations: None,
42            urls: None,
43        }
44    }
45}
46