# automatically generated by the FlatBuffers compiler, do not modify

# namespace: Example

import flatbuffers

class NestedStruct(object):
    __slots__ = ['_tab']

    # NestedStruct
    def Init(self, buf, pos):
        self._tab = flatbuffers.table.Table(buf, pos)

    # NestedStruct
    def A(self): return [self._tab.Get(flatbuffers.number_types.Int32Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(0 + i * 4)) for i in range(2)]
    # NestedStruct
    def B(self): return self._tab.Get(flatbuffers.number_types.Int8Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(8))
    # NestedStruct
    def C(self): return [self._tab.Get(flatbuffers.number_types.Int8Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(9 + i * 1)) for i in range(2)]

def CreateNestedStruct(builder, a, b, c):
    builder.Prep(4, 12)
    builder.Pad(1)
    for _idx0 in range(2 , 0, -1):
        builder.PrependInt8(c[_idx0-1])
    builder.PrependInt8(b)
    for _idx0 in range(2 , 0, -1):
        builder.PrependInt32(a[_idx0-1])
    return builder.Offset()
