use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SyncAssetFaceV1 {
#[serde(rename = "assetId")]
pub asset_id: String,
#[serde(rename = "boundingBoxX1")]
pub bounding_box_x1: i32,
#[serde(rename = "boundingBoxX2")]
pub bounding_box_x2: i32,
#[serde(rename = "boundingBoxY1")]
pub bounding_box_y1: i32,
#[serde(rename = "boundingBoxY2")]
pub bounding_box_y2: i32,
#[serde(rename = "id")]
pub id: String,
#[serde(rename = "imageHeight")]
pub image_height: i32,
#[serde(rename = "imageWidth")]
pub image_width: i32,
#[serde(rename = "personId", deserialize_with = "Option::deserialize")]
pub person_id: Option<String>,
#[serde(rename = "sourceType")]
pub source_type: String,
}
impl SyncAssetFaceV1 {
pub fn new(asset_id: String, bounding_box_x1: i32, bounding_box_x2: i32, bounding_box_y1: i32, bounding_box_y2: i32, id: String, image_height: i32, image_width: i32, person_id: Option<String>, source_type: String) -> SyncAssetFaceV1 {
SyncAssetFaceV1 {
asset_id,
bounding_box_x1,
bounding_box_x2,
bounding_box_y1,
bounding_box_y2,
id,
image_height,
image_width,
person_id,
source_type,
}
}
}