nautobot_openapi/models/
bulk_writable_software_image_file_request.rs1#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct BulkWritableSoftwareImageFileRequest {
15 #[serde(rename = "id")]
16 pub id: uuid::Uuid,
17 #[serde(rename = "image_file_name")]
18 pub image_file_name: String,
19 #[serde(
20 rename = "image_file_checksum",
21 skip_serializing_if = "Option::is_none"
22 )]
23 pub image_file_checksum: Option<String>,
24 #[serde(rename = "hashing_algorithm", skip_serializing_if = "Option::is_none")]
25 pub hashing_algorithm:
26 Option<Box<crate::models::BulkWritableSoftwareImageFileRequestHashingAlgorithm>>,
27 #[serde(
29 rename = "image_file_size",
30 default,
31 with = "::serde_with::rust::double_option",
32 skip_serializing_if = "Option::is_none"
33 )]
34 pub image_file_size: Option<Option<i64>>,
35 #[serde(rename = "download_url", skip_serializing_if = "Option::is_none")]
36 pub download_url: Option<String>,
37 #[serde(rename = "default_image", skip_serializing_if = "Option::is_none")]
39 pub default_image: Option<bool>,
40 #[serde(rename = "software_version")]
41 pub software_version: Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>,
42 #[serde(
43 rename = "external_integration",
44 default,
45 with = "::serde_with::rust::double_option",
46 skip_serializing_if = "Option::is_none"
47 )]
48 pub external_integration: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
49 #[serde(rename = "status")]
50 pub status: Box<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>,
51 #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
52 pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
53 #[serde(rename = "relationships", skip_serializing_if = "Option::is_none")]
54 pub relationships: Option<
55 ::std::collections::HashMap<
56 String,
57 crate::models::ApprovalWorkflowDefinitionRequestRelationshipsValue,
58 >,
59 >,
60 #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
61 pub tags: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
62}
63
64impl BulkWritableSoftwareImageFileRequest {
65 pub fn new(
67 id: uuid::Uuid,
68 image_file_name: String,
69 software_version: crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage,
70 status: crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage,
71 ) -> BulkWritableSoftwareImageFileRequest {
72 BulkWritableSoftwareImageFileRequest {
73 id,
74 image_file_name,
75 image_file_checksum: None,
76 hashing_algorithm: None,
77 image_file_size: None,
78 download_url: None,
79 default_image: None,
80 software_version: Box::new(software_version),
81 external_integration: None,
82 status: Box::new(status),
83 custom_fields: None,
84 relationships: None,
85 tags: None,
86 }
87 }
88}