netbox_openapi/models/
extras_image_attachments_create_request.rs1#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
12pub struct ExtrasImageAttachmentsCreateRequest {
13 #[serde(rename = "object_type")]
14 pub object_type: String,
15 #[serde(rename = "object_id")]
16 pub object_id: i64,
17 #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
18 pub name: Option<String>,
19 #[serde(rename = "image")]
20 pub image: std::path::PathBuf,
21 #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
22 pub description: Option<String>,
23}
24
25impl ExtrasImageAttachmentsCreateRequest {
26 pub fn new(
27 object_type: String,
28 object_id: i64,
29 image: std::path::PathBuf,
30 ) -> ExtrasImageAttachmentsCreateRequest {
31 ExtrasImageAttachmentsCreateRequest {
32 object_type,
33 object_id,
34 name: None,
35 image,
36 description: None,
37 }
38 }
39}