| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| use crate::models; |
| use serde::{Deserialize, Serialize}; |
|
|
| #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] |
| pub struct ImageDataPatch { |
| |
| #[serde( |
| rename = "blob", |
| default, |
| with = "::serde_with::rust::double_option", |
| skip_serializing_if = "Option::is_none" |
| )] |
| pub blob: Option<Option<String>>, |
| #[serde( |
| rename = "name", |
| default, |
| with = "::serde_with::rust::double_option", |
| skip_serializing_if = "Option::is_none" |
| )] |
| pub name: Option<Option<String>>, |
| #[serde( |
| rename = "naturalHeight", |
| default, |
| with = "::serde_with::rust::double_option", |
| skip_serializing_if = "Option::is_none" |
| )] |
| pub natural_height: Option<Option<u32>>, |
| #[serde( |
| rename = "naturalWidth", |
| default, |
| with = "::serde_with::rust::double_option", |
| skip_serializing_if = "Option::is_none" |
| )] |
| pub natural_width: Option<Option<u32>>, |
| #[serde( |
| rename = "opacity", |
| default, |
| with = "::serde_with::rust::double_option", |
| skip_serializing_if = "Option::is_none" |
| )] |
| pub opacity: Option<Option<f32>>, |
| } |
|
|
| impl ImageDataPatch { |
| pub fn new() -> ImageDataPatch { |
| ImageDataPatch { |
| blob: None, |
| name: None, |
| natural_height: None, |
| natural_width: None, |
| opacity: None, |
| } |
| } |
| } |
|
|