use serde::Deserialize;
#[derive(Clone, Deserialize, Debug)]
#[serde(untagged)]
#[non_exhaustive]
pub enum AttributeValue {
Integer(u64),
Decimal(f64),
Boolean(bool),
String(String),
Null,
}
impl From<&AttributeValue> for String {
fn from(value: &AttributeValue) -> Self {
match value {
AttributeValue::Integer(number) => number.to_string(),
AttributeValue::Decimal(number) => number.to_string(),
AttributeValue::Boolean(bool) => bool.to_string(),
AttributeValue::String(text) => text.clone(),
AttributeValue::Null => String::new(),
}
}
}