| /* | |
| * | |
| * | |
| * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | |
| * | |
| * The version of the OpenAPI document: | |
| * | |
| * Generated by: https://openapi-generator.tech | |
| */ | |
| use crate::models; | |
| use serde::{Deserialize, Serialize}; | |
| pub struct ImageData { | |
| /// Hex-encoded blake3 hash of an immutable blob. | |
| pub blob: String, | |
| pub name: Option<Option<String>>, | |
| pub natural_height: u32, | |
| pub natural_width: u32, | |
| pub opacity: Option<f32>, | |
| /// Role tags differentiate source / inpainted / rendered / user-imported images. Role is immutable on an existing node — switching roles = delete + add. | |
| pub role: models::ImageRole, | |
| } | |
| impl ImageData { | |
| pub fn new( | |
| blob: String, | |
| natural_height: u32, | |
| natural_width: u32, | |
| role: models::ImageRole, | |
| ) -> ImageData { | |
| ImageData { | |
| blob, | |
| name: None, | |
| natural_height, | |
| natural_width, | |
| opacity: None, | |
| role, | |
| } | |
| } | |
| } | |