use serde::{Deserialize, Serialize};
#[derive(Default, Debug, PartialEq, Eq, Deserialize, Serialize)]
pub struct Inventory {
#[serde(rename = "csl")]
pub consumable_slot_lot: i32,
pub bag: Bags,
#[serde(default)]
pub grps: Vec<Group>,
pub items: Items,
}
#[derive(Default, Debug, PartialEq, Eq, Deserialize, Serialize)]
pub struct Bags {
#[serde(rename = "b")]
children: Vec<Bag>,
}
#[derive(Default, Debug, PartialEq, Eq, Deserialize, Serialize)]
pub struct Bag {
#[serde(rename = "t")]
pub ty: u32,
#[serde(rename = "m")]
pub max: u32,
}
#[derive(Default, Debug, PartialEq, Eq, Deserialize, Serialize)]
pub struct Group {
pub attr_id: String,
pub attr_l: String,
pub attr_n: String,
pub attr_t: u32,
pub attr_u: String,
}
#[derive(Default, Debug, PartialEq, Eq, Deserialize, Serialize)]
pub struct Items {
#[serde(rename = "nn")]
pub attr_nn: Option<String>,
#[serde(rename = "in")]
pub children: Vec<ItemBag>,
}
#[derive(Default, Debug, PartialEq, Eq, Deserialize, Serialize)]
pub struct ItemBag {
#[serde(rename = "t")]
pub ty: u32,
#[serde(default, rename = "i")]
pub children: Vec<Item>,
}
#[derive(Default, Debug, PartialEq, Eq, Deserialize, Serialize)]
pub struct Item {
#[serde(rename = "b")]
pub bound: bool,
#[serde(rename = "c")]
pub count: u32,
#[serde(default, rename = "eq")]
pub equipped: bool,
#[serde(rename = "id")]
pub id: u64,
#[serde(rename = "l")]
pub template: u32,
#[serde(rename = "s")]
pub slot: u32,
#[serde(rename = "sk")]
pub subkey: u64,
#[serde(rename = "x")]
pub x: Option<ItemExtra>,
}
#[derive(Default, Debug, PartialEq, Eq, Deserialize, Serialize)]
#[allow(missing_docs)]
pub struct ItemExtra {
#[serde(rename = "b")]
pub attr_b: Option<String>,
#[serde(rename = "ma")]
pub module_assembly: String,
#[serde(rename = "ub")]
pub attr_ub: Option<String>,
#[serde(rename = "ud")]
pub attr_ud: Option<String>,
#[serde(rename = "ui")]
pub attr_ui: Option<String>,
#[serde(rename = "um")]
pub attr_um: Option<String>,
#[serde(rename = "un")]
pub attr_un: Option<String>,
#[serde(rename = "uo")]
pub attr_uo: Option<String>,
#[serde(rename = "up")]
pub attr_up: Option<String>,
}