use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[cfg_attr(feature = "openapi", derive(utoipa::ToSchema))]
#[cfg_attr(feature = "jsonschema", derive(schemars::JsonSchema))]
#[serde(rename_all = "camelCase")]
pub struct GcpAiImportData {
pub project_id: String,
pub location: String,
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn deserializes_the_emitter_import_ref_key() {
let json = serde_json::json!({ "projectId": "my-project", "location": "us-central1" });
let data: GcpAiImportData =
serde_json::from_value(json).expect("emitter's projectId key must deserialize");
assert_eq!(data.project_id, "my-project");
assert_eq!(data.location, "us-central1");
}
}