use super::{AppearancePlan, AppearanceRequest};
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Deserialize, Serialize)]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
pub struct AppearanceRaster {
pub width: u32,
pub height: u32,
pub byte_offset: usize,
pub byte_length: usize,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
pub struct AppearanceSourceRaster {
pub image_uri: String,
pub raster: AppearanceRaster,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
pub struct PageAppearanceRequest {
pub appearance: AppearanceRequest,
pub page: AppearanceRaster,
pub source_images: Vec<AppearanceSourceRaster>,
pub texels_per_metre: f64,
}
#[derive(Debug, Clone, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct AppearanceItemImage {
pub geometry_item_id: u32,
pub image_uri: String,
}
#[derive(Debug, Clone)]
pub struct AppearanceGeneratedImage {
pub image_uri: String,
pub width: u32,
pub height: u32,
pub png: Vec<u8>,
}
#[derive(Debug)]
pub struct PageAppearancePlan {
pub plan: AppearancePlan,
pub item_images: Vec<AppearanceItemImage>,
pub assets: Vec<AppearanceGeneratedImage>,
pub texels_per_metre: f64,
}