// automatically generated by the FlatBuffers compiler, do not modify


// @generated

use core::mem;
use core::cmp::Ordering;

extern crate flatbuffers;
use self::flatbuffers::{EndianScalar, Follow};

pub enum ItemTemplateOffset {}
#[derive(Copy, Clone, PartialEq)]

pub struct ItemTemplate<'a> {
  pub _tab: flatbuffers::Table<'a>,
}

impl<'a> flatbuffers::Follow<'a> for ItemTemplate<'a> {
  type Inner = ItemTemplate<'a>;
  #[inline]
  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
    Self { _tab: flatbuffers::Table::new(buf, loc) }
  }
}

impl<'a> ItemTemplate<'a> {
  pub const VT_ID: flatbuffers::VOffsetT = 4;
  pub const VT_NAME: flatbuffers::VOffsetT = 6;
  pub const VT_RARITY: flatbuffers::VOffsetT = 8;
  pub const VT_CLASS: flatbuffers::VOffsetT = 10;
  pub const VT_UNK_1: flatbuffers::VOffsetT = 12;
  pub const VT_UNK_2: flatbuffers::VOffsetT = 14;
  pub const VT_DESC: flatbuffers::VOffsetT = 16;
  pub const VT_SHOW_DETAIL: flatbuffers::VOffsetT = 18;
  pub const VT_STORY: flatbuffers::VOffsetT = 20;
  pub const VT_UNK_101: flatbuffers::VOffsetT = 22;
  pub const VT_ICON_PATH: flatbuffers::VOffsetT = 24;
  pub const VT_UNK_102: flatbuffers::VOffsetT = 26;
  pub const VT_SMALL_ICON_PATH: flatbuffers::VOffsetT = 28;
  pub const VT_UNK_103: flatbuffers::VOffsetT = 30;
  pub const VT_BIG_ICON: flatbuffers::VOffsetT = 32;
  pub const VT_UNK_3: flatbuffers::VOffsetT = 34;
  pub const VT_PREFAB_PATH: flatbuffers::VOffsetT = 36;
  pub const VT_PACKAGE: flatbuffers::VOffsetT = 38;
  pub const VT_UNK_4: flatbuffers::VOffsetT = 40;
  pub const VT_KEEP_MAX: flatbuffers::VOffsetT = 42;
  pub const VT_VALUE: flatbuffers::VOffsetT = 44;
  pub const VT_UNK_5: flatbuffers::VOffsetT = 46;
  pub const VT_UNK_6: flatbuffers::VOffsetT = 48;
  pub const VT_UNK_7: flatbuffers::VOffsetT = 50;
  pub const VT_UNK_8: flatbuffers::VOffsetT = 52;
  pub const VT_UNK_9: flatbuffers::VOffsetT = 54;
  pub const VT_UNK_10: flatbuffers::VOffsetT = 56;
  pub const VT_BORN_EFFECT_PATH: flatbuffers::VOffsetT = 58;
  pub const VT_REMAIN_EFFECT_PATH: flatbuffers::VOffsetT = 60;
  pub const VT_INTERACTION_EFFECT_PATH: flatbuffers::VOffsetT = 62;
  pub const VT_DEAD_EFFECT_PATH: flatbuffers::VOffsetT = 64;
  pub const VT_ITEM_DROP_EFFECT_NAME: flatbuffers::VOffsetT = 66;
  pub const VT_UNK_11: flatbuffers::VOffsetT = 68;
  pub const VT_UNK_12: flatbuffers::VOffsetT = 70;
  pub const VT_UNK_13: flatbuffers::VOffsetT = 72;
  pub const VT_UNK_14: flatbuffers::VOffsetT = 74;
  pub const VT_GROCERY_ICON: flatbuffers::VOffsetT = 76;
  pub const VT_UNK_15: flatbuffers::VOffsetT = 78;
  pub const VT_UNK_16: flatbuffers::VOffsetT = 80;
  pub const VT_UNK_17: flatbuffers::VOffsetT = 82;
  pub const VT_UNK_18: flatbuffers::VOffsetT = 84;
  pub const VT_PARAMETERS: flatbuffers::VOffsetT = 86;

  #[inline]
  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
    ItemTemplate { _tab: table }
  }
  #[allow(unused_mut)]
  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
    args: &'args ItemTemplateArgs<'args>
  ) -> flatbuffers::WIPOffset<ItemTemplate<'bldr>> {
    let mut builder = ItemTemplateBuilder::new(_fbb);
    builder.add_unk_17(args.unk_17);
    if let Some(x) = args.parameters { builder.add_parameters(x); }
    builder.add_unk_18(args.unk_18);
    if let Some(x) = args.unk_16 { builder.add_unk_16(x); }
    if let Some(x) = args.unk_15 { builder.add_unk_15(x); }
    if let Some(x) = args.grocery_icon { builder.add_grocery_icon(x); }
    if let Some(x) = args.unk_14 { builder.add_unk_14(x); }
    builder.add_unk_13(args.unk_13);
    builder.add_unk_12(args.unk_12);
    builder.add_unk_11(args.unk_11);
    if let Some(x) = args.item_drop_effect_name { builder.add_item_drop_effect_name(x); }
    if let Some(x) = args.dead_effect_path { builder.add_dead_effect_path(x); }
    if let Some(x) = args.interaction_effect_path { builder.add_interaction_effect_path(x); }
    if let Some(x) = args.remain_effect_path { builder.add_remain_effect_path(x); }
    if let Some(x) = args.born_effect_path { builder.add_born_effect_path(x); }
    builder.add_unk_10(args.unk_10);
    builder.add_unk_9(args.unk_9);
    builder.add_unk_8(args.unk_8);
    builder.add_unk_7(args.unk_7);
    if let Some(x) = args.unk_6 { builder.add_unk_6(x); }
    builder.add_unk_5(args.unk_5);
    builder.add_value(args.value);
    builder.add_keep_max(args.keep_max);
    builder.add_unk_4(args.unk_4);
    builder.add_package(args.package);
    if let Some(x) = args.prefab_path { builder.add_prefab_path(x); }
    builder.add_unk_3(args.unk_3);
    if let Some(x) = args.big_icon { builder.add_big_icon(x); }
    builder.add_unk_103(args.unk_103);
    if let Some(x) = args.small_icon_path { builder.add_small_icon_path(x); }
    builder.add_unk_102(args.unk_102);
    if let Some(x) = args.icon_path { builder.add_icon_path(x); }
    builder.add_unk_101(args.unk_101);
    if let Some(x) = args.story { builder.add_story(x); }
    builder.add_show_detail(args.show_detail);
    if let Some(x) = args.desc { builder.add_desc(x); }
    builder.add_unk_2(args.unk_2);
    builder.add_unk_1(args.unk_1);
    builder.add_class(args.class);
    builder.add_rarity(args.rarity);
    if let Some(x) = args.name { builder.add_name(x); }
    builder.add_id(args.id);
    builder.finish()
  }


  #[inline]
  pub fn id(&self) -> u32 {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<u32>(ItemTemplate::VT_ID, Some(0)).unwrap()}
  }
  #[inline]
  pub fn name(&self) -> Option<&'a str> {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ItemTemplate::VT_NAME, None)}
  }
  #[inline]
  pub fn rarity(&self) -> u32 {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<u32>(ItemTemplate::VT_RARITY, Some(0)).unwrap()}
  }
  #[inline]
  pub fn class(&self) -> u32 {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<u32>(ItemTemplate::VT_CLASS, Some(0)).unwrap()}
  }
  #[inline]
  pub fn unk_1(&self) -> i32 {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<i32>(ItemTemplate::VT_UNK_1, Some(0)).unwrap()}
  }
  #[inline]
  pub fn unk_2(&self) -> i32 {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<i32>(ItemTemplate::VT_UNK_2, Some(0)).unwrap()}
  }
  #[inline]
  pub fn desc(&self) -> Option<&'a str> {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ItemTemplate::VT_DESC, None)}
  }
  #[inline]
  pub fn show_detail(&self) -> i32 {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<i32>(ItemTemplate::VT_SHOW_DETAIL, Some(0)).unwrap()}
  }
  #[inline]
  pub fn story(&self) -> Option<&'a str> {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ItemTemplate::VT_STORY, None)}
  }
  #[inline]
  pub fn unk_101(&self) -> i32 {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<i32>(ItemTemplate::VT_UNK_101, Some(0)).unwrap()}
  }
  #[inline]
  pub fn icon_path(&self) -> Option<&'a str> {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ItemTemplate::VT_ICON_PATH, None)}
  }
  #[inline]
  pub fn unk_102(&self) -> i32 {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<i32>(ItemTemplate::VT_UNK_102, Some(0)).unwrap()}
  }
  #[inline]
  pub fn small_icon_path(&self) -> Option<&'a str> {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ItemTemplate::VT_SMALL_ICON_PATH, None)}
  }
  #[inline]
  pub fn unk_103(&self) -> i32 {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<i32>(ItemTemplate::VT_UNK_103, Some(0)).unwrap()}
  }
  #[inline]
  pub fn big_icon(&self) -> Option<&'a str> {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ItemTemplate::VT_BIG_ICON, None)}
  }
  #[inline]
  pub fn unk_3(&self) -> i32 {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<i32>(ItemTemplate::VT_UNK_3, Some(0)).unwrap()}
  }
  #[inline]
  pub fn prefab_path(&self) -> Option<&'a str> {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ItemTemplate::VT_PREFAB_PATH, None)}
  }
  #[inline]
  pub fn package(&self) -> u32 {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<u32>(ItemTemplate::VT_PACKAGE, Some(0)).unwrap()}
  }
  #[inline]
  pub fn unk_4(&self) -> i32 {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<i32>(ItemTemplate::VT_UNK_4, Some(0)).unwrap()}
  }
  #[inline]
  pub fn keep_max(&self) -> u32 {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<u32>(ItemTemplate::VT_KEEP_MAX, Some(0)).unwrap()}
  }
  #[inline]
  pub fn value(&self) -> u32 {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<u32>(ItemTemplate::VT_VALUE, Some(0)).unwrap()}
  }
  #[inline]
  pub fn unk_5(&self) -> i32 {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<i32>(ItemTemplate::VT_UNK_5, Some(0)).unwrap()}
  }
  #[inline]
  pub fn unk_6(&self) -> Option<&'a str> {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ItemTemplate::VT_UNK_6, None)}
  }
  #[inline]
  pub fn unk_7(&self) -> i32 {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<i32>(ItemTemplate::VT_UNK_7, Some(0)).unwrap()}
  }
  #[inline]
  pub fn unk_8(&self) -> i32 {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<i32>(ItemTemplate::VT_UNK_8, Some(0)).unwrap()}
  }
  #[inline]
  pub fn unk_9(&self) -> i32 {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<i32>(ItemTemplate::VT_UNK_9, Some(0)).unwrap()}
  }
  #[inline]
  pub fn unk_10(&self) -> i32 {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<i32>(ItemTemplate::VT_UNK_10, Some(0)).unwrap()}
  }
  #[inline]
  pub fn born_effect_path(&self) -> Option<&'a str> {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ItemTemplate::VT_BORN_EFFECT_PATH, None)}
  }
  #[inline]
  pub fn remain_effect_path(&self) -> Option<&'a str> {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ItemTemplate::VT_REMAIN_EFFECT_PATH, None)}
  }
  #[inline]
  pub fn interaction_effect_path(&self) -> Option<&'a str> {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ItemTemplate::VT_INTERACTION_EFFECT_PATH, None)}
  }
  #[inline]
  pub fn dead_effect_path(&self) -> Option<&'a str> {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ItemTemplate::VT_DEAD_EFFECT_PATH, None)}
  }
  #[inline]
  pub fn item_drop_effect_name(&self) -> Option<&'a str> {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ItemTemplate::VT_ITEM_DROP_EFFECT_NAME, None)}
  }
  #[inline]
  pub fn unk_11(&self) -> i32 {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<i32>(ItemTemplate::VT_UNK_11, Some(0)).unwrap()}
  }
  #[inline]
  pub fn unk_12(&self) -> i32 {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<i32>(ItemTemplate::VT_UNK_12, Some(0)).unwrap()}
  }
  #[inline]
  pub fn unk_13(&self) -> i32 {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<i32>(ItemTemplate::VT_UNK_13, Some(0)).unwrap()}
  }
  #[inline]
  pub fn unk_14(&self) -> Option<&'a str> {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ItemTemplate::VT_UNK_14, None)}
  }
  #[inline]
  pub fn grocery_icon(&self) -> Option<&'a str> {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ItemTemplate::VT_GROCERY_ICON, None)}
  }
  #[inline]
  pub fn unk_15(&self) -> Option<flatbuffers::Vector<'a, i32>> {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, i32>>>(ItemTemplate::VT_UNK_15, None)}
  }
  #[inline]
  pub fn unk_16(&self) -> Option<flatbuffers::Vector<'a, i32>> {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, i32>>>(ItemTemplate::VT_UNK_16, None)}
  }
  #[inline]
  pub fn unk_17(&self) -> u64 {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<u64>(ItemTemplate::VT_UNK_17, Some(0)).unwrap()}
  }
  #[inline]
  pub fn unk_18(&self) -> i32 {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<i32>(ItemTemplate::VT_UNK_18, Some(0)).unwrap()}
  }
  #[inline]
  pub fn parameters(&self) -> Option<flatbuffers::Vector<'a, u32>> {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u32>>>(ItemTemplate::VT_PARAMETERS, None)}
  }
}

impl flatbuffers::Verifiable for ItemTemplate<'_> {
  #[inline]
  fn run_verifier(
    v: &mut flatbuffers::Verifier, pos: usize
  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
    use self::flatbuffers::Verifiable;
    v.visit_table(pos)?
     .visit_field::<u32>("id", Self::VT_ID, false)?
     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, false)?
     .visit_field::<u32>("rarity", Self::VT_RARITY, false)?
     .visit_field::<u32>("class", Self::VT_CLASS, false)?
     .visit_field::<i32>("unk_1", Self::VT_UNK_1, false)?
     .visit_field::<i32>("unk_2", Self::VT_UNK_2, false)?
     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("desc", Self::VT_DESC, false)?
     .visit_field::<i32>("show_detail", Self::VT_SHOW_DETAIL, false)?
     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("story", Self::VT_STORY, false)?
     .visit_field::<i32>("unk_101", Self::VT_UNK_101, false)?
     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("icon_path", Self::VT_ICON_PATH, false)?
     .visit_field::<i32>("unk_102", Self::VT_UNK_102, false)?
     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("small_icon_path", Self::VT_SMALL_ICON_PATH, false)?
     .visit_field::<i32>("unk_103", Self::VT_UNK_103, false)?
     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("big_icon", Self::VT_BIG_ICON, false)?
     .visit_field::<i32>("unk_3", Self::VT_UNK_3, false)?
     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("prefab_path", Self::VT_PREFAB_PATH, false)?
     .visit_field::<u32>("package", Self::VT_PACKAGE, false)?
     .visit_field::<i32>("unk_4", Self::VT_UNK_4, false)?
     .visit_field::<u32>("keep_max", Self::VT_KEEP_MAX, false)?
     .visit_field::<u32>("value", Self::VT_VALUE, false)?
     .visit_field::<i32>("unk_5", Self::VT_UNK_5, false)?
     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("unk_6", Self::VT_UNK_6, false)?
     .visit_field::<i32>("unk_7", Self::VT_UNK_7, false)?
     .visit_field::<i32>("unk_8", Self::VT_UNK_8, false)?
     .visit_field::<i32>("unk_9", Self::VT_UNK_9, false)?
     .visit_field::<i32>("unk_10", Self::VT_UNK_10, false)?
     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("born_effect_path", Self::VT_BORN_EFFECT_PATH, false)?
     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("remain_effect_path", Self::VT_REMAIN_EFFECT_PATH, false)?
     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("interaction_effect_path", Self::VT_INTERACTION_EFFECT_PATH, false)?
     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("dead_effect_path", Self::VT_DEAD_EFFECT_PATH, false)?
     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("item_drop_effect_name", Self::VT_ITEM_DROP_EFFECT_NAME, false)?
     .visit_field::<i32>("unk_11", Self::VT_UNK_11, false)?
     .visit_field::<i32>("unk_12", Self::VT_UNK_12, false)?
     .visit_field::<i32>("unk_13", Self::VT_UNK_13, false)?
     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("unk_14", Self::VT_UNK_14, false)?
     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("grocery_icon", Self::VT_GROCERY_ICON, false)?
     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, i32>>>("unk_15", Self::VT_UNK_15, false)?
     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, i32>>>("unk_16", Self::VT_UNK_16, false)?
     .visit_field::<u64>("unk_17", Self::VT_UNK_17, false)?
     .visit_field::<i32>("unk_18", Self::VT_UNK_18, false)?
     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u32>>>("parameters", Self::VT_PARAMETERS, false)?
     .finish();
    Ok(())
  }
}
pub struct ItemTemplateArgs<'a> {
    pub id: u32,
    pub name: Option<flatbuffers::WIPOffset<&'a str>>,
    pub rarity: u32,
    pub class: u32,
    pub unk_1: i32,
    pub unk_2: i32,
    pub desc: Option<flatbuffers::WIPOffset<&'a str>>,
    pub show_detail: i32,
    pub story: Option<flatbuffers::WIPOffset<&'a str>>,
    pub unk_101: i32,
    pub icon_path: Option<flatbuffers::WIPOffset<&'a str>>,
    pub unk_102: i32,
    pub small_icon_path: Option<flatbuffers::WIPOffset<&'a str>>,
    pub unk_103: i32,
    pub big_icon: Option<flatbuffers::WIPOffset<&'a str>>,
    pub unk_3: i32,
    pub prefab_path: Option<flatbuffers::WIPOffset<&'a str>>,
    pub package: u32,
    pub unk_4: i32,
    pub keep_max: u32,
    pub value: u32,
    pub unk_5: i32,
    pub unk_6: Option<flatbuffers::WIPOffset<&'a str>>,
    pub unk_7: i32,
    pub unk_8: i32,
    pub unk_9: i32,
    pub unk_10: i32,
    pub born_effect_path: Option<flatbuffers::WIPOffset<&'a str>>,
    pub remain_effect_path: Option<flatbuffers::WIPOffset<&'a str>>,
    pub interaction_effect_path: Option<flatbuffers::WIPOffset<&'a str>>,
    pub dead_effect_path: Option<flatbuffers::WIPOffset<&'a str>>,
    pub item_drop_effect_name: Option<flatbuffers::WIPOffset<&'a str>>,
    pub unk_11: i32,
    pub unk_12: i32,
    pub unk_13: i32,
    pub unk_14: Option<flatbuffers::WIPOffset<&'a str>>,
    pub grocery_icon: Option<flatbuffers::WIPOffset<&'a str>>,
    pub unk_15: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, i32>>>,
    pub unk_16: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, i32>>>,
    pub unk_17: u64,
    pub unk_18: i32,
    pub parameters: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u32>>>,
}
impl<'a> Default for ItemTemplateArgs<'a> {
  #[inline]
  fn default() -> Self {
    ItemTemplateArgs {
      id: 0,
      name: None,
      rarity: 0,
      class: 0,
      unk_1: 0,
      unk_2: 0,
      desc: None,
      show_detail: 0,
      story: None,
      unk_101: 0,
      icon_path: None,
      unk_102: 0,
      small_icon_path: None,
      unk_103: 0,
      big_icon: None,
      unk_3: 0,
      prefab_path: None,
      package: 0,
      unk_4: 0,
      keep_max: 0,
      value: 0,
      unk_5: 0,
      unk_6: None,
      unk_7: 0,
      unk_8: 0,
      unk_9: 0,
      unk_10: 0,
      born_effect_path: None,
      remain_effect_path: None,
      interaction_effect_path: None,
      dead_effect_path: None,
      item_drop_effect_name: None,
      unk_11: 0,
      unk_12: 0,
      unk_13: 0,
      unk_14: None,
      grocery_icon: None,
      unk_15: None,
      unk_16: None,
      unk_17: 0,
      unk_18: 0,
      parameters: None,
    }
  }
}

pub struct ItemTemplateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ItemTemplateBuilder<'a, 'b, A> {
  #[inline]
  pub fn add_id(&mut self, id: u32) {
    self.fbb_.push_slot::<u32>(ItemTemplate::VT_ID, id, 0);
  }
  #[inline]
  pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b  str>) {
    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ItemTemplate::VT_NAME, name);
  }
  #[inline]
  pub fn add_rarity(&mut self, rarity: u32) {
    self.fbb_.push_slot::<u32>(ItemTemplate::VT_RARITY, rarity, 0);
  }
  #[inline]
  pub fn add_class(&mut self, class: u32) {
    self.fbb_.push_slot::<u32>(ItemTemplate::VT_CLASS, class, 0);
  }
  #[inline]
  pub fn add_unk_1(&mut self, unk_1: i32) {
    self.fbb_.push_slot::<i32>(ItemTemplate::VT_UNK_1, unk_1, 0);
  }
  #[inline]
  pub fn add_unk_2(&mut self, unk_2: i32) {
    self.fbb_.push_slot::<i32>(ItemTemplate::VT_UNK_2, unk_2, 0);
  }
  #[inline]
  pub fn add_desc(&mut self, desc: flatbuffers::WIPOffset<&'b  str>) {
    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ItemTemplate::VT_DESC, desc);
  }
  #[inline]
  pub fn add_show_detail(&mut self, show_detail: i32) {
    self.fbb_.push_slot::<i32>(ItemTemplate::VT_SHOW_DETAIL, show_detail, 0);
  }
  #[inline]
  pub fn add_story(&mut self, story: flatbuffers::WIPOffset<&'b  str>) {
    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ItemTemplate::VT_STORY, story);
  }
  #[inline]
  pub fn add_unk_101(&mut self, unk_101: i32) {
    self.fbb_.push_slot::<i32>(ItemTemplate::VT_UNK_101, unk_101, 0);
  }
  #[inline]
  pub fn add_icon_path(&mut self, icon_path: flatbuffers::WIPOffset<&'b  str>) {
    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ItemTemplate::VT_ICON_PATH, icon_path);
  }
  #[inline]
  pub fn add_unk_102(&mut self, unk_102: i32) {
    self.fbb_.push_slot::<i32>(ItemTemplate::VT_UNK_102, unk_102, 0);
  }
  #[inline]
  pub fn add_small_icon_path(&mut self, small_icon_path: flatbuffers::WIPOffset<&'b  str>) {
    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ItemTemplate::VT_SMALL_ICON_PATH, small_icon_path);
  }
  #[inline]
  pub fn add_unk_103(&mut self, unk_103: i32) {
    self.fbb_.push_slot::<i32>(ItemTemplate::VT_UNK_103, unk_103, 0);
  }
  #[inline]
  pub fn add_big_icon(&mut self, big_icon: flatbuffers::WIPOffset<&'b  str>) {
    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ItemTemplate::VT_BIG_ICON, big_icon);
  }
  #[inline]
  pub fn add_unk_3(&mut self, unk_3: i32) {
    self.fbb_.push_slot::<i32>(ItemTemplate::VT_UNK_3, unk_3, 0);
  }
  #[inline]
  pub fn add_prefab_path(&mut self, prefab_path: flatbuffers::WIPOffset<&'b  str>) {
    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ItemTemplate::VT_PREFAB_PATH, prefab_path);
  }
  #[inline]
  pub fn add_package(&mut self, package: u32) {
    self.fbb_.push_slot::<u32>(ItemTemplate::VT_PACKAGE, package, 0);
  }
  #[inline]
  pub fn add_unk_4(&mut self, unk_4: i32) {
    self.fbb_.push_slot::<i32>(ItemTemplate::VT_UNK_4, unk_4, 0);
  }
  #[inline]
  pub fn add_keep_max(&mut self, keep_max: u32) {
    self.fbb_.push_slot::<u32>(ItemTemplate::VT_KEEP_MAX, keep_max, 0);
  }
  #[inline]
  pub fn add_value(&mut self, value: u32) {
    self.fbb_.push_slot::<u32>(ItemTemplate::VT_VALUE, value, 0);
  }
  #[inline]
  pub fn add_unk_5(&mut self, unk_5: i32) {
    self.fbb_.push_slot::<i32>(ItemTemplate::VT_UNK_5, unk_5, 0);
  }
  #[inline]
  pub fn add_unk_6(&mut self, unk_6: flatbuffers::WIPOffset<&'b  str>) {
    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ItemTemplate::VT_UNK_6, unk_6);
  }
  #[inline]
  pub fn add_unk_7(&mut self, unk_7: i32) {
    self.fbb_.push_slot::<i32>(ItemTemplate::VT_UNK_7, unk_7, 0);
  }
  #[inline]
  pub fn add_unk_8(&mut self, unk_8: i32) {
    self.fbb_.push_slot::<i32>(ItemTemplate::VT_UNK_8, unk_8, 0);
  }
  #[inline]
  pub fn add_unk_9(&mut self, unk_9: i32) {
    self.fbb_.push_slot::<i32>(ItemTemplate::VT_UNK_9, unk_9, 0);
  }
  #[inline]
  pub fn add_unk_10(&mut self, unk_10: i32) {
    self.fbb_.push_slot::<i32>(ItemTemplate::VT_UNK_10, unk_10, 0);
  }
  #[inline]
  pub fn add_born_effect_path(&mut self, born_effect_path: flatbuffers::WIPOffset<&'b  str>) {
    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ItemTemplate::VT_BORN_EFFECT_PATH, born_effect_path);
  }
  #[inline]
  pub fn add_remain_effect_path(&mut self, remain_effect_path: flatbuffers::WIPOffset<&'b  str>) {
    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ItemTemplate::VT_REMAIN_EFFECT_PATH, remain_effect_path);
  }
  #[inline]
  pub fn add_interaction_effect_path(&mut self, interaction_effect_path: flatbuffers::WIPOffset<&'b  str>) {
    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ItemTemplate::VT_INTERACTION_EFFECT_PATH, interaction_effect_path);
  }
  #[inline]
  pub fn add_dead_effect_path(&mut self, dead_effect_path: flatbuffers::WIPOffset<&'b  str>) {
    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ItemTemplate::VT_DEAD_EFFECT_PATH, dead_effect_path);
  }
  #[inline]
  pub fn add_item_drop_effect_name(&mut self, item_drop_effect_name: flatbuffers::WIPOffset<&'b  str>) {
    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ItemTemplate::VT_ITEM_DROP_EFFECT_NAME, item_drop_effect_name);
  }
  #[inline]
  pub fn add_unk_11(&mut self, unk_11: i32) {
    self.fbb_.push_slot::<i32>(ItemTemplate::VT_UNK_11, unk_11, 0);
  }
  #[inline]
  pub fn add_unk_12(&mut self, unk_12: i32) {
    self.fbb_.push_slot::<i32>(ItemTemplate::VT_UNK_12, unk_12, 0);
  }
  #[inline]
  pub fn add_unk_13(&mut self, unk_13: i32) {
    self.fbb_.push_slot::<i32>(ItemTemplate::VT_UNK_13, unk_13, 0);
  }
  #[inline]
  pub fn add_unk_14(&mut self, unk_14: flatbuffers::WIPOffset<&'b  str>) {
    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ItemTemplate::VT_UNK_14, unk_14);
  }
  #[inline]
  pub fn add_grocery_icon(&mut self, grocery_icon: flatbuffers::WIPOffset<&'b  str>) {
    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ItemTemplate::VT_GROCERY_ICON, grocery_icon);
  }
  #[inline]
  pub fn add_unk_15(&mut self, unk_15: flatbuffers::WIPOffset<flatbuffers::Vector<'b , i32>>) {
    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ItemTemplate::VT_UNK_15, unk_15);
  }
  #[inline]
  pub fn add_unk_16(&mut self, unk_16: flatbuffers::WIPOffset<flatbuffers::Vector<'b , i32>>) {
    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ItemTemplate::VT_UNK_16, unk_16);
  }
  #[inline]
  pub fn add_unk_17(&mut self, unk_17: u64) {
    self.fbb_.push_slot::<u64>(ItemTemplate::VT_UNK_17, unk_17, 0);
  }
  #[inline]
  pub fn add_unk_18(&mut self, unk_18: i32) {
    self.fbb_.push_slot::<i32>(ItemTemplate::VT_UNK_18, unk_18, 0);
  }
  #[inline]
  pub fn add_parameters(&mut self, parameters: flatbuffers::WIPOffset<flatbuffers::Vector<'b , u32>>) {
    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ItemTemplate::VT_PARAMETERS, parameters);
  }
  #[inline]
  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ItemTemplateBuilder<'a, 'b, A> {
    let start = _fbb.start_table();
    ItemTemplateBuilder {
      fbb_: _fbb,
      start_: start,
    }
  }
  #[inline]
  pub fn finish(self) -> flatbuffers::WIPOffset<ItemTemplate<'a>> {
    let o = self.fbb_.end_table(self.start_);
    flatbuffers::WIPOffset::new(o.value())
  }
}

impl core::fmt::Debug for ItemTemplate<'_> {
  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
    let mut ds = f.debug_struct("ItemTemplate");
      ds.field("id", &self.id());
      ds.field("name", &self.name());
      ds.field("rarity", &self.rarity());
      ds.field("class", &self.class());
      ds.field("unk_1", &self.unk_1());
      ds.field("unk_2", &self.unk_2());
      ds.field("desc", &self.desc());
      ds.field("show_detail", &self.show_detail());
      ds.field("story", &self.story());
      ds.field("unk_101", &self.unk_101());
      ds.field("icon_path", &self.icon_path());
      ds.field("unk_102", &self.unk_102());
      ds.field("small_icon_path", &self.small_icon_path());
      ds.field("unk_103", &self.unk_103());
      ds.field("big_icon", &self.big_icon());
      ds.field("unk_3", &self.unk_3());
      ds.field("prefab_path", &self.prefab_path());
      ds.field("package", &self.package());
      ds.field("unk_4", &self.unk_4());
      ds.field("keep_max", &self.keep_max());
      ds.field("value", &self.value());
      ds.field("unk_5", &self.unk_5());
      ds.field("unk_6", &self.unk_6());
      ds.field("unk_7", &self.unk_7());
      ds.field("unk_8", &self.unk_8());
      ds.field("unk_9", &self.unk_9());
      ds.field("unk_10", &self.unk_10());
      ds.field("born_effect_path", &self.born_effect_path());
      ds.field("remain_effect_path", &self.remain_effect_path());
      ds.field("interaction_effect_path", &self.interaction_effect_path());
      ds.field("dead_effect_path", &self.dead_effect_path());
      ds.field("item_drop_effect_name", &self.item_drop_effect_name());
      ds.field("unk_11", &self.unk_11());
      ds.field("unk_12", &self.unk_12());
      ds.field("unk_13", &self.unk_13());
      ds.field("unk_14", &self.unk_14());
      ds.field("grocery_icon", &self.grocery_icon());
      ds.field("unk_15", &self.unk_15());
      ds.field("unk_16", &self.unk_16());
      ds.field("unk_17", &self.unk_17());
      ds.field("unk_18", &self.unk_18());
      ds.field("parameters", &self.parameters());
      ds.finish()
  }
}
pub enum ItemTemplateTbOffset {}
#[derive(Copy, Clone, PartialEq)]

pub struct ItemTemplateTb<'a> {
  pub _tab: flatbuffers::Table<'a>,
}

impl<'a> flatbuffers::Follow<'a> for ItemTemplateTb<'a> {
  type Inner = ItemTemplateTb<'a>;
  #[inline]
  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
    Self { _tab: flatbuffers::Table::new(buf, loc) }
  }
}

impl<'a> ItemTemplateTb<'a> {
  pub const VT_DATA: flatbuffers::VOffsetT = 4;

  #[inline]
  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
    ItemTemplateTb { _tab: table }
  }
  #[allow(unused_mut)]
  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
    args: &'args ItemTemplateTbArgs<'args>
  ) -> flatbuffers::WIPOffset<ItemTemplateTb<'bldr>> {
    let mut builder = ItemTemplateTbBuilder::new(_fbb);
    if let Some(x) = args.data { builder.add_data(x); }
    builder.finish()
  }


  #[inline]
  pub fn data(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ItemTemplate<'a>>>> {
    // Safety:
    // Created from valid Table for this object
    // which contains a valid value in this slot
    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ItemTemplate>>>>(ItemTemplateTb::VT_DATA, None)}
  }
}

impl flatbuffers::Verifiable for ItemTemplateTb<'_> {
  #[inline]
  fn run_verifier(
    v: &mut flatbuffers::Verifier, pos: usize
  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
    use self::flatbuffers::Verifiable;
    v.visit_table(pos)?
     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<ItemTemplate>>>>("data", Self::VT_DATA, false)?
     .finish();
    Ok(())
  }
}
pub struct ItemTemplateTbArgs<'a> {
    pub data: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ItemTemplate<'a>>>>>,
}
impl<'a> Default for ItemTemplateTbArgs<'a> {
  #[inline]
  fn default() -> Self {
    ItemTemplateTbArgs {
      data: None,
    }
  }
}

pub struct ItemTemplateTbBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ItemTemplateTbBuilder<'a, 'b, A> {
  #[inline]
  pub fn add_data(&mut self, data: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<ItemTemplate<'b >>>>) {
    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ItemTemplateTb::VT_DATA, data);
  }
  #[inline]
  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ItemTemplateTbBuilder<'a, 'b, A> {
    let start = _fbb.start_table();
    ItemTemplateTbBuilder {
      fbb_: _fbb,
      start_: start,
    }
  }
  #[inline]
  pub fn finish(self) -> flatbuffers::WIPOffset<ItemTemplateTb<'a>> {
    let o = self.fbb_.end_table(self.start_);
    flatbuffers::WIPOffset::new(o.value())
  }
}

impl core::fmt::Debug for ItemTemplateTb<'_> {
  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
    let mut ds = f.debug_struct("ItemTemplateTb");
      ds.field("data", &self.data());
      ds.finish()
  }
}
