1
This commit is contained in:
@@ -13,6 +13,12 @@ pub struct CreateMatch3DAgentSessionRequest {
|
||||
pub clear_count: Option<u32>,
|
||||
#[serde(default)]
|
||||
pub difficulty: Option<u32>,
|
||||
#[serde(default)]
|
||||
pub asset_style_id: Option<String>,
|
||||
#[serde(default)]
|
||||
pub asset_style_label: Option<String>,
|
||||
#[serde(default)]
|
||||
pub asset_style_prompt: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
|
||||
@@ -52,6 +58,12 @@ pub struct Match3DCreatorConfigResponse {
|
||||
pub reference_image_src: Option<String>,
|
||||
pub clear_count: u32,
|
||||
pub difficulty: u32,
|
||||
#[serde(default)]
|
||||
pub asset_style_id: Option<String>,
|
||||
#[serde(default)]
|
||||
pub asset_style_label: Option<String>,
|
||||
#[serde(default)]
|
||||
pub asset_style_prompt: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)]
|
||||
@@ -73,6 +85,32 @@ pub struct Match3DResultDraftResponse {
|
||||
pub total_item_count: u32,
|
||||
pub publish_ready: bool,
|
||||
pub blockers: Vec<String>,
|
||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||
pub generated_item_assets: Vec<Match3DGeneratedItemAssetResponse>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct Match3DGeneratedItemAssetResponse {
|
||||
pub item_id: String,
|
||||
pub item_name: String,
|
||||
#[serde(default)]
|
||||
pub image_src: Option<String>,
|
||||
#[serde(default)]
|
||||
pub image_object_key: Option<String>,
|
||||
#[serde(default)]
|
||||
pub model_src: Option<String>,
|
||||
#[serde(default)]
|
||||
pub model_object_key: Option<String>,
|
||||
#[serde(default)]
|
||||
pub model_file_name: Option<String>,
|
||||
#[serde(default)]
|
||||
pub task_uuid: Option<String>,
|
||||
#[serde(default)]
|
||||
pub subscription_key: Option<String>,
|
||||
pub status: String,
|
||||
#[serde(default)]
|
||||
pub error: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)]
|
||||
@@ -147,6 +185,9 @@ mod tests {
|
||||
reference_image_src: Some("data:image/png;base64,abc".to_string()),
|
||||
clear_count: Some(4),
|
||||
difficulty: Some(3),
|
||||
asset_style_id: Some("clay-toy".to_string()),
|
||||
asset_style_label: Some("黏土手作".to_string()),
|
||||
asset_style_prompt: Some("圆润黏土手作风".to_string()),
|
||||
})
|
||||
.expect("payload should serialize");
|
||||
|
||||
@@ -157,5 +198,6 @@ mod tests {
|
||||
json!("data:image/png;base64,abc")
|
||||
);
|
||||
assert_eq!(payload["clearCount"], json!(4));
|
||||
assert_eq!(payload["assetStyleId"], json!("clay-toy"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user