Skip to main content

nautobot_openapi/models/
software_image_file.rs

1/*
2 * API Documentation
3 *
4 * Source of truth and network automation platform
5 *
6 * The version of the OpenAPI document: 3.1.0 (3.1)
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// SoftwareImageFile : Base class to use for serializers based on OrganizationalModel or PrimaryModel.  Can also be used for models derived from BaseModel, so long as they support custom fields, notes, and relationships.
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct SoftwareImageFile {
15    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
16    pub id: Option<uuid::Uuid>,
17    #[serde(rename = "object_type", skip_serializing_if = "Option::is_none")]
18    pub object_type: Option<String>,
19    /// Human friendly display value
20    #[serde(rename = "display", skip_serializing_if = "Option::is_none")]
21    pub display: Option<String>,
22    #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
23    pub url: Option<String>,
24    #[serde(rename = "natural_slug", skip_serializing_if = "Option::is_none")]
25    pub natural_slug: Option<String>,
26    #[serde(rename = "image_file_name")]
27    pub image_file_name: String,
28    #[serde(
29        rename = "image_file_checksum",
30        skip_serializing_if = "Option::is_none"
31    )]
32    pub image_file_checksum: Option<String>,
33    #[serde(rename = "hashing_algorithm", skip_serializing_if = "Option::is_none")]
34    pub hashing_algorithm:
35        Option<Box<crate::models::BulkWritableSoftwareImageFileRequestHashingAlgorithm>>,
36    /// Image file size in bytes
37    #[serde(
38        rename = "image_file_size",
39        default,
40        with = "::serde_with::rust::double_option",
41        skip_serializing_if = "Option::is_none"
42    )]
43    pub image_file_size: Option<Option<i64>>,
44    #[serde(rename = "download_url", skip_serializing_if = "Option::is_none")]
45    pub download_url: Option<String>,
46    /// Is the default image for this software version
47    #[serde(rename = "default_image", skip_serializing_if = "Option::is_none")]
48    pub default_image: Option<bool>,
49    #[serde(rename = "software_version")]
50    pub software_version: Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>,
51    #[serde(
52        rename = "external_integration",
53        default,
54        with = "::serde_with::rust::double_option",
55        skip_serializing_if = "Option::is_none"
56    )]
57    pub external_integration: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
58    #[serde(rename = "status")]
59    pub status: Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>,
60    #[serde(
61        rename = "created",
62        default,
63        with = "::serde_with::rust::double_option",
64        skip_serializing_if = "Option::is_none"
65    )]
66    pub created: Option<Option<String>>,
67    #[serde(
68        rename = "last_updated",
69        default,
70        with = "::serde_with::rust::double_option",
71        skip_serializing_if = "Option::is_none"
72    )]
73    pub last_updated: Option<Option<String>>,
74    #[serde(rename = "notes_url", skip_serializing_if = "Option::is_none")]
75    pub notes_url: Option<String>,
76    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
77    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
78    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
79    pub tags: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
80}
81
82impl SoftwareImageFile {
83    /// Base class to use for serializers based on OrganizationalModel or PrimaryModel.  Can also be used for models derived from BaseModel, so long as they support custom fields, notes, and relationships.
84    pub fn new(
85        image_file_name: String,
86        software_version: crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage,
87        status: crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage,
88    ) -> SoftwareImageFile {
89        SoftwareImageFile {
90            id: None,
91            object_type: None,
92            display: None,
93            url: None,
94            natural_slug: None,
95            image_file_name,
96            image_file_checksum: None,
97            hashing_algorithm: None,
98            image_file_size: None,
99            download_url: None,
100            default_image: None,
101            software_version: Box::new(software_version),
102            external_integration: None,
103            status: Box::new(status),
104            created: None,
105            last_updated: None,
106            notes_url: None,
107            custom_fields: None,
108            tags: None,
109        }
110    }
111}