// automatically generated by the FlatBuffers compiler, do not modify
// @generated
extern crate alloc;

#[allow(unused_imports, dead_code)]
pub mod fb_test {

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

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

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

    impl<'a> TestUIntMap<'a> {
        pub const VT_KEYS: ::flatbuffers::VOffsetT = 4;
        pub const VT_VALUES: ::flatbuffers::VOffsetT = 6;

        #[inline]
        pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
            TestUIntMap { _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 TestUIntMapArgs<'args>,
        ) -> ::flatbuffers::WIPOffset<TestUIntMap<'bldr>> {
            let mut builder = TestUIntMapBuilder::new(_fbb);
            if let Some(x) = args.values {
                builder.add_values(x);
            }
            if let Some(x) = args.keys {
                builder.add_keys(x);
            }
            builder.finish()
        }

        pub fn unpack(&self) -> TestUIntMapT {
            let keys = {
                let x = self.keys();
                x.into_iter().collect()
            };
            let values = {
                let x = self.values();
                x.into_iter().collect()
            };
            TestUIntMapT { keys, values }
        }

        #[inline]
        pub fn keys(&self) -> ::flatbuffers::Vector<'a, u64> {
            // 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, u64>>>(
                        TestUIntMap::VT_KEYS,
                        None,
                    )
                    .unwrap()
            }
        }
        #[inline]
        pub fn values(&self) -> ::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>>>(
                        TestUIntMap::VT_VALUES,
                        None,
                    )
                    .unwrap()
            }
        }
    }

    impl ::flatbuffers::Verifiable for TestUIntMap<'_> {
        #[inline]
        fn run_verifier(
            v: &mut ::flatbuffers::Verifier,
            pos: usize,
        ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
            v.visit_table(pos)?
                .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u64>>>(
                    "keys",
                    Self::VT_KEYS,
                    true,
                )?
                .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u32>>>(
                    "values",
                    Self::VT_VALUES,
                    true,
                )?
                .finish();
            Ok(())
        }
    }
    pub struct TestUIntMapArgs<'a> {
        pub keys: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u64>>>,
        pub values: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u32>>>,
    }
    impl<'a> Default for TestUIntMapArgs<'a> {
        #[inline]
        fn default() -> Self {
            TestUIntMapArgs {
                keys: None,   // required field
                values: None, // required field
            }
        }
    }

    pub struct TestUIntMapBuilder<'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> TestUIntMapBuilder<'a, 'b, A> {
        #[inline]
        pub fn add_keys(&mut self, keys: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u64>>) {
            self.fbb_
                .push_slot_always::<::flatbuffers::WIPOffset<_>>(TestUIntMap::VT_KEYS, keys);
        }
        #[inline]
        pub fn add_values(
            &mut self,
            values: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u32>>,
        ) {
            self.fbb_
                .push_slot_always::<::flatbuffers::WIPOffset<_>>(TestUIntMap::VT_VALUES, values);
        }
        #[inline]
        pub fn new(
            _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
        ) -> TestUIntMapBuilder<'a, 'b, A> {
            let start = _fbb.start_table();
            TestUIntMapBuilder {
                fbb_: _fbb,
                start_: start,
            }
        }
        #[inline]
        pub fn finish(self) -> ::flatbuffers::WIPOffset<TestUIntMap<'a>> {
            let o = self.fbb_.end_table(self.start_);
            self.fbb_.required(o, TestUIntMap::VT_KEYS, "keys");
            self.fbb_.required(o, TestUIntMap::VT_VALUES, "values");
            ::flatbuffers::WIPOffset::new(o.value())
        }
    }

    impl ::core::fmt::Debug for TestUIntMap<'_> {
        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
            let mut ds = f.debug_struct("TestUIntMap");
            ds.field("keys", &self.keys());
            ds.field("values", &self.values());
            ds.finish()
        }
    }
    #[non_exhaustive]
    #[derive(Debug, Clone, PartialEq)]
    pub struct TestUIntMapT {
        pub keys: alloc::vec::Vec<u64>,
        pub values: alloc::vec::Vec<u32>,
    }
    impl Default for TestUIntMapT {
        fn default() -> Self {
            Self {
                keys: Default::default(),
                values: Default::default(),
            }
        }
    }
    impl TestUIntMapT {
        pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
            &self,
            _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>,
        ) -> ::flatbuffers::WIPOffset<TestUIntMap<'b>> {
            let keys = Some({
                let x = &self.keys;
                _fbb.create_vector(x)
            });
            let values = Some({
                let x = &self.values;
                _fbb.create_vector(x)
            });
            TestUIntMap::create(_fbb, &TestUIntMapArgs { keys, values })
        }
    }
    pub enum TestStringMapOffset {}
    #[derive(Copy, Clone, PartialEq)]

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

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

    impl<'a> TestStringMap<'a> {
        pub const VT_KEYS: ::flatbuffers::VOffsetT = 4;
        pub const VT_VALUES: ::flatbuffers::VOffsetT = 6;

        #[inline]
        pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
            TestStringMap { _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 TestStringMapArgs<'args>,
        ) -> ::flatbuffers::WIPOffset<TestStringMap<'bldr>> {
            let mut builder = TestStringMapBuilder::new(_fbb);
            if let Some(x) = args.values {
                builder.add_values(x);
            }
            if let Some(x) = args.keys {
                builder.add_keys(x);
            }
            builder.finish()
        }

        pub fn unpack(&self) -> TestStringMapT {
            let keys = {
                let x = self.keys();
                x.iter()
                    .map(|s| alloc::string::ToString::to_string(s))
                    .collect()
            };
            let values = {
                let x = self.values();
                x.iter()
                    .map(|s| alloc::string::ToString::to_string(s))
                    .collect()
            };
            TestStringMapT { keys, values }
        }

        #[inline]
        pub fn keys(&self) -> ::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<&'a str>> {
            // 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<&'a str>>,
                    >>(TestStringMap::VT_KEYS, None)
                    .unwrap()
            }
        }
        #[inline]
        pub fn values(&self) -> ::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<&'a str>> {
            // 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<&'a str>>,
                    >>(TestStringMap::VT_VALUES, None)
                    .unwrap()
            }
        }
    }

    impl ::flatbuffers::Verifiable for TestStringMap<'_> {
        #[inline]
        fn run_verifier(
            v: &mut ::flatbuffers::Verifier,
            pos: usize,
        ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
            v.visit_table(pos)?
                .visit_field::<::flatbuffers::ForwardsUOffset<
                    ::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<&'_ str>>,
                >>("keys", Self::VT_KEYS, true)?
                .visit_field::<::flatbuffers::ForwardsUOffset<
                    ::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<&'_ str>>,
                >>("values", Self::VT_VALUES, true)?
                .finish();
            Ok(())
        }
    }
    pub struct TestStringMapArgs<'a> {
        pub keys: Option<
            ::flatbuffers::WIPOffset<
                ::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<&'a str>>,
            >,
        >,
        pub values: Option<
            ::flatbuffers::WIPOffset<
                ::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<&'a str>>,
            >,
        >,
    }
    impl<'a> Default for TestStringMapArgs<'a> {
        #[inline]
        fn default() -> Self {
            TestStringMapArgs {
                keys: None,   // required field
                values: None, // required field
            }
        }
    }

    pub struct TestStringMapBuilder<'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> TestStringMapBuilder<'a, 'b, A> {
        #[inline]
        pub fn add_keys(
            &mut self,
            keys: ::flatbuffers::WIPOffset<
                ::flatbuffers::Vector<'b, ::flatbuffers::ForwardsUOffset<&'b str>>,
            >,
        ) {
            self.fbb_
                .push_slot_always::<::flatbuffers::WIPOffset<_>>(TestStringMap::VT_KEYS, keys);
        }
        #[inline]
        pub fn add_values(
            &mut self,
            values: ::flatbuffers::WIPOffset<
                ::flatbuffers::Vector<'b, ::flatbuffers::ForwardsUOffset<&'b str>>,
            >,
        ) {
            self.fbb_
                .push_slot_always::<::flatbuffers::WIPOffset<_>>(TestStringMap::VT_VALUES, values);
        }
        #[inline]
        pub fn new(
            _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
        ) -> TestStringMapBuilder<'a, 'b, A> {
            let start = _fbb.start_table();
            TestStringMapBuilder {
                fbb_: _fbb,
                start_: start,
            }
        }
        #[inline]
        pub fn finish(self) -> ::flatbuffers::WIPOffset<TestStringMap<'a>> {
            let o = self.fbb_.end_table(self.start_);
            self.fbb_.required(o, TestStringMap::VT_KEYS, "keys");
            self.fbb_.required(o, TestStringMap::VT_VALUES, "values");
            ::flatbuffers::WIPOffset::new(o.value())
        }
    }

    impl ::core::fmt::Debug for TestStringMap<'_> {
        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
            let mut ds = f.debug_struct("TestStringMap");
            ds.field("keys", &self.keys());
            ds.field("values", &self.values());
            ds.finish()
        }
    }
    #[non_exhaustive]
    #[derive(Debug, Clone, PartialEq)]
    pub struct TestStringMapT {
        pub keys: alloc::vec::Vec<alloc::string::String>,
        pub values: alloc::vec::Vec<alloc::string::String>,
    }
    impl Default for TestStringMapT {
        fn default() -> Self {
            Self {
                keys: Default::default(),
                values: Default::default(),
            }
        }
    }
    impl TestStringMapT {
        pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
            &self,
            _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>,
        ) -> ::flatbuffers::WIPOffset<TestStringMap<'b>> {
            let keys = Some({
                let x = &self.keys;
                let w: alloc::vec::Vec<_> = x.iter().map(|s| _fbb.create_string(s)).collect();
                _fbb.create_vector(&w)
            });
            let values = Some({
                let x = &self.values;
                let w: alloc::vec::Vec<_> = x.iter().map(|s| _fbb.create_string(s)).collect();
                _fbb.create_vector(&w)
            });
            TestStringMap::create(_fbb, &TestStringMapArgs { keys, values })
        }
    }
    pub enum TestRootOffset {}
    #[derive(Copy, Clone, PartialEq)]

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

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

    impl<'a> TestRoot<'a> {
        pub const VT_TEST_UINT_MAP: ::flatbuffers::VOffsetT = 4;
        pub const VT_TEST_STRING_MAP: ::flatbuffers::VOffsetT = 6;
        pub const VT_TEST_UINT_SET: ::flatbuffers::VOffsetT = 8;
        pub const VT_TEST_STRING_SET: ::flatbuffers::VOffsetT = 10;

        #[inline]
        pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
            TestRoot { _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 TestRootArgs<'args>,
        ) -> ::flatbuffers::WIPOffset<TestRoot<'bldr>> {
            let mut builder = TestRootBuilder::new(_fbb);
            if let Some(x) = args.test_string_set {
                builder.add_test_string_set(x);
            }
            if let Some(x) = args.test_uint_set {
                builder.add_test_uint_set(x);
            }
            if let Some(x) = args.test_string_map {
                builder.add_test_string_map(x);
            }
            if let Some(x) = args.test_uint_map {
                builder.add_test_uint_map(x);
            }
            builder.finish()
        }

        pub fn unpack(&self) -> TestRootT {
            let test_uint_map = self
                .test_uint_map()
                .map(|x| alloc::boxed::Box::new(x.unpack()));
            let test_string_map = self
                .test_string_map()
                .map(|x| alloc::boxed::Box::new(x.unpack()));
            let test_uint_set = self.test_uint_set().map(|x| x.into_iter().collect());
            let test_string_set = self.test_string_set().map(|x| {
                x.iter()
                    .map(|s| alloc::string::ToString::to_string(s))
                    .collect()
            });
            TestRootT {
                test_uint_map,
                test_string_map,
                test_uint_set,
                test_string_set,
            }
        }

        #[inline]
        pub fn test_uint_map(&self) -> Option<TestUIntMap<'a>> {
            // Safety:
            // Created from valid Table for this object
            // which contains a valid value in this slot
            unsafe {
                self._tab
                    .get::<::flatbuffers::ForwardsUOffset<TestUIntMap>>(
                        TestRoot::VT_TEST_UINT_MAP,
                        None,
                    )
            }
        }
        #[inline]
        pub fn test_string_map(&self) -> Option<TestStringMap<'a>> {
            // Safety:
            // Created from valid Table for this object
            // which contains a valid value in this slot
            unsafe {
                self._tab
                    .get::<::flatbuffers::ForwardsUOffset<TestStringMap>>(
                        TestRoot::VT_TEST_STRING_MAP,
                        None,
                    )
            }
        }
        #[inline]
        pub fn test_uint_set(&self) -> Option<::flatbuffers::Vector<'a, u64>> {
            // 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, u64>>>(
                        TestRoot::VT_TEST_UINT_SET,
                        None,
                    )
            }
        }
        #[inline]
        pub fn test_string_set(
            &self,
        ) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<&'a str>>> {
            // 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<&'a str>>,
                >>(TestRoot::VT_TEST_STRING_SET, None)
            }
        }
    }

    impl ::flatbuffers::Verifiable for TestRoot<'_> {
        #[inline]
        fn run_verifier(
            v: &mut ::flatbuffers::Verifier,
            pos: usize,
        ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
            v.visit_table(pos)?
                .visit_field::<::flatbuffers::ForwardsUOffset<TestUIntMap>>(
                    "test_uint_map",
                    Self::VT_TEST_UINT_MAP,
                    false,
                )?
                .visit_field::<::flatbuffers::ForwardsUOffset<TestStringMap>>(
                    "test_string_map",
                    Self::VT_TEST_STRING_MAP,
                    false,
                )?
                .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u64>>>(
                    "test_uint_set",
                    Self::VT_TEST_UINT_SET,
                    false,
                )?
                .visit_field::<::flatbuffers::ForwardsUOffset<
                    ::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<&'_ str>>,
                >>("test_string_set", Self::VT_TEST_STRING_SET, false)?
                .finish();
            Ok(())
        }
    }
    pub struct TestRootArgs<'a> {
        pub test_uint_map: Option<::flatbuffers::WIPOffset<TestUIntMap<'a>>>,
        pub test_string_map: Option<::flatbuffers::WIPOffset<TestStringMap<'a>>>,
        pub test_uint_set: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u64>>>,
        pub test_string_set: Option<
            ::flatbuffers::WIPOffset<
                ::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<&'a str>>,
            >,
        >,
    }
    impl<'a> Default for TestRootArgs<'a> {
        #[inline]
        fn default() -> Self {
            TestRootArgs {
                test_uint_map: None,
                test_string_map: None,
                test_uint_set: None,
                test_string_set: None,
            }
        }
    }

    pub struct TestRootBuilder<'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> TestRootBuilder<'a, 'b, A> {
        #[inline]
        pub fn add_test_uint_map(
            &mut self,
            test_uint_map: ::flatbuffers::WIPOffset<TestUIntMap<'b>>,
        ) {
            self.fbb_
                .push_slot_always::<::flatbuffers::WIPOffset<TestUIntMap>>(
                    TestRoot::VT_TEST_UINT_MAP,
                    test_uint_map,
                );
        }
        #[inline]
        pub fn add_test_string_map(
            &mut self,
            test_string_map: ::flatbuffers::WIPOffset<TestStringMap<'b>>,
        ) {
            self.fbb_
                .push_slot_always::<::flatbuffers::WIPOffset<TestStringMap>>(
                    TestRoot::VT_TEST_STRING_MAP,
                    test_string_map,
                );
        }
        #[inline]
        pub fn add_test_uint_set(
            &mut self,
            test_uint_set: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u64>>,
        ) {
            self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(
                TestRoot::VT_TEST_UINT_SET,
                test_uint_set,
            );
        }
        #[inline]
        pub fn add_test_string_set(
            &mut self,
            test_string_set: ::flatbuffers::WIPOffset<
                ::flatbuffers::Vector<'b, ::flatbuffers::ForwardsUOffset<&'b str>>,
            >,
        ) {
            self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(
                TestRoot::VT_TEST_STRING_SET,
                test_string_set,
            );
        }
        #[inline]
        pub fn new(
            _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
        ) -> TestRootBuilder<'a, 'b, A> {
            let start = _fbb.start_table();
            TestRootBuilder {
                fbb_: _fbb,
                start_: start,
            }
        }
        #[inline]
        pub fn finish(self) -> ::flatbuffers::WIPOffset<TestRoot<'a>> {
            let o = self.fbb_.end_table(self.start_);
            ::flatbuffers::WIPOffset::new(o.value())
        }
    }

    impl ::core::fmt::Debug for TestRoot<'_> {
        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
            let mut ds = f.debug_struct("TestRoot");
            ds.field("test_uint_map", &self.test_uint_map());
            ds.field("test_string_map", &self.test_string_map());
            ds.field("test_uint_set", &self.test_uint_set());
            ds.field("test_string_set", &self.test_string_set());
            ds.finish()
        }
    }
    #[non_exhaustive]
    #[derive(Debug, Clone, PartialEq)]
    pub struct TestRootT {
        pub test_uint_map: Option<alloc::boxed::Box<TestUIntMapT>>,
        pub test_string_map: Option<alloc::boxed::Box<TestStringMapT>>,
        pub test_uint_set: Option<alloc::vec::Vec<u64>>,
        pub test_string_set: Option<alloc::vec::Vec<alloc::string::String>>,
    }
    impl Default for TestRootT {
        fn default() -> Self {
            Self {
                test_uint_map: None,
                test_string_map: None,
                test_uint_set: None,
                test_string_set: None,
            }
        }
    }
    impl TestRootT {
        pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
            &self,
            _fbb: &mut ::flatbuffers::FlatBufferBuilder<'b, A>,
        ) -> ::flatbuffers::WIPOffset<TestRoot<'b>> {
            let test_uint_map = self.test_uint_map.as_ref().map(|x| x.pack(_fbb));
            let test_string_map = self.test_string_map.as_ref().map(|x| x.pack(_fbb));
            let test_uint_set = self.test_uint_set.as_ref().map(|x| _fbb.create_vector(x));
            let test_string_set = self.test_string_set.as_ref().map(|x| {
                let w: alloc::vec::Vec<_> = x.iter().map(|s| _fbb.create_string(s)).collect();
                _fbb.create_vector(&w)
            });
            TestRoot::create(
                _fbb,
                &TestRootArgs {
                    test_uint_map,
                    test_string_map,
                    test_uint_set,
                    test_string_set,
                },
            )
        }
    }
    #[inline]
    /// Verifies that a buffer of bytes contains a `TestRoot`
    /// and returns it.
    /// Note that verification is still experimental and may not
    /// catch every error, or be maximally performant. For the
    /// previous, unchecked, behavior use
    /// `root_as_test_root_unchecked`.
    pub fn root_as_test_root(buf: &[u8]) -> Result<TestRoot<'_>, ::flatbuffers::InvalidFlatbuffer> {
        ::flatbuffers::root::<TestRoot>(buf)
    }
    #[inline]
    /// Verifies that a buffer of bytes contains a size prefixed
    /// `TestRoot` and returns it.
    /// Note that verification is still experimental and may not
    /// catch every error, or be maximally performant. For the
    /// previous, unchecked, behavior use
    /// `size_prefixed_root_as_test_root_unchecked`.
    pub fn size_prefixed_root_as_test_root(
        buf: &[u8],
    ) -> Result<TestRoot<'_>, ::flatbuffers::InvalidFlatbuffer> {
        ::flatbuffers::size_prefixed_root::<TestRoot>(buf)
    }
    #[inline]
    /// Verifies, with the given options, that a buffer of bytes
    /// contains a `TestRoot` and returns it.
    /// Note that verification is still experimental and may not
    /// catch every error, or be maximally performant. For the
    /// previous, unchecked, behavior use
    /// `root_as_test_root_unchecked`.
    pub fn root_as_test_root_with_opts<'b, 'o>(
        opts: &'o ::flatbuffers::VerifierOptions,
        buf: &'b [u8],
    ) -> Result<TestRoot<'b>, ::flatbuffers::InvalidFlatbuffer> {
        ::flatbuffers::root_with_opts::<TestRoot<'b>>(opts, buf)
    }
    #[inline]
    /// Verifies, with the given verifier options, that a buffer of
    /// bytes contains a size prefixed `TestRoot` and returns
    /// it. Note that verification is still experimental and may not
    /// catch every error, or be maximally performant. For the
    /// previous, unchecked, behavior use
    /// `root_as_test_root_unchecked`.
    pub fn size_prefixed_root_as_test_root_with_opts<'b, 'o>(
        opts: &'o ::flatbuffers::VerifierOptions,
        buf: &'b [u8],
    ) -> Result<TestRoot<'b>, ::flatbuffers::InvalidFlatbuffer> {
        ::flatbuffers::size_prefixed_root_with_opts::<TestRoot<'b>>(opts, buf)
    }
    #[inline]
    /// Assumes, without verification, that a buffer of bytes contains a TestRoot and returns it.
    /// # Safety
    /// Callers must trust the given bytes do indeed contain a valid `TestRoot`.
    pub unsafe fn root_as_test_root_unchecked(buf: &[u8]) -> TestRoot<'_> {
        unsafe { ::flatbuffers::root_unchecked::<TestRoot>(buf) }
    }
    #[inline]
    /// Assumes, without verification, that a buffer of bytes contains a size prefixed TestRoot and returns it.
    /// # Safety
    /// Callers must trust the given bytes do indeed contain a valid size prefixed `TestRoot`.
    pub unsafe fn size_prefixed_root_as_test_root_unchecked(buf: &[u8]) -> TestRoot<'_> {
        unsafe { ::flatbuffers::size_prefixed_root_unchecked::<TestRoot>(buf) }
    }
    #[inline]
    pub fn finish_test_root_buffer<'a, 'b, A: ::flatbuffers::Allocator + 'a>(
        fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
        root: ::flatbuffers::WIPOffset<TestRoot<'a>>,
    ) {
        fbb.finish(root, None);
    }

    #[inline]
    pub fn finish_size_prefixed_test_root_buffer<'a, 'b, A: ::flatbuffers::Allocator + 'a>(
        fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
        root: ::flatbuffers::WIPOffset<TestRoot<'a>>,
    ) {
        fbb.finish_size_prefixed(root, None);
    }
} // pub mod fb_test
