#ifndef FLATBUFFERS_COMMON_READER_H
#define FLATBUFFERS_COMMON_READER_H

/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

/* Common FlatBuffers read functionality for C. */

#include "flatcc/flatcc_prologue.h"
#include "flatcc/flatcc_flatbuffers.h"


#define __flatbuffers_read_scalar_at_byteoffset(N, p, o) N ## _read_from_pe((uint8_t *)(p) + (o))
#define __flatbuffers_read_scalar(N, p) N ## _read_from_pe(p)
#define __flatbuffers_read_vt(ID, offset, t)\
flatbuffers_voffset_t offset = 0;\
{   flatbuffers_voffset_t id__tmp, *vt__tmp;\
    FLATCC_ASSERT(t != 0 && "null pointer table access");\
    id__tmp = ID;\
    vt__tmp = (flatbuffers_voffset_t *)((uint8_t *)(t) -\
        __flatbuffers_soffset_read_from_pe(t));\
    if (__flatbuffers_voffset_read_from_pe(vt__tmp) >= sizeof(vt__tmp[0]) * (id__tmp + 3u)) {\
        offset = __flatbuffers_voffset_read_from_pe(vt__tmp + id__tmp + 2);\
    }\
}
#define __flatbuffers_field_present(ID, t) { __flatbuffers_read_vt(ID, offset__tmp, t) return offset__tmp != 0; }
#define __flatbuffers_scalar_field(T, ID, t)\
{\
    __flatbuffers_read_vt(ID, offset__tmp, t)\
    if (offset__tmp) {\
        return (const T *)((uint8_t *)(t) + offset__tmp);\
    }\
    return 0;\
}
#define __flatbuffers_define_scalar_field(ID, N, NK, TK, T, V)\
static inline T N ## _ ## NK ## _get(N ## _table_t t__tmp)\
{ __flatbuffers_read_vt(ID, offset__tmp, t__tmp)\
  return offset__tmp ? __flatbuffers_read_scalar_at_byteoffset(TK, t__tmp, offset__tmp) : V;\
}\
static inline T N ## _ ## NK(N ## _table_t t__tmp)\
{ __flatbuffers_read_vt(ID, offset__tmp, t__tmp)\
  return offset__tmp ? __flatbuffers_read_scalar_at_byteoffset(TK, t__tmp, offset__tmp) : V;\
}\
static inline const T *N ## _ ## NK ## _get_ptr(N ## _table_t t__tmp)\
__flatbuffers_scalar_field(T, ID, t__tmp)\
static inline int N ## _ ## NK ## _is_present(N ## _table_t t__tmp)\
__flatbuffers_field_present(ID, t__tmp)\
__flatbuffers_define_scan_by_scalar_field(N, NK, T)
#define __flatbuffers_define_scalar_optional_field(ID, N, NK, TK, T, V)\
__flatbuffers_define_scalar_field(ID, N, NK, TK, T, V)\
static inline TK ## _option_t N ## _ ## NK ## _option(N ## _table_t t__tmp)\
{ TK ## _option_t ret; __flatbuffers_read_vt(ID, offset__tmp, t__tmp)\
  ret.is_null = offset__tmp == 0; ret.value = offset__tmp ?\
  __flatbuffers_read_scalar_at_byteoffset(TK, t__tmp, offset__tmp) : V;\
  return ret; }
#define __flatbuffers_struct_field(T, ID, t, r)\
{\
    __flatbuffers_read_vt(ID, offset__tmp, t)\
    if (offset__tmp) {\
        return (T)((uint8_t *)(t) + offset__tmp);\
    }\
    FLATCC_ASSERT(!(r) && "required field missing");\
    return 0;\
}
#define __flatbuffers_offset_field(T, ID, t, r, adjust)\
{\
    flatbuffers_uoffset_t *elem__tmp;\
    __flatbuffers_read_vt(ID, offset__tmp, t)\
    if (offset__tmp) {\
        elem__tmp = (flatbuffers_uoffset_t *)((uint8_t *)(t) + offset__tmp);\
        /* Add sizeof so C api can have raw access past header field. */\
        return (T)((uint8_t *)(elem__tmp) + adjust +\
              __flatbuffers_uoffset_read_from_pe(elem__tmp));\
    }\
    FLATCC_ASSERT(!(r) && "required field missing");\
    return 0;\
}
#define __flatbuffers_vector_field(T, ID, t, r) __flatbuffers_offset_field(T, ID, t, r, sizeof(flatbuffers_uoffset_t))
#define __flatbuffers_table_field(T, ID, t, r) __flatbuffers_offset_field(T, ID, t, r, 0)
#define __flatbuffers_define_struct_field(ID, N, NK, T, r)\
static inline T N ## _ ## NK ## _get(N ## _table_t t__tmp)\
__flatbuffers_struct_field(T, ID, t__tmp, r)\
static inline T N ## _ ## NK(N ## _table_t t__tmp)\
__flatbuffers_struct_field(T, ID, t__tmp, r)\
static inline int N ## _ ## NK ## _is_present(N ## _table_t t__tmp)\
__flatbuffers_field_present(ID, t__tmp)
#define __flatbuffers_define_vector_field(ID, N, NK, T, r)\
static inline T N ## _ ## NK ## _get(N ## _table_t t__tmp)\
__flatbuffers_vector_field(T, ID, t__tmp, r)\
static inline T N ## _ ## NK(N ## _table_t t__tmp)\
__flatbuffers_vector_field(T, ID, t__tmp, r)\
static inline int N ## _ ## NK ## _is_present(N ## _table_t t__tmp)\
__flatbuffers_field_present(ID, t__tmp)
#define __flatbuffers_define_table_field(ID, N, NK, T, r)\
static inline T N ## _ ## NK ## _get(N ## _table_t t__tmp)\
__flatbuffers_table_field(T, ID, t__tmp, r)\
static inline T N ## _ ## NK(N ## _table_t t__tmp)\
__flatbuffers_table_field(T, ID, t__tmp, r)\
static inline int N ## _ ## NK ## _is_present(N ## _table_t t__tmp)\
__flatbuffers_field_present(ID, t__tmp)
#define __flatbuffers_define_string_field(ID, N, NK, r)\
static inline flatbuffers_string_t N ## _ ## NK ## _get(N ## _table_t t__tmp)\
__flatbuffers_vector_field(flatbuffers_string_t, ID, t__tmp, r)\
static inline flatbuffers_string_t N ## _ ## NK(N ## _table_t t__tmp)\
__flatbuffers_vector_field(flatbuffers_string_t, ID, t__tmp, r)\
static inline int N ## _ ## NK ## _is_present(N ## _table_t t__tmp)\
__flatbuffers_field_present(ID, t__tmp)\
__flatbuffers_define_scan_by_string_field(N, NK)
#define __flatbuffers_vec_len(vec)\
{ return (vec) ? (size_t)__flatbuffers_uoffset_read_from_pe((flatbuffers_uoffset_t *)vec - 1) : 0; }
#define __flatbuffers_string_len(s) __flatbuffers_vec_len(s)
static inline size_t flatbuffers_vec_len(const void *vec)
__flatbuffers_vec_len(vec)
#define __flatbuffers_scalar_vec_at(N, vec, i)\
{ FLATCC_ASSERT(flatbuffers_vec_len(vec) > (i) && "index out of range");\
  return __flatbuffers_read_scalar(N, &(vec)[i]); }
#define __flatbuffers_struct_vec_at(vec, i)\
{ FLATCC_ASSERT(flatbuffers_vec_len(vec) > (i) && "index out of range"); return (vec) + (i); }
/* `adjust` skips past the header for string vectors. */
#define __flatbuffers_offset_vec_at(T, vec, i, adjust)\
{ const flatbuffers_uoffset_t *elem__tmp = (vec) + (i);\
  FLATCC_ASSERT(flatbuffers_vec_len(vec) > (i) && "index out of range");\
  return (T)((uint8_t *)(elem__tmp) + (size_t)__flatbuffers_uoffset_read_from_pe(elem__tmp) + (adjust)); }
#define __flatbuffers_define_scalar_vec_len(N)\
static inline size_t N ## _vec_len(N ##_vec_t vec__tmp)\
{ return flatbuffers_vec_len(vec__tmp); }
#define __flatbuffers_define_scalar_vec_at(N, T) \
static inline T N ## _vec_at(N ## _vec_t vec__tmp, size_t i__tmp)\
__flatbuffers_scalar_vec_at(N, vec__tmp, i__tmp)
typedef const char *flatbuffers_string_t;
static inline size_t flatbuffers_string_len(flatbuffers_string_t s)
__flatbuffers_string_len(s)
typedef const flatbuffers_uoffset_t *flatbuffers_string_vec_t;
typedef flatbuffers_uoffset_t *flatbuffers_string_mutable_vec_t;
static inline size_t flatbuffers_string_vec_len(flatbuffers_string_vec_t vec)
__flatbuffers_vec_len(vec)
static inline flatbuffers_string_t flatbuffers_string_vec_at(flatbuffers_string_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(flatbuffers_string_t, vec, i, sizeof(vec[0]))
typedef const void *flatbuffers_generic_t;
typedef void *flatbuffers_mutable_generic_t;
static inline flatbuffers_string_t flatbuffers_string_cast_from_generic(const flatbuffers_generic_t p)
{ return p ? ((const char *)p) + __flatbuffers_uoffset__size() : 0; }
typedef const flatbuffers_uoffset_t *flatbuffers_generic_vec_t;
typedef flatbuffers_uoffset_t *flatbuffers_generic_table_mutable_vec_t;
static inline size_t flatbuffers_generic_vec_len(flatbuffers_generic_vec_t vec)
__flatbuffers_vec_len(vec)
static inline flatbuffers_generic_t flatbuffers_generic_vec_at(flatbuffers_generic_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(flatbuffers_generic_t, vec, i, 0)
static inline flatbuffers_generic_t flatbuffers_generic_vec_at_as_string(flatbuffers_generic_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(flatbuffers_generic_t, vec, i, sizeof(vec[0]))
typedef struct flatbuffers_union {
    flatbuffers_union_type_t type;
    flatbuffers_generic_t value;
} flatbuffers_union_t;
typedef struct flatbuffers_union_vec {
    const flatbuffers_union_type_t *type;
    const flatbuffers_uoffset_t *value;
} flatbuffers_union_vec_t;
typedef struct flatbuffers_mutable_union {
    flatbuffers_union_type_t type;
    flatbuffers_mutable_generic_t value;
} flatbuffers_mutable_union_t;
typedef struct flatbuffers_mutable_union_vec {
    flatbuffers_union_type_t *type;
    flatbuffers_uoffset_t *value;
} flatbuffers_mutable_union_vec_t;
static inline flatbuffers_mutable_union_t flatbuffers_mutable_union_cast(flatbuffers_union_t u__tmp)\
{ flatbuffers_mutable_union_t mu = { u__tmp.type, (flatbuffers_mutable_generic_t)u__tmp.value };\
  return mu; }
static inline flatbuffers_mutable_union_vec_t flatbuffers_mutable_union_vec_cast(flatbuffers_union_vec_t uv__tmp)\
{ flatbuffers_mutable_union_vec_t muv =\
  { (flatbuffers_union_type_t *)uv__tmp.type, (flatbuffers_uoffset_t *)uv__tmp.value }; return muv; }
#define __flatbuffers_union_type_field(ID, t)\
{\
    __flatbuffers_read_vt(ID, offset__tmp, t)\
    return offset__tmp ? __flatbuffers_read_scalar_at_byteoffset(__flatbuffers_utype, t, offset__tmp) : 0;\
}
static inline flatbuffers_string_t flatbuffers_string_cast_from_union(const flatbuffers_union_t u__tmp)\
{ return flatbuffers_string_cast_from_generic(u__tmp.value); }
#define __flatbuffers_define_union_field(NS, ID, N, NK, T, r)\
static inline T ## _union_type_t N ## _ ## NK ## _type_get(N ## _table_t t__tmp)\
__## NS ## union_type_field(((ID) - 1), t__tmp)\
static inline NS ## generic_t N ## _ ## NK ## _get(N ## _table_t t__tmp)\
__## NS ## table_field(NS ## generic_t, ID, t__tmp, r)\
static inline T ## _union_type_t N ## _ ## NK ## _type(N ## _table_t t__tmp)\
__## NS ## union_type_field(((ID) - 1), t__tmp)\
static inline NS ## generic_t N ## _ ## NK(N ## _table_t t__tmp)\
__## NS ## table_field(NS ## generic_t, ID, t__tmp, r)\
static inline int N ## _ ## NK ## _is_present(N ## _table_t t__tmp)\
__## NS ## field_present(ID, t__tmp)\
static inline T ## _union_t N ## _ ## NK ## _union(N ## _table_t t__tmp)\
{ T ## _union_t u__tmp = { 0, 0 }; u__tmp.type = N ## _ ## NK ## _type_get(t__tmp);\
  if (u__tmp.type == 0) return u__tmp; u__tmp.value = N ## _ ## NK ## _get(t__tmp); return u__tmp; }\
static inline NS ## string_t N ## _ ## NK ## _as_string(N ## _table_t t__tmp)\
{ return NS ## string_cast_from_generic(N ## _ ## NK ## _get(t__tmp)); }\

#define __flatbuffers_define_union_vector_ops(NS, T)\
static inline size_t T ## _union_vec_len(T ## _union_vec_t uv__tmp)\
{ return NS ## vec_len(uv__tmp.type); }\
static inline T ## _union_t T ## _union_vec_at(T ## _union_vec_t uv__tmp, size_t i__tmp)\
{ T ## _union_t u__tmp = { 0, 0 }; size_t n__tmp = NS ## vec_len(uv__tmp.type);\
  FLATCC_ASSERT(n__tmp > (i__tmp) && "index out of range"); u__tmp.type = uv__tmp.type[i__tmp];\
  /* Unknown type is treated as NONE for schema evolution. */\
  if (u__tmp.type == 0) return u__tmp;\
  u__tmp.value = NS ## generic_vec_at(uv__tmp.value, i__tmp); return u__tmp; }\
static inline NS ## string_t T ## _union_vec_at_as_string(T ## _union_vec_t uv__tmp, size_t i__tmp)\
{ return (NS ## string_t) NS ## generic_vec_at_as_string(uv__tmp.value, i__tmp); }\

#define __flatbuffers_define_union_vector(NS, T)\
typedef NS ## union_vec_t T ## _union_vec_t;\
typedef NS ## mutable_union_vec_t T ## _mutable_union_vec_t;\
static inline T ## _mutable_union_vec_t T ## _mutable_union_vec_cast(T ## _union_vec_t u__tmp)\
{ return NS ## mutable_union_vec_cast(u__tmp); }\
__## NS ## define_union_vector_ops(NS, T)
#define __flatbuffers_define_union(NS, T)\
typedef NS ## union_t T ## _union_t;\
typedef NS ## mutable_union_t T ## _mutable_union_t;\
static inline T ## _mutable_union_t T ## _mutable_union_cast(T ## _union_t u__tmp)\
{ return NS ## mutable_union_cast(u__tmp); }\
__## NS ## define_union_vector(NS, T)
#define __flatbuffers_define_union_vector_field(NS, ID, N, NK, T, r)\
__## NS ## define_vector_field(ID - 1, N, NK ## _type, T ## _vec_t, r)\
__## NS ## define_vector_field(ID, N, NK, flatbuffers_generic_vec_t, r)\
static inline T ## _union_vec_t N ## _ ## NK ## _union(N ## _table_t t__tmp)\
{ T ## _union_vec_t uv__tmp; uv__tmp.type = N ## _ ## NK ## _type_get(t__tmp);\
  uv__tmp.value = N ## _ ## NK(t__tmp);\
  FLATCC_ASSERT(NS ## vec_len(uv__tmp.type) == NS ## vec_len(uv__tmp.value)\
  && "union vector type length mismatch"); return uv__tmp; }
#include <string.h>
static const size_t flatbuffers_not_found = (size_t)-1;
static const size_t flatbuffers_end = (size_t)-1;
#define __flatbuffers_identity(n) (n)
#define __flatbuffers_min(a, b) ((a) < (b) ? (a) : (b))
/* Subtraction doesn't work for unsigned types. */
#define __flatbuffers_scalar_cmp(x, y, n) ((x) < (y) ? -1 : (x) > (y))
static inline int __flatbuffers_string_n_cmp(flatbuffers_string_t v, const char *s, size_t n)
{ size_t nv = flatbuffers_string_len(v); int x = strncmp(v, s, nv < n ? nv : n);
  return x != 0 ? x : nv < n ? -1 : nv > n; }
/* `n` arg unused, but needed by string find macro expansion. */
static inline int __flatbuffers_string_cmp(flatbuffers_string_t v, const char *s, size_t n) { (void)n; return strcmp(v, s); }
/* A = identity if searching scalar vectors rather than key fields. */
/* Returns lowest matching index or not_found. */
#define __flatbuffers_find_by_field(A, V, E, L, K, Kn, T, D)\
{ T v__tmp; size_t a__tmp = 0, b__tmp, m__tmp; if (!(b__tmp = L(V))) { return flatbuffers_not_found; }\
  --b__tmp;\
  while (a__tmp < b__tmp) {\
    m__tmp = a__tmp + ((b__tmp - a__tmp) >> 1);\
    v__tmp = A(E(V, m__tmp));\
    if ((D(v__tmp, (K), (Kn))) < 0) {\
      a__tmp = m__tmp + 1;\
    } else {\
      b__tmp = m__tmp;\
    }\
  }\
  if (a__tmp == b__tmp) {\
    v__tmp = A(E(V, a__tmp));\
    if (D(v__tmp, (K), (Kn)) == 0) {\
       return a__tmp;\
    }\
  }\
  return flatbuffers_not_found;\
}
#define __flatbuffers_find_by_scalar_field(A, V, E, L, K, T)\
__flatbuffers_find_by_field(A, V, E, L, K, 0, T, __flatbuffers_scalar_cmp)
#define __flatbuffers_find_by_string_field(A, V, E, L, K)\
__flatbuffers_find_by_field(A, V, E, L, K, 0, flatbuffers_string_t, __flatbuffers_string_cmp)
#define __flatbuffers_find_by_string_n_field(A, V, E, L, K, Kn)\
__flatbuffers_find_by_field(A, V, E, L, K, Kn, flatbuffers_string_t, __flatbuffers_string_n_cmp)
#define __flatbuffers_define_find_by_scalar_field(N, NK, TK)\
static inline size_t N ## _vec_find_by_ ## NK(N ## _vec_t vec__tmp, TK key__tmp)\
__flatbuffers_find_by_scalar_field(N ## _ ## NK, vec__tmp, N ## _vec_at, N ## _vec_len, key__tmp, TK)
#define __flatbuffers_define_scalar_find(N, T)\
static inline size_t N ## _vec_find(N ## _vec_t vec__tmp, T key__tmp)\
__flatbuffers_find_by_scalar_field(__flatbuffers_identity, vec__tmp, N ## _vec_at, N ## _vec_len, key__tmp, T)
#define __flatbuffers_define_find_by_string_field(N, NK) \
/* Note: find only works on vectors sorted by this field. */\
static inline size_t N ## _vec_find_by_ ## NK(N ## _vec_t vec__tmp, const char *s__tmp)\
__flatbuffers_find_by_string_field(N ## _ ## NK, vec__tmp, N ## _vec_at, N ## _vec_len, s__tmp)\
static inline size_t N ## _vec_find_n_by_ ## NK(N ## _vec_t vec__tmp, const char *s__tmp, size_t n__tmp)\
__flatbuffers_find_by_string_n_field(N ## _ ## NK, vec__tmp, N ## _vec_at, N ## _vec_len, s__tmp, n__tmp)
#define __flatbuffers_define_default_find_by_scalar_field(N, NK, TK)\
static inline size_t N ## _vec_find(N ## _vec_t vec__tmp, TK key__tmp)\
{ return N ## _vec_find_by_ ## NK(vec__tmp, key__tmp); }
#define __flatbuffers_define_default_find_by_string_field(N, NK) \
static inline size_t N ## _vec_find(N ## _vec_t vec__tmp, const char *s__tmp)\
{ return N ## _vec_find_by_ ## NK(vec__tmp, s__tmp); }\
static inline size_t N ## _vec_find_n(N ## _vec_t vec__tmp, const char *s__tmp, size_t n__tmp)\
{ return N ## _vec_find_n_by_ ## NK(vec__tmp, s__tmp, n__tmp); }
/* A = identity if searching scalar vectors rather than key fields. */
/* Returns lowest matching index or not_found. */
#define __flatbuffers_scan_by_field(b, e, A, V, E, L, K, Kn, T, D)\
{ T v__tmp; size_t i__tmp;\
  for (i__tmp = b; i__tmp < e; ++i__tmp) {\
    v__tmp = A(E(V, i__tmp));\
    if (D(v__tmp, (K), (Kn)) == 0) {\
       return i__tmp;\
    }\
  }\
  return flatbuffers_not_found;\
}
#define __flatbuffers_rscan_by_field(b, e, A, V, E, L, K, Kn, T, D)\
{ T v__tmp; size_t i__tmp = e;\
  while (i__tmp-- > b) {\
    v__tmp = A(E(V, i__tmp));\
    if (D(v__tmp, (K), (Kn)) == 0) {\
       return i__tmp;\
    }\
  }\
  return flatbuffers_not_found;\
}
#define __flatbuffers_scan_by_scalar_field(b, e, A, V, E, L, K, T)\
__flatbuffers_scan_by_field(b, e, A, V, E, L, K, 0, T, __flatbuffers_scalar_cmp)
#define __flatbuffers_scan_by_string_field(b, e, A, V, E, L, K)\
__flatbuffers_scan_by_field(b, e, A, V, E, L, K, 0, flatbuffers_string_t, __flatbuffers_string_cmp)
#define __flatbuffers_scan_by_string_n_field(b, e, A, V, E, L, K, Kn)\
__flatbuffers_scan_by_field(b, e, A, V, E, L, K, Kn, flatbuffers_string_t, __flatbuffers_string_n_cmp)
#define __flatbuffers_rscan_by_scalar_field(b, e, A, V, E, L, K, T)\
__flatbuffers_rscan_by_field(b, e, A, V, E, L, K, 0, T, __flatbuffers_scalar_cmp)
#define __flatbuffers_rscan_by_string_field(b, e, A, V, E, L, K)\
__flatbuffers_rscan_by_field(b, e, A, V, E, L, K, 0, flatbuffers_string_t, __flatbuffers_string_cmp)
#define __flatbuffers_rscan_by_string_n_field(b, e, A, V, E, L, K, Kn)\
__flatbuffers_rscan_by_field(b, e, A, V, E, L, K, Kn, flatbuffers_string_t, __flatbuffers_string_n_cmp)
#define __flatbuffers_define_scan_by_scalar_field(N, NK, T)\
static inline size_t N ## _vec_scan_by_ ## NK(N ## _vec_t vec__tmp, T key__tmp)\
__flatbuffers_scan_by_scalar_field(0, N ## _vec_len(vec__tmp), N ## _ ## NK ## _get, vec__tmp, N ## _vec_at, N ## _vec_len, key__tmp, T)\
static inline size_t N ## _vec_scan_ex_by_ ## NK(N ## _vec_t vec__tmp, size_t begin__tmp, size_t end__tmp, T key__tmp)\
__flatbuffers_scan_by_scalar_field(begin__tmp, __flatbuffers_min(end__tmp, N ## _vec_len(vec__tmp)), N ## _ ## NK ## _get, vec__tmp, N ## _vec_at, N ## _vec_len, key__tmp, T)\
static inline size_t N ## _vec_rscan_by_ ## NK(N ## _vec_t vec__tmp, T key__tmp)\
__flatbuffers_rscan_by_scalar_field(0, N ## _vec_len(vec__tmp), N ## _ ## NK ## _get, vec__tmp, N ## _vec_at, N ## _vec_len, key__tmp, T)\
static inline size_t N ## _vec_rscan_ex_by_ ## NK(N ## _vec_t vec__tmp, size_t begin__tmp, size_t end__tmp, T key__tmp)\
__flatbuffers_rscan_by_scalar_field(begin__tmp, __flatbuffers_min(end__tmp, N ## _vec_len(vec__tmp)), N ## _ ## NK ## _get, vec__tmp, N ## _vec_at, N ## _vec_len, key__tmp, T)
#define __flatbuffers_define_scalar_scan(N, T)\
static inline size_t N ## _vec_scan(N ## _vec_t vec__tmp, T key__tmp)\
__flatbuffers_scan_by_scalar_field(0, N ## _vec_len(vec__tmp), __flatbuffers_identity, vec__tmp, N ## _vec_at, N ## _vec_len, key__tmp, T)\
static inline size_t N ## _vec_scan_ex(N ## _vec_t vec__tmp, size_t begin__tmp, size_t end__tmp, T key__tmp)\
__flatbuffers_scan_by_scalar_field(begin__tmp, __flatbuffers_min(end__tmp, N ## _vec_len(vec__tmp)), __flatbuffers_identity, vec__tmp, N ## _vec_at, N ## _vec_len, key__tmp, T)\
static inline size_t N ## _vec_rscan(N ## _vec_t vec__tmp, T key__tmp)\
__flatbuffers_rscan_by_scalar_field(0, N ## _vec_len(vec__tmp), __flatbuffers_identity, vec__tmp, N ## _vec_at, N ## _vec_len, key__tmp, T)\
static inline size_t N ## _vec_rscan_ex(N ## _vec_t vec__tmp, size_t begin__tmp, size_t end__tmp, T key__tmp)\
__flatbuffers_rscan_by_scalar_field(begin__tmp, __flatbuffers_min(end__tmp, N ## _vec_len(vec__tmp)), __flatbuffers_identity, vec__tmp, N ## _vec_at, N ## _vec_len, key__tmp, T)
#define __flatbuffers_define_scan_by_string_field(N, NK) \
static inline size_t N ## _vec_scan_by_ ## NK(N ## _vec_t vec__tmp, const char *s__tmp)\
__flatbuffers_scan_by_string_field(0, N ## _vec_len(vec__tmp), N ## _ ## NK ## _get, vec__tmp, N ## _vec_at, N ## _vec_len, s__tmp)\
static inline size_t N ## _vec_scan_n_by_ ## NK(N ## _vec_t vec__tmp, const char *s__tmp, size_t n__tmp)\
__flatbuffers_scan_by_string_n_field(0, N ## _vec_len(vec__tmp), N ## _ ## NK ## _get, vec__tmp, N ## _vec_at, N ## _vec_len, s__tmp, n__tmp)\
static inline size_t N ## _vec_scan_ex_by_ ## NK(N ## _vec_t vec__tmp, size_t begin__tmp, size_t end__tmp, const char *s__tmp)\
__flatbuffers_scan_by_string_field(begin__tmp, __flatbuffers_min(end__tmp, N ## _vec_len(vec__tmp)), N ## _ ## NK ## _get, vec__tmp, N ## _vec_at, N ## _vec_len, s__tmp)\
static inline size_t N ## _vec_scan_ex_n_by_ ## NK(N ## _vec_t vec__tmp, size_t begin__tmp, size_t end__tmp, const char *s__tmp, size_t n__tmp)\
__flatbuffers_scan_by_string_n_field(begin__tmp, __flatbuffers_min( end__tmp, N ## _vec_len(vec__tmp)), N ## _ ## NK ## _get, vec__tmp, N ## _vec_at, N ## _vec_len, s__tmp, n__tmp)\
static inline size_t N ## _vec_rscan_by_ ## NK(N ## _vec_t vec__tmp, const char *s__tmp)\
__flatbuffers_rscan_by_string_field(0, N ## _vec_len(vec__tmp), N ## _ ## NK ## _get, vec__tmp, N ## _vec_at, N ## _vec_len, s__tmp)\
static inline size_t N ## _vec_rscan_n_by_ ## NK(N ## _vec_t vec__tmp, const char *s__tmp, size_t n__tmp)\
__flatbuffers_rscan_by_string_n_field(0, N ## _vec_len(vec__tmp), N ## _ ## NK ## _get, vec__tmp, N ## _vec_at, N ## _vec_len, s__tmp, n__tmp)\
static inline size_t N ## _vec_rscan_ex_by_ ## NK(N ## _vec_t vec__tmp, size_t begin__tmp, size_t end__tmp, const char *s__tmp)\
__flatbuffers_rscan_by_string_field(begin__tmp, __flatbuffers_min(end__tmp, N ## _vec_len(vec__tmp)), N ## _ ## NK ## _get, vec__tmp, N ## _vec_at, N ## _vec_len, s__tmp)\
static inline size_t N ## _vec_rscan_ex_n_by_ ## NK(N ## _vec_t vec__tmp, size_t begin__tmp, size_t end__tmp, const char *s__tmp, size_t n__tmp)\
__flatbuffers_rscan_by_string_n_field(begin__tmp, __flatbuffers_min( end__tmp, N ## _vec_len(vec__tmp)), N ## _ ## NK ## _get, vec__tmp, N ## _vec_at, N ## _vec_len, s__tmp, n__tmp)
#define __flatbuffers_define_default_scan_by_scalar_field(N, NK, TK)\
static inline size_t N ## _vec_scan(N ## _vec_t vec__tmp, TK key__tmp)\
{ return N ## _vec_scan_by_ ## NK(vec__tmp, key__tmp); }\
static inline size_t N ## _vec_scan_ex(N ## _vec_t vec__tmp, size_t begin__tmp, size_t end__tmp, TK key__tmp)\
{ return N ## _vec_scan_ex_by_ ## NK(vec__tmp, begin__tmp, end__tmp, key__tmp); }\
static inline size_t N ## _vec_rscan(N ## _vec_t vec__tmp, TK key__tmp)\
{ return N ## _vec_rscan_by_ ## NK(vec__tmp, key__tmp); }\
static inline size_t N ## _vec_rscan_ex(N ## _vec_t vec__tmp, size_t begin__tmp, size_t end__tmp, TK key__tmp)\
{ return N ## _vec_rscan_ex_by_ ## NK(vec__tmp, begin__tmp, end__tmp, key__tmp); }
#define __flatbuffers_define_default_scan_by_string_field(N, NK) \
static inline size_t N ## _vec_scan(N ## _vec_t vec__tmp, const char *s__tmp)\
{ return N ## _vec_scan_by_ ## NK(vec__tmp, s__tmp); }\
static inline size_t N ## _vec_scan_n(N ## _vec_t vec__tmp, const char *s__tmp, size_t n__tmp)\
{ return N ## _vec_scan_n_by_ ## NK(vec__tmp, s__tmp, n__tmp); }\
static inline size_t N ## _vec_scan_ex(N ## _vec_t vec__tmp, size_t begin__tmp, size_t end__tmp, const char *s__tmp)\
{ return N ## _vec_scan_ex_by_ ## NK(vec__tmp, begin__tmp, end__tmp, s__tmp); }\
static inline size_t N ## _vec_scan_ex_n(N ## _vec_t vec__tmp, size_t begin__tmp, size_t end__tmp, const char *s__tmp, size_t n__tmp)\
{ return N ## _vec_scan_ex_n_by_ ## NK(vec__tmp, begin__tmp, end__tmp, s__tmp, n__tmp); }\
static inline size_t N ## _vec_rscan(N ## _vec_t vec__tmp, const char *s__tmp)\
{ return N ## _vec_rscan_by_ ## NK(vec__tmp, s__tmp); }\
static inline size_t N ## _vec_rscan_n(N ## _vec_t vec__tmp, const char *s__tmp, size_t n__tmp)\
{ return N ## _vec_rscan_n_by_ ## NK(vec__tmp, s__tmp, n__tmp); }\
static inline size_t N ## _vec_rscan_ex(N ## _vec_t vec__tmp, size_t begin__tmp, size_t end__tmp, const char *s__tmp)\
{ return N ## _vec_rscan_ex_by_ ## NK(vec__tmp, begin__tmp, end__tmp, s__tmp); }\
static inline size_t N ## _vec_rscan_ex_n(N ## _vec_t vec__tmp, size_t begin__tmp, size_t end__tmp, const char *s__tmp, size_t n__tmp)\
{ return N ## _vec_rscan_ex_n_by_ ## NK(vec__tmp, begin__tmp, end__tmp, s__tmp, n__tmp); }
#define __flatbuffers_heap_sort(N, X, A, E, L, TK, TE, D, S)\
static inline void __ ## N ## X ## __heap_sift_down(\
        N ## _mutable_vec_t vec__tmp, size_t start__tmp, size_t end__tmp)\
{ size_t child__tmp, root__tmp; TK v1__tmp, v2__tmp, vroot__tmp;\
  root__tmp = start__tmp;\
  while ((root__tmp << 1) <= end__tmp) {\
    child__tmp = root__tmp << 1;\
    if (child__tmp < end__tmp) {\
      v1__tmp = A(E(vec__tmp, child__tmp));\
      v2__tmp = A(E(vec__tmp, child__tmp + 1));\
      if (D(v1__tmp, v2__tmp) < 0) {\
        child__tmp++;\
      }\
    }\
    vroot__tmp = A(E(vec__tmp, root__tmp));\
    v1__tmp = A(E(vec__tmp, child__tmp));\
    if (D(vroot__tmp, v1__tmp) < 0) {\
      S(vec__tmp, root__tmp, child__tmp, TE);\
      root__tmp = child__tmp;\
    } else {\
      return;\
    }\
  }\
}\
static inline void __ ## N ## X ## __heap_sort(N ## _mutable_vec_t vec__tmp)\
{ size_t start__tmp, end__tmp, size__tmp;\
  size__tmp = L(vec__tmp); if (size__tmp == 0) return; end__tmp = size__tmp - 1; start__tmp = size__tmp >> 1;\
  do { __ ## N ## X ## __heap_sift_down(vec__tmp, start__tmp, end__tmp); } while (start__tmp--);\
  while (end__tmp > 0) { \
    S(vec__tmp, 0, end__tmp, TE);\
    __ ## N ## X ## __heap_sift_down(vec__tmp, 0, --end__tmp); } }
#define __flatbuffers_define_sort_by_field(N, NK, TK, TE, D, S)\
  __flatbuffers_heap_sort(N, _sort_by_ ## NK, N ## _ ## NK ## _get, N ## _vec_at, N ## _vec_len, TK, TE, D, S)\
static inline void N ## _vec_sort_by_ ## NK(N ## _mutable_vec_t vec__tmp)\
{ __ ## N ## _sort_by_ ## NK ## __heap_sort(vec__tmp); }
#define __flatbuffers_define_sort(N, TK, TE, D, S)\
__flatbuffers_heap_sort(N, , __flatbuffers_identity, N ## _vec_at, N ## _vec_len, TK, TE, D, S)\
static inline void N ## _vec_sort(N ## _mutable_vec_t vec__tmp) { __ ## N ## __heap_sort(vec__tmp); }
#define __flatbuffers_scalar_diff(x, y) ((x) < (y) ? -1 : (x) > (y))
#define __flatbuffers_string_diff(x, y) __flatbuffers_string_n_cmp((x), (const char *)(y), flatbuffers_string_len(y))
#define __flatbuffers_value_swap(vec, a, b, TE) { TE x__tmp = vec[b]; vec[b] = vec[a]; vec[a] = x__tmp; }
#define __flatbuffers_uoffset_swap(vec, a, b, TE)\
{ TE ta__tmp, tb__tmp, d__tmp;\
  d__tmp = (TE)((a - b) * sizeof(vec[0]));\
  ta__tmp =  __flatbuffers_uoffset_read_from_pe(vec + b) - d__tmp;\
  tb__tmp =  __flatbuffers_uoffset_read_from_pe(vec + a) + d__tmp;\
  __flatbuffers_uoffset_write_to_pe(vec + a, ta__tmp);\
  __flatbuffers_uoffset_write_to_pe(vec + b, tb__tmp); }
#define __flatbuffers_scalar_swap(vec, a, b, TE) __flatbuffers_value_swap(vec, a, b, TE)
#define __flatbuffers_string_swap(vec, a, b, TE) __flatbuffers_uoffset_swap(vec, a, b, TE)
#define __flatbuffers_struct_swap(vec, a, b, TE) __flatbuffers_value_swap(vec, a, b, TE)
#define __flatbuffers_table_swap(vec, a, b, TE) __flatbuffers_uoffset_swap(vec, a, b, TE)
#define __flatbuffers_define_struct_sort_by_scalar_field(N, NK, TK, TE)\
  __flatbuffers_define_sort_by_field(N, NK, TK, TE, __flatbuffers_scalar_diff, __flatbuffers_struct_swap)
#define __flatbuffers_define_table_sort_by_scalar_field(N, NK, TK)\
  __flatbuffers_define_sort_by_field(N, NK, TK, flatbuffers_uoffset_t, __flatbuffers_scalar_diff, __flatbuffers_table_swap)
#define __flatbuffers_define_table_sort_by_string_field(N, NK)\
  __flatbuffers_define_sort_by_field(N, NK, flatbuffers_string_t, flatbuffers_uoffset_t, __flatbuffers_string_diff, __flatbuffers_table_swap)
#define __flatbuffers_define_scalar_sort(N, T) __flatbuffers_define_sort(N, T, T, __flatbuffers_scalar_diff, __flatbuffers_scalar_swap)
#define __flatbuffers_define_string_sort() __flatbuffers_define_sort(flatbuffers_string, flatbuffers_string_t, flatbuffers_uoffset_t, __flatbuffers_string_diff, __flatbuffers_string_swap)
#define __flatbuffers_sort_vector_field(N, NK, T, t)\
{ T ## _mutable_vec_t v__tmp = (T ## _mutable_vec_t) N ## _ ## NK ## _get(t);\
  if (v__tmp) T ## _vec_sort(v__tmp); }
#define __flatbuffers_sort_table_field(N, NK, T, t)\
{ T ## _sort((T ## _mutable_table_t)N ## _ ## NK ## _get(t)); }
#define __flatbuffers_sort_union_field(N, NK, T, t)\
{ T ## _sort(T ## _mutable_union_cast(N ## _ ## NK ## _union(t))); }
#define __flatbuffers_sort_table_vector_field_elements(N, NK, T, t)\
{ T ## _vec_t v__tmp = N ## _ ## NK ## _get(t); size_t i__tmp, n__tmp;\
  n__tmp = T ## _vec_len(v__tmp); for (i__tmp = 0; i__tmp < n__tmp; ++i__tmp) {\
  T ## _sort((T ## _mutable_table_t)T ## _vec_at(v__tmp, i__tmp)); }}
#define __flatbuffers_sort_union_vector_field_elements(N, NK, T, t)\
{ T ## _union_vec_t v__tmp = N ## _ ## NK ## _union(t); size_t i__tmp, n__tmp;\
  n__tmp = T ## _union_vec_len(v__tmp); for (i__tmp = 0; i__tmp < n__tmp; ++i__tmp) {\
  T ## _sort(T ## _mutable_union_cast(T ## _union_vec_at(v__tmp, i__tmp))); }}
#define __flatbuffers_define_scalar_vector(N, T)\
typedef const T *N ## _vec_t;\
typedef T *N ## _mutable_vec_t;\
__flatbuffers_define_scalar_vec_len(N)\
__flatbuffers_define_scalar_vec_at(N, T)\
__flatbuffers_define_scalar_find(N, T)\
__flatbuffers_define_scalar_scan(N, T)\
__flatbuffers_define_scalar_sort(N, T)

#define __flatbuffers_define_integer_type(N, T, W)\
__flatcc_define_integer_accessors(N, T, W, flatbuffers_endian)\
__flatbuffers_define_scalar_vector(N, T)
__flatbuffers_define_scalar_vector(flatbuffers_bool, flatbuffers_bool_t)
__flatbuffers_define_scalar_vector(flatbuffers_char, char)
__flatbuffers_define_scalar_vector(flatbuffers_uint8, uint8_t)
__flatbuffers_define_scalar_vector(flatbuffers_int8, int8_t)
__flatbuffers_define_scalar_vector(flatbuffers_uint16, uint16_t)
__flatbuffers_define_scalar_vector(flatbuffers_int16, int16_t)
__flatbuffers_define_scalar_vector(flatbuffers_uint32, uint32_t)
__flatbuffers_define_scalar_vector(flatbuffers_int32, int32_t)
__flatbuffers_define_scalar_vector(flatbuffers_uint64, uint64_t)
__flatbuffers_define_scalar_vector(flatbuffers_int64, int64_t)
__flatbuffers_define_scalar_vector(flatbuffers_float, float)
__flatbuffers_define_scalar_vector(flatbuffers_double, double)
__flatbuffers_define_scalar_vector(flatbuffers_union_type, flatbuffers_union_type_t)
static inline size_t flatbuffers_string_vec_find(flatbuffers_string_vec_t vec, const char *s)
__flatbuffers_find_by_string_field(__flatbuffers_identity, vec, flatbuffers_string_vec_at, flatbuffers_string_vec_len, s)
static inline size_t flatbuffers_string_vec_find_n(flatbuffers_string_vec_t vec, const char *s, size_t n)
__flatbuffers_find_by_string_n_field(__flatbuffers_identity, vec, flatbuffers_string_vec_at, flatbuffers_string_vec_len, s, n)
static inline size_t flatbuffers_string_vec_scan(flatbuffers_string_vec_t vec, const char *s)
__flatbuffers_scan_by_string_field(0, flatbuffers_string_vec_len(vec), __flatbuffers_identity, vec, flatbuffers_string_vec_at, flatbuffers_string_vec_len, s)
static inline size_t flatbuffers_string_vec_scan_n(flatbuffers_string_vec_t vec, const char *s, size_t n)
__flatbuffers_scan_by_string_n_field(0, flatbuffers_string_vec_len(vec), __flatbuffers_identity, vec, flatbuffers_string_vec_at, flatbuffers_string_vec_len, s, n)
static inline size_t flatbuffers_string_vec_scan_ex(flatbuffers_string_vec_t vec, size_t begin, size_t end, const char *s)
__flatbuffers_scan_by_string_field(begin, __flatbuffers_min(end, flatbuffers_string_vec_len(vec)), __flatbuffers_identity, vec, flatbuffers_string_vec_at, flatbuffers_string_vec_len, s)
static inline size_t flatbuffers_string_vec_scan_ex_n(flatbuffers_string_vec_t vec, size_t begin, size_t end, const char *s, size_t n)
__flatbuffers_scan_by_string_n_field(begin, __flatbuffers_min(end, flatbuffers_string_vec_len(vec)), __flatbuffers_identity, vec, flatbuffers_string_vec_at, flatbuffers_string_vec_len, s, n)
static inline size_t flatbuffers_string_vec_rscan(flatbuffers_string_vec_t vec, const char *s)
__flatbuffers_rscan_by_string_field(0, flatbuffers_string_vec_len(vec), __flatbuffers_identity, vec, flatbuffers_string_vec_at, flatbuffers_string_vec_len, s)
static inline size_t flatbuffers_string_vec_rscan_n(flatbuffers_string_vec_t vec, const char *s, size_t n)
__flatbuffers_rscan_by_string_n_field(0, flatbuffers_string_vec_len(vec), __flatbuffers_identity, vec, flatbuffers_string_vec_at, flatbuffers_string_vec_len, s, n)
static inline size_t flatbuffers_string_vec_rscan_ex(flatbuffers_string_vec_t vec, size_t begin, size_t end, const char *s)
__flatbuffers_rscan_by_string_field(begin, __flatbuffers_min(end, flatbuffers_string_vec_len(vec)), __flatbuffers_identity, vec, flatbuffers_string_vec_at, flatbuffers_string_vec_len, s)
static inline size_t flatbuffers_string_vec_rscan_ex_n(flatbuffers_string_vec_t vec, size_t begin, size_t end, const char *s, size_t n)
__flatbuffers_rscan_by_string_n_field(begin, __flatbuffers_min(end, flatbuffers_string_vec_len(vec)), __flatbuffers_identity, vec, flatbuffers_string_vec_at, flatbuffers_string_vec_len, s, n)
__flatbuffers_define_string_sort()
#define __flatbuffers_define_struct_scalar_fixed_array_field(N, NK, TK, T, L)\
static inline T N ## _ ## NK ## _get(N ## _struct_t t__tmp, size_t i__tmp)\
{ if (!t__tmp || i__tmp >= L) return 0;\
  return __flatbuffers_read_scalar(TK, &(t__tmp->NK[i__tmp])); }\
static inline const T *N ## _ ## NK ## _get_ptr(N ## _struct_t t__tmp)\
{ return t__tmp ? t__tmp->NK : 0; }\
static inline size_t N ## _ ## NK ## _get_len(void) { return L; }\
static inline T N ## _ ## NK (N ## _struct_t t__tmp, size_t i__tmp)\
{ return N ## _ ## NK ## _get(t__tmp, i__tmp); }
#define __flatbuffers_define_struct_struct_fixed_array_field(N, NK, T, L)\
static inline T N ## _ ## NK ## _get(N ## _struct_t t__tmp, size_t i__tmp)\
{ if (!t__tmp || i__tmp >= L) return 0; return t__tmp->NK + i__tmp; }static inline T N ## _ ## NK ## _get_ptr(N ## _struct_t t__tmp)\
{ return t__tmp ? t__tmp->NK : 0; }\
static inline size_t N ## _ ## NK ## _get_len(void) { return L; }\
static inline T N ## _ ## NK(N ## _struct_t t__tmp, size_t i__tmp)\
{ if (!t__tmp || i__tmp >= L) return 0; return t__tmp->NK + i__tmp; }
#define __flatbuffers_define_struct_scalar_field(N, NK, TK, T)\
static inline T N ## _ ## NK ## _get(N ## _struct_t t__tmp)\
{ return t__tmp ? __flatbuffers_read_scalar(TK, &(t__tmp->NK)) : 0; }\
static inline const T *N ## _ ## NK ## _get_ptr(N ## _struct_t t__tmp)\
{ return t__tmp ? &(t__tmp->NK) : 0; }\
static inline T N ## _ ## NK (N ## _struct_t t__tmp)\
{ return t__tmp ? __flatbuffers_read_scalar(TK, &(t__tmp->NK)) : 0; }\
__flatbuffers_define_scan_by_scalar_field(N, NK, T)
#define __flatbuffers_define_struct_struct_field(N, NK, T)\
static inline T N ## _ ## NK ## _get(N ## _struct_t t__tmp) { return t__tmp ? &(t__tmp->NK) : 0; }\
static inline T N ## _ ## NK (N ## _struct_t t__tmp) { return t__tmp ? &(t__tmp->NK) : 0; }
/* If fid is null, the function returns true without testing as buffer is not expected to have any id. */
static inline int flatbuffers_has_identifier(const void *buffer, const char *fid)
{ flatbuffers_thash_t id, id2 = 0; if (fid == 0) { return 1; };
  id2 = flatbuffers_type_hash_from_string(fid);
  id = __flatbuffers_thash_read_from_pe(((flatbuffers_uoffset_t *)buffer) + 1);
  return id2 == 0 || id == id2; }
static inline int flatbuffers_has_type_hash(const void *buffer, flatbuffers_thash_t thash)
{ return thash == 0 || (__flatbuffers_thash_read_from_pe((flatbuffers_uoffset_t *)buffer + 1) == thash); }

static inline flatbuffers_thash_t flatbuffers_get_type_hash(const void *buffer)
{ return __flatbuffers_thash_read_from_pe((flatbuffers_uoffset_t *)buffer + 1); }

#define flatbuffers_verify_endian() flatbuffers_has_identifier("\x00\x00\x00\x00" "1234", "1234")
static inline void *flatbuffers_read_size_prefix(void *b, size_t *size_out)
{ if (size_out) { *size_out = (size_t)__flatbuffers_uoffset_read_from_pe(b); }
  return (uint8_t *)b + sizeof(flatbuffers_uoffset_t); }
/* Null file identifier accepts anything, otherwise fid should be 4 characters. */
#define __flatbuffers_read_root(T, K, buffer, fid)\
  ((!buffer || !flatbuffers_has_identifier(buffer, fid)) ? 0 :\
  ((T ## _ ## K ## t)(((uint8_t *)buffer) +\
    __flatbuffers_uoffset_read_from_pe(buffer))))
#define __flatbuffers_read_typed_root(T, K, buffer, thash)\
  ((!buffer || !flatbuffers_has_type_hash(buffer, thash)) ? 0 :\
  ((T ## _ ## K ## t)(((uint8_t *)buffer) +\
    __flatbuffers_uoffset_read_from_pe(buffer))))
#define __flatbuffers_nested_buffer_as_root(C, N, T, K)\
static inline T ## _ ## K ## t C ## _ ## N ## _as_root_with_identifier(C ## _ ## table_t t__tmp, const char *fid__tmp)\
{ const uint8_t *buffer__tmp = C ## _ ## N(t__tmp); return __flatbuffers_read_root(T, K, buffer__tmp, fid__tmp); }\
static inline T ## _ ## K ## t C ## _ ## N ## _as_typed_root(C ## _ ## table_t t__tmp)\
{ const uint8_t *buffer__tmp = C ## _ ## N(t__tmp); return __flatbuffers_read_root(T, K, buffer__tmp, C ## _ ## type_identifier); }\
static inline T ## _ ## K ## t C ## _ ## N ## _as_root(C ## _ ## table_t t__tmp)\
{ const char *fid__tmp = T ## _file_identifier;\
  const uint8_t *buffer__tmp = C ## _ ## N(t__tmp); return __flatbuffers_read_root(T, K, buffer__tmp, fid__tmp); }
#define __flatbuffers_buffer_as_root(N, K)\
static inline N ## _ ## K ## t N ## _as_root_with_identifier(const void *buffer__tmp, const char *fid__tmp)\
{ return __flatbuffers_read_root(N, K, buffer__tmp, fid__tmp); }\
static inline N ## _ ## K ## t N ## _as_root_with_type_hash(const void *buffer__tmp, flatbuffers_thash_t thash__tmp)\
{ return __flatbuffers_read_typed_root(N, K, buffer__tmp, thash__tmp); }\
static inline N ## _ ## K ## t N ## _as_root(const void *buffer__tmp)\
{ const char *fid__tmp = N ## _file_identifier;\
  return __flatbuffers_read_root(N, K, buffer__tmp, fid__tmp); }\
static inline N ## _ ## K ## t N ## _as_typed_root(const void *buffer__tmp)\
{ return __flatbuffers_read_typed_root(N, K, buffer__tmp, N ## _type_hash); }
#define __flatbuffers_struct_as_root(N) __flatbuffers_buffer_as_root(N, struct_)
#define __flatbuffers_table_as_root(N) __flatbuffers_buffer_as_root(N, table_)

#include "flatcc/flatcc_epilogue.h"
#endif /* FLATBUFFERS_COMMON_H */
#ifndef FLATBUFFERS_COMMON_BUILDER_H
#define FLATBUFFERS_COMMON_BUILDER_H

/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

/* Common FlatBuffers build functionality for C. */

#include "flatcc/flatcc_prologue.h"
#ifndef FLATBUILDER_H
#include "flatcc/flatcc_builder.h"
#endif
typedef flatcc_builder_t flatbuffers_builder_t;
typedef flatcc_builder_ref_t flatbuffers_ref_t;
typedef flatcc_builder_ref_t flatbuffers_vec_ref_t;
typedef flatcc_builder_union_ref_t flatbuffers_union_ref_t;
typedef flatcc_builder_union_vec_ref_t flatbuffers_union_vec_ref_t;
/* integer return code (ref and ptr always fail on 0) */
#define flatbuffers_failed(x) ((x) < 0)
typedef flatbuffers_ref_t flatbuffers_root_t;
#define flatbuffers_root(ref) ((flatbuffers_root_t)(ref))

#define __flatbuffers_memoize_begin(B, src)\
do { flatcc_builder_ref_t _ref; if ((_ref = flatcc_builder_refmap_find((B), (src)))) return _ref; } while (0)
#define __flatbuffers_memoize_end(B, src, op) do { return flatcc_builder_refmap_insert((B), (src), (op)); } while (0)
#define __flatbuffers_memoize(B, src, op) do { __flatbuffers_memoize_begin(B, src); __flatbuffers_memoize_end(B, src, op); } while (0)

#define __flatbuffers_build_buffer(NS)\
typedef NS ## ref_t NS ## buffer_ref_t;\
static inline int NS ## buffer_start(NS ## builder_t *B, const NS ##fid_t fid)\
{ return flatcc_builder_start_buffer(B, fid, 0, 0); }\
static inline int NS ## buffer_start_with_size(NS ## builder_t *B, const NS ##fid_t fid)\
{ return flatcc_builder_start_buffer(B, fid, 0, flatcc_builder_with_size); }\
static inline int NS ## buffer_start_aligned(NS ## builder_t *B, NS ##fid_t fid, uint16_t block_align)\
{ return flatcc_builder_start_buffer(B, fid, block_align, 0); }\
static inline int NS ## buffer_start_aligned_with_size(NS ## builder_t *B, NS ##fid_t fid, uint16_t block_align)\
{ return flatcc_builder_start_buffer(B, fid, block_align, flatcc_builder_with_size); }\
static inline NS ## buffer_ref_t NS ## buffer_end(NS ## builder_t *B, NS ## ref_t root)\
{ return flatcc_builder_end_buffer(B, root); }

#define __flatbuffers_build_table_root(NS, N, FID, TFID)\
static inline int N ## _start_as_root(NS ## builder_t *B)\
{ return NS ## buffer_start(B, FID) ? -1 : N ## _start(B); }\
static inline int N ## _start_as_root_with_size(NS ## builder_t *B)\
{ return NS ## buffer_start_with_size(B, FID) ? -1 : N ## _start(B); }\
static inline int N ## _start_as_typed_root(NS ## builder_t *B)\
{ return NS ## buffer_start(B, TFID) ? -1 : N ## _start(B); }\
static inline int N ## _start_as_typed_root_with_size(NS ## builder_t *B)\
{ return NS ## buffer_start_with_size(B, TFID) ? -1 : N ## _start(B); }\
static inline NS ## buffer_ref_t N ## _end_as_root(NS ## builder_t *B)\
{ return NS ## buffer_end(B, N ## _end(B)); }\
static inline NS ## buffer_ref_t N ## _end_as_typed_root(NS ## builder_t *B)\
{ return NS ## buffer_end(B, N ## _end(B)); }\
static inline NS ## buffer_ref_t N ## _create_as_root(NS ## builder_t *B __ ## N ## _formal_args)\
{ if (NS ## buffer_start(B, FID)) return 0; return NS ## buffer_end(B, N ## _create(B __ ## N ## _call_args)); }\
static inline NS ## buffer_ref_t N ## _create_as_root_with_size(NS ## builder_t *B __ ## N ## _formal_args)\
{ if (NS ## buffer_start_with_size(B, FID)) return 0; return NS ## buffer_end(B, N ## _create(B __ ## N ## _call_args)); }\
static inline NS ## buffer_ref_t N ## _create_as_typed_root(NS ## builder_t *B __ ## N ## _formal_args)\
{ if (NS ## buffer_start(B, TFID)) return 0; return NS ## buffer_end(B, N ## _create(B __ ## N ## _call_args)); }\
static inline NS ## buffer_ref_t N ## _create_as_typed_root_with_size(NS ## builder_t *B __ ## N ## _formal_args)\
{ if (NS ## buffer_start_with_size(B, TFID)) return 0; return NS ## buffer_end(B, N ## _create(B __ ## N ## _call_args)); }\
static inline NS ## buffer_ref_t N ## _clone_as_root(NS ## builder_t *B, N ## _table_t t)\
{ if (NS ## buffer_start(B, FID)) return 0; return NS ## buffer_end(B, N ## _clone(B, t)); }\
static inline NS ## buffer_ref_t N ## _clone_as_root_with_size(NS ## builder_t *B, N ## _table_t t)\
{ if (NS ## buffer_start_with_size(B, FID)) return 0; return NS ## buffer_end(B, N ## _clone(B, t)); }\
static inline NS ## buffer_ref_t N ## _clone_as_typed_root(NS ## builder_t *B, N ## _table_t t)\
{ if (NS ## buffer_start(B, TFID)) return 0;return NS ## buffer_end(B, N ## _clone(B, t)); }\
static inline NS ## buffer_ref_t N ## _clone_as_typed_root_with_size(NS ## builder_t *B, N ## _table_t t)\
{ if (NS ## buffer_start_with_size(B, TFID)) return 0; return NS ## buffer_end(B, N ## _clone(B, t)); }

#define __flatbuffers_build_table_prolog(NS, N, FID, TFID)\
__flatbuffers_build_table_vector_ops(NS, N ## _vec, N)\
__flatbuffers_build_table_root(NS, N, FID, TFID)

#define __flatbuffers_build_struct_root(NS, N, A, FID, TFID)\
static inline N ## _t *N ## _start_as_root(NS ## builder_t *B)\
{ return NS ## buffer_start(B, FID) ? 0 : N ## _start(B); }\
static inline N ## _t *N ## _start_as_root_with_size(NS ## builder_t *B)\
{ return NS ## buffer_start_with_size(B, FID) ? 0 : N ## _start(B); }\
static inline N ## _t *N ## _start_as_typed_root(NS ## builder_t *B)\
{ return NS ## buffer_start(B, TFID) ? 0 : N ## _start(B); }\
static inline N ## _t *N ## _start_as_typed_root_with_size(NS ## builder_t *B)\
{ return NS ## buffer_start_with_size(B, TFID) ? 0 : N ## _start(B); }\
static inline NS ## buffer_ref_t N ## _end_as_root(NS ## builder_t *B)\
{ return NS ## buffer_end(B, N ## _end(B)); }\
static inline NS ## buffer_ref_t N ## _end_as_typed_root(NS ## builder_t *B)\
{ return NS ## buffer_end(B, N ## _end(B)); }\
static inline NS ## buffer_ref_t N ## _end_pe_as_root(NS ## builder_t *B)\
{ return NS ## buffer_end(B, N ## _end_pe(B)); }\
static inline NS ## buffer_ref_t N ## _end_pe_as_typed_root(NS ## builder_t *B)\
{ return NS ## buffer_end(B, N ## _end_pe(B)); }\
static inline NS ## buffer_ref_t N ## _create_as_root(NS ## builder_t *B __ ## N ## _formal_args)\
{ return flatcc_builder_create_buffer(B, FID, 0,\
  N ## _create(B __ ## N ## _call_args), A, 0); }\
static inline NS ## buffer_ref_t N ## _create_as_root_with_size(NS ## builder_t *B __ ## N ## _formal_args)\
{ return flatcc_builder_create_buffer(B, FID, 0,\
  N ## _create(B __ ## N ## _call_args), A, flatcc_builder_with_size); }\
static inline NS ## buffer_ref_t N ## _create_as_typed_root(NS ## builder_t *B __ ## N ## _formal_args)\
{ return flatcc_builder_create_buffer(B, TFID, 0,\
  N ## _create(B __ ## N ## _call_args), A, 0); }\
static inline NS ## buffer_ref_t N ## _create_as_typed_root_with_size(NS ## builder_t *B __ ## N ## _formal_args)\
{ return flatcc_builder_create_buffer(B, TFID, 0,\
  N ## _create(B __ ## N ## _call_args), A, flatcc_builder_with_size); }\
static inline NS ## buffer_ref_t N ## _clone_as_root(NS ## builder_t *B, N ## _struct_t p)\
{ return flatcc_builder_create_buffer(B, FID, 0, N ## _clone(B, p), A, 0); }\
static inline NS ## buffer_ref_t N ## _clone_as_root_with_size(NS ## builder_t *B, N ## _struct_t p)\
{ return flatcc_builder_create_buffer(B, FID, 0, N ## _clone(B, p), A, flatcc_builder_with_size); }\
static inline NS ## buffer_ref_t N ## _clone_as_typed_root(NS ## builder_t *B, N ## _struct_t p)\
{ return flatcc_builder_create_buffer(B, TFID, 0, N ## _clone(B, p), A, 0); }\
static inline NS ## buffer_ref_t N ## _clone_as_typed_root_with_size(NS ## builder_t *B, N ## _struct_t p)\
{ return flatcc_builder_create_buffer(B, TFID, 0, N ## _clone(B, p), A, flatcc_builder_with_size); }

#define __flatbuffers_build_nested_table_root(NS, N, TN, FID, TFID)\
static inline int N ## _start_as_root(NS ## builder_t *B)\
{ return NS ## buffer_start(B, FID) ? -1 : TN ## _start(B); }\
static inline int N ## _start_as_typed_root(NS ## builder_t *B)\
{ return NS ## buffer_start(B, TFID) ? -1 : TN ## _start(B); }\
static inline int N ## _end_as_root(NS ## builder_t *B)\
{ return N ## _add(B, NS ## buffer_end(B, TN ## _end(B))); }\
static inline int N ## _end_as_typed_root(NS ## builder_t *B)\
{ return N ## _add(B, NS ## buffer_end(B, TN ## _end(B))); }\
static inline int N ## _nest(NS ## builder_t *B, void *data, size_t size, uint16_t align)\
{ return N ## _add(B, flatcc_builder_create_vector(B, data, size, 1,\
  align ? align : 8, FLATBUFFERS_COUNT_MAX(1))); }\
static inline int N ## _typed_nest(NS ## builder_t *B, void *data, size_t size, uint16_t align)\
{ return N ## _add(B, flatcc_builder_create_vector(B, data, size, 1,\
  align ? align : 8, FLATBUFFERS_COUNT_MAX(1))); }\
static inline int N ## _clone_as_root(NS ## builder_t *B, TN ## _table_t t)\
{ return N ## _add(B, TN ## _clone_as_root(B, t)); }\
static inline int N ## _clone_as_typed_root(NS ## builder_t *B, TN ## _table_t t)\
{ return N ## _add(B, TN ## _clone_as_typed_root(B, t)); }

#define __flatbuffers_build_nested_struct_root(NS, N, TN, A, FID, TFID)\
static inline TN ## _t *N ## _start_as_root(NS ## builder_t *B)\
{ return NS ## buffer_start(B, FID) ? 0 : TN ## _start(B); }\
static inline TN ## _t *N ## _start_as_typed_root(NS ## builder_t *B)\
{ return NS ## buffer_start(B, FID) ? 0 : TN ## _start(B); }\
static inline int N ## _end_as_root(NS ## builder_t *B)\
{ return N ## _add(B, NS ## buffer_end(B, TN ## _end(B))); }\
static inline int N ## _end_as_typed_root(NS ## builder_t *B)\
{ return N ## _add(B, NS ## buffer_end(B, TN ## _end(B))); }\
static inline int N ## _end_pe_as_root(NS ## builder_t *B)\
{ return N ## _add(B, NS ## buffer_end(B, TN ## _end_pe(B))); }\
static inline int N ## _create_as_root(NS ## builder_t *B __ ## TN ## _formal_args)\
{ return N ## _add(B, flatcc_builder_create_buffer(B, FID, 0,\
  TN ## _create(B __ ## TN ## _call_args), A, flatcc_builder_is_nested)); }\
static inline int N ## _create_as_typed_root(NS ## builder_t *B __ ## TN ## _formal_args)\
{ return N ## _add(B, flatcc_builder_create_buffer(B, TFID, 0,\
  TN ## _create(B __ ## TN ## _call_args), A, flatcc_builder_is_nested)); }\
static inline int N ## _nest(NS ## builder_t *B, void *data, size_t size, uint16_t align)\
{ return N ## _add(B, flatcc_builder_create_vector(B, data, size, 1,\
  align < A ? A : align, FLATBUFFERS_COUNT_MAX(1))); }\
static inline int N ## _typed_nest(NS ## builder_t *B, void *data, size_t size, uint16_t align)\
{ return N ## _add(B, flatcc_builder_create_vector(B, data, size, 1,\
  align < A ? A : align, FLATBUFFERS_COUNT_MAX(1))); }\
static inline int N ## _clone_as_root(NS ## builder_t *B, TN ## _struct_t p)\
{ return N ## _add(B, TN ## _clone_as_root(B, p)); }\
static inline int N ## _clone_as_typed_root(NS ## builder_t *B, TN ## _struct_t p)\
{ return N ## _add(B, TN ## _clone_as_typed_root(B, p)); }

#define __flatbuffers_build_vector_ops(NS, V, N, TN, T)\
static inline T *V ## _extend(NS ## builder_t *B, size_t len)\
{ return (T *)flatcc_builder_extend_vector(B, len); }\
static inline T *V ## _append(NS ## builder_t *B, const T *data, size_t len)\
{ return (T *)flatcc_builder_append_vector(B, data, len); }\
static inline int V ## _truncate(NS ## builder_t *B, size_t len)\
{ return flatcc_builder_truncate_vector(B, len); }\
static inline T *V ## _edit(NS ## builder_t *B)\
{ return (T *)flatcc_builder_vector_edit(B); }\
static inline size_t V ## _reserved_len(NS ## builder_t *B)\
{ return flatcc_builder_vector_count(B); }\
static inline T *V ## _push(NS ## builder_t *B, const T *p)\
{ T *_p; return (_p = (T *)flatcc_builder_extend_vector(B, 1)) ? (memcpy(_p, p, TN ## __size()), _p) : 0; }\
static inline T *V ## _push_copy(NS ## builder_t *B, const T *p)\
{ T *_p; return (_p = (T *)flatcc_builder_extend_vector(B, 1)) ? TN ## _copy(_p, p) : 0; }\
static inline T *V ## _push_clone(NS ## builder_t *B, const T *p)\
{ T *_p; return (_p = (T *)flatcc_builder_extend_vector(B, 1)) ? TN ## _copy(_p, p) : 0; }\
static inline T *V ## _push_create(NS ## builder_t *B __ ## TN ## _formal_args)\
{ T *_p; return (_p = (T *)flatcc_builder_extend_vector(B, 1)) ? TN ## _assign(_p __ ## TN ## _call_args) : 0; }

#define __flatbuffers_build_vector(NS, N, T, S, A)\
typedef NS ## ref_t N ## _vec_ref_t;\
static inline int N ## _vec_start(NS ## builder_t *B)\
{ return flatcc_builder_start_vector(B, S, A, FLATBUFFERS_COUNT_MAX(S)); }\
static inline N ## _vec_ref_t N ## _vec_end_pe(NS ## builder_t *B)\
{ return flatcc_builder_end_vector(B); }\
static inline N ## _vec_ref_t N ## _vec_end(NS ## builder_t *B)\
{ if (!NS ## is_native_pe()) { size_t i, n; T *p = (T *)flatcc_builder_vector_edit(B);\
    for (i = 0, n = flatcc_builder_vector_count(B); i < n; ++i)\
    { N ## _to_pe(N ## __ptr_add(p, i)); }} return flatcc_builder_end_vector(B); }\
static inline N ## _vec_ref_t N ## _vec_create_pe(NS ## builder_t *B, const T *data, size_t len)\
{ return flatcc_builder_create_vector(B, data, len, S, A, FLATBUFFERS_COUNT_MAX(S)); }\
static inline N ## _vec_ref_t N ## _vec_create(NS ## builder_t *B, const T *data, size_t len)\
{ if (!NS ## is_native_pe()) { size_t i; T *p; int ret = flatcc_builder_start_vector(B, S, A, FLATBUFFERS_COUNT_MAX(S)); if (ret) { return ret; }\
  p = (T *)flatcc_builder_extend_vector(B, len); if (!p) return 0;\
  for (i = 0; i < len; ++i) { N ## _copy_to_pe(N ## __ptr_add(p, i), N ## __const_ptr_add(data, i)); }\
  return flatcc_builder_end_vector(B); } else return flatcc_builder_create_vector(B, data, len, S, A, FLATBUFFERS_COUNT_MAX(S)); }\
static inline N ## _vec_ref_t N ## _vec_clone(NS ## builder_t *B, N ##_vec_t vec)\
{ __flatbuffers_memoize(B, vec, flatcc_builder_create_vector(B, vec, N ## _vec_len(vec), S, A, FLATBUFFERS_COUNT_MAX(S))); }\
static inline N ## _vec_ref_t N ## _vec_slice(NS ## builder_t *B, N ##_vec_t vec, size_t index, size_t len)\
{ size_t n = N ## _vec_len(vec); if (index >= n) index = n; n -= index; if (len > n) len = n;\
  return flatcc_builder_create_vector(B, N ## __const_ptr_add(vec, index), len, S, A, FLATBUFFERS_COUNT_MAX(S)); }\
__flatbuffers_build_vector_ops(NS, N ## _vec, N, N, T)

#define __flatbuffers_build_union_vector_ops(NS, V, N, TN)\
static inline TN ## _union_ref_t *V ## _extend(NS ## builder_t *B, size_t len)\
{ return flatcc_builder_extend_union_vector(B, len); }\
static inline TN ## _union_ref_t *V ## _append(NS ## builder_t *B, const TN ## _union_ref_t *data, size_t len)\
{ return flatcc_builder_append_union_vector(B, data, len); }\
static inline int V ## _truncate(NS ## builder_t *B, size_t len)\
{ return flatcc_builder_truncate_union_vector(B, len); }\
static inline TN ## _union_ref_t *V ## _edit(NS ## builder_t *B)\
{ return (TN ## _union_ref_t *) flatcc_builder_union_vector_edit(B); }\
static inline size_t V ## _reserved_len(NS ## builder_t *B)\
{ return flatcc_builder_union_vector_count(B); }\
static inline TN ## _union_ref_t *V ## _push(NS ## builder_t *B, const TN ## _union_ref_t ref)\
{ return flatcc_builder_union_vector_push(B, ref); }\
static inline TN ## _union_ref_t *V ## _push_clone(NS ## builder_t *B, TN ## _union_t u)\
{ return TN ## _vec_push(B, TN ## _clone(B, u)); }

#define __flatbuffers_build_union_vector(NS, N)\
static inline int N ## _vec_start(NS ## builder_t *B)\
{ return flatcc_builder_start_union_vector(B); }\
static inline N ## _union_vec_ref_t N ## _vec_end(NS ## builder_t *B)\
{ return flatcc_builder_end_union_vector(B); }\
static inline N ## _union_vec_ref_t N ## _vec_create(NS ## builder_t *B, const N ## _union_ref_t *data, size_t len)\
{ return flatcc_builder_create_union_vector(B, data, len); }\
__flatbuffers_build_union_vector_ops(NS, N ## _vec, N, N)\
/* Preserves DAG structure separately for type and value vector, so a type vector could be shared for many value vectors. */\
static inline N ## _union_vec_ref_t N ## _vec_clone(NS ## builder_t *B, N ##_union_vec_t vec)\
{ N ## _union_vec_ref_t _uvref, _ret = { 0, 0 }; NS ## union_ref_t _uref; size_t _i, _len;\
  if (vec.type == 0) return _ret;\
  _uvref.type = flatcc_builder_refmap_find(B, vec.type); _uvref.value = flatcc_builder_refmap_find(B, vec.value);\
  _len = N ## _union_vec_len(vec); if (_uvref.type == 0) {\
  _uvref.type = flatcc_builder_refmap_insert(B, vec.type, (flatcc_builder_create_type_vector(B, vec.type, _len))); }\
  if (_uvref.type == 0) return _ret; if (_uvref.value == 0) {\
  if (flatcc_builder_start_offset_vector(B)) return _ret;\
  for (_i = 0; _i < _len; ++_i) { _uref = N ## _clone(B, N ## _union_vec_at(vec, _i));\
    if (!_uref.value || !(flatcc_builder_offset_vector_push(B, _uref.value))) return _ret; }\
  _uvref.value = flatcc_builder_refmap_insert(B, vec.value, flatcc_builder_end_offset_vector(B));\
  if (_uvref.value == 0) return _ret; } return _uvref; }

#define __flatbuffers_build_string_vector_ops(NS, N)\
static inline int N ## _push_start(NS ## builder_t *B)\
{ return NS ## string_start(B); }\
static inline NS ## string_ref_t *N ## _push_end(NS ## builder_t *B)\
{ return NS ## string_vec_push(B, NS ## string_end(B)); }\
static inline NS ## string_ref_t *N ## _push_create(NS ## builder_t *B, const char *s, size_t len)\
{ return NS ## string_vec_push(B, NS ## string_create(B, s, len)); }\
static inline NS ## string_ref_t *N ## _push_create_str(NS ## builder_t *B, const char *s)\
{ return NS ## string_vec_push(B, NS ## string_create_str(B, s)); }\
static inline NS ## string_ref_t *N ## _push_create_strn(NS ## builder_t *B, const char *s, size_t max_len)\
{ return NS ## string_vec_push(B, NS ## string_create_strn(B, s, max_len)); }\
static inline NS ## string_ref_t *N ## _push_clone(NS ## builder_t *B, NS ## string_t string)\
{ return NS ## string_vec_push(B, NS ## string_clone(B, string)); }\
static inline NS ## string_ref_t *N ## _push_slice(NS ## builder_t *B, NS ## string_t string, size_t index, size_t len)\
{ return NS ## string_vec_push(B, NS ## string_slice(B, string, index, len)); }

#define __flatbuffers_build_table_vector_ops(NS, N, TN)\
static inline int N ## _push_start(NS ## builder_t *B)\
{ return TN ## _start(B); }\
static inline TN ## _ref_t *N ## _push_end(NS ## builder_t *B)\
{ return N ## _push(B, TN ## _end(B)); }\
static inline TN ## _ref_t *N ## _push_create(NS ## builder_t *B __ ## TN ##_formal_args)\
{ return N ## _push(B, TN ## _create(B __ ## TN ## _call_args)); }

#define __flatbuffers_build_offset_vector_ops(NS, V, N, TN)\
static inline TN ## _ref_t *V ## _extend(NS ## builder_t *B, size_t len)\
{ return flatcc_builder_extend_offset_vector(B, len); }\
static inline TN ## _ref_t *V ## _append(NS ## builder_t *B, const TN ## _ref_t *data, size_t len)\
{ return flatcc_builder_append_offset_vector(B, data, len); }\
static inline int V ## _truncate(NS ## builder_t *B, size_t len)\
{ return flatcc_builder_truncate_offset_vector(B, len); }\
static inline TN ## _ref_t *V ## _edit(NS ## builder_t *B)\
{ return (TN ## _ref_t *)flatcc_builder_offset_vector_edit(B); }\
static inline size_t V ## _reserved_len(NS ## builder_t *B)\
{ return flatcc_builder_offset_vector_count(B); }\
static inline TN ## _ref_t *V ## _push(NS ## builder_t *B, const TN ## _ref_t ref)\
{ return ref ? flatcc_builder_offset_vector_push(B, ref) : 0; }

#define __flatbuffers_build_offset_vector(NS, N)\
typedef NS ## ref_t N ## _vec_ref_t;\
static inline int N ## _vec_start(NS ## builder_t *B)\
{ return flatcc_builder_start_offset_vector(B); }\
static inline N ## _vec_ref_t N ## _vec_end(NS ## builder_t *B)\
{ return flatcc_builder_end_offset_vector(B); }\
static inline N ## _vec_ref_t N ## _vec_create(NS ## builder_t *B, const N ## _ref_t *data, size_t len)\
{ return flatcc_builder_create_offset_vector(B, data, len); }\
__flatbuffers_build_offset_vector_ops(NS, N ## _vec, N, N)\
static inline N ## _vec_ref_t N ## _vec_clone(NS ## builder_t *B, N ##_vec_t vec)\
{ int _ret; N ## _ref_t _e; size_t _i, _len; __flatbuffers_memoize_begin(B, vec);\
 _len = N ## _vec_len(vec); if (flatcc_builder_start_offset_vector(B)) return 0;\
  for (_i = 0; _i < _len; ++_i) { if (!(_e = N ## _clone(B, N ## _vec_at(vec, _i)))) return 0;\
    if (!flatcc_builder_offset_vector_push(B, _e)) return 0; }\
  __flatbuffers_memoize_end(B, vec, flatcc_builder_end_offset_vector(B)); }\

#define __flatbuffers_build_string_ops(NS, N)\
static inline char *N ## _append(NS ## builder_t *B, const char *s, size_t len)\
{ return flatcc_builder_append_string(B, s, len); }\
static inline char *N ## _append_str(NS ## builder_t *B, const char *s)\
{ return flatcc_builder_append_string_str(B, s); }\
static inline char *N ## _append_strn(NS ## builder_t *B, const char *s, size_t len)\
{ return flatcc_builder_append_string_strn(B, s, len); }\
static inline size_t N ## _reserved_len(NS ## builder_t *B)\
{ return flatcc_builder_string_len(B); }\
static inline char *N ## _extend(NS ## builder_t *B, size_t len)\
{ return flatcc_builder_extend_string(B, len); }\
static inline char *N ## _edit(NS ## builder_t *B)\
{ return flatcc_builder_string_edit(B); }\
static inline int N ## _truncate(NS ## builder_t *B, size_t len)\
{ return flatcc_builder_truncate_string(B, len); }

#define __flatbuffers_build_string(NS)\
typedef NS ## ref_t NS ## string_ref_t;\
static inline int NS ## string_start(NS ## builder_t *B)\
{ return flatcc_builder_start_string(B); }\
static inline NS ## string_ref_t NS ## string_end(NS ## builder_t *B)\
{ return flatcc_builder_end_string(B); }\
static inline NS ## ref_t NS ## string_create(NS ## builder_t *B, const char *s, size_t len)\
{ return flatcc_builder_create_string(B, s, len); }\
static inline NS ## ref_t NS ## string_create_str(NS ## builder_t *B, const char *s)\
{ return flatcc_builder_create_string_str(B, s); }\
static inline NS ## ref_t NS ## string_create_strn(NS ## builder_t *B, const char *s, size_t len)\
{ return flatcc_builder_create_string_strn(B, s, len); }\
static inline NS ## string_ref_t NS ## string_clone(NS ## builder_t *B, NS ## string_t string)\
{ __flatbuffers_memoize(B, string, flatcc_builder_create_string(B, string, NS ## string_len(string))); }\
static inline NS ## string_ref_t NS ## string_slice(NS ## builder_t *B, NS ## string_t string, size_t index, size_t len)\
{ size_t n = NS ## string_len(string); if (index >= n) index = n; n -= index; if (len > n) len = n;\
  return flatcc_builder_create_string(B, string + index, len); }\
__flatbuffers_build_string_ops(NS, NS ## string)\
__flatbuffers_build_offset_vector(NS, NS ## string)

#define __flatbuffers_copy_from_pe(P, P2, N) (*(P) = N ## _read_from_pe(P2), (P))
#define __flatbuffers_from_pe(P, N) (*(P) = N ## _read_from_pe(P), (P))
#define __flatbuffers_copy_to_pe(P, P2, N) (N ## _write_to_pe((P), *(P2)), (P))
#define __flatbuffers_to_pe(P, N) (N ## _write_to_pe((P), *(P)), (P))
#define __flatbuffers_define_fixed_array_primitives(NS, N, T)\
static inline T *N ## _array_copy(T *p, const T *p2, size_t n)\
{ memcpy(p, p2, n * sizeof(T)); return p; }\
static inline T *N ## _array_copy_from_pe(T *p, const T *p2, size_t n)\
{ size_t i; if (NS ## is_native_pe()) memcpy(p, p2, n * sizeof(T)); else\
  for (i = 0; i < n; ++i) N ## _copy_from_pe(&p[i], &p2[i]); return p; }\
static inline T *N ## _array_copy_to_pe(T *p, const T *p2, size_t n)\
{ size_t i; if (NS ## is_native_pe()) memcpy(p, p2, n * sizeof(T)); else\
  for (i = 0; i < n; ++i) N ## _copy_to_pe(&p[i], &p2[i]); return p; }
#define __flatbuffers_define_scalar_primitives(NS, N, T)\
static inline T *N ## _from_pe(T *p) { return __ ## NS ## from_pe(p, N); }\
static inline T *N ## _to_pe(T *p) { return __ ## NS ## to_pe(p, N); }\
static inline T *N ## _copy(T *p, const T *p2) { *p = *p2; return p; }\
static inline T *N ## _copy_from_pe(T *p, const T *p2)\
{ return __ ## NS ## copy_from_pe(p, p2, N); }\
static inline T *N ## _copy_to_pe(T *p, const T *p2) \
{ return __ ## NS ## copy_to_pe(p, p2, N); }\
static inline T *N ## _assign(T *p, const T v0) { *p = v0; return p; }\
static inline T *N ## _assign_from_pe(T *p, T v0)\
{ *p = N ## _read_from_pe(&v0); return p; }\
static inline T *N ## _assign_to_pe(T *p, T v0)\
{ N ## _write_to_pe(p, v0); return p; }
#define __flatbuffers_build_scalar(NS, N, T)\
__ ## NS ## define_scalar_primitives(NS, N, T)\
__ ## NS ## define_fixed_array_primitives(NS, N, T)\
__ ## NS ## build_vector(NS, N, T, sizeof(T), sizeof(T))
/* Depends on generated copy_to/from_pe functions, and the type. */
#define __flatbuffers_define_struct_primitives(NS, N)\
static inline N ## _t *N ##_to_pe(N ## _t *p)\
{ if (!NS ## is_native_pe()) { N ## _copy_to_pe(p, p); }; return p; }\
static inline N ## _t *N ##_from_pe(N ## _t *p)\
{ if (!NS ## is_native_pe()) { N ## _copy_from_pe(p, p); }; return p; }\
static inline N ## _t *N ## _clear(N ## _t *p) { return (N ## _t *)memset(p, 0, N ## __size()); }

/* Depends on generated copy/assign_to/from_pe functions, and the type. */
#define __flatbuffers_build_struct(NS, N, S, A, FID, TFID)\
__ ## NS ## define_struct_primitives(NS, N)\
typedef NS ## ref_t N ## _ref_t;\
static inline N ## _t *N ## _start(NS ## builder_t *B)\
{ return (N ## _t *)flatcc_builder_start_struct(B, S, A); }\
static inline N ## _ref_t N ## _end(NS ## builder_t *B)\
{ if (!NS ## is_native_pe()) { N ## _to_pe((N ## _t *)flatcc_builder_struct_edit(B)); }\
  return flatcc_builder_end_struct(B); }\
static inline N ## _ref_t N ## _end_pe(NS ## builder_t *B)\
{ return flatcc_builder_end_struct(B); }\
static inline N ## _ref_t N ## _create(NS ## builder_t *B __ ## N ## _formal_args)\
{ N ## _t *_p = N ## _start(B); if (!_p) return 0; N ##_assign_to_pe(_p __ ## N ## _call_args);\
  return N ## _end_pe(B); }\
static inline N ## _ref_t N ## _clone(NS ## builder_t *B, N ## _struct_t p)\
{ N ## _t *_p; __flatbuffers_memoize_begin(B, p); _p = N ## _start(B); if (!_p) return 0;\
  N ## _copy(_p, p); __flatbuffers_memoize_end(B, p, N ##_end_pe(B)); }\
__flatbuffers_build_vector(NS, N, N ## _t, S, A)\
__flatbuffers_build_struct_root(NS, N, A, FID, TFID)\

#define __flatbuffers_struct_clear_field(p) memset((p), 0, sizeof(*(p)))
#define __flatbuffers_build_table(NS, N, K)\
static inline int N ## _start(NS ## builder_t *B)\
{ return flatcc_builder_start_table(B, K); }\
static inline N ## _ref_t N ## _end(NS ## builder_t *B)\
{ FLATCC_ASSERT(flatcc_builder_check_required(B, __ ## N ## _required,\
  sizeof(__ ## N ## _required) / sizeof(__ ## N ## _required[0]) - 1));\
  return flatcc_builder_end_table(B); }\
__flatbuffers_build_offset_vector(NS, N)

#define __flatbuffers_build_table_field(ID, NS, N, TN, TT)\
static inline int N ## _add(NS ## builder_t *B, TN ## _ref_t ref)\
{ TN ## _ref_t *_p; return (ref && (_p = flatcc_builder_table_add_offset(B, ID))) ?\
  ((*_p = ref), 0) : -1; }\
static inline int N ## _start(NS ## builder_t *B)\
{ return TN ## _start(B); }\
static inline int N ## _end(NS ## builder_t *B)\
{ return N ## _add(B, TN ## _end(B)); }\
static inline TN ## _ref_t N ## _create(NS ## builder_t *B __ ## TN ##_formal_args)\
{ return N ## _add(B, TN ## _create(B __ ## TN ## _call_args)); }\
static inline int N ## _clone(NS ## builder_t *B, TN ## _table_t p)\
{ return N ## _add(B, TN ## _clone(B, p)); }\
static inline int N ## _pick(NS ## builder_t *B, TT ## _table_t t)\
{ TN ## _table_t _p = N ## _get(t); return _p ? N ## _clone(B, _p) : 0; }

#define __flatbuffers_build_union_field(ID, NS, N, TN, TT)\
static inline int N ## _add(NS ## builder_t *B, TN ## _union_ref_t uref)\
{ NS ## ref_t *_p; TN ## _union_type_t *_pt; if (uref.type == TN ## _NONE) return 0; if (uref.value == 0) return -1;\
  if (!(_pt = (TN ## _union_type_t *)flatcc_builder_table_add(B, ID - 1, sizeof(*_pt), sizeof(*_pt)))) return -1;\
  *_pt = uref.type; if (!(_p = flatcc_builder_table_add_offset(B, ID))) return -1; *_p = uref.value; return 0; }\
static inline int N ## _add_type(NS ## builder_t *B, TN ## _union_type_t type)\
{ TN ## _union_type_t *_pt; if (type == TN ## _NONE) return 0; return (_pt = (TN ## _union_type_t *)flatcc_builder_table_add(B, ID - 1,\
  sizeof(*_pt), sizeof(*_pt))) ? ((*_pt = type), 0) : -1; }\
static inline int N ## _add_value(NS ## builder_t *B, TN ## _union_ref_t uref)\
{ NS ## ref_t *p; if (uref.type == TN ## _NONE) return 0; return (p = flatcc_builder_table_add_offset(B, ID)) ?\
  ((*p = uref.value), 0) : -1; }\
static inline int N ## _clone(NS ## builder_t *B, TN ## _union_t p)\
{ return N ## _add(B, TN ## _clone(B, p)); }\
static inline int N ## _pick(NS ## builder_t *B, TT ## _table_t t)\
{ TN ## _union_t _p = N ## _union(t); return _p.type ? N ## _clone(B, _p) : 0; }

/* M is the union value name and T is its type, i.e. the qualified name. */
#define __flatbuffers_build_union_table_value_field(NS, N, NU, M, T)\
static inline int N ## _ ## M ## _add(NS ## builder_t *B, T ## _ref_t ref)\
{ return N ## _add(B, NU ## _as_ ## M (ref)); }\
static inline int N ## _ ## M ## _start(NS ## builder_t *B)\
{ return T ## _start(B); }\
static inline int N ## _ ## M ## _end(NS ## builder_t *B)\
{ T ## _ref_t ref = T ## _end(B);\
  return ref ? N ## _ ## M ## _add(B, ref) : -1; }\
static inline int N ## _ ## M ## _create(NS ## builder_t *B __ ## T ##_formal_args)\
{ T ## _ref_t ref = T ## _create(B __ ## T ## _call_args);\
  return ref ? N ## _add(B, NU ## _as_ ## M(ref)) : -1; }\
static inline int N ## _ ## M ## _clone(NS ## builder_t *B, T ## _table_t t)\
{ T ## _ref_t ref = T ## _clone(B, t);\
  return ref ? N ## _add(B, NU ## _as_ ## M(ref)) : -1; }

/* M is the union value name and T is its type, i.e. the qualified name. */
#define __flatbuffers_build_union_struct_value_field(NS, N, NU, M, T)\
static inline int N ## _ ## M ## _add(NS ## builder_t *B, T ## _ref_t ref)\
{ return N ## _add(B, NU ## _as_ ## M (ref)); }\
static inline T ## _t *N ## _ ## M ## _start(NS ## builder_t *B)\
{ return T ## _start(B); }\
static inline int N ## _ ## M ## _end(NS ## builder_t *B)\
{ T ## _ref_t ref = T ## _end(B);\
  return ref ? N ## _ ## M ## _add(B, ref) : -1; }\
static inline int N ## _ ## M ## _create(NS ## builder_t *B __ ## T ##_formal_args)\
{ T ## _ref_t ref = T ## _create(B __ ## T ## _call_args);\
  return ref ? N ## _add(B, NU ## _as_ ## M(ref)) : -1; }\
static inline int N ## _ ## M ## _end_pe(NS ## builder_t *B)\
{ T ## _ref_t ref = T ## _end_pe(B);\
  return ref ? N ## _add(B, NU ## _as_ ## M(ref)) : -1; }\
static inline int N ## _ ## M ## _clone(NS ## builder_t *B, T ## _struct_t p)\
{ T ## _ref_t ref = T ## _clone(B, p);\
  return ref ? N ## _add(B, NU ## _as_ ## M(ref)) : -1; }
#define __flatbuffers_build_union_string_value_field(NS, N, NU, M)\
static inline int N ## _ ## M ## _add(NS ## builder_t *B, NS ## string_ref_t ref)\
{ return N ## _add(B, NU ## _as_ ## M (ref)); }\
__flatbuffers_build_string_field_ops(NS, N ## _ ## M)

/* NS: common namespace, ID: table field id (not offset), TN: name of type T, TT: name of table type
 * S: sizeof of scalar type, A: alignment of type T, default value V of type T. */
#define __flatbuffers_build_scalar_field(ID, NS, N, TN, T, S, A, V, TT)\
static inline int N ## _add(NS ## builder_t *B, const T v)\
{ T *_p; if (v == V) return 0; if (!(_p = (T *)flatcc_builder_table_add(B, ID, S, A))) return -1;\
  TN ## _assign_to_pe(_p, v); return 0; }\
static inline int N ## _force_add(NS ## builder_t *B, const T v)\
{ T *_p; if (!(_p = (T *)flatcc_builder_table_add(B, ID, S, A))) return -1;\
  TN ## _assign_to_pe(_p, v); return 0; }\
/* Clone does not skip default values and expects pe endian content. */\
static inline int N ## _clone(NS ## builder_t *B, const T *p)\
{ return 0 == flatcc_builder_table_add_copy(B, ID, p, S, A) ? -1 : 0; }\
/* Transferring a missing field is a nop success with 0 as result. */\
static inline int N ## _pick(NS ## builder_t *B, TT ## _table_t t)\
{ const T *_p = N ## _get_ptr(t); return _p ? N ## _clone(B, _p) : 0; }

/* NS: common namespace, ID: table field id (not offset), TN: name of type T, TT: name of table type
 * S: sizeof of scalar type, A: alignment of type T. */
#define __flatbuffers_build_scalar_optional_field(ID, NS, N, TN, T, S, A, TT)\
static inline int N ## _add(NS ## builder_t *B, const T v)\
{ T *_p; if (!(_p = (T *)flatcc_builder_table_add(B, ID, S, A))) return -1;\
  TN ## _assign_to_pe(_p, v); return 0; }\
/* Clone does not skip default values and expects pe endian content. */\
static inline int N ## _clone(NS ## builder_t *B, const T *p)\
{ return 0 == flatcc_builder_table_add_copy(B, ID, p, S, A) ? -1 : 0; }\
/* Transferring a missing field is a nop success with 0 as result. */\
static inline int N ## _pick(NS ## builder_t *B, TT ## _table_t t)\
{ const T *_p = N ## _get_ptr(t); return _p ? N ## _clone(B, _p) : 0; }

#define __flatbuffers_build_struct_field(ID, NS, N, TN, S, A, TT)\
static inline TN ## _t *N ## _start(NS ## builder_t *B)\
{ return (TN ## _t *)flatcc_builder_table_add(B, ID, S, A); }\
static inline int N ## _end(NS ## builder_t *B)\
{ if (!NS ## is_native_pe()) { TN ## _to_pe((TN ## _t *)flatcc_builder_table_edit(B, S)); } return 0; }\
static inline int N ## _end_pe(NS ## builder_t *B) { return 0; }\
static inline int N ## _create(NS ## builder_t *B __ ## TN ## _formal_args)\
{ TN ## _t *_p = N ## _start(B); if (!_p) return -1; TN ##_assign_to_pe(_p __ ## TN ## _call_args);\
  return 0; }\
static inline int N ## _add(NS ## builder_t *B, const TN ## _t *p)\
{ TN ## _t *_p = N ## _start(B); if (!_p) return -1; TN ##_copy_to_pe(_p, p); return 0; }\
static inline int N ## _clone(NS ## builder_t *B, TN ## _struct_t p)\
{ return 0 == flatcc_builder_table_add_copy(B, ID, p, S, A) ? -1 : 0; }\
static inline int N ## _pick(NS ## builder_t *B, TT ## _table_t t)\
{ TN ## _struct_t _p = N ## _get(t); return _p ? N ## _clone(B, _p) : 0; }

#define __flatbuffers_build_vector_field(ID, NS, N, TN, T, TT)\
static inline int N ## _add(NS ## builder_t *B, TN ## _vec_ref_t ref)\
{ TN ## _vec_ref_t *_p; return (ref && (_p = flatcc_builder_table_add_offset(B, ID))) ? ((*_p = ref), 0) : -1; }\
static inline int N ## _start(NS ## builder_t *B)\
{ return TN ## _vec_start(B); }\
static inline int N ## _end_pe(NS ## builder_t *B)\
{ return N ## _add(B, TN ## _vec_end_pe(B)); }\
static inline int N ## _end(NS ## builder_t *B)\
{ return N ## _add(B, TN ## _vec_end(B)); }\
static inline int N ## _create_pe(NS ## builder_t *B, const T *data, size_t len)\
{ return N ## _add(B, TN ## _vec_create_pe(B, data, len)); }\
static inline int N ## _create(NS ## builder_t *B, const T *data, size_t len)\
{ return N ## _add(B, TN ## _vec_create(B, data, len)); }\
static inline int N ## _slice(NS ## builder_t *B, TN ## _vec_t vec, size_t index, size_t len)\
{ return N ## _add(B, TN ## _vec_slice(B, vec, index, len)); }\
static inline int N ## _clone(NS ## builder_t *B, TN ## _vec_t vec)\
{ return N ## _add(B, TN ## _vec_clone(B, vec)); }\
static inline int N ## _pick(NS ## builder_t *B, TT ## _table_t t)\
{ TN ## _vec_t _p = N ## _get(t); return _p ? N ## _clone(B, _p) : 0; }\
__flatbuffers_build_vector_ops(NS, N, N, TN, T)\

#define __flatbuffers_build_offset_vector_field(ID, NS, N, TN, TT)\
static inline int N ## _add(NS ## builder_t *B, TN ## _vec_ref_t ref)\
{ TN ## _vec_ref_t *_p; return (ref && (_p = flatcc_builder_table_add_offset(B, ID))) ? ((*_p = ref), 0) : -1; }\
static inline int N ## _start(NS ## builder_t *B)\
{ return flatcc_builder_start_offset_vector(B); }\
static inline int N ## _end(NS ## builder_t *B)\
{ return N ## _add(B, flatcc_builder_end_offset_vector(B)); }\
static inline int N ## _create(NS ## builder_t *B, const TN ## _ref_t *data, size_t len)\
{ return N ## _add(B, flatcc_builder_create_offset_vector(B, data, len)); }\
__flatbuffers_build_offset_vector_ops(NS, N, N, TN)\
static inline int N ## _clone(NS ## builder_t *B, TN ## _vec_t vec)\
{ return N ## _add(B, TN ## _vec_clone(B, vec)); }\
static inline int N ## _pick(NS ## builder_t *B, TT ## _table_t t)\
{ TN ## _vec_t _p = N ## _get(t); return _p ? N ## _clone(B, _p) : 0; }

/* depends on N ## _add which differs for union member fields and ordinary fields */\
#define __flatbuffers_build_string_field_ops(NS, N)\
static inline int N ## _start(NS ## builder_t *B)\
{ return flatcc_builder_start_string(B); }\
static inline int N ## _end(NS ## builder_t *B)\
{ return N ## _add(B, flatcc_builder_end_string(B)); }\
static inline int N ## _create(NS ## builder_t *B, const char *s, size_t len)\
{ return N ## _add(B, flatcc_builder_create_string(B, s, len)); }\
static inline int N ## _create_str(NS ## builder_t *B, const char *s)\
{ return N ## _add(B, flatcc_builder_create_string_str(B, s)); }\
static inline int N ## _create_strn(NS ## builder_t *B, const char *s, size_t max_len)\
{ return N ## _add(B, flatcc_builder_create_string_strn(B, s, max_len)); }\
static inline int N ## _clone(NS ## builder_t *B, NS ## string_t string)\
{ return N ## _add(B, NS ## string_clone(B, string)); }\
static inline int N ## _slice(NS ## builder_t *B, NS ## string_t string, size_t index, size_t len)\
{ return N ## _add(B, NS ## string_slice(B, string, index, len)); }\
__flatbuffers_build_string_ops(NS, N)

#define __flatbuffers_build_string_field(ID, NS, N, TT)\
static inline int N ## _add(NS ## builder_t *B, NS ## string_ref_t ref)\
{ NS ## string_ref_t *_p; return (ref && (_p = flatcc_builder_table_add_offset(B, ID))) ? ((*_p = ref), 0) : -1; }\
__flatbuffers_build_string_field_ops(NS, N)\
static inline int N ## _pick(NS ## builder_t *B, TT ## _table_t t)\
{ NS ## string_t _p = N ## _get(t); return _p ? N ## _clone(B, _p) : 0; }

#define __flatbuffers_build_table_vector_field(ID, NS, N, TN, TT)\
__flatbuffers_build_offset_vector_field(ID, NS, N, TN, TT)\
__flatbuffers_build_table_vector_ops(NS, N, TN)

#define __flatbuffers_build_union_vector_field(ID, NS, N, TN, TT)\
static inline int N ## _add(NS ## builder_t *B, TN ## _union_vec_ref_t uvref)\
{ NS ## vec_ref_t *_p; if (!uvref.type || !uvref.value) return uvref.type == uvref.value ? 0 : -1;\
  if (!(_p = flatcc_builder_table_add_offset(B, ID - 1))) return -1; *_p = uvref.type;\
  if (!(_p = flatcc_builder_table_add_offset(B, ID))) return -1; *_p = uvref.value; return 0; }\
static inline int N ## _start(NS ## builder_t *B)\
{ return flatcc_builder_start_union_vector(B); }\
static inline int N ## _end(NS ## builder_t *B)\
{ return N ## _add(B, flatcc_builder_end_union_vector(B)); }\
static inline int N ## _create(NS ## builder_t *B, const TN ## _union_ref_t *data, size_t len)\
{ return N ## _add(B, flatcc_builder_create_union_vector(B, data, len)); }\
__flatbuffers_build_union_vector_ops(NS, N, N, TN)\
static inline int N ## _clone(NS ## builder_t *B, TN ## _union_vec_t vec)\
{ return N ## _add(B, TN ## _vec_clone(B, vec)); }\
static inline int N ## _pick(NS ## builder_t *B, TT ## _table_t t)\
{ TN ## _union_vec_t _p = N ## _union(t); return _p.type ? N ## _clone(B, _p) : 0; }

#define __flatbuffers_build_union_table_vector_value_field(NS, N, NU, M, T)\
static inline int N ## _ ## M ## _push_start(NS ## builder_t *B)\
{ return T ## _start(B); }\
static inline NU ## _union_ref_t *N ## _ ## M ## _push_end(NS ## builder_t *B)\
{ return NU ## _vec_push(B, NU ## _as_ ## M (T ## _end(B))); }\
static inline NU ## _union_ref_t *N ## _ ## M ## _push(NS ## builder_t *B, T ## _ref_t ref)\
{ return NU ## _vec_push(B, NU ## _as_ ## M (ref)); }\
static inline NU ## _union_ref_t *N ## _ ## M ## _push_create(NS ## builder_t *B __ ## T ##_formal_args)\
{ return NU ## _vec_push(B, NU ## _as_ ## M(T ## _create(B __ ## T ## _call_args))); }\
static inline NU ## _union_ref_t *N ## _ ## M ## _push_clone(NS ## builder_t *B, T ## _table_t t)\
{ return NU ## _vec_push(B, NU ## _as_ ## M(T ## _clone(B, t))); }

#define __flatbuffers_build_union_struct_vector_value_field(NS, N, NU, M, T)\
static inline T ## _t *N ## _ ## M ## _push_start(NS ## builder_t *B)\
{ return T ## _start(B); }\
static inline NU ## _union_ref_t *N ## _ ## M ## _push_end(NS ## builder_t *B)\
{ return NU ## _vec_push(B, NU ## _as_ ## M (T ## _end(B))); }\
static inline NU ## _union_ref_t *N ## _ ## M ## _push(NS ## builder_t *B, T ## _ref_t ref)\
{ return NU ## _vec_push(B, NU ## _as_ ## M (ref)); }\
static inline NU ## _union_ref_t *N ## _ ## M ## _push_create(NS ## builder_t *B __ ## T ##_formal_args)\
{ return NU ## _vec_push(B, NU ## _as_ ## M(T ## _create(B __ ## T ## _call_args))); }\
static inline NU ## _union_ref_t *N ## _ ## M ## _push_clone(NS ## builder_t *B, T ## _struct_t p)\
{ return NU ## _vec_push(B, NU ## _as_ ## M(T ## _clone(B, p))); }

#define __flatbuffers_build_union_string_vector_value_field(NS, N, NU, M)\
static inline NU ## _union_ref_t *N ## _ ## M ## _push(NS ## builder_t *B, NS ## string_ref_t ref)\
{ return NU ## _vec_push(B, NU ## _as_ ## M (ref)); }\
static inline int N ## _ ## M ## _push_start(NS ## builder_t *B)\
{ return NS ## string_start(B); }\
static inline NU ## _union_ref_t *N ## _ ## M ## _push_end(NS ## builder_t *B)\
{ return NU ## _vec_push(B, NU ## _as_ ## M(NS ## string_end(B))); }\
static inline NU ## _union_ref_t *N ## _ ## M ## _push_create(NS ## builder_t *B, const char *s, size_t len)\
{ return NU ## _vec_push(B, NU ## _as_ ## M(NS ## string_create(B, s, len))); }\
static inline NU ## _union_ref_t *N ## _ ## M ## _push_create_str(NS ## builder_t *B, const char *s)\
{ return NU ## _vec_push(B, NU ## _as_ ## M(NS ## string_create_str(B, s))); }\
static inline NU ## _union_ref_t *N ## _ ## M ## _push_create_strn(NS ## builder_t *B, const char *s, size_t max_len)\
{ return NU ## _vec_push(B, NU ## _as_ ## M(NS ## string_create_strn(B, s, max_len))); }\
static inline NU ## _union_ref_t *N ## _ ## M ## _push_clone(NS ## builder_t *B, NS ## string_t string)\
{ return NU ## _vec_push(B, NU ## _as_ ## M(NS ## string_clone(B, string))); }\
static inline NU ## _union_ref_t *N ## _ ## M ## _push_slice(NS ## builder_t *B, NS ## string_t string, size_t index, size_t len)\
{ return NU ## _vec_push(B, NU ## _as_ ## M(NS ## string_slice(B, string, index, len))); }

#define __flatbuffers_build_string_vector_field(ID, NS, N, TT)\
__flatbuffers_build_offset_vector_field(ID, NS, N, NS ## string, TT)\
__flatbuffers_build_string_vector_ops(NS, N)

#define __flatbuffers_char_formal_args , char v0
#define __flatbuffers_char_call_args , v0
#define __flatbuffers_uint8_formal_args , uint8_t v0
#define __flatbuffers_uint8_call_args , v0
#define __flatbuffers_int8_formal_args , int8_t v0
#define __flatbuffers_int8_call_args , v0
#define __flatbuffers_bool_formal_args , flatbuffers_bool_t v0
#define __flatbuffers_bool_call_args , v0
#define __flatbuffers_uint16_formal_args , uint16_t v0
#define __flatbuffers_uint16_call_args , v0
#define __flatbuffers_uint32_formal_args , uint32_t v0
#define __flatbuffers_uint32_call_args , v0
#define __flatbuffers_uint64_formal_args , uint64_t v0
#define __flatbuffers_uint64_call_args , v0
#define __flatbuffers_int16_formal_args , int16_t v0
#define __flatbuffers_int16_call_args , v0
#define __flatbuffers_int32_formal_args , int32_t v0
#define __flatbuffers_int32_call_args , v0
#define __flatbuffers_int64_formal_args , int64_t v0
#define __flatbuffers_int64_call_args , v0
#define __flatbuffers_float_formal_args , float v0
#define __flatbuffers_float_call_args , v0
#define __flatbuffers_double_formal_args , double v0
#define __flatbuffers_double_call_args , v0

__flatbuffers_build_scalar(flatbuffers_, flatbuffers_char, char)
__flatbuffers_build_scalar(flatbuffers_, flatbuffers_uint8, uint8_t)
__flatbuffers_build_scalar(flatbuffers_, flatbuffers_int8, int8_t)
__flatbuffers_build_scalar(flatbuffers_, flatbuffers_bool, flatbuffers_bool_t)
__flatbuffers_build_scalar(flatbuffers_, flatbuffers_uint16, uint16_t)
__flatbuffers_build_scalar(flatbuffers_, flatbuffers_uint32, uint32_t)
__flatbuffers_build_scalar(flatbuffers_, flatbuffers_uint64, uint64_t)
__flatbuffers_build_scalar(flatbuffers_, flatbuffers_int16, int16_t)
__flatbuffers_build_scalar(flatbuffers_, flatbuffers_int32, int32_t)
__flatbuffers_build_scalar(flatbuffers_, flatbuffers_int64, int64_t)
__flatbuffers_build_scalar(flatbuffers_, flatbuffers_float, float)
__flatbuffers_build_scalar(flatbuffers_, flatbuffers_double, double)

__flatbuffers_build_string(flatbuffers_)

__flatbuffers_build_buffer(flatbuffers_)
#include "flatcc/flatcc_epilogue.h"
#endif /* FLATBUFFERS_COMMON_BUILDER_H */
#ifndef SCHEMA_READER_H
#define SCHEMA_READER_H

/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

#ifndef FLATBUFFERS_COMMON_READER_H
#include "flatbuffers_common_reader.h"
#endif
#include "flatcc/flatcc_flatbuffers.h"
#ifndef __alignas_is_defined
#include <stdalign.h>
#endif
#include "flatcc/flatcc_prologue.h"
#ifndef flatbuffers_identifier
#define flatbuffers_identifier 0
#endif
#ifndef flatbuffers_extension
#define flatbuffers_extension "bin"
#endif

typedef struct org_apache_arrow_flatbuf_Buffer org_apache_arrow_flatbuf_Buffer_t;
typedef const org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_struct_t;
typedef org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_mutable_struct_t;
typedef const org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_vec_t;
typedef org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_mutable_vec_t;

typedef const struct org_apache_arrow_flatbuf_Null_table *org_apache_arrow_flatbuf_Null_table_t;
typedef struct org_apache_arrow_flatbuf_Null_table *org_apache_arrow_flatbuf_Null_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Null_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Null_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Struct__table *org_apache_arrow_flatbuf_Struct__table_t;
typedef struct org_apache_arrow_flatbuf_Struct__table *org_apache_arrow_flatbuf_Struct__mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Struct__vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Struct__mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_List_table *org_apache_arrow_flatbuf_List_table_t;
typedef struct org_apache_arrow_flatbuf_List_table *org_apache_arrow_flatbuf_List_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_List_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_List_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_LargeList_table *org_apache_arrow_flatbuf_LargeList_table_t;
typedef struct org_apache_arrow_flatbuf_LargeList_table *org_apache_arrow_flatbuf_LargeList_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_LargeList_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_LargeList_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_FixedSizeList_table *org_apache_arrow_flatbuf_FixedSizeList_table_t;
typedef struct org_apache_arrow_flatbuf_FixedSizeList_table *org_apache_arrow_flatbuf_FixedSizeList_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_FixedSizeList_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_FixedSizeList_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Map_table *org_apache_arrow_flatbuf_Map_table_t;
typedef struct org_apache_arrow_flatbuf_Map_table *org_apache_arrow_flatbuf_Map_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Map_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Map_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Union_table *org_apache_arrow_flatbuf_Union_table_t;
typedef struct org_apache_arrow_flatbuf_Union_table *org_apache_arrow_flatbuf_Union_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Union_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Union_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Int_table *org_apache_arrow_flatbuf_Int_table_t;
typedef struct org_apache_arrow_flatbuf_Int_table *org_apache_arrow_flatbuf_Int_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Int_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Int_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_FloatingPoint_table *org_apache_arrow_flatbuf_FloatingPoint_table_t;
typedef struct org_apache_arrow_flatbuf_FloatingPoint_table *org_apache_arrow_flatbuf_FloatingPoint_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_FloatingPoint_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_FloatingPoint_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Utf8_table *org_apache_arrow_flatbuf_Utf8_table_t;
typedef struct org_apache_arrow_flatbuf_Utf8_table *org_apache_arrow_flatbuf_Utf8_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Utf8_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Utf8_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Binary_table *org_apache_arrow_flatbuf_Binary_table_t;
typedef struct org_apache_arrow_flatbuf_Binary_table *org_apache_arrow_flatbuf_Binary_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Binary_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Binary_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_LargeUtf8_table *org_apache_arrow_flatbuf_LargeUtf8_table_t;
typedef struct org_apache_arrow_flatbuf_LargeUtf8_table *org_apache_arrow_flatbuf_LargeUtf8_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_LargeUtf8_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_LargeUtf8_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_LargeBinary_table *org_apache_arrow_flatbuf_LargeBinary_table_t;
typedef struct org_apache_arrow_flatbuf_LargeBinary_table *org_apache_arrow_flatbuf_LargeBinary_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_LargeBinary_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_LargeBinary_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_FixedSizeBinary_table *org_apache_arrow_flatbuf_FixedSizeBinary_table_t;
typedef struct org_apache_arrow_flatbuf_FixedSizeBinary_table *org_apache_arrow_flatbuf_FixedSizeBinary_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_FixedSizeBinary_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_FixedSizeBinary_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Bool_table *org_apache_arrow_flatbuf_Bool_table_t;
typedef struct org_apache_arrow_flatbuf_Bool_table *org_apache_arrow_flatbuf_Bool_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Bool_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Bool_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_RunEndEncoded_table *org_apache_arrow_flatbuf_RunEndEncoded_table_t;
typedef struct org_apache_arrow_flatbuf_RunEndEncoded_table *org_apache_arrow_flatbuf_RunEndEncoded_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_RunEndEncoded_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_RunEndEncoded_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Decimal_table *org_apache_arrow_flatbuf_Decimal_table_t;
typedef struct org_apache_arrow_flatbuf_Decimal_table *org_apache_arrow_flatbuf_Decimal_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Decimal_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Decimal_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Date_table *org_apache_arrow_flatbuf_Date_table_t;
typedef struct org_apache_arrow_flatbuf_Date_table *org_apache_arrow_flatbuf_Date_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Date_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Date_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Time_table *org_apache_arrow_flatbuf_Time_table_t;
typedef struct org_apache_arrow_flatbuf_Time_table *org_apache_arrow_flatbuf_Time_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Time_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Time_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Timestamp_table *org_apache_arrow_flatbuf_Timestamp_table_t;
typedef struct org_apache_arrow_flatbuf_Timestamp_table *org_apache_arrow_flatbuf_Timestamp_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Timestamp_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Timestamp_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Interval_table *org_apache_arrow_flatbuf_Interval_table_t;
typedef struct org_apache_arrow_flatbuf_Interval_table *org_apache_arrow_flatbuf_Interval_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Interval_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Interval_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Duration_table *org_apache_arrow_flatbuf_Duration_table_t;
typedef struct org_apache_arrow_flatbuf_Duration_table *org_apache_arrow_flatbuf_Duration_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Duration_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Duration_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_KeyValue_table *org_apache_arrow_flatbuf_KeyValue_table_t;
typedef struct org_apache_arrow_flatbuf_KeyValue_table *org_apache_arrow_flatbuf_KeyValue_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_KeyValue_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_KeyValue_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_DictionaryEncoding_table *org_apache_arrow_flatbuf_DictionaryEncoding_table_t;
typedef struct org_apache_arrow_flatbuf_DictionaryEncoding_table *org_apache_arrow_flatbuf_DictionaryEncoding_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_DictionaryEncoding_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_DictionaryEncoding_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Field_table *org_apache_arrow_flatbuf_Field_table_t;
typedef struct org_apache_arrow_flatbuf_Field_table *org_apache_arrow_flatbuf_Field_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Field_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Field_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Schema_table *org_apache_arrow_flatbuf_Schema_table_t;
typedef struct org_apache_arrow_flatbuf_Schema_table *org_apache_arrow_flatbuf_Schema_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Schema_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Schema_mutable_vec_t;
#ifndef org_apache_arrow_flatbuf_Null_file_identifier
#define org_apache_arrow_flatbuf_Null_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Null_file_identifier */
#ifndef org_apache_arrow_flatbuf_Null_identifier
#define org_apache_arrow_flatbuf_Null_identifier 0
#endif
#define org_apache_arrow_flatbuf_Null_type_hash ((flatbuffers_thash_t)0x7b36a4dd)
#define org_apache_arrow_flatbuf_Null_type_identifier "\xdd\xa4\x36\x7b"
#ifndef org_apache_arrow_flatbuf_Null_file_extension
#define org_apache_arrow_flatbuf_Null_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Struct__file_identifier
#define org_apache_arrow_flatbuf_Struct__file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Struct__file_identifier */
#ifndef org_apache_arrow_flatbuf_Struct__identifier
#define org_apache_arrow_flatbuf_Struct__identifier 0
#endif
#define org_apache_arrow_flatbuf_Struct__type_hash ((flatbuffers_thash_t)0x6310f362)
#define org_apache_arrow_flatbuf_Struct__type_identifier "\x62\xf3\x10\x63"
#ifndef org_apache_arrow_flatbuf_Struct__file_extension
#define org_apache_arrow_flatbuf_Struct__file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_List_file_identifier
#define org_apache_arrow_flatbuf_List_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_List_file_identifier */
#ifndef org_apache_arrow_flatbuf_List_identifier
#define org_apache_arrow_flatbuf_List_identifier 0
#endif
#define org_apache_arrow_flatbuf_List_type_hash ((flatbuffers_thash_t)0xd4ce5878)
#define org_apache_arrow_flatbuf_List_type_identifier "\x78\x58\xce\xd4"
#ifndef org_apache_arrow_flatbuf_List_file_extension
#define org_apache_arrow_flatbuf_List_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_LargeList_file_identifier
#define org_apache_arrow_flatbuf_LargeList_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_LargeList_file_identifier */
#ifndef org_apache_arrow_flatbuf_LargeList_identifier
#define org_apache_arrow_flatbuf_LargeList_identifier 0
#endif
#define org_apache_arrow_flatbuf_LargeList_type_hash ((flatbuffers_thash_t)0x38aa7e27)
#define org_apache_arrow_flatbuf_LargeList_type_identifier "\x27\x7e\xaa\x38"
#ifndef org_apache_arrow_flatbuf_LargeList_file_extension
#define org_apache_arrow_flatbuf_LargeList_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_FixedSizeList_file_identifier
#define org_apache_arrow_flatbuf_FixedSizeList_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_FixedSizeList_file_identifier */
#ifndef org_apache_arrow_flatbuf_FixedSizeList_identifier
#define org_apache_arrow_flatbuf_FixedSizeList_identifier 0
#endif
#define org_apache_arrow_flatbuf_FixedSizeList_type_hash ((flatbuffers_thash_t)0xcef245bb)
#define org_apache_arrow_flatbuf_FixedSizeList_type_identifier "\xbb\x45\xf2\xce"
#ifndef org_apache_arrow_flatbuf_FixedSizeList_file_extension
#define org_apache_arrow_flatbuf_FixedSizeList_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Map_file_identifier
#define org_apache_arrow_flatbuf_Map_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Map_file_identifier */
#ifndef org_apache_arrow_flatbuf_Map_identifier
#define org_apache_arrow_flatbuf_Map_identifier 0
#endif
#define org_apache_arrow_flatbuf_Map_type_hash ((flatbuffers_thash_t)0xcebef8e6)
#define org_apache_arrow_flatbuf_Map_type_identifier "\xe6\xf8\xbe\xce"
#ifndef org_apache_arrow_flatbuf_Map_file_extension
#define org_apache_arrow_flatbuf_Map_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Union_file_identifier
#define org_apache_arrow_flatbuf_Union_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Union_file_identifier */
#ifndef org_apache_arrow_flatbuf_Union_identifier
#define org_apache_arrow_flatbuf_Union_identifier 0
#endif
#define org_apache_arrow_flatbuf_Union_type_hash ((flatbuffers_thash_t)0x896bda57)
#define org_apache_arrow_flatbuf_Union_type_identifier "\x57\xda\x6b\x89"
#ifndef org_apache_arrow_flatbuf_Union_file_extension
#define org_apache_arrow_flatbuf_Union_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Int_file_identifier
#define org_apache_arrow_flatbuf_Int_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Int_file_identifier */
#ifndef org_apache_arrow_flatbuf_Int_identifier
#define org_apache_arrow_flatbuf_Int_identifier 0
#endif
#define org_apache_arrow_flatbuf_Int_type_hash ((flatbuffers_thash_t)0x30789001)
#define org_apache_arrow_flatbuf_Int_type_identifier "\x01\x90\x78\x30"
#ifndef org_apache_arrow_flatbuf_Int_file_extension
#define org_apache_arrow_flatbuf_Int_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_FloatingPoint_file_identifier
#define org_apache_arrow_flatbuf_FloatingPoint_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_FloatingPoint_file_identifier */
#ifndef org_apache_arrow_flatbuf_FloatingPoint_identifier
#define org_apache_arrow_flatbuf_FloatingPoint_identifier 0
#endif
#define org_apache_arrow_flatbuf_FloatingPoint_type_hash ((flatbuffers_thash_t)0xf7d06268)
#define org_apache_arrow_flatbuf_FloatingPoint_type_identifier "\x68\x62\xd0\xf7"
#ifndef org_apache_arrow_flatbuf_FloatingPoint_file_extension
#define org_apache_arrow_flatbuf_FloatingPoint_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Utf8_file_identifier
#define org_apache_arrow_flatbuf_Utf8_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Utf8_file_identifier */
#ifndef org_apache_arrow_flatbuf_Utf8_identifier
#define org_apache_arrow_flatbuf_Utf8_identifier 0
#endif
#define org_apache_arrow_flatbuf_Utf8_type_hash ((flatbuffers_thash_t)0x8fe60d37)
#define org_apache_arrow_flatbuf_Utf8_type_identifier "\x37\x0d\xe6\x8f"
#ifndef org_apache_arrow_flatbuf_Utf8_file_extension
#define org_apache_arrow_flatbuf_Utf8_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Binary_file_identifier
#define org_apache_arrow_flatbuf_Binary_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Binary_file_identifier */
#ifndef org_apache_arrow_flatbuf_Binary_identifier
#define org_apache_arrow_flatbuf_Binary_identifier 0
#endif
#define org_apache_arrow_flatbuf_Binary_type_hash ((flatbuffers_thash_t)0x8e21a795)
#define org_apache_arrow_flatbuf_Binary_type_identifier "\x95\xa7\x21\x8e"
#ifndef org_apache_arrow_flatbuf_Binary_file_extension
#define org_apache_arrow_flatbuf_Binary_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_LargeUtf8_file_identifier
#define org_apache_arrow_flatbuf_LargeUtf8_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_LargeUtf8_file_identifier */
#ifndef org_apache_arrow_flatbuf_LargeUtf8_identifier
#define org_apache_arrow_flatbuf_LargeUtf8_identifier 0
#endif
#define org_apache_arrow_flatbuf_LargeUtf8_type_hash ((flatbuffers_thash_t)0x24ed2fb0)
#define org_apache_arrow_flatbuf_LargeUtf8_type_identifier "\xb0\x2f\xed\x24"
#ifndef org_apache_arrow_flatbuf_LargeUtf8_file_extension
#define org_apache_arrow_flatbuf_LargeUtf8_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_LargeBinary_file_identifier
#define org_apache_arrow_flatbuf_LargeBinary_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_LargeBinary_file_identifier */
#ifndef org_apache_arrow_flatbuf_LargeBinary_identifier
#define org_apache_arrow_flatbuf_LargeBinary_identifier 0
#endif
#define org_apache_arrow_flatbuf_LargeBinary_type_hash ((flatbuffers_thash_t)0xbd437872)
#define org_apache_arrow_flatbuf_LargeBinary_type_identifier "\x72\x78\x43\xbd"
#ifndef org_apache_arrow_flatbuf_LargeBinary_file_extension
#define org_apache_arrow_flatbuf_LargeBinary_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_FixedSizeBinary_file_identifier
#define org_apache_arrow_flatbuf_FixedSizeBinary_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_FixedSizeBinary_file_identifier */
#ifndef org_apache_arrow_flatbuf_FixedSizeBinary_identifier
#define org_apache_arrow_flatbuf_FixedSizeBinary_identifier 0
#endif
#define org_apache_arrow_flatbuf_FixedSizeBinary_type_hash ((flatbuffers_thash_t)0x80d0f4ce)
#define org_apache_arrow_flatbuf_FixedSizeBinary_type_identifier "\xce\xf4\xd0\x80"
#ifndef org_apache_arrow_flatbuf_FixedSizeBinary_file_extension
#define org_apache_arrow_flatbuf_FixedSizeBinary_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Bool_file_identifier
#define org_apache_arrow_flatbuf_Bool_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Bool_file_identifier */
#ifndef org_apache_arrow_flatbuf_Bool_identifier
#define org_apache_arrow_flatbuf_Bool_identifier 0
#endif
#define org_apache_arrow_flatbuf_Bool_type_hash ((flatbuffers_thash_t)0x96bf83f0)
#define org_apache_arrow_flatbuf_Bool_type_identifier "\xf0\x83\xbf\x96"
#ifndef org_apache_arrow_flatbuf_Bool_file_extension
#define org_apache_arrow_flatbuf_Bool_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_RunEndEncoded_file_identifier
#define org_apache_arrow_flatbuf_RunEndEncoded_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_RunEndEncoded_file_identifier */
#ifndef org_apache_arrow_flatbuf_RunEndEncoded_identifier
#define org_apache_arrow_flatbuf_RunEndEncoded_identifier 0
#endif
#define org_apache_arrow_flatbuf_RunEndEncoded_type_hash ((flatbuffers_thash_t)0x5a98bcc)
#define org_apache_arrow_flatbuf_RunEndEncoded_type_identifier "\xcc\x8b\xa9\x05"
#ifndef org_apache_arrow_flatbuf_RunEndEncoded_file_extension
#define org_apache_arrow_flatbuf_RunEndEncoded_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Decimal_file_identifier
#define org_apache_arrow_flatbuf_Decimal_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Decimal_file_identifier */
#ifndef org_apache_arrow_flatbuf_Decimal_identifier
#define org_apache_arrow_flatbuf_Decimal_identifier 0
#endif
#define org_apache_arrow_flatbuf_Decimal_type_hash ((flatbuffers_thash_t)0x91d1beb7)
#define org_apache_arrow_flatbuf_Decimal_type_identifier "\xb7\xbe\xd1\x91"
#ifndef org_apache_arrow_flatbuf_Decimal_file_extension
#define org_apache_arrow_flatbuf_Decimal_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Date_file_identifier
#define org_apache_arrow_flatbuf_Date_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Date_file_identifier */
#ifndef org_apache_arrow_flatbuf_Date_identifier
#define org_apache_arrow_flatbuf_Date_identifier 0
#endif
#define org_apache_arrow_flatbuf_Date_type_hash ((flatbuffers_thash_t)0xe0ccf624)
#define org_apache_arrow_flatbuf_Date_type_identifier "\x24\xf6\xcc\xe0"
#ifndef org_apache_arrow_flatbuf_Date_file_extension
#define org_apache_arrow_flatbuf_Date_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Time_file_identifier
#define org_apache_arrow_flatbuf_Time_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Time_file_identifier */
#ifndef org_apache_arrow_flatbuf_Time_identifier
#define org_apache_arrow_flatbuf_Time_identifier 0
#endif
#define org_apache_arrow_flatbuf_Time_type_hash ((flatbuffers_thash_t)0x2442a489)
#define org_apache_arrow_flatbuf_Time_type_identifier "\x89\xa4\x42\x24"
#ifndef org_apache_arrow_flatbuf_Time_file_extension
#define org_apache_arrow_flatbuf_Time_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Timestamp_file_identifier
#define org_apache_arrow_flatbuf_Timestamp_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Timestamp_file_identifier */
#ifndef org_apache_arrow_flatbuf_Timestamp_identifier
#define org_apache_arrow_flatbuf_Timestamp_identifier 0
#endif
#define org_apache_arrow_flatbuf_Timestamp_type_hash ((flatbuffers_thash_t)0x1fddf080)
#define org_apache_arrow_flatbuf_Timestamp_type_identifier "\x80\xf0\xdd\x1f"
#ifndef org_apache_arrow_flatbuf_Timestamp_file_extension
#define org_apache_arrow_flatbuf_Timestamp_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Interval_file_identifier
#define org_apache_arrow_flatbuf_Interval_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Interval_file_identifier */
#ifndef org_apache_arrow_flatbuf_Interval_identifier
#define org_apache_arrow_flatbuf_Interval_identifier 0
#endif
#define org_apache_arrow_flatbuf_Interval_type_hash ((flatbuffers_thash_t)0x1e2d6809)
#define org_apache_arrow_flatbuf_Interval_type_identifier "\x09\x68\x2d\x1e"
#ifndef org_apache_arrow_flatbuf_Interval_file_extension
#define org_apache_arrow_flatbuf_Interval_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Duration_file_identifier
#define org_apache_arrow_flatbuf_Duration_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Duration_file_identifier */
#ifndef org_apache_arrow_flatbuf_Duration_identifier
#define org_apache_arrow_flatbuf_Duration_identifier 0
#endif
#define org_apache_arrow_flatbuf_Duration_type_hash ((flatbuffers_thash_t)0x1ecea6b0)
#define org_apache_arrow_flatbuf_Duration_type_identifier "\xb0\xa6\xce\x1e"
#ifndef org_apache_arrow_flatbuf_Duration_file_extension
#define org_apache_arrow_flatbuf_Duration_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_KeyValue_file_identifier
#define org_apache_arrow_flatbuf_KeyValue_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_KeyValue_file_identifier */
#ifndef org_apache_arrow_flatbuf_KeyValue_identifier
#define org_apache_arrow_flatbuf_KeyValue_identifier 0
#endif
#define org_apache_arrow_flatbuf_KeyValue_type_hash ((flatbuffers_thash_t)0x3b264744)
#define org_apache_arrow_flatbuf_KeyValue_type_identifier "\x44\x47\x26\x3b"
#ifndef org_apache_arrow_flatbuf_KeyValue_file_extension
#define org_apache_arrow_flatbuf_KeyValue_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_DictionaryEncoding_file_identifier
#define org_apache_arrow_flatbuf_DictionaryEncoding_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_DictionaryEncoding_file_identifier */
#ifndef org_apache_arrow_flatbuf_DictionaryEncoding_identifier
#define org_apache_arrow_flatbuf_DictionaryEncoding_identifier 0
#endif
#define org_apache_arrow_flatbuf_DictionaryEncoding_type_hash ((flatbuffers_thash_t)0x8c703261)
#define org_apache_arrow_flatbuf_DictionaryEncoding_type_identifier "\x61\x32\x70\x8c"
#ifndef org_apache_arrow_flatbuf_DictionaryEncoding_file_extension
#define org_apache_arrow_flatbuf_DictionaryEncoding_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Field_file_identifier
#define org_apache_arrow_flatbuf_Field_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Field_file_identifier */
#ifndef org_apache_arrow_flatbuf_Field_identifier
#define org_apache_arrow_flatbuf_Field_identifier 0
#endif
#define org_apache_arrow_flatbuf_Field_type_hash ((flatbuffers_thash_t)0xd981525c)
#define org_apache_arrow_flatbuf_Field_type_identifier "\x5c\x52\x81\xd9"
#ifndef org_apache_arrow_flatbuf_Field_file_extension
#define org_apache_arrow_flatbuf_Field_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Buffer_file_identifier
#define org_apache_arrow_flatbuf_Buffer_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Buffer_file_identifier */
#ifndef org_apache_arrow_flatbuf_Buffer_identifier
#define org_apache_arrow_flatbuf_Buffer_identifier 0
#endif
#define org_apache_arrow_flatbuf_Buffer_type_hash ((flatbuffers_thash_t)0x519d7fea)
#define org_apache_arrow_flatbuf_Buffer_type_identifier "\xea\x7f\x9d\x51"
#ifndef org_apache_arrow_flatbuf_Buffer_file_extension
#define org_apache_arrow_flatbuf_Buffer_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Schema_file_identifier
#define org_apache_arrow_flatbuf_Schema_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Schema_file_identifier */
#ifndef org_apache_arrow_flatbuf_Schema_identifier
#define org_apache_arrow_flatbuf_Schema_identifier 0
#endif
#define org_apache_arrow_flatbuf_Schema_type_hash ((flatbuffers_thash_t)0x406570b)
#define org_apache_arrow_flatbuf_Schema_type_identifier "\x0b\x57\x06\x04"
#ifndef org_apache_arrow_flatbuf_Schema_file_extension
#define org_apache_arrow_flatbuf_Schema_file_extension "bin"
#endif

typedef int16_t org_apache_arrow_flatbuf_MetadataVersion_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_MetadataVersion, org_apache_arrow_flatbuf_MetadataVersion_enum_t, 16)
/**  0.1.0 (October 2016). */
#define org_apache_arrow_flatbuf_MetadataVersion_V1 ((org_apache_arrow_flatbuf_MetadataVersion_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_MetadataVersion_V2 ((org_apache_arrow_flatbuf_MetadataVersion_enum_t)INT16_C(1))
#define org_apache_arrow_flatbuf_MetadataVersion_V3 ((org_apache_arrow_flatbuf_MetadataVersion_enum_t)INT16_C(2))
#define org_apache_arrow_flatbuf_MetadataVersion_V4 ((org_apache_arrow_flatbuf_MetadataVersion_enum_t)INT16_C(3))
#define org_apache_arrow_flatbuf_MetadataVersion_V5 ((org_apache_arrow_flatbuf_MetadataVersion_enum_t)INT16_C(4))

static inline const char *org_apache_arrow_flatbuf_MetadataVersion_name(org_apache_arrow_flatbuf_MetadataVersion_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_MetadataVersion_V1: return "V1";
    case org_apache_arrow_flatbuf_MetadataVersion_V2: return "V2";
    case org_apache_arrow_flatbuf_MetadataVersion_V3: return "V3";
    case org_apache_arrow_flatbuf_MetadataVersion_V4: return "V4";
    case org_apache_arrow_flatbuf_MetadataVersion_V5: return "V5";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_MetadataVersion_is_known_value(org_apache_arrow_flatbuf_MetadataVersion_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_MetadataVersion_V1: return 1;
    case org_apache_arrow_flatbuf_MetadataVersion_V2: return 1;
    case org_apache_arrow_flatbuf_MetadataVersion_V3: return 1;
    case org_apache_arrow_flatbuf_MetadataVersion_V4: return 1;
    case org_apache_arrow_flatbuf_MetadataVersion_V5: return 1;
    default: return 0;
    }
}

/**  Represents Arrow Features that might not have full support
 *  within implementations. This is intended to be used in
 *  two scenarios:
 *   1.  A mechanism for readers of Arrow Streams
 *       and files to understand that the stream or file makes
 *       use of a feature that isn't supported or unknown to
 *       the implementation (and therefore can meet the Arrow
 *       forward compatibility guarantees).
 *   2.  A means of negotiating between a client and server
 *       what features a stream is allowed to use. The enums
 *       values here are intented to represent higher level
 *       features, additional details maybe negotiated
 *       with key-value pairs specific to the protocol.
 *
 *  Enums added to this list should be assigned power-of-two values
 *  to facilitate exchanging and comparing bitmaps for supported
 *  features. */
typedef int64_t org_apache_arrow_flatbuf_Feature_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_Feature, org_apache_arrow_flatbuf_Feature_enum_t, 64)
/**  Needed to make flatbuffers happy. */
#define org_apache_arrow_flatbuf_Feature_UNUSED ((org_apache_arrow_flatbuf_Feature_enum_t)INT64_C(0))
#define org_apache_arrow_flatbuf_Feature_DICTIONARY_REPLACEMENT ((org_apache_arrow_flatbuf_Feature_enum_t)INT64_C(1))
#define org_apache_arrow_flatbuf_Feature_COMPRESSED_BODY ((org_apache_arrow_flatbuf_Feature_enum_t)INT64_C(2))

static inline const char *org_apache_arrow_flatbuf_Feature_name(org_apache_arrow_flatbuf_Feature_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_Feature_UNUSED: return "UNUSED";
    case org_apache_arrow_flatbuf_Feature_DICTIONARY_REPLACEMENT: return "DICTIONARY_REPLACEMENT";
    case org_apache_arrow_flatbuf_Feature_COMPRESSED_BODY: return "COMPRESSED_BODY";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_Feature_is_known_value(org_apache_arrow_flatbuf_Feature_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_Feature_UNUSED: return 1;
    case org_apache_arrow_flatbuf_Feature_DICTIONARY_REPLACEMENT: return 1;
    case org_apache_arrow_flatbuf_Feature_COMPRESSED_BODY: return 1;
    default: return 0;
    }
}

typedef int16_t org_apache_arrow_flatbuf_UnionMode_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_UnionMode, org_apache_arrow_flatbuf_UnionMode_enum_t, 16)
#define org_apache_arrow_flatbuf_UnionMode_Sparse ((org_apache_arrow_flatbuf_UnionMode_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_UnionMode_Dense ((org_apache_arrow_flatbuf_UnionMode_enum_t)INT16_C(1))

static inline const char *org_apache_arrow_flatbuf_UnionMode_name(org_apache_arrow_flatbuf_UnionMode_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_UnionMode_Sparse: return "Sparse";
    case org_apache_arrow_flatbuf_UnionMode_Dense: return "Dense";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_UnionMode_is_known_value(org_apache_arrow_flatbuf_UnionMode_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_UnionMode_Sparse: return 1;
    case org_apache_arrow_flatbuf_UnionMode_Dense: return 1;
    default: return 0;
    }
}

typedef int16_t org_apache_arrow_flatbuf_Precision_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_Precision, org_apache_arrow_flatbuf_Precision_enum_t, 16)
#define org_apache_arrow_flatbuf_Precision_HALF ((org_apache_arrow_flatbuf_Precision_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_Precision_SINGLE ((org_apache_arrow_flatbuf_Precision_enum_t)INT16_C(1))
#define org_apache_arrow_flatbuf_Precision_DOUBLE ((org_apache_arrow_flatbuf_Precision_enum_t)INT16_C(2))

static inline const char *org_apache_arrow_flatbuf_Precision_name(org_apache_arrow_flatbuf_Precision_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_Precision_HALF: return "HALF";
    case org_apache_arrow_flatbuf_Precision_SINGLE: return "SINGLE";
    case org_apache_arrow_flatbuf_Precision_DOUBLE: return "DOUBLE";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_Precision_is_known_value(org_apache_arrow_flatbuf_Precision_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_Precision_HALF: return 1;
    case org_apache_arrow_flatbuf_Precision_SINGLE: return 1;
    case org_apache_arrow_flatbuf_Precision_DOUBLE: return 1;
    default: return 0;
    }
}

typedef int16_t org_apache_arrow_flatbuf_DateUnit_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_DateUnit, org_apache_arrow_flatbuf_DateUnit_enum_t, 16)
#define org_apache_arrow_flatbuf_DateUnit_DAY ((org_apache_arrow_flatbuf_DateUnit_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_DateUnit_MILLISECOND ((org_apache_arrow_flatbuf_DateUnit_enum_t)INT16_C(1))

static inline const char *org_apache_arrow_flatbuf_DateUnit_name(org_apache_arrow_flatbuf_DateUnit_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_DateUnit_DAY: return "DAY";
    case org_apache_arrow_flatbuf_DateUnit_MILLISECOND: return "MILLISECOND";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_DateUnit_is_known_value(org_apache_arrow_flatbuf_DateUnit_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_DateUnit_DAY: return 1;
    case org_apache_arrow_flatbuf_DateUnit_MILLISECOND: return 1;
    default: return 0;
    }
}

typedef int16_t org_apache_arrow_flatbuf_TimeUnit_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t, 16)
#define org_apache_arrow_flatbuf_TimeUnit_SECOND ((org_apache_arrow_flatbuf_TimeUnit_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_TimeUnit_MILLISECOND ((org_apache_arrow_flatbuf_TimeUnit_enum_t)INT16_C(1))
#define org_apache_arrow_flatbuf_TimeUnit_MICROSECOND ((org_apache_arrow_flatbuf_TimeUnit_enum_t)INT16_C(2))
#define org_apache_arrow_flatbuf_TimeUnit_NANOSECOND ((org_apache_arrow_flatbuf_TimeUnit_enum_t)INT16_C(3))

static inline const char *org_apache_arrow_flatbuf_TimeUnit_name(org_apache_arrow_flatbuf_TimeUnit_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_TimeUnit_SECOND: return "SECOND";
    case org_apache_arrow_flatbuf_TimeUnit_MILLISECOND: return "MILLISECOND";
    case org_apache_arrow_flatbuf_TimeUnit_MICROSECOND: return "MICROSECOND";
    case org_apache_arrow_flatbuf_TimeUnit_NANOSECOND: return "NANOSECOND";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_TimeUnit_is_known_value(org_apache_arrow_flatbuf_TimeUnit_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_TimeUnit_SECOND: return 1;
    case org_apache_arrow_flatbuf_TimeUnit_MILLISECOND: return 1;
    case org_apache_arrow_flatbuf_TimeUnit_MICROSECOND: return 1;
    case org_apache_arrow_flatbuf_TimeUnit_NANOSECOND: return 1;
    default: return 0;
    }
}

typedef int16_t org_apache_arrow_flatbuf_IntervalUnit_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_IntervalUnit, org_apache_arrow_flatbuf_IntervalUnit_enum_t, 16)
#define org_apache_arrow_flatbuf_IntervalUnit_YEAR_MONTH ((org_apache_arrow_flatbuf_IntervalUnit_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_IntervalUnit_DAY_TIME ((org_apache_arrow_flatbuf_IntervalUnit_enum_t)INT16_C(1))
#define org_apache_arrow_flatbuf_IntervalUnit_MONTH_DAY_NANO ((org_apache_arrow_flatbuf_IntervalUnit_enum_t)INT16_C(2))

static inline const char *org_apache_arrow_flatbuf_IntervalUnit_name(org_apache_arrow_flatbuf_IntervalUnit_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_IntervalUnit_YEAR_MONTH: return "YEAR_MONTH";
    case org_apache_arrow_flatbuf_IntervalUnit_DAY_TIME: return "DAY_TIME";
    case org_apache_arrow_flatbuf_IntervalUnit_MONTH_DAY_NANO: return "MONTH_DAY_NANO";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_IntervalUnit_is_known_value(org_apache_arrow_flatbuf_IntervalUnit_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_IntervalUnit_YEAR_MONTH: return 1;
    case org_apache_arrow_flatbuf_IntervalUnit_DAY_TIME: return 1;
    case org_apache_arrow_flatbuf_IntervalUnit_MONTH_DAY_NANO: return 1;
    default: return 0;
    }
}

/**  ----------------------------------------------------------------------
 *  Dictionary encoding metadata
 *  Maintained for forwards compatibility, in the future
 *  Dictionaries might be explicit maps between integers and values
 *  allowing for non-contiguous index values */
typedef int16_t org_apache_arrow_flatbuf_DictionaryKind_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_DictionaryKind, org_apache_arrow_flatbuf_DictionaryKind_enum_t, 16)
#define org_apache_arrow_flatbuf_DictionaryKind_DenseArray ((org_apache_arrow_flatbuf_DictionaryKind_enum_t)INT16_C(0))

static inline const char *org_apache_arrow_flatbuf_DictionaryKind_name(org_apache_arrow_flatbuf_DictionaryKind_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_DictionaryKind_DenseArray: return "DenseArray";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_DictionaryKind_is_known_value(org_apache_arrow_flatbuf_DictionaryKind_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_DictionaryKind_DenseArray: return 1;
    default: return 0;
    }
}

/**  ----------------------------------------------------------------------
 *  Endianness of the platform producing the data */
typedef int16_t org_apache_arrow_flatbuf_Endianness_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_Endianness, org_apache_arrow_flatbuf_Endianness_enum_t, 16)
#define org_apache_arrow_flatbuf_Endianness_Little ((org_apache_arrow_flatbuf_Endianness_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_Endianness_Big ((org_apache_arrow_flatbuf_Endianness_enum_t)INT16_C(1))

static inline const char *org_apache_arrow_flatbuf_Endianness_name(org_apache_arrow_flatbuf_Endianness_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_Endianness_Little: return "Little";
    case org_apache_arrow_flatbuf_Endianness_Big: return "Big";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_Endianness_is_known_value(org_apache_arrow_flatbuf_Endianness_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_Endianness_Little: return 1;
    case org_apache_arrow_flatbuf_Endianness_Big: return 1;
    default: return 0;
    }
}


/**  ----------------------------------------------------------------------
 *  A Buffer represents a single contiguous memory segment */
struct org_apache_arrow_flatbuf_Buffer {
    /**  The relative offset into the shared memory page where the bytes for this
     *  buffer starts */
    alignas(8) int64_t offset;
    /**  The absolute length (in bytes) of the memory buffer. The memory is found
     *  from offset (inclusive) to offset + length (non-inclusive). When building
     *  messages using the encapsulated IPC message, padding bytes may be written
     *  after a buffer, but such padding bytes do not need to be accounted for in
     *  the size here. */
    alignas(8) int64_t length;
};
static_assert(sizeof(org_apache_arrow_flatbuf_Buffer_t) == 16, "struct size mismatch");

static inline const org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer__const_ptr_add(const org_apache_arrow_flatbuf_Buffer_t *p, size_t i) { return p + i; }
static inline org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer__ptr_add(org_apache_arrow_flatbuf_Buffer_t *p, size_t i) { return p + i; }
static inline org_apache_arrow_flatbuf_Buffer_struct_t org_apache_arrow_flatbuf_Buffer_vec_at(org_apache_arrow_flatbuf_Buffer_vec_t vec, size_t i)
__flatbuffers_struct_vec_at(vec, i)
static inline size_t org_apache_arrow_flatbuf_Buffer__size(void) { return 16; }
static inline size_t org_apache_arrow_flatbuf_Buffer_vec_len(org_apache_arrow_flatbuf_Buffer_vec_t vec)
__flatbuffers_vec_len(vec)
__flatbuffers_struct_as_root(org_apache_arrow_flatbuf_Buffer)

__flatbuffers_define_struct_scalar_field(org_apache_arrow_flatbuf_Buffer, offset, flatbuffers_int64, int64_t)
__flatbuffers_define_struct_scalar_field(org_apache_arrow_flatbuf_Buffer, length, flatbuffers_int64, int64_t)


/**  These are stored in the flatbuffer in the Type union below */
struct org_apache_arrow_flatbuf_Null_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Null_vec_len(org_apache_arrow_flatbuf_Null_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Null_table_t org_apache_arrow_flatbuf_Null_vec_at(org_apache_arrow_flatbuf_Null_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Null_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Null)


/**  A Struct_ in the flatbuffer metadata is the same as an Arrow Struct
 *  (according to the physical memory layout). We used Struct_ here as
 *  Struct is a reserved word in Flatbuffers */
struct org_apache_arrow_flatbuf_Struct__table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Struct__vec_len(org_apache_arrow_flatbuf_Struct__vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Struct__table_t org_apache_arrow_flatbuf_Struct__vec_at(org_apache_arrow_flatbuf_Struct__vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Struct__table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Struct_)


struct org_apache_arrow_flatbuf_List_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_List_vec_len(org_apache_arrow_flatbuf_List_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_List_table_t org_apache_arrow_flatbuf_List_vec_at(org_apache_arrow_flatbuf_List_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_List_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_List)


/**  Same as List, but with 64-bit offsets, allowing to represent
 *  extremely large data values. */
struct org_apache_arrow_flatbuf_LargeList_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_LargeList_vec_len(org_apache_arrow_flatbuf_LargeList_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_LargeList_table_t org_apache_arrow_flatbuf_LargeList_vec_at(org_apache_arrow_flatbuf_LargeList_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_LargeList_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_LargeList)


struct org_apache_arrow_flatbuf_FixedSizeList_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_FixedSizeList_vec_len(org_apache_arrow_flatbuf_FixedSizeList_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_FixedSizeList_table_t org_apache_arrow_flatbuf_FixedSizeList_vec_at(org_apache_arrow_flatbuf_FixedSizeList_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_FixedSizeList_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_FixedSizeList)

/**  Number of list items per value */
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_FixedSizeList, listSize, flatbuffers_int32, int32_t, INT32_C(0))

/**  A Map is a logical nested type that is represented as
 *
 *  List<entries: Struct<key: K, value: V>>
 *
 *  In this layout, the keys and values are each respectively contiguous. We do
 *  not constrain the key and value types, so the application is responsible
 *  for ensuring that the keys are hashable and unique. Whether the keys are sorted
 *  may be set in the metadata for this field.
 *
 *  In a field with Map type, the field has a child Struct field, which then
 *  has two children: key type and the second the value type. The names of the
 *  child fields may be respectively "entries", "key", and "value", but this is
 *  not enforced.
 *
 *  Map
 *  ```text
 *    - child[0] entries: Struct
 *      - child[0] key: K
 *      - child[1] value: V
 *  ```
 *  Neither the "entries" field nor the "key" field may be nullable.
 *
 *  The metadata is structured so that Arrow systems without special handling
 *  for Map can make Map an alias for List. The "layout" attribute for the Map
 *  field must have the same contents as a List. */
struct org_apache_arrow_flatbuf_Map_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Map_vec_len(org_apache_arrow_flatbuf_Map_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Map_table_t org_apache_arrow_flatbuf_Map_vec_at(org_apache_arrow_flatbuf_Map_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Map_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Map)

/**  Set to true if the keys within each value are sorted */
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Map, keysSorted, flatbuffers_bool, flatbuffers_bool_t, UINT8_C(0))

/**  A union is a complex type with children in Field
 *  By default ids in the type vector refer to the offsets in the children
 *  optionally typeIds provides an indirection between the child offset and the type id
 *  for each child `typeIds[offset]` is the id used in the type vector */
struct org_apache_arrow_flatbuf_Union_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Union_vec_len(org_apache_arrow_flatbuf_Union_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Union_table_t org_apache_arrow_flatbuf_Union_vec_at(org_apache_arrow_flatbuf_Union_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Union_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Union)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Union, mode, org_apache_arrow_flatbuf_UnionMode, org_apache_arrow_flatbuf_UnionMode_enum_t, INT16_C(0))
__flatbuffers_define_vector_field(1, org_apache_arrow_flatbuf_Union, typeIds, flatbuffers_int32_vec_t, 0)

struct org_apache_arrow_flatbuf_Int_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Int_vec_len(org_apache_arrow_flatbuf_Int_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Int_table_t org_apache_arrow_flatbuf_Int_vec_at(org_apache_arrow_flatbuf_Int_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Int_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Int)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Int, bitWidth, flatbuffers_int32, int32_t, INT32_C(0))
__flatbuffers_define_scalar_field(1, org_apache_arrow_flatbuf_Int, is_signed, flatbuffers_bool, flatbuffers_bool_t, UINT8_C(0))

struct org_apache_arrow_flatbuf_FloatingPoint_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_FloatingPoint_vec_len(org_apache_arrow_flatbuf_FloatingPoint_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_FloatingPoint_table_t org_apache_arrow_flatbuf_FloatingPoint_vec_at(org_apache_arrow_flatbuf_FloatingPoint_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_FloatingPoint_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_FloatingPoint)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_FloatingPoint, precision, org_apache_arrow_flatbuf_Precision, org_apache_arrow_flatbuf_Precision_enum_t, INT16_C(0))

/**  Unicode with UTF-8 encoding */
struct org_apache_arrow_flatbuf_Utf8_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Utf8_vec_len(org_apache_arrow_flatbuf_Utf8_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Utf8_table_t org_apache_arrow_flatbuf_Utf8_vec_at(org_apache_arrow_flatbuf_Utf8_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Utf8_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Utf8)


/**  Opaque binary data */
struct org_apache_arrow_flatbuf_Binary_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Binary_vec_len(org_apache_arrow_flatbuf_Binary_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Binary_table_t org_apache_arrow_flatbuf_Binary_vec_at(org_apache_arrow_flatbuf_Binary_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Binary_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Binary)


/**  Same as Utf8, but with 64-bit offsets, allowing to represent
 *  extremely large data values. */
struct org_apache_arrow_flatbuf_LargeUtf8_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_LargeUtf8_vec_len(org_apache_arrow_flatbuf_LargeUtf8_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_LargeUtf8_table_t org_apache_arrow_flatbuf_LargeUtf8_vec_at(org_apache_arrow_flatbuf_LargeUtf8_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_LargeUtf8_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_LargeUtf8)


/**  Same as Binary, but with 64-bit offsets, allowing to represent
 *  extremely large data values. */
struct org_apache_arrow_flatbuf_LargeBinary_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_LargeBinary_vec_len(org_apache_arrow_flatbuf_LargeBinary_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_LargeBinary_table_t org_apache_arrow_flatbuf_LargeBinary_vec_at(org_apache_arrow_flatbuf_LargeBinary_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_LargeBinary_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_LargeBinary)


struct org_apache_arrow_flatbuf_FixedSizeBinary_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_FixedSizeBinary_vec_len(org_apache_arrow_flatbuf_FixedSizeBinary_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_FixedSizeBinary_table_t org_apache_arrow_flatbuf_FixedSizeBinary_vec_at(org_apache_arrow_flatbuf_FixedSizeBinary_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_FixedSizeBinary_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_FixedSizeBinary)

/**  Number of bytes per value */
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_FixedSizeBinary, byteWidth, flatbuffers_int32, int32_t, INT32_C(0))

struct org_apache_arrow_flatbuf_Bool_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Bool_vec_len(org_apache_arrow_flatbuf_Bool_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Bool_table_t org_apache_arrow_flatbuf_Bool_vec_at(org_apache_arrow_flatbuf_Bool_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Bool_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Bool)


/**  Contains two child arrays, run_ends and values.
 *  The run_ends child array must be a 16/32/64-bit integer array
 *  which encodes the indices at which the run with the value in
 *  each corresponding index in the values child array ends.
 *  Like list/struct types, the value array can be of any type. */
struct org_apache_arrow_flatbuf_RunEndEncoded_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_RunEndEncoded_vec_len(org_apache_arrow_flatbuf_RunEndEncoded_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_RunEndEncoded_table_t org_apache_arrow_flatbuf_RunEndEncoded_vec_at(org_apache_arrow_flatbuf_RunEndEncoded_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_RunEndEncoded_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_RunEndEncoded)


/**  Exact decimal value represented as an integer value in two's
 *  complement. Currently only 128-bit (16-byte) and 256-bit (32-byte) integers
 *  are used. The representation uses the endianness indicated
 *  in the Schema. */
struct org_apache_arrow_flatbuf_Decimal_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Decimal_vec_len(org_apache_arrow_flatbuf_Decimal_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Decimal_table_t org_apache_arrow_flatbuf_Decimal_vec_at(org_apache_arrow_flatbuf_Decimal_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Decimal_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Decimal)

/**  Total number of decimal digits */
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Decimal, precision, flatbuffers_int32, int32_t, INT32_C(0))
/**  Number of digits after the decimal point "." */
__flatbuffers_define_scalar_field(1, org_apache_arrow_flatbuf_Decimal, scale, flatbuffers_int32, int32_t, INT32_C(0))
/**  Number of bits per value. The only accepted widths are 128 and 256.
 *  We use bitWidth for consistency with Int::bitWidth. */
__flatbuffers_define_scalar_field(2, org_apache_arrow_flatbuf_Decimal, bitWidth, flatbuffers_int32, int32_t, INT32_C(128))

/**  Date is either a 32-bit or 64-bit signed integer type representing an
 *  elapsed time since UNIX epoch (1970-01-01), stored in either of two units:
 *
 *  * Milliseconds (64 bits) indicating UNIX time elapsed since the epoch (no
 *    leap seconds), where the values are evenly divisible by 86400000
 *  * Days (32 bits) since the UNIX epoch */
struct org_apache_arrow_flatbuf_Date_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Date_vec_len(org_apache_arrow_flatbuf_Date_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Date_table_t org_apache_arrow_flatbuf_Date_vec_at(org_apache_arrow_flatbuf_Date_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Date_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Date)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Date, unit, org_apache_arrow_flatbuf_DateUnit, org_apache_arrow_flatbuf_DateUnit_enum_t, INT16_C(1))

/**  Time is either a 32-bit or 64-bit signed integer type representing an
 *  elapsed time since midnight, stored in either of four units: seconds,
 *  milliseconds, microseconds or nanoseconds.
 *
 *  The integer `bitWidth` depends on the `unit` and must be one of the following:
 *  * SECOND and MILLISECOND: 32 bits
 *  * MICROSECOND and NANOSECOND: 64 bits
 *
 *  The allowed values are between 0 (inclusive) and 86400 (=24*60*60) seconds
 *  (exclusive), adjusted for the time unit (for example, up to 86400000
 *  exclusive for the MILLISECOND unit).
 *  This definition doesn't allow for leap seconds. Time values from
 *  measurements with leap seconds will need to be corrected when ingesting
 *  into Arrow (for example by replacing the value 86400 with 86399). */
struct org_apache_arrow_flatbuf_Time_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Time_vec_len(org_apache_arrow_flatbuf_Time_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Time_table_t org_apache_arrow_flatbuf_Time_vec_at(org_apache_arrow_flatbuf_Time_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Time_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Time)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Time, unit, org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t, INT16_C(1))
__flatbuffers_define_scalar_field(1, org_apache_arrow_flatbuf_Time, bitWidth, flatbuffers_int32, int32_t, INT32_C(32))

/**  Timestamp is a 64-bit signed integer representing an elapsed time since a
 *  fixed epoch, stored in either of four units: seconds, milliseconds,
 *  microseconds or nanoseconds, and is optionally annotated with a timezone.
 *
 *  Timestamp values do not include any leap seconds (in other words, all
 *  days are considered 86400 seconds long).
 *
 *  Timestamps with a non-empty timezone
 *  ------------------------------------
 *
 *  If a Timestamp column has a non-empty timezone value, its epoch is
 *  1970-01-01 00:00:00 (January 1st 1970, midnight) in the *UTC* timezone
 *  (the Unix epoch), regardless of the Timestamp's own timezone.
 *
 *  Therefore, timestamp values with a non-empty timezone correspond to
 *  physical points in time together with some additional information about
 *  how the data was obtained and/or how to display it (the timezone).
 *
 *    For example, the timestamp value 0 with the timezone string "Europe/Paris"
 *    corresponds to "January 1st 1970, 00h00" in the UTC timezone, but the
 *    application may prefer to display it as "January 1st 1970, 01h00" in
 *    the Europe/Paris timezone (which is the same physical point in time).
 *
 *  One consequence is that timestamp values with a non-empty timezone
 *  can be compared and ordered directly, since they all share the same
 *  well-known point of reference (the Unix epoch).
 *
 *  Timestamps with an unset / empty timezone
 *  -----------------------------------------
 *
 *  If a Timestamp column has no timezone value, its epoch is
 *  1970-01-01 00:00:00 (January 1st 1970, midnight) in an *unknown* timezone.
 *
 *  Therefore, timestamp values without a timezone cannot be meaningfully
 *  interpreted as physical points in time, but only as calendar / clock
 *  indications ("wall clock time") in an unspecified timezone.
 *
 *    For example, the timestamp value 0 with an empty timezone string
 *    corresponds to "January 1st 1970, 00h00" in an unknown timezone: there
 *    is not enough information to interpret it as a well-defined physical
 *    point in time.
 *
 *  One consequence is that timestamp values without a timezone cannot
 *  be reliably compared or ordered, since they may have different points of
 *  reference.  In particular, it is *not* possible to interpret an unset
 *  or empty timezone as the same as "UTC".
 *
 *  Conversion between timezones
 *  ----------------------------
 *
 *  If a Timestamp column has a non-empty timezone, changing the timezone
 *  to a different non-empty value is a metadata-only operation:
 *  the timestamp values need not change as their point of reference remains
 *  the same (the Unix epoch).
 *
 *  However, if a Timestamp column has no timezone value, changing it to a
 *  non-empty value requires to think about the desired semantics.
 *  One possibility is to assume that the original timestamp values are
 *  relative to the epoch of the timezone being set; timestamp values should
 *  then adjusted to the Unix epoch (for example, changing the timezone from
 *  empty to "Europe/Paris" would require converting the timestamp values
 *  from "Europe/Paris" to "UTC", which seems counter-intuitive but is
 *  nevertheless correct).
 *
 *  Guidelines for encoding data from external libraries
 *  ----------------------------------------------------
 *
 *  Date & time libraries often have multiple different data types for temporal
 *  data. In order to ease interoperability between different implementations the
 *  Arrow project has some recommendations for encoding these types into a Timestamp
 *  column.
 *
 *  An "instant" represents a physical point in time that has no relevant timezone
 *  (for example, astronomical data). To encode an instant, use a Timestamp with
 *  the timezone string set to "UTC", and make sure the Timestamp values
 *  are relative to the UTC epoch (January 1st 1970, midnight).
 *
 *  A "zoned date-time" represents a physical point in time annotated with an
 *  informative timezone (for example, the timezone in which the data was
 *  recorded).  To encode a zoned date-time, use a Timestamp with the timezone
 *  string set to the name of the timezone, and make sure the Timestamp values
 *  are relative to the UTC epoch (January 1st 1970, midnight).
 *
 *   (There is some ambiguity between an instant and a zoned date-time with the
 *    UTC timezone.  Both of these are stored the same in Arrow.  Typically,
 *    this distinction does not matter.  If it does, then an application should
 *    use custom metadata or an extension type to distinguish between the two cases.)
 *
 *  An "offset date-time" represents a physical point in time combined with an
 *  explicit offset from UTC.  To encode an offset date-time, use a Timestamp
 *  with the timezone string set to the numeric timezone offset string
 *  (e.g. "+03:00"), and make sure the Timestamp values are relative to
 *  the UTC epoch (January 1st 1970, midnight).
 *
 *  A "naive date-time" (also called "local date-time" in some libraries)
 *  represents a wall clock time combined with a calendar date, but with
 *  no indication of how to map this information to a physical point in time.
 *  Naive date-times must be handled with care because of this missing
 *  information, and also because daylight saving time (DST) may make
 *  some values ambiguous or non-existent. A naive date-time may be
 *  stored as a struct with Date and Time fields. However, it may also be
 *  encoded into a Timestamp column with an empty timezone. The timestamp
 *  values should be computed "as if" the timezone of the date-time values
 *  was UTC; for example, the naive date-time "January 1st 1970, 00h00" would
 *  be encoded as timestamp value 0. */
struct org_apache_arrow_flatbuf_Timestamp_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Timestamp_vec_len(org_apache_arrow_flatbuf_Timestamp_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Timestamp_table_t org_apache_arrow_flatbuf_Timestamp_vec_at(org_apache_arrow_flatbuf_Timestamp_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Timestamp_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Timestamp)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Timestamp, unit, org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t, INT16_C(0))
/**  The timezone is an optional string indicating the name of a timezone,
 *  one of:
 *
 *  * As used in the Olson timezone database (the "tz database" or
 *    "tzdata"), such as "America/New_York".
 *  * An absolute timezone offset of the form "+XX:XX" or "-XX:XX",
 *    such as "+07:30".
 *
 *  Whether a timezone string is present indicates different semantics about
 *  the data (see above). */
__flatbuffers_define_string_field(1, org_apache_arrow_flatbuf_Timestamp, timezone, 0)

struct org_apache_arrow_flatbuf_Interval_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Interval_vec_len(org_apache_arrow_flatbuf_Interval_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Interval_table_t org_apache_arrow_flatbuf_Interval_vec_at(org_apache_arrow_flatbuf_Interval_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Interval_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Interval)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Interval, unit, org_apache_arrow_flatbuf_IntervalUnit, org_apache_arrow_flatbuf_IntervalUnit_enum_t, INT16_C(0))

struct org_apache_arrow_flatbuf_Duration_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Duration_vec_len(org_apache_arrow_flatbuf_Duration_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Duration_table_t org_apache_arrow_flatbuf_Duration_vec_at(org_apache_arrow_flatbuf_Duration_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Duration_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Duration)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Duration, unit, org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t, INT16_C(1))
/**  ----------------------------------------------------------------------
 *  Top-level Type value, enabling extensible type-specific metadata. We can
 *  add new logical types to Type without breaking backwards compatibility */
typedef uint8_t org_apache_arrow_flatbuf_Type_union_type_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_Type, org_apache_arrow_flatbuf_Type_union_type_t, 8)
__flatbuffers_define_union(flatbuffers_, org_apache_arrow_flatbuf_Type)
/**  ----------------------------------------------------------------------
 *  user defined key value pairs to add custom metadata to arrow
 *  key namespacing is the responsibility of the user */
#define org_apache_arrow_flatbuf_Type_NONE ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(0))
#define org_apache_arrow_flatbuf_Type_Null ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(1))
#define org_apache_arrow_flatbuf_Type_Int ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(2))
#define org_apache_arrow_flatbuf_Type_FloatingPoint ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(3))
#define org_apache_arrow_flatbuf_Type_Binary ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(4))
#define org_apache_arrow_flatbuf_Type_Utf8 ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(5))
#define org_apache_arrow_flatbuf_Type_Bool ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(6))
#define org_apache_arrow_flatbuf_Type_Decimal ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(7))
#define org_apache_arrow_flatbuf_Type_Date ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(8))
#define org_apache_arrow_flatbuf_Type_Time ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(9))
#define org_apache_arrow_flatbuf_Type_Timestamp ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(10))
#define org_apache_arrow_flatbuf_Type_Interval ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(11))
#define org_apache_arrow_flatbuf_Type_List ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(12))
#define org_apache_arrow_flatbuf_Type_Struct_ ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(13))
#define org_apache_arrow_flatbuf_Type_Union ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(14))
#define org_apache_arrow_flatbuf_Type_FixedSizeBinary ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(15))
#define org_apache_arrow_flatbuf_Type_FixedSizeList ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(16))
#define org_apache_arrow_flatbuf_Type_Map ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(17))
#define org_apache_arrow_flatbuf_Type_Duration ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(18))
#define org_apache_arrow_flatbuf_Type_LargeBinary ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(19))
#define org_apache_arrow_flatbuf_Type_LargeUtf8 ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(20))
#define org_apache_arrow_flatbuf_Type_LargeList ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(21))
#define org_apache_arrow_flatbuf_Type_RunEndEncoded ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(22))

static inline const char *org_apache_arrow_flatbuf_Type_type_name(org_apache_arrow_flatbuf_Type_union_type_t type)
{
    switch (type) {
    case org_apache_arrow_flatbuf_Type_NONE: return "NONE";
    case org_apache_arrow_flatbuf_Type_Null: return "Null";
    case org_apache_arrow_flatbuf_Type_Int: return "Int";
    case org_apache_arrow_flatbuf_Type_FloatingPoint: return "FloatingPoint";
    case org_apache_arrow_flatbuf_Type_Binary: return "Binary";
    case org_apache_arrow_flatbuf_Type_Utf8: return "Utf8";
    case org_apache_arrow_flatbuf_Type_Bool: return "Bool";
    case org_apache_arrow_flatbuf_Type_Decimal: return "Decimal";
    case org_apache_arrow_flatbuf_Type_Date: return "Date";
    case org_apache_arrow_flatbuf_Type_Time: return "Time";
    case org_apache_arrow_flatbuf_Type_Timestamp: return "Timestamp";
    case org_apache_arrow_flatbuf_Type_Interval: return "Interval";
    case org_apache_arrow_flatbuf_Type_List: return "List";
    case org_apache_arrow_flatbuf_Type_Struct_: return "Struct_";
    case org_apache_arrow_flatbuf_Type_Union: return "Union";
    case org_apache_arrow_flatbuf_Type_FixedSizeBinary: return "FixedSizeBinary";
    case org_apache_arrow_flatbuf_Type_FixedSizeList: return "FixedSizeList";
    case org_apache_arrow_flatbuf_Type_Map: return "Map";
    case org_apache_arrow_flatbuf_Type_Duration: return "Duration";
    case org_apache_arrow_flatbuf_Type_LargeBinary: return "LargeBinary";
    case org_apache_arrow_flatbuf_Type_LargeUtf8: return "LargeUtf8";
    case org_apache_arrow_flatbuf_Type_LargeList: return "LargeList";
    case org_apache_arrow_flatbuf_Type_RunEndEncoded: return "RunEndEncoded";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_Type_is_known_type(org_apache_arrow_flatbuf_Type_union_type_t type)
{
    switch (type) {
    case org_apache_arrow_flatbuf_Type_NONE: return 1;
    case org_apache_arrow_flatbuf_Type_Null: return 1;
    case org_apache_arrow_flatbuf_Type_Int: return 1;
    case org_apache_arrow_flatbuf_Type_FloatingPoint: return 1;
    case org_apache_arrow_flatbuf_Type_Binary: return 1;
    case org_apache_arrow_flatbuf_Type_Utf8: return 1;
    case org_apache_arrow_flatbuf_Type_Bool: return 1;
    case org_apache_arrow_flatbuf_Type_Decimal: return 1;
    case org_apache_arrow_flatbuf_Type_Date: return 1;
    case org_apache_arrow_flatbuf_Type_Time: return 1;
    case org_apache_arrow_flatbuf_Type_Timestamp: return 1;
    case org_apache_arrow_flatbuf_Type_Interval: return 1;
    case org_apache_arrow_flatbuf_Type_List: return 1;
    case org_apache_arrow_flatbuf_Type_Struct_: return 1;
    case org_apache_arrow_flatbuf_Type_Union: return 1;
    case org_apache_arrow_flatbuf_Type_FixedSizeBinary: return 1;
    case org_apache_arrow_flatbuf_Type_FixedSizeList: return 1;
    case org_apache_arrow_flatbuf_Type_Map: return 1;
    case org_apache_arrow_flatbuf_Type_Duration: return 1;
    case org_apache_arrow_flatbuf_Type_LargeBinary: return 1;
    case org_apache_arrow_flatbuf_Type_LargeUtf8: return 1;
    case org_apache_arrow_flatbuf_Type_LargeList: return 1;
    case org_apache_arrow_flatbuf_Type_RunEndEncoded: return 1;
    default: return 0;
    }
}


struct org_apache_arrow_flatbuf_KeyValue_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_KeyValue_vec_len(org_apache_arrow_flatbuf_KeyValue_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_KeyValue_table_t org_apache_arrow_flatbuf_KeyValue_vec_at(org_apache_arrow_flatbuf_KeyValue_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_KeyValue_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_KeyValue)

__flatbuffers_define_string_field(0, org_apache_arrow_flatbuf_KeyValue, key, 0)
__flatbuffers_define_string_field(1, org_apache_arrow_flatbuf_KeyValue, value, 0)

struct org_apache_arrow_flatbuf_DictionaryEncoding_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_DictionaryEncoding_vec_len(org_apache_arrow_flatbuf_DictionaryEncoding_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_DictionaryEncoding_table_t org_apache_arrow_flatbuf_DictionaryEncoding_vec_at(org_apache_arrow_flatbuf_DictionaryEncoding_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_DictionaryEncoding_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_DictionaryEncoding)

/**  The known dictionary id in the application where this data is used. In
 *  the file or streaming formats, the dictionary ids are found in the
 *  DictionaryBatch messages */
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_DictionaryEncoding, id, flatbuffers_int64, int64_t, INT64_C(0))
/**  The dictionary indices are constrained to be non-negative integers. If
 *  this field is null, the indices must be signed int32. To maximize
 *  cross-language compatibility and performance, implementations are
 *  recommended to prefer signed integer types over unsigned integer types
 *  and to avoid uint64 indices unless they are required by an application. */
__flatbuffers_define_table_field(1, org_apache_arrow_flatbuf_DictionaryEncoding, indexType, org_apache_arrow_flatbuf_Int_table_t, 0)
/**  By default, dictionaries are not ordered, or the order does not have
 *  semantic meaning. In some statistical, applications, dictionary-encoding
 *  is used to represent ordered categorical data, and we provide a way to
 *  preserve that metadata here */
__flatbuffers_define_scalar_field(2, org_apache_arrow_flatbuf_DictionaryEncoding, isOrdered, flatbuffers_bool, flatbuffers_bool_t, UINT8_C(0))
__flatbuffers_define_scalar_field(3, org_apache_arrow_flatbuf_DictionaryEncoding, dictionaryKind, org_apache_arrow_flatbuf_DictionaryKind, org_apache_arrow_flatbuf_DictionaryKind_enum_t, INT16_C(0))

/**  ----------------------------------------------------------------------
 *  A field represents a named column in a record / row batch or child of a
 *  nested type. */
struct org_apache_arrow_flatbuf_Field_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Field_vec_len(org_apache_arrow_flatbuf_Field_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Field_table_t org_apache_arrow_flatbuf_Field_vec_at(org_apache_arrow_flatbuf_Field_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Field_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Field)

/**  Name is not required, in i.e. a List */
__flatbuffers_define_string_field(0, org_apache_arrow_flatbuf_Field, name, 0)
/**  Whether or not this field can contain nulls. Should be true in general. */
__flatbuffers_define_scalar_field(1, org_apache_arrow_flatbuf_Field, nullable, flatbuffers_bool, flatbuffers_bool_t, UINT8_C(0))
/**  This is the type of the decoded value if the field is dictionary encoded. */
__flatbuffers_define_union_field(flatbuffers_, 3, org_apache_arrow_flatbuf_Field, type, org_apache_arrow_flatbuf_Type, 0)
/**  Present only if the field is dictionary encoded. */
__flatbuffers_define_table_field(4, org_apache_arrow_flatbuf_Field, dictionary, org_apache_arrow_flatbuf_DictionaryEncoding_table_t, 0)
/**  children apply only to nested data types like Struct, List and Union. For
 *  primitive types children will have length 0. */
__flatbuffers_define_vector_field(5, org_apache_arrow_flatbuf_Field, children, org_apache_arrow_flatbuf_Field_vec_t, 0)
/**  User-defined metadata */
__flatbuffers_define_vector_field(6, org_apache_arrow_flatbuf_Field, custom_metadata, org_apache_arrow_flatbuf_KeyValue_vec_t, 0)

/**  ----------------------------------------------------------------------
 *  A Schema describes the columns in a row batch */
struct org_apache_arrow_flatbuf_Schema_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Schema_vec_len(org_apache_arrow_flatbuf_Schema_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Schema_table_t org_apache_arrow_flatbuf_Schema_vec_at(org_apache_arrow_flatbuf_Schema_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Schema_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Schema)

/**  endianness of the buffer
 *  it is Little Endian by default
 *  if endianness doesn't match the underlying system then the vectors need to be converted */
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Schema, endianness, org_apache_arrow_flatbuf_Endianness, org_apache_arrow_flatbuf_Endianness_enum_t, INT16_C(0))
__flatbuffers_define_vector_field(1, org_apache_arrow_flatbuf_Schema, fields, org_apache_arrow_flatbuf_Field_vec_t, 0)
__flatbuffers_define_vector_field(2, org_apache_arrow_flatbuf_Schema, custom_metadata, org_apache_arrow_flatbuf_KeyValue_vec_t, 0)
/**  Features used in the stream/file. */
__flatbuffers_define_vector_field(3, org_apache_arrow_flatbuf_Schema, features, org_apache_arrow_flatbuf_Feature_vec_t, 0)


#include "flatcc/flatcc_epilogue.h"
#endif /* SCHEMA_READER_H */
#ifndef SCHEMA_BUILDER_H
#define SCHEMA_BUILDER_H

/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

#ifndef SCHEMA_READER_H
#include "Schema_reader.h"
#endif
#ifndef FLATBUFFERS_COMMON_BUILDER_H
#include "flatbuffers_common_builder.h"
#endif
#include "flatcc/flatcc_prologue.h"
#ifndef flatbuffers_identifier
#define flatbuffers_identifier 0
#endif
#ifndef flatbuffers_extension
#define flatbuffers_extension "bin"
#endif

#define __org_apache_arrow_flatbuf_MetadataVersion_formal_args , org_apache_arrow_flatbuf_MetadataVersion_enum_t v0
#define __org_apache_arrow_flatbuf_MetadataVersion_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_MetadataVersion, org_apache_arrow_flatbuf_MetadataVersion_enum_t)
#define __org_apache_arrow_flatbuf_Feature_formal_args , org_apache_arrow_flatbuf_Feature_enum_t v0
#define __org_apache_arrow_flatbuf_Feature_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_Feature, org_apache_arrow_flatbuf_Feature_enum_t)
#define __org_apache_arrow_flatbuf_UnionMode_formal_args , org_apache_arrow_flatbuf_UnionMode_enum_t v0
#define __org_apache_arrow_flatbuf_UnionMode_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_UnionMode, org_apache_arrow_flatbuf_UnionMode_enum_t)
#define __org_apache_arrow_flatbuf_Precision_formal_args , org_apache_arrow_flatbuf_Precision_enum_t v0
#define __org_apache_arrow_flatbuf_Precision_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_Precision, org_apache_arrow_flatbuf_Precision_enum_t)
#define __org_apache_arrow_flatbuf_DateUnit_formal_args , org_apache_arrow_flatbuf_DateUnit_enum_t v0
#define __org_apache_arrow_flatbuf_DateUnit_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_DateUnit, org_apache_arrow_flatbuf_DateUnit_enum_t)
#define __org_apache_arrow_flatbuf_TimeUnit_formal_args , org_apache_arrow_flatbuf_TimeUnit_enum_t v0
#define __org_apache_arrow_flatbuf_TimeUnit_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t)
#define __org_apache_arrow_flatbuf_IntervalUnit_formal_args , org_apache_arrow_flatbuf_IntervalUnit_enum_t v0
#define __org_apache_arrow_flatbuf_IntervalUnit_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_IntervalUnit, org_apache_arrow_flatbuf_IntervalUnit_enum_t)
#define __org_apache_arrow_flatbuf_DictionaryKind_formal_args , org_apache_arrow_flatbuf_DictionaryKind_enum_t v0
#define __org_apache_arrow_flatbuf_DictionaryKind_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_DictionaryKind, org_apache_arrow_flatbuf_DictionaryKind_enum_t)
#define __org_apache_arrow_flatbuf_Endianness_formal_args , org_apache_arrow_flatbuf_Endianness_enum_t v0
#define __org_apache_arrow_flatbuf_Endianness_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_Endianness, org_apache_arrow_flatbuf_Endianness_enum_t)

#define __org_apache_arrow_flatbuf_Buffer_formal_args , int64_t v0, int64_t v1
#define __org_apache_arrow_flatbuf_Buffer_call_args , v0, v1
static inline org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_assign(org_apache_arrow_flatbuf_Buffer_t *p, int64_t v0, int64_t v1)
{ p->offset = v0; p->length = v1;
  return p; }
static inline org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_copy(org_apache_arrow_flatbuf_Buffer_t *p, const org_apache_arrow_flatbuf_Buffer_t *p2)
{ p->offset = p2->offset; p->length = p2->length;
  return p; }
static inline org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_assign_to_pe(org_apache_arrow_flatbuf_Buffer_t *p, int64_t v0, int64_t v1)
{ flatbuffers_int64_assign_to_pe(&p->offset, v0); flatbuffers_int64_assign_to_pe(&p->length, v1);
  return p; }
static inline org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_copy_to_pe(org_apache_arrow_flatbuf_Buffer_t *p, const org_apache_arrow_flatbuf_Buffer_t *p2)
{ flatbuffers_int64_copy_to_pe(&p->offset, &p2->offset); flatbuffers_int64_copy_to_pe(&p->length, &p2->length);
  return p; }
static inline org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_assign_from_pe(org_apache_arrow_flatbuf_Buffer_t *p, int64_t v0, int64_t v1)
{ flatbuffers_int64_assign_from_pe(&p->offset, v0); flatbuffers_int64_assign_from_pe(&p->length, v1);
  return p; }
static inline org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_copy_from_pe(org_apache_arrow_flatbuf_Buffer_t *p, const org_apache_arrow_flatbuf_Buffer_t *p2)
{ flatbuffers_int64_copy_from_pe(&p->offset, &p2->offset); flatbuffers_int64_copy_from_pe(&p->length, &p2->length);
  return p; }
__flatbuffers_build_struct(flatbuffers_, org_apache_arrow_flatbuf_Buffer, 16, 8, org_apache_arrow_flatbuf_Buffer_file_identifier, org_apache_arrow_flatbuf_Buffer_type_identifier)
__flatbuffers_define_fixed_array_primitives(flatbuffers_, org_apache_arrow_flatbuf_Buffer, org_apache_arrow_flatbuf_Buffer_t)

typedef flatbuffers_union_ref_t org_apache_arrow_flatbuf_Type_union_ref_t;
typedef flatbuffers_union_vec_ref_t org_apache_arrow_flatbuf_Type_union_vec_ref_t;
static org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Type_union_t t);

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Null_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Null_ref_t;
static org_apache_arrow_flatbuf_Null_ref_t org_apache_arrow_flatbuf_Null_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Null_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Null, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Struct__required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Struct__ref_t;
static org_apache_arrow_flatbuf_Struct__ref_t org_apache_arrow_flatbuf_Struct__clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Struct__table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Struct_, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_List_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_List_ref_t;
static org_apache_arrow_flatbuf_List_ref_t org_apache_arrow_flatbuf_List_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_List_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_List, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_LargeList_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_LargeList_ref_t;
static org_apache_arrow_flatbuf_LargeList_ref_t org_apache_arrow_flatbuf_LargeList_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_LargeList_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_LargeList, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_FixedSizeList_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_FixedSizeList_ref_t;
static org_apache_arrow_flatbuf_FixedSizeList_ref_t org_apache_arrow_flatbuf_FixedSizeList_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_FixedSizeList_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_FixedSizeList, 1)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Map_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Map_ref_t;
static org_apache_arrow_flatbuf_Map_ref_t org_apache_arrow_flatbuf_Map_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Map_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Map, 1)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Union_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Union_ref_t;
static org_apache_arrow_flatbuf_Union_ref_t org_apache_arrow_flatbuf_Union_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Union_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Union, 2)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Int_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Int_ref_t;
static org_apache_arrow_flatbuf_Int_ref_t org_apache_arrow_flatbuf_Int_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Int_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Int, 2)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_FloatingPoint_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_FloatingPoint_ref_t;
static org_apache_arrow_flatbuf_FloatingPoint_ref_t org_apache_arrow_flatbuf_FloatingPoint_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_FloatingPoint_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_FloatingPoint, 1)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Utf8_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Utf8_ref_t;
static org_apache_arrow_flatbuf_Utf8_ref_t org_apache_arrow_flatbuf_Utf8_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Utf8_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Utf8, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Binary_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Binary_ref_t;
static org_apache_arrow_flatbuf_Binary_ref_t org_apache_arrow_flatbuf_Binary_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Binary_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Binary, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_LargeUtf8_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_LargeUtf8_ref_t;
static org_apache_arrow_flatbuf_LargeUtf8_ref_t org_apache_arrow_flatbuf_LargeUtf8_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_LargeUtf8_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_LargeUtf8, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_LargeBinary_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_LargeBinary_ref_t;
static org_apache_arrow_flatbuf_LargeBinary_ref_t org_apache_arrow_flatbuf_LargeBinary_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_LargeBinary_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_LargeBinary, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_FixedSizeBinary_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_FixedSizeBinary_ref_t;
static org_apache_arrow_flatbuf_FixedSizeBinary_ref_t org_apache_arrow_flatbuf_FixedSizeBinary_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_FixedSizeBinary_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_FixedSizeBinary, 1)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Bool_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Bool_ref_t;
static org_apache_arrow_flatbuf_Bool_ref_t org_apache_arrow_flatbuf_Bool_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Bool_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Bool, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_RunEndEncoded_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_RunEndEncoded_ref_t;
static org_apache_arrow_flatbuf_RunEndEncoded_ref_t org_apache_arrow_flatbuf_RunEndEncoded_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_RunEndEncoded_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_RunEndEncoded, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Decimal_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Decimal_ref_t;
static org_apache_arrow_flatbuf_Decimal_ref_t org_apache_arrow_flatbuf_Decimal_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Decimal_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Decimal, 3)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Date_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Date_ref_t;
static org_apache_arrow_flatbuf_Date_ref_t org_apache_arrow_flatbuf_Date_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Date_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Date, 1)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Time_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Time_ref_t;
static org_apache_arrow_flatbuf_Time_ref_t org_apache_arrow_flatbuf_Time_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Time_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Time, 2)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Timestamp_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Timestamp_ref_t;
static org_apache_arrow_flatbuf_Timestamp_ref_t org_apache_arrow_flatbuf_Timestamp_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Timestamp_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Timestamp, 2)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Interval_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Interval_ref_t;
static org_apache_arrow_flatbuf_Interval_ref_t org_apache_arrow_flatbuf_Interval_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Interval_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Interval, 1)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Duration_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Duration_ref_t;
static org_apache_arrow_flatbuf_Duration_ref_t org_apache_arrow_flatbuf_Duration_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Duration_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Duration, 1)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_KeyValue_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_KeyValue_ref_t;
static org_apache_arrow_flatbuf_KeyValue_ref_t org_apache_arrow_flatbuf_KeyValue_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_KeyValue_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_KeyValue, 2)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_DictionaryEncoding_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_DictionaryEncoding_ref_t;
static org_apache_arrow_flatbuf_DictionaryEncoding_ref_t org_apache_arrow_flatbuf_DictionaryEncoding_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_DictionaryEncoding_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_DictionaryEncoding, 4)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Field_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Field_ref_t;
static org_apache_arrow_flatbuf_Field_ref_t org_apache_arrow_flatbuf_Field_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Field_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Field, 7)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Schema_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Schema_ref_t;
static org_apache_arrow_flatbuf_Schema_ref_t org_apache_arrow_flatbuf_Schema_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Schema_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Schema, 4)

#define __org_apache_arrow_flatbuf_Null_formal_args
#define __org_apache_arrow_flatbuf_Null_call_args
static inline org_apache_arrow_flatbuf_Null_ref_t org_apache_arrow_flatbuf_Null_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Null_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Null, org_apache_arrow_flatbuf_Null_file_identifier, org_apache_arrow_flatbuf_Null_type_identifier)

#define __org_apache_arrow_flatbuf_Struct__formal_args
#define __org_apache_arrow_flatbuf_Struct__call_args
static inline org_apache_arrow_flatbuf_Struct__ref_t org_apache_arrow_flatbuf_Struct__create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Struct__formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Struct_, org_apache_arrow_flatbuf_Struct__file_identifier, org_apache_arrow_flatbuf_Struct__type_identifier)

#define __org_apache_arrow_flatbuf_List_formal_args
#define __org_apache_arrow_flatbuf_List_call_args
static inline org_apache_arrow_flatbuf_List_ref_t org_apache_arrow_flatbuf_List_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_List_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_List, org_apache_arrow_flatbuf_List_file_identifier, org_apache_arrow_flatbuf_List_type_identifier)

#define __org_apache_arrow_flatbuf_LargeList_formal_args
#define __org_apache_arrow_flatbuf_LargeList_call_args
static inline org_apache_arrow_flatbuf_LargeList_ref_t org_apache_arrow_flatbuf_LargeList_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_LargeList_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_LargeList, org_apache_arrow_flatbuf_LargeList_file_identifier, org_apache_arrow_flatbuf_LargeList_type_identifier)

#define __org_apache_arrow_flatbuf_FixedSizeList_formal_args , int32_t v0
#define __org_apache_arrow_flatbuf_FixedSizeList_call_args , v0
static inline org_apache_arrow_flatbuf_FixedSizeList_ref_t org_apache_arrow_flatbuf_FixedSizeList_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_FixedSizeList_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_FixedSizeList, org_apache_arrow_flatbuf_FixedSizeList_file_identifier, org_apache_arrow_flatbuf_FixedSizeList_type_identifier)

#define __org_apache_arrow_flatbuf_Map_formal_args , flatbuffers_bool_t v0
#define __org_apache_arrow_flatbuf_Map_call_args , v0
static inline org_apache_arrow_flatbuf_Map_ref_t org_apache_arrow_flatbuf_Map_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Map_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Map, org_apache_arrow_flatbuf_Map_file_identifier, org_apache_arrow_flatbuf_Map_type_identifier)

#define __org_apache_arrow_flatbuf_Union_formal_args , org_apache_arrow_flatbuf_UnionMode_enum_t v0, flatbuffers_int32_vec_ref_t v1
#define __org_apache_arrow_flatbuf_Union_call_args , v0, v1
static inline org_apache_arrow_flatbuf_Union_ref_t org_apache_arrow_flatbuf_Union_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Union_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Union, org_apache_arrow_flatbuf_Union_file_identifier, org_apache_arrow_flatbuf_Union_type_identifier)

#define __org_apache_arrow_flatbuf_Int_formal_args , int32_t v0, flatbuffers_bool_t v1
#define __org_apache_arrow_flatbuf_Int_call_args , v0, v1
static inline org_apache_arrow_flatbuf_Int_ref_t org_apache_arrow_flatbuf_Int_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Int_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Int, org_apache_arrow_flatbuf_Int_file_identifier, org_apache_arrow_flatbuf_Int_type_identifier)

#define __org_apache_arrow_flatbuf_FloatingPoint_formal_args , org_apache_arrow_flatbuf_Precision_enum_t v0
#define __org_apache_arrow_flatbuf_FloatingPoint_call_args , v0
static inline org_apache_arrow_flatbuf_FloatingPoint_ref_t org_apache_arrow_flatbuf_FloatingPoint_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_FloatingPoint_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_FloatingPoint, org_apache_arrow_flatbuf_FloatingPoint_file_identifier, org_apache_arrow_flatbuf_FloatingPoint_type_identifier)

#define __org_apache_arrow_flatbuf_Utf8_formal_args
#define __org_apache_arrow_flatbuf_Utf8_call_args
static inline org_apache_arrow_flatbuf_Utf8_ref_t org_apache_arrow_flatbuf_Utf8_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Utf8_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Utf8, org_apache_arrow_flatbuf_Utf8_file_identifier, org_apache_arrow_flatbuf_Utf8_type_identifier)

#define __org_apache_arrow_flatbuf_Binary_formal_args
#define __org_apache_arrow_flatbuf_Binary_call_args
static inline org_apache_arrow_flatbuf_Binary_ref_t org_apache_arrow_flatbuf_Binary_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Binary_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Binary, org_apache_arrow_flatbuf_Binary_file_identifier, org_apache_arrow_flatbuf_Binary_type_identifier)

#define __org_apache_arrow_flatbuf_LargeUtf8_formal_args
#define __org_apache_arrow_flatbuf_LargeUtf8_call_args
static inline org_apache_arrow_flatbuf_LargeUtf8_ref_t org_apache_arrow_flatbuf_LargeUtf8_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_LargeUtf8_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_LargeUtf8, org_apache_arrow_flatbuf_LargeUtf8_file_identifier, org_apache_arrow_flatbuf_LargeUtf8_type_identifier)

#define __org_apache_arrow_flatbuf_LargeBinary_formal_args
#define __org_apache_arrow_flatbuf_LargeBinary_call_args
static inline org_apache_arrow_flatbuf_LargeBinary_ref_t org_apache_arrow_flatbuf_LargeBinary_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_LargeBinary_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_LargeBinary, org_apache_arrow_flatbuf_LargeBinary_file_identifier, org_apache_arrow_flatbuf_LargeBinary_type_identifier)

#define __org_apache_arrow_flatbuf_FixedSizeBinary_formal_args , int32_t v0
#define __org_apache_arrow_flatbuf_FixedSizeBinary_call_args , v0
static inline org_apache_arrow_flatbuf_FixedSizeBinary_ref_t org_apache_arrow_flatbuf_FixedSizeBinary_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_FixedSizeBinary_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_FixedSizeBinary, org_apache_arrow_flatbuf_FixedSizeBinary_file_identifier, org_apache_arrow_flatbuf_FixedSizeBinary_type_identifier)

#define __org_apache_arrow_flatbuf_Bool_formal_args
#define __org_apache_arrow_flatbuf_Bool_call_args
static inline org_apache_arrow_flatbuf_Bool_ref_t org_apache_arrow_flatbuf_Bool_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Bool_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Bool, org_apache_arrow_flatbuf_Bool_file_identifier, org_apache_arrow_flatbuf_Bool_type_identifier)

#define __org_apache_arrow_flatbuf_RunEndEncoded_formal_args
#define __org_apache_arrow_flatbuf_RunEndEncoded_call_args
static inline org_apache_arrow_flatbuf_RunEndEncoded_ref_t org_apache_arrow_flatbuf_RunEndEncoded_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_RunEndEncoded_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_RunEndEncoded, org_apache_arrow_flatbuf_RunEndEncoded_file_identifier, org_apache_arrow_flatbuf_RunEndEncoded_type_identifier)

#define __org_apache_arrow_flatbuf_Decimal_formal_args , int32_t v0, int32_t v1, int32_t v2
#define __org_apache_arrow_flatbuf_Decimal_call_args , v0, v1, v2
static inline org_apache_arrow_flatbuf_Decimal_ref_t org_apache_arrow_flatbuf_Decimal_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Decimal_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Decimal, org_apache_arrow_flatbuf_Decimal_file_identifier, org_apache_arrow_flatbuf_Decimal_type_identifier)

#define __org_apache_arrow_flatbuf_Date_formal_args , org_apache_arrow_flatbuf_DateUnit_enum_t v0
#define __org_apache_arrow_flatbuf_Date_call_args , v0
static inline org_apache_arrow_flatbuf_Date_ref_t org_apache_arrow_flatbuf_Date_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Date_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Date, org_apache_arrow_flatbuf_Date_file_identifier, org_apache_arrow_flatbuf_Date_type_identifier)

#define __org_apache_arrow_flatbuf_Time_formal_args , org_apache_arrow_flatbuf_TimeUnit_enum_t v0, int32_t v1
#define __org_apache_arrow_flatbuf_Time_call_args , v0, v1
static inline org_apache_arrow_flatbuf_Time_ref_t org_apache_arrow_flatbuf_Time_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Time_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Time, org_apache_arrow_flatbuf_Time_file_identifier, org_apache_arrow_flatbuf_Time_type_identifier)

#define __org_apache_arrow_flatbuf_Timestamp_formal_args , org_apache_arrow_flatbuf_TimeUnit_enum_t v0, flatbuffers_string_ref_t v1
#define __org_apache_arrow_flatbuf_Timestamp_call_args , v0, v1
static inline org_apache_arrow_flatbuf_Timestamp_ref_t org_apache_arrow_flatbuf_Timestamp_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Timestamp_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Timestamp, org_apache_arrow_flatbuf_Timestamp_file_identifier, org_apache_arrow_flatbuf_Timestamp_type_identifier)

#define __org_apache_arrow_flatbuf_Interval_formal_args , org_apache_arrow_flatbuf_IntervalUnit_enum_t v0
#define __org_apache_arrow_flatbuf_Interval_call_args , v0
static inline org_apache_arrow_flatbuf_Interval_ref_t org_apache_arrow_flatbuf_Interval_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Interval_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Interval, org_apache_arrow_flatbuf_Interval_file_identifier, org_apache_arrow_flatbuf_Interval_type_identifier)

#define __org_apache_arrow_flatbuf_Duration_formal_args , org_apache_arrow_flatbuf_TimeUnit_enum_t v0
#define __org_apache_arrow_flatbuf_Duration_call_args , v0
static inline org_apache_arrow_flatbuf_Duration_ref_t org_apache_arrow_flatbuf_Duration_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Duration_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Duration, org_apache_arrow_flatbuf_Duration_file_identifier, org_apache_arrow_flatbuf_Duration_type_identifier)

#define __org_apache_arrow_flatbuf_KeyValue_formal_args , flatbuffers_string_ref_t v0, flatbuffers_string_ref_t v1
#define __org_apache_arrow_flatbuf_KeyValue_call_args , v0, v1
static inline org_apache_arrow_flatbuf_KeyValue_ref_t org_apache_arrow_flatbuf_KeyValue_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_KeyValue_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_KeyValue, org_apache_arrow_flatbuf_KeyValue_file_identifier, org_apache_arrow_flatbuf_KeyValue_type_identifier)

#define __org_apache_arrow_flatbuf_DictionaryEncoding_formal_args , int64_t v0, org_apache_arrow_flatbuf_Int_ref_t v1, flatbuffers_bool_t v2, org_apache_arrow_flatbuf_DictionaryKind_enum_t v3
#define __org_apache_arrow_flatbuf_DictionaryEncoding_call_args , v0, v1, v2, v3
static inline org_apache_arrow_flatbuf_DictionaryEncoding_ref_t org_apache_arrow_flatbuf_DictionaryEncoding_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_DictionaryEncoding_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_DictionaryEncoding, org_apache_arrow_flatbuf_DictionaryEncoding_file_identifier, org_apache_arrow_flatbuf_DictionaryEncoding_type_identifier)

#define __org_apache_arrow_flatbuf_Field_formal_args ,\
  flatbuffers_string_ref_t v0, flatbuffers_bool_t v1, org_apache_arrow_flatbuf_Type_union_ref_t v3, org_apache_arrow_flatbuf_DictionaryEncoding_ref_t v4, org_apache_arrow_flatbuf_Field_vec_ref_t v5, org_apache_arrow_flatbuf_KeyValue_vec_ref_t v6
#define __org_apache_arrow_flatbuf_Field_call_args ,\
  v0, v1, v3, v4, v5, v6
static inline org_apache_arrow_flatbuf_Field_ref_t org_apache_arrow_flatbuf_Field_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Field_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Field, org_apache_arrow_flatbuf_Field_file_identifier, org_apache_arrow_flatbuf_Field_type_identifier)

#define __org_apache_arrow_flatbuf_Schema_formal_args , org_apache_arrow_flatbuf_Endianness_enum_t v0, org_apache_arrow_flatbuf_Field_vec_ref_t v1, org_apache_arrow_flatbuf_KeyValue_vec_ref_t v2, org_apache_arrow_flatbuf_Feature_vec_ref_t v3
#define __org_apache_arrow_flatbuf_Schema_call_args , v0, v1, v2, v3
static inline org_apache_arrow_flatbuf_Schema_ref_t org_apache_arrow_flatbuf_Schema_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Schema_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Schema, org_apache_arrow_flatbuf_Schema_file_identifier, org_apache_arrow_flatbuf_Schema_type_identifier)

static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_NONE(void)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_NONE; uref.value = 0; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Null(org_apache_arrow_flatbuf_Null_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Null; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Int(org_apache_arrow_flatbuf_Int_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Int; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_FloatingPoint(org_apache_arrow_flatbuf_FloatingPoint_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_FloatingPoint; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Binary(org_apache_arrow_flatbuf_Binary_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Binary; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Utf8(org_apache_arrow_flatbuf_Utf8_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Utf8; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Bool(org_apache_arrow_flatbuf_Bool_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Bool; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Decimal(org_apache_arrow_flatbuf_Decimal_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Decimal; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Date(org_apache_arrow_flatbuf_Date_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Date; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Time(org_apache_arrow_flatbuf_Time_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Time; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Timestamp(org_apache_arrow_flatbuf_Timestamp_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Timestamp; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Interval(org_apache_arrow_flatbuf_Interval_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Interval; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_List(org_apache_arrow_flatbuf_List_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_List; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Struct_(org_apache_arrow_flatbuf_Struct__ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Struct_; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Union(org_apache_arrow_flatbuf_Union_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Union; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_FixedSizeBinary(org_apache_arrow_flatbuf_FixedSizeBinary_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_FixedSizeBinary; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_FixedSizeList(org_apache_arrow_flatbuf_FixedSizeList_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_FixedSizeList; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Map(org_apache_arrow_flatbuf_Map_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Map; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Duration(org_apache_arrow_flatbuf_Duration_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Duration; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_LargeBinary(org_apache_arrow_flatbuf_LargeBinary_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_LargeBinary; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_LargeUtf8(org_apache_arrow_flatbuf_LargeUtf8_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_LargeUtf8; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_LargeList(org_apache_arrow_flatbuf_LargeList_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_LargeList; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_RunEndEncoded(org_apache_arrow_flatbuf_RunEndEncoded_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_RunEndEncoded; uref.value = ref; return uref; }
__flatbuffers_build_union_vector(flatbuffers_, org_apache_arrow_flatbuf_Type)

static org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Type_union_t u)
{
    switch (u.type) {
    case 1: return org_apache_arrow_flatbuf_Type_as_Null(org_apache_arrow_flatbuf_Null_clone(B, (org_apache_arrow_flatbuf_Null_table_t)u.value));
    case 2: return org_apache_arrow_flatbuf_Type_as_Int(org_apache_arrow_flatbuf_Int_clone(B, (org_apache_arrow_flatbuf_Int_table_t)u.value));
    case 3: return org_apache_arrow_flatbuf_Type_as_FloatingPoint(org_apache_arrow_flatbuf_FloatingPoint_clone(B, (org_apache_arrow_flatbuf_FloatingPoint_table_t)u.value));
    case 4: return org_apache_arrow_flatbuf_Type_as_Binary(org_apache_arrow_flatbuf_Binary_clone(B, (org_apache_arrow_flatbuf_Binary_table_t)u.value));
    case 5: return org_apache_arrow_flatbuf_Type_as_Utf8(org_apache_arrow_flatbuf_Utf8_clone(B, (org_apache_arrow_flatbuf_Utf8_table_t)u.value));
    case 6: return org_apache_arrow_flatbuf_Type_as_Bool(org_apache_arrow_flatbuf_Bool_clone(B, (org_apache_arrow_flatbuf_Bool_table_t)u.value));
    case 7: return org_apache_arrow_flatbuf_Type_as_Decimal(org_apache_arrow_flatbuf_Decimal_clone(B, (org_apache_arrow_flatbuf_Decimal_table_t)u.value));
    case 8: return org_apache_arrow_flatbuf_Type_as_Date(org_apache_arrow_flatbuf_Date_clone(B, (org_apache_arrow_flatbuf_Date_table_t)u.value));
    case 9: return org_apache_arrow_flatbuf_Type_as_Time(org_apache_arrow_flatbuf_Time_clone(B, (org_apache_arrow_flatbuf_Time_table_t)u.value));
    case 10: return org_apache_arrow_flatbuf_Type_as_Timestamp(org_apache_arrow_flatbuf_Timestamp_clone(B, (org_apache_arrow_flatbuf_Timestamp_table_t)u.value));
    case 11: return org_apache_arrow_flatbuf_Type_as_Interval(org_apache_arrow_flatbuf_Interval_clone(B, (org_apache_arrow_flatbuf_Interval_table_t)u.value));
    case 12: return org_apache_arrow_flatbuf_Type_as_List(org_apache_arrow_flatbuf_List_clone(B, (org_apache_arrow_flatbuf_List_table_t)u.value));
    case 13: return org_apache_arrow_flatbuf_Type_as_Struct_(org_apache_arrow_flatbuf_Struct__clone(B, (org_apache_arrow_flatbuf_Struct__table_t)u.value));
    case 14: return org_apache_arrow_flatbuf_Type_as_Union(org_apache_arrow_flatbuf_Union_clone(B, (org_apache_arrow_flatbuf_Union_table_t)u.value));
    case 15: return org_apache_arrow_flatbuf_Type_as_FixedSizeBinary(org_apache_arrow_flatbuf_FixedSizeBinary_clone(B, (org_apache_arrow_flatbuf_FixedSizeBinary_table_t)u.value));
    case 16: return org_apache_arrow_flatbuf_Type_as_FixedSizeList(org_apache_arrow_flatbuf_FixedSizeList_clone(B, (org_apache_arrow_flatbuf_FixedSizeList_table_t)u.value));
    case 17: return org_apache_arrow_flatbuf_Type_as_Map(org_apache_arrow_flatbuf_Map_clone(B, (org_apache_arrow_flatbuf_Map_table_t)u.value));
    case 18: return org_apache_arrow_flatbuf_Type_as_Duration(org_apache_arrow_flatbuf_Duration_clone(B, (org_apache_arrow_flatbuf_Duration_table_t)u.value));
    case 19: return org_apache_arrow_flatbuf_Type_as_LargeBinary(org_apache_arrow_flatbuf_LargeBinary_clone(B, (org_apache_arrow_flatbuf_LargeBinary_table_t)u.value));
    case 20: return org_apache_arrow_flatbuf_Type_as_LargeUtf8(org_apache_arrow_flatbuf_LargeUtf8_clone(B, (org_apache_arrow_flatbuf_LargeUtf8_table_t)u.value));
    case 21: return org_apache_arrow_flatbuf_Type_as_LargeList(org_apache_arrow_flatbuf_LargeList_clone(B, (org_apache_arrow_flatbuf_LargeList_table_t)u.value));
    case 22: return org_apache_arrow_flatbuf_Type_as_RunEndEncoded(org_apache_arrow_flatbuf_RunEndEncoded_clone(B, (org_apache_arrow_flatbuf_RunEndEncoded_table_t)u.value));
    default: return org_apache_arrow_flatbuf_Type_as_NONE();
    }
}


static inline org_apache_arrow_flatbuf_Null_ref_t org_apache_arrow_flatbuf_Null_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Null_formal_args)
{
    if (org_apache_arrow_flatbuf_Null_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Null_end(B);
}

static org_apache_arrow_flatbuf_Null_ref_t org_apache_arrow_flatbuf_Null_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Null_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Null_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Null_end(B));
}


static inline org_apache_arrow_flatbuf_Struct__ref_t org_apache_arrow_flatbuf_Struct__create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Struct__formal_args)
{
    if (org_apache_arrow_flatbuf_Struct__start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Struct__end(B);
}

static org_apache_arrow_flatbuf_Struct__ref_t org_apache_arrow_flatbuf_Struct__clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Struct__table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Struct__start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Struct__end(B));
}


static inline org_apache_arrow_flatbuf_List_ref_t org_apache_arrow_flatbuf_List_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_List_formal_args)
{
    if (org_apache_arrow_flatbuf_List_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_List_end(B);
}

static org_apache_arrow_flatbuf_List_ref_t org_apache_arrow_flatbuf_List_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_List_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_List_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_List_end(B));
}


static inline org_apache_arrow_flatbuf_LargeList_ref_t org_apache_arrow_flatbuf_LargeList_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_LargeList_formal_args)
{
    if (org_apache_arrow_flatbuf_LargeList_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_LargeList_end(B);
}

static org_apache_arrow_flatbuf_LargeList_ref_t org_apache_arrow_flatbuf_LargeList_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_LargeList_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_LargeList_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_LargeList_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_FixedSizeList_listSize, flatbuffers_int32, int32_t, 4, 4, INT32_C(0), org_apache_arrow_flatbuf_FixedSizeList)

static inline org_apache_arrow_flatbuf_FixedSizeList_ref_t org_apache_arrow_flatbuf_FixedSizeList_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_FixedSizeList_formal_args)
{
    if (org_apache_arrow_flatbuf_FixedSizeList_start(B)
        || org_apache_arrow_flatbuf_FixedSizeList_listSize_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_FixedSizeList_end(B);
}

static org_apache_arrow_flatbuf_FixedSizeList_ref_t org_apache_arrow_flatbuf_FixedSizeList_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_FixedSizeList_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_FixedSizeList_start(B)
        || org_apache_arrow_flatbuf_FixedSizeList_listSize_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_FixedSizeList_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Map_keysSorted, flatbuffers_bool, flatbuffers_bool_t, 1, 1, UINT8_C(0), org_apache_arrow_flatbuf_Map)

static inline org_apache_arrow_flatbuf_Map_ref_t org_apache_arrow_flatbuf_Map_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Map_formal_args)
{
    if (org_apache_arrow_flatbuf_Map_start(B)
        || org_apache_arrow_flatbuf_Map_keysSorted_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Map_end(B);
}

static org_apache_arrow_flatbuf_Map_ref_t org_apache_arrow_flatbuf_Map_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Map_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Map_start(B)
        || org_apache_arrow_flatbuf_Map_keysSorted_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Map_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Union_mode, org_apache_arrow_flatbuf_UnionMode, org_apache_arrow_flatbuf_UnionMode_enum_t, 2, 2, INT16_C(0), org_apache_arrow_flatbuf_Union)
__flatbuffers_build_vector_field(1, flatbuffers_, org_apache_arrow_flatbuf_Union_typeIds, flatbuffers_int32, int32_t, org_apache_arrow_flatbuf_Union)

static inline org_apache_arrow_flatbuf_Union_ref_t org_apache_arrow_flatbuf_Union_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Union_formal_args)
{
    if (org_apache_arrow_flatbuf_Union_start(B)
        || org_apache_arrow_flatbuf_Union_typeIds_add(B, v1)
        || org_apache_arrow_flatbuf_Union_mode_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Union_end(B);
}

static org_apache_arrow_flatbuf_Union_ref_t org_apache_arrow_flatbuf_Union_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Union_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Union_start(B)
        || org_apache_arrow_flatbuf_Union_typeIds_pick(B, t)
        || org_apache_arrow_flatbuf_Union_mode_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Union_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Int_bitWidth, flatbuffers_int32, int32_t, 4, 4, INT32_C(0), org_apache_arrow_flatbuf_Int)
__flatbuffers_build_scalar_field(1, flatbuffers_, org_apache_arrow_flatbuf_Int_is_signed, flatbuffers_bool, flatbuffers_bool_t, 1, 1, UINT8_C(0), org_apache_arrow_flatbuf_Int)

static inline org_apache_arrow_flatbuf_Int_ref_t org_apache_arrow_flatbuf_Int_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Int_formal_args)
{
    if (org_apache_arrow_flatbuf_Int_start(B)
        || org_apache_arrow_flatbuf_Int_bitWidth_add(B, v0)
        || org_apache_arrow_flatbuf_Int_is_signed_add(B, v1)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Int_end(B);
}

static org_apache_arrow_flatbuf_Int_ref_t org_apache_arrow_flatbuf_Int_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Int_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Int_start(B)
        || org_apache_arrow_flatbuf_Int_bitWidth_pick(B, t)
        || org_apache_arrow_flatbuf_Int_is_signed_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Int_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_FloatingPoint_precision, org_apache_arrow_flatbuf_Precision, org_apache_arrow_flatbuf_Precision_enum_t, 2, 2, INT16_C(0), org_apache_arrow_flatbuf_FloatingPoint)

static inline org_apache_arrow_flatbuf_FloatingPoint_ref_t org_apache_arrow_flatbuf_FloatingPoint_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_FloatingPoint_formal_args)
{
    if (org_apache_arrow_flatbuf_FloatingPoint_start(B)
        || org_apache_arrow_flatbuf_FloatingPoint_precision_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_FloatingPoint_end(B);
}

static org_apache_arrow_flatbuf_FloatingPoint_ref_t org_apache_arrow_flatbuf_FloatingPoint_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_FloatingPoint_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_FloatingPoint_start(B)
        || org_apache_arrow_flatbuf_FloatingPoint_precision_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_FloatingPoint_end(B));
}


static inline org_apache_arrow_flatbuf_Utf8_ref_t org_apache_arrow_flatbuf_Utf8_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Utf8_formal_args)
{
    if (org_apache_arrow_flatbuf_Utf8_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Utf8_end(B);
}

static org_apache_arrow_flatbuf_Utf8_ref_t org_apache_arrow_flatbuf_Utf8_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Utf8_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Utf8_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Utf8_end(B));
}


static inline org_apache_arrow_flatbuf_Binary_ref_t org_apache_arrow_flatbuf_Binary_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Binary_formal_args)
{
    if (org_apache_arrow_flatbuf_Binary_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Binary_end(B);
}

static org_apache_arrow_flatbuf_Binary_ref_t org_apache_arrow_flatbuf_Binary_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Binary_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Binary_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Binary_end(B));
}


static inline org_apache_arrow_flatbuf_LargeUtf8_ref_t org_apache_arrow_flatbuf_LargeUtf8_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_LargeUtf8_formal_args)
{
    if (org_apache_arrow_flatbuf_LargeUtf8_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_LargeUtf8_end(B);
}

static org_apache_arrow_flatbuf_LargeUtf8_ref_t org_apache_arrow_flatbuf_LargeUtf8_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_LargeUtf8_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_LargeUtf8_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_LargeUtf8_end(B));
}


static inline org_apache_arrow_flatbuf_LargeBinary_ref_t org_apache_arrow_flatbuf_LargeBinary_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_LargeBinary_formal_args)
{
    if (org_apache_arrow_flatbuf_LargeBinary_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_LargeBinary_end(B);
}

static org_apache_arrow_flatbuf_LargeBinary_ref_t org_apache_arrow_flatbuf_LargeBinary_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_LargeBinary_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_LargeBinary_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_LargeBinary_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_FixedSizeBinary_byteWidth, flatbuffers_int32, int32_t, 4, 4, INT32_C(0), org_apache_arrow_flatbuf_FixedSizeBinary)

static inline org_apache_arrow_flatbuf_FixedSizeBinary_ref_t org_apache_arrow_flatbuf_FixedSizeBinary_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_FixedSizeBinary_formal_args)
{
    if (org_apache_arrow_flatbuf_FixedSizeBinary_start(B)
        || org_apache_arrow_flatbuf_FixedSizeBinary_byteWidth_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_FixedSizeBinary_end(B);
}

static org_apache_arrow_flatbuf_FixedSizeBinary_ref_t org_apache_arrow_flatbuf_FixedSizeBinary_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_FixedSizeBinary_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_FixedSizeBinary_start(B)
        || org_apache_arrow_flatbuf_FixedSizeBinary_byteWidth_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_FixedSizeBinary_end(B));
}


static inline org_apache_arrow_flatbuf_Bool_ref_t org_apache_arrow_flatbuf_Bool_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Bool_formal_args)
{
    if (org_apache_arrow_flatbuf_Bool_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Bool_end(B);
}

static org_apache_arrow_flatbuf_Bool_ref_t org_apache_arrow_flatbuf_Bool_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Bool_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Bool_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Bool_end(B));
}


static inline org_apache_arrow_flatbuf_RunEndEncoded_ref_t org_apache_arrow_flatbuf_RunEndEncoded_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_RunEndEncoded_formal_args)
{
    if (org_apache_arrow_flatbuf_RunEndEncoded_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_RunEndEncoded_end(B);
}

static org_apache_arrow_flatbuf_RunEndEncoded_ref_t org_apache_arrow_flatbuf_RunEndEncoded_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_RunEndEncoded_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_RunEndEncoded_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_RunEndEncoded_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Decimal_precision, flatbuffers_int32, int32_t, 4, 4, INT32_C(0), org_apache_arrow_flatbuf_Decimal)
__flatbuffers_build_scalar_field(1, flatbuffers_, org_apache_arrow_flatbuf_Decimal_scale, flatbuffers_int32, int32_t, 4, 4, INT32_C(0), org_apache_arrow_flatbuf_Decimal)
__flatbuffers_build_scalar_field(2, flatbuffers_, org_apache_arrow_flatbuf_Decimal_bitWidth, flatbuffers_int32, int32_t, 4, 4, INT32_C(128), org_apache_arrow_flatbuf_Decimal)

static inline org_apache_arrow_flatbuf_Decimal_ref_t org_apache_arrow_flatbuf_Decimal_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Decimal_formal_args)
{
    if (org_apache_arrow_flatbuf_Decimal_start(B)
        || org_apache_arrow_flatbuf_Decimal_precision_add(B, v0)
        || org_apache_arrow_flatbuf_Decimal_scale_add(B, v1)
        || org_apache_arrow_flatbuf_Decimal_bitWidth_add(B, v2)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Decimal_end(B);
}

static org_apache_arrow_flatbuf_Decimal_ref_t org_apache_arrow_flatbuf_Decimal_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Decimal_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Decimal_start(B)
        || org_apache_arrow_flatbuf_Decimal_precision_pick(B, t)
        || org_apache_arrow_flatbuf_Decimal_scale_pick(B, t)
        || org_apache_arrow_flatbuf_Decimal_bitWidth_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Decimal_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Date_unit, org_apache_arrow_flatbuf_DateUnit, org_apache_arrow_flatbuf_DateUnit_enum_t, 2, 2, INT16_C(1), org_apache_arrow_flatbuf_Date)

static inline org_apache_arrow_flatbuf_Date_ref_t org_apache_arrow_flatbuf_Date_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Date_formal_args)
{
    if (org_apache_arrow_flatbuf_Date_start(B)
        || org_apache_arrow_flatbuf_Date_unit_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Date_end(B);
}

static org_apache_arrow_flatbuf_Date_ref_t org_apache_arrow_flatbuf_Date_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Date_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Date_start(B)
        || org_apache_arrow_flatbuf_Date_unit_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Date_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Time_unit, org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t, 2, 2, INT16_C(1), org_apache_arrow_flatbuf_Time)
__flatbuffers_build_scalar_field(1, flatbuffers_, org_apache_arrow_flatbuf_Time_bitWidth, flatbuffers_int32, int32_t, 4, 4, INT32_C(32), org_apache_arrow_flatbuf_Time)

static inline org_apache_arrow_flatbuf_Time_ref_t org_apache_arrow_flatbuf_Time_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Time_formal_args)
{
    if (org_apache_arrow_flatbuf_Time_start(B)
        || org_apache_arrow_flatbuf_Time_bitWidth_add(B, v1)
        || org_apache_arrow_flatbuf_Time_unit_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Time_end(B);
}

static org_apache_arrow_flatbuf_Time_ref_t org_apache_arrow_flatbuf_Time_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Time_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Time_start(B)
        || org_apache_arrow_flatbuf_Time_bitWidth_pick(B, t)
        || org_apache_arrow_flatbuf_Time_unit_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Time_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Timestamp_unit, org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t, 2, 2, INT16_C(0), org_apache_arrow_flatbuf_Timestamp)
__flatbuffers_build_string_field(1, flatbuffers_, org_apache_arrow_flatbuf_Timestamp_timezone, org_apache_arrow_flatbuf_Timestamp)

static inline org_apache_arrow_flatbuf_Timestamp_ref_t org_apache_arrow_flatbuf_Timestamp_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Timestamp_formal_args)
{
    if (org_apache_arrow_flatbuf_Timestamp_start(B)
        || org_apache_arrow_flatbuf_Timestamp_timezone_add(B, v1)
        || org_apache_arrow_flatbuf_Timestamp_unit_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Timestamp_end(B);
}

static org_apache_arrow_flatbuf_Timestamp_ref_t org_apache_arrow_flatbuf_Timestamp_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Timestamp_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Timestamp_start(B)
        || org_apache_arrow_flatbuf_Timestamp_timezone_pick(B, t)
        || org_apache_arrow_flatbuf_Timestamp_unit_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Timestamp_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Interval_unit, org_apache_arrow_flatbuf_IntervalUnit, org_apache_arrow_flatbuf_IntervalUnit_enum_t, 2, 2, INT16_C(0), org_apache_arrow_flatbuf_Interval)

static inline org_apache_arrow_flatbuf_Interval_ref_t org_apache_arrow_flatbuf_Interval_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Interval_formal_args)
{
    if (org_apache_arrow_flatbuf_Interval_start(B)
        || org_apache_arrow_flatbuf_Interval_unit_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Interval_end(B);
}

static org_apache_arrow_flatbuf_Interval_ref_t org_apache_arrow_flatbuf_Interval_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Interval_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Interval_start(B)
        || org_apache_arrow_flatbuf_Interval_unit_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Interval_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Duration_unit, org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t, 2, 2, INT16_C(1), org_apache_arrow_flatbuf_Duration)

static inline org_apache_arrow_flatbuf_Duration_ref_t org_apache_arrow_flatbuf_Duration_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Duration_formal_args)
{
    if (org_apache_arrow_flatbuf_Duration_start(B)
        || org_apache_arrow_flatbuf_Duration_unit_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Duration_end(B);
}

static org_apache_arrow_flatbuf_Duration_ref_t org_apache_arrow_flatbuf_Duration_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Duration_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Duration_start(B)
        || org_apache_arrow_flatbuf_Duration_unit_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Duration_end(B));
}

__flatbuffers_build_string_field(0, flatbuffers_, org_apache_arrow_flatbuf_KeyValue_key, org_apache_arrow_flatbuf_KeyValue)
__flatbuffers_build_string_field(1, flatbuffers_, org_apache_arrow_flatbuf_KeyValue_value, org_apache_arrow_flatbuf_KeyValue)

static inline org_apache_arrow_flatbuf_KeyValue_ref_t org_apache_arrow_flatbuf_KeyValue_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_KeyValue_formal_args)
{
    if (org_apache_arrow_flatbuf_KeyValue_start(B)
        || org_apache_arrow_flatbuf_KeyValue_key_add(B, v0)
        || org_apache_arrow_flatbuf_KeyValue_value_add(B, v1)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_KeyValue_end(B);
}

static org_apache_arrow_flatbuf_KeyValue_ref_t org_apache_arrow_flatbuf_KeyValue_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_KeyValue_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_KeyValue_start(B)
        || org_apache_arrow_flatbuf_KeyValue_key_pick(B, t)
        || org_apache_arrow_flatbuf_KeyValue_value_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_KeyValue_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_DictionaryEncoding_id, flatbuffers_int64, int64_t, 8, 8, INT64_C(0), org_apache_arrow_flatbuf_DictionaryEncoding)
__flatbuffers_build_table_field(1, flatbuffers_, org_apache_arrow_flatbuf_DictionaryEncoding_indexType, org_apache_arrow_flatbuf_Int, org_apache_arrow_flatbuf_DictionaryEncoding)
__flatbuffers_build_scalar_field(2, flatbuffers_, org_apache_arrow_flatbuf_DictionaryEncoding_isOrdered, flatbuffers_bool, flatbuffers_bool_t, 1, 1, UINT8_C(0), org_apache_arrow_flatbuf_DictionaryEncoding)
__flatbuffers_build_scalar_field(3, flatbuffers_, org_apache_arrow_flatbuf_DictionaryEncoding_dictionaryKind, org_apache_arrow_flatbuf_DictionaryKind, org_apache_arrow_flatbuf_DictionaryKind_enum_t, 2, 2, INT16_C(0), org_apache_arrow_flatbuf_DictionaryEncoding)

static inline org_apache_arrow_flatbuf_DictionaryEncoding_ref_t org_apache_arrow_flatbuf_DictionaryEncoding_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_DictionaryEncoding_formal_args)
{
    if (org_apache_arrow_flatbuf_DictionaryEncoding_start(B)
        || org_apache_arrow_flatbuf_DictionaryEncoding_id_add(B, v0)
        || org_apache_arrow_flatbuf_DictionaryEncoding_indexType_add(B, v1)
        || org_apache_arrow_flatbuf_DictionaryEncoding_dictionaryKind_add(B, v3)
        || org_apache_arrow_flatbuf_DictionaryEncoding_isOrdered_add(B, v2)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_DictionaryEncoding_end(B);
}

static org_apache_arrow_flatbuf_DictionaryEncoding_ref_t org_apache_arrow_flatbuf_DictionaryEncoding_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_DictionaryEncoding_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_DictionaryEncoding_start(B)
        || org_apache_arrow_flatbuf_DictionaryEncoding_id_pick(B, t)
        || org_apache_arrow_flatbuf_DictionaryEncoding_indexType_pick(B, t)
        || org_apache_arrow_flatbuf_DictionaryEncoding_dictionaryKind_pick(B, t)
        || org_apache_arrow_flatbuf_DictionaryEncoding_isOrdered_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_DictionaryEncoding_end(B));
}

__flatbuffers_build_string_field(0, flatbuffers_, org_apache_arrow_flatbuf_Field_name, org_apache_arrow_flatbuf_Field)
__flatbuffers_build_scalar_field(1, flatbuffers_, org_apache_arrow_flatbuf_Field_nullable, flatbuffers_bool, flatbuffers_bool_t, 1, 1, UINT8_C(0), org_apache_arrow_flatbuf_Field)
__flatbuffers_build_union_field(3, flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, org_apache_arrow_flatbuf_Field)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Null, org_apache_arrow_flatbuf_Null)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Int, org_apache_arrow_flatbuf_Int)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, FloatingPoint, org_apache_arrow_flatbuf_FloatingPoint)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Binary, org_apache_arrow_flatbuf_Binary)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Utf8, org_apache_arrow_flatbuf_Utf8)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Bool, org_apache_arrow_flatbuf_Bool)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Decimal, org_apache_arrow_flatbuf_Decimal)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Date, org_apache_arrow_flatbuf_Date)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Time, org_apache_arrow_flatbuf_Time)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Timestamp, org_apache_arrow_flatbuf_Timestamp)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Interval, org_apache_arrow_flatbuf_Interval)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, List, org_apache_arrow_flatbuf_List)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Struct_, org_apache_arrow_flatbuf_Struct_)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Union, org_apache_arrow_flatbuf_Union)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, FixedSizeBinary, org_apache_arrow_flatbuf_FixedSizeBinary)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, FixedSizeList, org_apache_arrow_flatbuf_FixedSizeList)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Map, org_apache_arrow_flatbuf_Map)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Duration, org_apache_arrow_flatbuf_Duration)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, LargeBinary, org_apache_arrow_flatbuf_LargeBinary)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, LargeUtf8, org_apache_arrow_flatbuf_LargeUtf8)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, LargeList, org_apache_arrow_flatbuf_LargeList)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, RunEndEncoded, org_apache_arrow_flatbuf_RunEndEncoded)
__flatbuffers_build_table_field(4, flatbuffers_, org_apache_arrow_flatbuf_Field_dictionary, org_apache_arrow_flatbuf_DictionaryEncoding, org_apache_arrow_flatbuf_Field)
__flatbuffers_build_table_vector_field(5, flatbuffers_, org_apache_arrow_flatbuf_Field_children, org_apache_arrow_flatbuf_Field, org_apache_arrow_flatbuf_Field)
__flatbuffers_build_table_vector_field(6, flatbuffers_, org_apache_arrow_flatbuf_Field_custom_metadata, org_apache_arrow_flatbuf_KeyValue, org_apache_arrow_flatbuf_Field)

static inline org_apache_arrow_flatbuf_Field_ref_t org_apache_arrow_flatbuf_Field_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Field_formal_args)
{
    if (org_apache_arrow_flatbuf_Field_start(B)
        || org_apache_arrow_flatbuf_Field_name_add(B, v0)
        || org_apache_arrow_flatbuf_Field_type_add_value(B, v3)
        || org_apache_arrow_flatbuf_Field_dictionary_add(B, v4)
        || org_apache_arrow_flatbuf_Field_children_add(B, v5)
        || org_apache_arrow_flatbuf_Field_custom_metadata_add(B, v6)
        || org_apache_arrow_flatbuf_Field_nullable_add(B, v1)
        || org_apache_arrow_flatbuf_Field_type_add_type(B, v3.type)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Field_end(B);
}

static org_apache_arrow_flatbuf_Field_ref_t org_apache_arrow_flatbuf_Field_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Field_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Field_start(B)
        || org_apache_arrow_flatbuf_Field_name_pick(B, t)
        || org_apache_arrow_flatbuf_Field_type_pick(B, t)
        || org_apache_arrow_flatbuf_Field_dictionary_pick(B, t)
        || org_apache_arrow_flatbuf_Field_children_pick(B, t)
        || org_apache_arrow_flatbuf_Field_custom_metadata_pick(B, t)
        || org_apache_arrow_flatbuf_Field_nullable_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Field_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Schema_endianness, org_apache_arrow_flatbuf_Endianness, org_apache_arrow_flatbuf_Endianness_enum_t, 2, 2, INT16_C(0), org_apache_arrow_flatbuf_Schema)
__flatbuffers_build_table_vector_field(1, flatbuffers_, org_apache_arrow_flatbuf_Schema_fields, org_apache_arrow_flatbuf_Field, org_apache_arrow_flatbuf_Schema)
__flatbuffers_build_table_vector_field(2, flatbuffers_, org_apache_arrow_flatbuf_Schema_custom_metadata, org_apache_arrow_flatbuf_KeyValue, org_apache_arrow_flatbuf_Schema)
__flatbuffers_build_vector_field(3, flatbuffers_, org_apache_arrow_flatbuf_Schema_features, org_apache_arrow_flatbuf_Feature, org_apache_arrow_flatbuf_Feature_enum_t, org_apache_arrow_flatbuf_Schema)

static inline org_apache_arrow_flatbuf_Schema_ref_t org_apache_arrow_flatbuf_Schema_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Schema_formal_args)
{
    if (org_apache_arrow_flatbuf_Schema_start(B)
        || org_apache_arrow_flatbuf_Schema_fields_add(B, v1)
        || org_apache_arrow_flatbuf_Schema_custom_metadata_add(B, v2)
        || org_apache_arrow_flatbuf_Schema_features_add(B, v3)
        || org_apache_arrow_flatbuf_Schema_endianness_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Schema_end(B);
}

static org_apache_arrow_flatbuf_Schema_ref_t org_apache_arrow_flatbuf_Schema_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Schema_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Schema_start(B)
        || org_apache_arrow_flatbuf_Schema_fields_pick(B, t)
        || org_apache_arrow_flatbuf_Schema_custom_metadata_pick(B, t)
        || org_apache_arrow_flatbuf_Schema_features_pick(B, t)
        || org_apache_arrow_flatbuf_Schema_endianness_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Schema_end(B));
}

#include "flatcc/flatcc_epilogue.h"
#endif /* SCHEMA_BUILDER_H */
#ifndef SCHEMA_VERIFIER_H
#define SCHEMA_VERIFIER_H

/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

#ifndef SCHEMA_READER_H
#include "Schema_reader.h"
#endif
#include "flatcc/flatcc_verifier.h"
#include "flatcc/flatcc_prologue.h"

static int org_apache_arrow_flatbuf_Null_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Struct__verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_List_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_LargeList_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_FixedSizeList_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Map_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Union_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Int_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_FloatingPoint_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Utf8_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Binary_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_LargeUtf8_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_LargeBinary_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_FixedSizeBinary_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Bool_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_RunEndEncoded_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Decimal_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Date_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Time_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Timestamp_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Interval_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Duration_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_KeyValue_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_DictionaryEncoding_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Field_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Schema_verify_table(flatcc_table_verifier_descriptor_t *td);

static int org_apache_arrow_flatbuf_Type_union_verifier(flatcc_union_verifier_descriptor_t *ud)
{
    switch (ud->type) {
    case 1: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Null_verify_table); /* Null */
    case 2: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Int_verify_table); /* Int */
    case 3: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_FloatingPoint_verify_table); /* FloatingPoint */
    case 4: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Binary_verify_table); /* Binary */
    case 5: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Utf8_verify_table); /* Utf8 */
    case 6: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Bool_verify_table); /* Bool */
    case 7: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Decimal_verify_table); /* Decimal */
    case 8: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Date_verify_table); /* Date */
    case 9: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Time_verify_table); /* Time */
    case 10: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Timestamp_verify_table); /* Timestamp */
    case 11: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Interval_verify_table); /* Interval */
    case 12: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_List_verify_table); /* List */
    case 13: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Struct__verify_table); /* Struct_ */
    case 14: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Union_verify_table); /* Union */
    case 15: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_FixedSizeBinary_verify_table); /* FixedSizeBinary */
    case 16: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_FixedSizeList_verify_table); /* FixedSizeList */
    case 17: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Map_verify_table); /* Map */
    case 18: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Duration_verify_table); /* Duration */
    case 19: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_LargeBinary_verify_table); /* LargeBinary */
    case 20: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_LargeUtf8_verify_table); /* LargeUtf8 */
    case 21: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_LargeList_verify_table); /* LargeList */
    case 22: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_RunEndEncoded_verify_table); /* RunEndEncoded */
    default: return flatcc_verify_ok;
    }
}

static inline int org_apache_arrow_flatbuf_Buffer_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_struct_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Buffer_identifier, 16, 8);
}

static inline int org_apache_arrow_flatbuf_Buffer_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_struct_as_typed_root(buf, bufsiz, org_apache_arrow_flatbuf_Buffer_type_hash, 16, 8);
}

static inline int org_apache_arrow_flatbuf_Buffer_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_struct_as_typed_root(buf, bufsiz, thash, 16, 8);
}

static inline int org_apache_arrow_flatbuf_Buffer_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_struct_as_root(buf, bufsiz, fid, 16, 8);
}

static int org_apache_arrow_flatbuf_Null_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Null_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Null_identifier, &org_apache_arrow_flatbuf_Null_verify_table);
}

static inline int org_apache_arrow_flatbuf_Null_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Null_type_identifier, &org_apache_arrow_flatbuf_Null_verify_table);
}

static inline int org_apache_arrow_flatbuf_Null_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Null_verify_table);
}

static inline int org_apache_arrow_flatbuf_Null_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Null_verify_table);
}

static int org_apache_arrow_flatbuf_Struct__verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Struct__verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Struct__identifier, &org_apache_arrow_flatbuf_Struct__verify_table);
}

static inline int org_apache_arrow_flatbuf_Struct__verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Struct__type_identifier, &org_apache_arrow_flatbuf_Struct__verify_table);
}

static inline int org_apache_arrow_flatbuf_Struct__verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Struct__verify_table);
}

static inline int org_apache_arrow_flatbuf_Struct__verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Struct__verify_table);
}

static int org_apache_arrow_flatbuf_List_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_List_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_List_identifier, &org_apache_arrow_flatbuf_List_verify_table);
}

static inline int org_apache_arrow_flatbuf_List_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_List_type_identifier, &org_apache_arrow_flatbuf_List_verify_table);
}

static inline int org_apache_arrow_flatbuf_List_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_List_verify_table);
}

static inline int org_apache_arrow_flatbuf_List_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_List_verify_table);
}

static int org_apache_arrow_flatbuf_LargeList_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_LargeList_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_LargeList_identifier, &org_apache_arrow_flatbuf_LargeList_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeList_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_LargeList_type_identifier, &org_apache_arrow_flatbuf_LargeList_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeList_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_LargeList_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeList_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_LargeList_verify_table);
}

static int org_apache_arrow_flatbuf_FixedSizeList_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 4, 4) /* listSize */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_FixedSizeList_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_FixedSizeList_identifier, &org_apache_arrow_flatbuf_FixedSizeList_verify_table);
}

static inline int org_apache_arrow_flatbuf_FixedSizeList_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_FixedSizeList_type_identifier, &org_apache_arrow_flatbuf_FixedSizeList_verify_table);
}

static inline int org_apache_arrow_flatbuf_FixedSizeList_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_FixedSizeList_verify_table);
}

static inline int org_apache_arrow_flatbuf_FixedSizeList_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_FixedSizeList_verify_table);
}

static int org_apache_arrow_flatbuf_Map_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 1, 1) /* keysSorted */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Map_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Map_identifier, &org_apache_arrow_flatbuf_Map_verify_table);
}

static inline int org_apache_arrow_flatbuf_Map_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Map_type_identifier, &org_apache_arrow_flatbuf_Map_verify_table);
}

static inline int org_apache_arrow_flatbuf_Map_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Map_verify_table);
}

static inline int org_apache_arrow_flatbuf_Map_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Map_verify_table);
}

static int org_apache_arrow_flatbuf_Union_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* mode */)) return ret;
    if ((ret = flatcc_verify_vector_field(td, 1, 0, 4, 4, INT64_C(1073741823)) /* typeIds */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Union_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Union_identifier, &org_apache_arrow_flatbuf_Union_verify_table);
}

static inline int org_apache_arrow_flatbuf_Union_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Union_type_identifier, &org_apache_arrow_flatbuf_Union_verify_table);
}

static inline int org_apache_arrow_flatbuf_Union_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Union_verify_table);
}

static inline int org_apache_arrow_flatbuf_Union_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Union_verify_table);
}

static int org_apache_arrow_flatbuf_Int_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 4, 4) /* bitWidth */)) return ret;
    if ((ret = flatcc_verify_field(td, 1, 1, 1) /* is_signed */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Int_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Int_identifier, &org_apache_arrow_flatbuf_Int_verify_table);
}

static inline int org_apache_arrow_flatbuf_Int_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Int_type_identifier, &org_apache_arrow_flatbuf_Int_verify_table);
}

static inline int org_apache_arrow_flatbuf_Int_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Int_verify_table);
}

static inline int org_apache_arrow_flatbuf_Int_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Int_verify_table);
}

static int org_apache_arrow_flatbuf_FloatingPoint_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* precision */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_FloatingPoint_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_FloatingPoint_identifier, &org_apache_arrow_flatbuf_FloatingPoint_verify_table);
}

static inline int org_apache_arrow_flatbuf_FloatingPoint_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_FloatingPoint_type_identifier, &org_apache_arrow_flatbuf_FloatingPoint_verify_table);
}

static inline int org_apache_arrow_flatbuf_FloatingPoint_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_FloatingPoint_verify_table);
}

static inline int org_apache_arrow_flatbuf_FloatingPoint_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_FloatingPoint_verify_table);
}

static int org_apache_arrow_flatbuf_Utf8_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Utf8_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Utf8_identifier, &org_apache_arrow_flatbuf_Utf8_verify_table);
}

static inline int org_apache_arrow_flatbuf_Utf8_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Utf8_type_identifier, &org_apache_arrow_flatbuf_Utf8_verify_table);
}

static inline int org_apache_arrow_flatbuf_Utf8_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Utf8_verify_table);
}

static inline int org_apache_arrow_flatbuf_Utf8_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Utf8_verify_table);
}

static int org_apache_arrow_flatbuf_Binary_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Binary_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Binary_identifier, &org_apache_arrow_flatbuf_Binary_verify_table);
}

static inline int org_apache_arrow_flatbuf_Binary_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Binary_type_identifier, &org_apache_arrow_flatbuf_Binary_verify_table);
}

static inline int org_apache_arrow_flatbuf_Binary_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Binary_verify_table);
}

static inline int org_apache_arrow_flatbuf_Binary_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Binary_verify_table);
}

static int org_apache_arrow_flatbuf_LargeUtf8_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_LargeUtf8_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_LargeUtf8_identifier, &org_apache_arrow_flatbuf_LargeUtf8_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeUtf8_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_LargeUtf8_type_identifier, &org_apache_arrow_flatbuf_LargeUtf8_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeUtf8_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_LargeUtf8_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeUtf8_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_LargeUtf8_verify_table);
}

static int org_apache_arrow_flatbuf_LargeBinary_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_LargeBinary_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_LargeBinary_identifier, &org_apache_arrow_flatbuf_LargeBinary_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeBinary_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_LargeBinary_type_identifier, &org_apache_arrow_flatbuf_LargeBinary_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeBinary_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_LargeBinary_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeBinary_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_LargeBinary_verify_table);
}

static int org_apache_arrow_flatbuf_FixedSizeBinary_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 4, 4) /* byteWidth */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_FixedSizeBinary_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_FixedSizeBinary_identifier, &org_apache_arrow_flatbuf_FixedSizeBinary_verify_table);
}

static inline int org_apache_arrow_flatbuf_FixedSizeBinary_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_FixedSizeBinary_type_identifier, &org_apache_arrow_flatbuf_FixedSizeBinary_verify_table);
}

static inline int org_apache_arrow_flatbuf_FixedSizeBinary_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_FixedSizeBinary_verify_table);
}

static inline int org_apache_arrow_flatbuf_FixedSizeBinary_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_FixedSizeBinary_verify_table);
}

static int org_apache_arrow_flatbuf_Bool_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Bool_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Bool_identifier, &org_apache_arrow_flatbuf_Bool_verify_table);
}

static inline int org_apache_arrow_flatbuf_Bool_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Bool_type_identifier, &org_apache_arrow_flatbuf_Bool_verify_table);
}

static inline int org_apache_arrow_flatbuf_Bool_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Bool_verify_table);
}

static inline int org_apache_arrow_flatbuf_Bool_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Bool_verify_table);
}

static int org_apache_arrow_flatbuf_RunEndEncoded_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_RunEndEncoded_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_RunEndEncoded_identifier, &org_apache_arrow_flatbuf_RunEndEncoded_verify_table);
}

static inline int org_apache_arrow_flatbuf_RunEndEncoded_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_RunEndEncoded_type_identifier, &org_apache_arrow_flatbuf_RunEndEncoded_verify_table);
}

static inline int org_apache_arrow_flatbuf_RunEndEncoded_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_RunEndEncoded_verify_table);
}

static inline int org_apache_arrow_flatbuf_RunEndEncoded_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_RunEndEncoded_verify_table);
}

static int org_apache_arrow_flatbuf_Decimal_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 4, 4) /* precision */)) return ret;
    if ((ret = flatcc_verify_field(td, 1, 4, 4) /* scale */)) return ret;
    if ((ret = flatcc_verify_field(td, 2, 4, 4) /* bitWidth */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Decimal_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Decimal_identifier, &org_apache_arrow_flatbuf_Decimal_verify_table);
}

static inline int org_apache_arrow_flatbuf_Decimal_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Decimal_type_identifier, &org_apache_arrow_flatbuf_Decimal_verify_table);
}

static inline int org_apache_arrow_flatbuf_Decimal_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Decimal_verify_table);
}

static inline int org_apache_arrow_flatbuf_Decimal_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Decimal_verify_table);
}

static int org_apache_arrow_flatbuf_Date_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* unit */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Date_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Date_identifier, &org_apache_arrow_flatbuf_Date_verify_table);
}

static inline int org_apache_arrow_flatbuf_Date_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Date_type_identifier, &org_apache_arrow_flatbuf_Date_verify_table);
}

static inline int org_apache_arrow_flatbuf_Date_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Date_verify_table);
}

static inline int org_apache_arrow_flatbuf_Date_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Date_verify_table);
}

static int org_apache_arrow_flatbuf_Time_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* unit */)) return ret;
    if ((ret = flatcc_verify_field(td, 1, 4, 4) /* bitWidth */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Time_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Time_identifier, &org_apache_arrow_flatbuf_Time_verify_table);
}

static inline int org_apache_arrow_flatbuf_Time_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Time_type_identifier, &org_apache_arrow_flatbuf_Time_verify_table);
}

static inline int org_apache_arrow_flatbuf_Time_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Time_verify_table);
}

static inline int org_apache_arrow_flatbuf_Time_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Time_verify_table);
}

static int org_apache_arrow_flatbuf_Timestamp_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* unit */)) return ret;
    if ((ret = flatcc_verify_string_field(td, 1, 0) /* timezone */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Timestamp_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Timestamp_identifier, &org_apache_arrow_flatbuf_Timestamp_verify_table);
}

static inline int org_apache_arrow_flatbuf_Timestamp_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Timestamp_type_identifier, &org_apache_arrow_flatbuf_Timestamp_verify_table);
}

static inline int org_apache_arrow_flatbuf_Timestamp_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Timestamp_verify_table);
}

static inline int org_apache_arrow_flatbuf_Timestamp_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Timestamp_verify_table);
}

static int org_apache_arrow_flatbuf_Interval_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* unit */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Interval_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Interval_identifier, &org_apache_arrow_flatbuf_Interval_verify_table);
}

static inline int org_apache_arrow_flatbuf_Interval_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Interval_type_identifier, &org_apache_arrow_flatbuf_Interval_verify_table);
}

static inline int org_apache_arrow_flatbuf_Interval_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Interval_verify_table);
}

static inline int org_apache_arrow_flatbuf_Interval_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Interval_verify_table);
}

static int org_apache_arrow_flatbuf_Duration_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* unit */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Duration_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Duration_identifier, &org_apache_arrow_flatbuf_Duration_verify_table);
}

static inline int org_apache_arrow_flatbuf_Duration_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Duration_type_identifier, &org_apache_arrow_flatbuf_Duration_verify_table);
}

static inline int org_apache_arrow_flatbuf_Duration_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Duration_verify_table);
}

static inline int org_apache_arrow_flatbuf_Duration_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Duration_verify_table);
}

static int org_apache_arrow_flatbuf_KeyValue_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_string_field(td, 0, 0) /* key */)) return ret;
    if ((ret = flatcc_verify_string_field(td, 1, 0) /* value */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_KeyValue_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_KeyValue_identifier, &org_apache_arrow_flatbuf_KeyValue_verify_table);
}

static inline int org_apache_arrow_flatbuf_KeyValue_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_KeyValue_type_identifier, &org_apache_arrow_flatbuf_KeyValue_verify_table);
}

static inline int org_apache_arrow_flatbuf_KeyValue_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_KeyValue_verify_table);
}

static inline int org_apache_arrow_flatbuf_KeyValue_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_KeyValue_verify_table);
}

static int org_apache_arrow_flatbuf_DictionaryEncoding_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 8, 8) /* id */)) return ret;
    if ((ret = flatcc_verify_table_field(td, 1, 0, &org_apache_arrow_flatbuf_Int_verify_table) /* indexType */)) return ret;
    if ((ret = flatcc_verify_field(td, 2, 1, 1) /* isOrdered */)) return ret;
    if ((ret = flatcc_verify_field(td, 3, 2, 2) /* dictionaryKind */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_DictionaryEncoding_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_DictionaryEncoding_identifier, &org_apache_arrow_flatbuf_DictionaryEncoding_verify_table);
}

static inline int org_apache_arrow_flatbuf_DictionaryEncoding_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_DictionaryEncoding_type_identifier, &org_apache_arrow_flatbuf_DictionaryEncoding_verify_table);
}

static inline int org_apache_arrow_flatbuf_DictionaryEncoding_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_DictionaryEncoding_verify_table);
}

static inline int org_apache_arrow_flatbuf_DictionaryEncoding_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_DictionaryEncoding_verify_table);
}

static int org_apache_arrow_flatbuf_Field_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_string_field(td, 0, 0) /* name */)) return ret;
    if ((ret = flatcc_verify_field(td, 1, 1, 1) /* nullable */)) return ret;
    if ((ret = flatcc_verify_union_field(td, 3, 0, &org_apache_arrow_flatbuf_Type_union_verifier) /* type */)) return ret;
    if ((ret = flatcc_verify_table_field(td, 4, 0, &org_apache_arrow_flatbuf_DictionaryEncoding_verify_table) /* dictionary */)) return ret;
    if ((ret = flatcc_verify_table_vector_field(td, 5, 0, &org_apache_arrow_flatbuf_Field_verify_table) /* children */)) return ret;
    if ((ret = flatcc_verify_table_vector_field(td, 6, 0, &org_apache_arrow_flatbuf_KeyValue_verify_table) /* custom_metadata */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Field_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Field_identifier, &org_apache_arrow_flatbuf_Field_verify_table);
}

static inline int org_apache_arrow_flatbuf_Field_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Field_type_identifier, &org_apache_arrow_flatbuf_Field_verify_table);
}

static inline int org_apache_arrow_flatbuf_Field_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Field_verify_table);
}

static inline int org_apache_arrow_flatbuf_Field_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Field_verify_table);
}

static int org_apache_arrow_flatbuf_Schema_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* endianness */)) return ret;
    if ((ret = flatcc_verify_table_vector_field(td, 1, 0, &org_apache_arrow_flatbuf_Field_verify_table) /* fields */)) return ret;
    if ((ret = flatcc_verify_table_vector_field(td, 2, 0, &org_apache_arrow_flatbuf_KeyValue_verify_table) /* custom_metadata */)) return ret;
    if ((ret = flatcc_verify_vector_field(td, 3, 0, 8, 8, INT64_C(536870911)) /* features */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Schema_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Schema_identifier, &org_apache_arrow_flatbuf_Schema_verify_table);
}

static inline int org_apache_arrow_flatbuf_Schema_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Schema_type_identifier, &org_apache_arrow_flatbuf_Schema_verify_table);
}

static inline int org_apache_arrow_flatbuf_Schema_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Schema_verify_table);
}

static inline int org_apache_arrow_flatbuf_Schema_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Schema_verify_table);
}

#include "flatcc/flatcc_epilogue.h"
#endif /* SCHEMA_VERIFIER_H */
#ifndef FILE_READER_H
#define FILE_READER_H

/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

#ifndef FLATBUFFERS_COMMON_READER_H
#include "flatbuffers_common_reader.h"
#endif
#ifndef SCHEMA_READER_H
#include "Schema_reader.h"
#endif
#include "flatcc/flatcc_flatbuffers.h"
#ifndef __alignas_is_defined
#include <stdalign.h>
#endif
#include "flatcc/flatcc_prologue.h"
#ifndef flatbuffers_identifier
#define flatbuffers_identifier 0
#endif
#ifndef flatbuffers_extension
#define flatbuffers_extension "bin"
#endif

typedef struct org_apache_arrow_flatbuf_Block org_apache_arrow_flatbuf_Block_t;
typedef const org_apache_arrow_flatbuf_Block_t *org_apache_arrow_flatbuf_Block_struct_t;
typedef org_apache_arrow_flatbuf_Block_t *org_apache_arrow_flatbuf_Block_mutable_struct_t;
typedef const org_apache_arrow_flatbuf_Block_t *org_apache_arrow_flatbuf_Block_vec_t;
typedef org_apache_arrow_flatbuf_Block_t *org_apache_arrow_flatbuf_Block_mutable_vec_t;

typedef const struct org_apache_arrow_flatbuf_Footer_table *org_apache_arrow_flatbuf_Footer_table_t;
typedef struct org_apache_arrow_flatbuf_Footer_table *org_apache_arrow_flatbuf_Footer_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Footer_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Footer_mutable_vec_t;
#ifndef org_apache_arrow_flatbuf_Footer_file_identifier
#define org_apache_arrow_flatbuf_Footer_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Footer_file_identifier */
#ifndef org_apache_arrow_flatbuf_Footer_identifier
#define org_apache_arrow_flatbuf_Footer_identifier 0
#endif
#define org_apache_arrow_flatbuf_Footer_type_hash ((flatbuffers_thash_t)0x65df4be3)
#define org_apache_arrow_flatbuf_Footer_type_identifier "\xe3\x4b\xdf\x65"
#ifndef org_apache_arrow_flatbuf_Footer_file_extension
#define org_apache_arrow_flatbuf_Footer_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Block_file_identifier
#define org_apache_arrow_flatbuf_Block_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Block_file_identifier */
#ifndef org_apache_arrow_flatbuf_Block_identifier
#define org_apache_arrow_flatbuf_Block_identifier 0
#endif
#define org_apache_arrow_flatbuf_Block_type_hash ((flatbuffers_thash_t)0xdc6d4841)
#define org_apache_arrow_flatbuf_Block_type_identifier "\x41\x48\x6d\xdc"
#ifndef org_apache_arrow_flatbuf_Block_file_extension
#define org_apache_arrow_flatbuf_Block_file_extension "bin"
#endif


struct org_apache_arrow_flatbuf_Block {
    /**  Index to the start of the RecordBlock (note this is past the Message header) */
    alignas(8) int64_t offset;
    /**  Length of the metadata */
    alignas(4) int32_t metaDataLength;
    /**  Length of the data (this is aligned so there can be a gap between this and
     *  the metadata). */
    alignas(8) int64_t bodyLength;
};
static_assert(sizeof(org_apache_arrow_flatbuf_Block_t) == 24, "struct size mismatch");

static inline const org_apache_arrow_flatbuf_Block_t *org_apache_arrow_flatbuf_Block__const_ptr_add(const org_apache_arrow_flatbuf_Block_t *p, size_t i) { return p + i; }
static inline org_apache_arrow_flatbuf_Block_t *org_apache_arrow_flatbuf_Block__ptr_add(org_apache_arrow_flatbuf_Block_t *p, size_t i) { return p + i; }
static inline org_apache_arrow_flatbuf_Block_struct_t org_apache_arrow_flatbuf_Block_vec_at(org_apache_arrow_flatbuf_Block_vec_t vec, size_t i)
__flatbuffers_struct_vec_at(vec, i)
static inline size_t org_apache_arrow_flatbuf_Block__size(void) { return 24; }
static inline size_t org_apache_arrow_flatbuf_Block_vec_len(org_apache_arrow_flatbuf_Block_vec_t vec)
__flatbuffers_vec_len(vec)
__flatbuffers_struct_as_root(org_apache_arrow_flatbuf_Block)

__flatbuffers_define_struct_scalar_field(org_apache_arrow_flatbuf_Block, offset, flatbuffers_int64, int64_t)
__flatbuffers_define_struct_scalar_field(org_apache_arrow_flatbuf_Block, metaDataLength, flatbuffers_int32, int32_t)
__flatbuffers_define_struct_scalar_field(org_apache_arrow_flatbuf_Block, bodyLength, flatbuffers_int64, int64_t)


/**  ----------------------------------------------------------------------
 *  Arrow File metadata
 *  */
struct org_apache_arrow_flatbuf_Footer_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Footer_vec_len(org_apache_arrow_flatbuf_Footer_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Footer_table_t org_apache_arrow_flatbuf_Footer_vec_at(org_apache_arrow_flatbuf_Footer_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Footer_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Footer)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Footer, version, org_apache_arrow_flatbuf_MetadataVersion, org_apache_arrow_flatbuf_MetadataVersion_enum_t, INT16_C(0))
__flatbuffers_define_table_field(1, org_apache_arrow_flatbuf_Footer, schema, org_apache_arrow_flatbuf_Schema_table_t, 0)
__flatbuffers_define_vector_field(2, org_apache_arrow_flatbuf_Footer, dictionaries, org_apache_arrow_flatbuf_Block_vec_t, 0)
__flatbuffers_define_vector_field(3, org_apache_arrow_flatbuf_Footer, recordBatches, org_apache_arrow_flatbuf_Block_vec_t, 0)
/**  User-defined metadata */
__flatbuffers_define_vector_field(4, org_apache_arrow_flatbuf_Footer, custom_metadata, org_apache_arrow_flatbuf_KeyValue_vec_t, 0)


#include "flatcc/flatcc_epilogue.h"
#endif /* FILE_READER_H */
#ifndef FILE_BUILDER_H
#define FILE_BUILDER_H

/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

#ifndef FILE_READER_H
#include "File_reader.h"
#endif
#ifndef FLATBUFFERS_COMMON_BUILDER_H
#include "flatbuffers_common_builder.h"
#endif
#ifndef SCHEMA_BUILDER_H
#include "Schema_builder.h"
#endif
#include "flatcc/flatcc_prologue.h"
#ifndef flatbuffers_identifier
#define flatbuffers_identifier 0
#endif
#ifndef flatbuffers_extension
#define flatbuffers_extension "bin"
#endif

#define __org_apache_arrow_flatbuf_Block_formal_args , int64_t v0, int32_t v1, int64_t v2
#define __org_apache_arrow_flatbuf_Block_call_args , v0, v1, v2
static inline org_apache_arrow_flatbuf_Block_t *org_apache_arrow_flatbuf_Block_assign(org_apache_arrow_flatbuf_Block_t *p, int64_t v0, int32_t v1, int64_t v2)
{ p->offset = v0; p->metaDataLength = v1; p->bodyLength = v2;
  return p; }
static inline org_apache_arrow_flatbuf_Block_t *org_apache_arrow_flatbuf_Block_copy(org_apache_arrow_flatbuf_Block_t *p, const org_apache_arrow_flatbuf_Block_t *p2)
{ p->offset = p2->offset; p->metaDataLength = p2->metaDataLength; p->bodyLength = p2->bodyLength;
  return p; }
static inline org_apache_arrow_flatbuf_Block_t *org_apache_arrow_flatbuf_Block_assign_to_pe(org_apache_arrow_flatbuf_Block_t *p, int64_t v0, int32_t v1, int64_t v2)
{ flatbuffers_int64_assign_to_pe(&p->offset, v0); flatbuffers_int32_assign_to_pe(&p->metaDataLength, v1); flatbuffers_int64_assign_to_pe(&p->bodyLength, v2);
  return p; }
static inline org_apache_arrow_flatbuf_Block_t *org_apache_arrow_flatbuf_Block_copy_to_pe(org_apache_arrow_flatbuf_Block_t *p, const org_apache_arrow_flatbuf_Block_t *p2)
{ flatbuffers_int64_copy_to_pe(&p->offset, &p2->offset); flatbuffers_int32_copy_to_pe(&p->metaDataLength, &p2->metaDataLength); flatbuffers_int64_copy_to_pe(&p->bodyLength, &p2->bodyLength);
  return p; }
static inline org_apache_arrow_flatbuf_Block_t *org_apache_arrow_flatbuf_Block_assign_from_pe(org_apache_arrow_flatbuf_Block_t *p, int64_t v0, int32_t v1, int64_t v2)
{ flatbuffers_int64_assign_from_pe(&p->offset, v0); flatbuffers_int32_assign_from_pe(&p->metaDataLength, v1); flatbuffers_int64_assign_from_pe(&p->bodyLength, v2);
  return p; }
static inline org_apache_arrow_flatbuf_Block_t *org_apache_arrow_flatbuf_Block_copy_from_pe(org_apache_arrow_flatbuf_Block_t *p, const org_apache_arrow_flatbuf_Block_t *p2)
{ flatbuffers_int64_copy_from_pe(&p->offset, &p2->offset); flatbuffers_int32_copy_from_pe(&p->metaDataLength, &p2->metaDataLength); flatbuffers_int64_copy_from_pe(&p->bodyLength, &p2->bodyLength);
  return p; }
__flatbuffers_build_struct(flatbuffers_, org_apache_arrow_flatbuf_Block, 24, 8, org_apache_arrow_flatbuf_Block_file_identifier, org_apache_arrow_flatbuf_Block_type_identifier)
__flatbuffers_define_fixed_array_primitives(flatbuffers_, org_apache_arrow_flatbuf_Block, org_apache_arrow_flatbuf_Block_t)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Footer_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Footer_ref_t;
static org_apache_arrow_flatbuf_Footer_ref_t org_apache_arrow_flatbuf_Footer_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Footer_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Footer, 5)

#define __org_apache_arrow_flatbuf_Footer_formal_args ,\
  org_apache_arrow_flatbuf_MetadataVersion_enum_t v0, org_apache_arrow_flatbuf_Schema_ref_t v1, org_apache_arrow_flatbuf_Block_vec_ref_t v2, org_apache_arrow_flatbuf_Block_vec_ref_t v3, org_apache_arrow_flatbuf_KeyValue_vec_ref_t v4
#define __org_apache_arrow_flatbuf_Footer_call_args ,\
  v0, v1, v2, v3, v4
static inline org_apache_arrow_flatbuf_Footer_ref_t org_apache_arrow_flatbuf_Footer_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Footer_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Footer, org_apache_arrow_flatbuf_Footer_file_identifier, org_apache_arrow_flatbuf_Footer_type_identifier)

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Footer_version, org_apache_arrow_flatbuf_MetadataVersion, org_apache_arrow_flatbuf_MetadataVersion_enum_t, 2, 2, INT16_C(0), org_apache_arrow_flatbuf_Footer)
__flatbuffers_build_table_field(1, flatbuffers_, org_apache_arrow_flatbuf_Footer_schema, org_apache_arrow_flatbuf_Schema, org_apache_arrow_flatbuf_Footer)
__flatbuffers_build_vector_field(2, flatbuffers_, org_apache_arrow_flatbuf_Footer_dictionaries, org_apache_arrow_flatbuf_Block, org_apache_arrow_flatbuf_Block_t, org_apache_arrow_flatbuf_Footer)
__flatbuffers_build_vector_field(3, flatbuffers_, org_apache_arrow_flatbuf_Footer_recordBatches, org_apache_arrow_flatbuf_Block, org_apache_arrow_flatbuf_Block_t, org_apache_arrow_flatbuf_Footer)
__flatbuffers_build_table_vector_field(4, flatbuffers_, org_apache_arrow_flatbuf_Footer_custom_metadata, org_apache_arrow_flatbuf_KeyValue, org_apache_arrow_flatbuf_Footer)

static inline org_apache_arrow_flatbuf_Footer_ref_t org_apache_arrow_flatbuf_Footer_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Footer_formal_args)
{
    if (org_apache_arrow_flatbuf_Footer_start(B)
        || org_apache_arrow_flatbuf_Footer_schema_add(B, v1)
        || org_apache_arrow_flatbuf_Footer_dictionaries_add(B, v2)
        || org_apache_arrow_flatbuf_Footer_recordBatches_add(B, v3)
        || org_apache_arrow_flatbuf_Footer_custom_metadata_add(B, v4)
        || org_apache_arrow_flatbuf_Footer_version_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Footer_end(B);
}

static org_apache_arrow_flatbuf_Footer_ref_t org_apache_arrow_flatbuf_Footer_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Footer_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Footer_start(B)
        || org_apache_arrow_flatbuf_Footer_schema_pick(B, t)
        || org_apache_arrow_flatbuf_Footer_dictionaries_pick(B, t)
        || org_apache_arrow_flatbuf_Footer_recordBatches_pick(B, t)
        || org_apache_arrow_flatbuf_Footer_custom_metadata_pick(B, t)
        || org_apache_arrow_flatbuf_Footer_version_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Footer_end(B));
}

#include "flatcc/flatcc_epilogue.h"
#endif /* FILE_BUILDER_H */
#ifndef FILE_VERIFIER_H
#define FILE_VERIFIER_H

/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

#ifndef FILE_READER_H
#include "File_reader.h"
#endif
#include "flatcc/flatcc_verifier.h"
#ifndef SCHEMA_VERIFIER_H
#include "Schema_verifier.h"
#endif
#include "flatcc/flatcc_prologue.h"

static int org_apache_arrow_flatbuf_Footer_verify_table(flatcc_table_verifier_descriptor_t *td);

static inline int org_apache_arrow_flatbuf_Block_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_struct_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Block_identifier, 24, 8);
}

static inline int org_apache_arrow_flatbuf_Block_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_struct_as_typed_root(buf, bufsiz, org_apache_arrow_flatbuf_Block_type_hash, 24, 8);
}

static inline int org_apache_arrow_flatbuf_Block_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_struct_as_typed_root(buf, bufsiz, thash, 24, 8);
}

static inline int org_apache_arrow_flatbuf_Block_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_struct_as_root(buf, bufsiz, fid, 24, 8);
}

static int org_apache_arrow_flatbuf_Footer_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* version */)) return ret;
    if ((ret = flatcc_verify_table_field(td, 1, 0, &org_apache_arrow_flatbuf_Schema_verify_table) /* schema */)) return ret;
    if ((ret = flatcc_verify_vector_field(td, 2, 0, 24, 8, INT64_C(178956970)) /* dictionaries */)) return ret;
    if ((ret = flatcc_verify_vector_field(td, 3, 0, 24, 8, INT64_C(178956970)) /* recordBatches */)) return ret;
    if ((ret = flatcc_verify_table_vector_field(td, 4, 0, &org_apache_arrow_flatbuf_KeyValue_verify_table) /* custom_metadata */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Footer_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Footer_identifier, &org_apache_arrow_flatbuf_Footer_verify_table);
}

static inline int org_apache_arrow_flatbuf_Footer_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Footer_type_identifier, &org_apache_arrow_flatbuf_Footer_verify_table);
}

static inline int org_apache_arrow_flatbuf_Footer_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Footer_verify_table);
}

static inline int org_apache_arrow_flatbuf_Footer_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Footer_verify_table);
}

#include "flatcc/flatcc_epilogue.h"
#endif /* FILE_VERIFIER_H */
#ifndef SCHEMA_READER_H
#define SCHEMA_READER_H

/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

#ifndef FLATBUFFERS_COMMON_READER_H
#include "flatbuffers_common_reader.h"
#endif
#include "flatcc/flatcc_flatbuffers.h"
#ifndef __alignas_is_defined
#include <stdalign.h>
#endif
#include "flatcc/flatcc_prologue.h"
#ifndef flatbuffers_identifier
#define flatbuffers_identifier 0
#endif
#ifndef flatbuffers_extension
#define flatbuffers_extension "bin"
#endif

typedef struct org_apache_arrow_flatbuf_Buffer org_apache_arrow_flatbuf_Buffer_t;
typedef const org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_struct_t;
typedef org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_mutable_struct_t;
typedef const org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_vec_t;
typedef org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_mutable_vec_t;

typedef const struct org_apache_arrow_flatbuf_Null_table *org_apache_arrow_flatbuf_Null_table_t;
typedef struct org_apache_arrow_flatbuf_Null_table *org_apache_arrow_flatbuf_Null_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Null_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Null_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Struct__table *org_apache_arrow_flatbuf_Struct__table_t;
typedef struct org_apache_arrow_flatbuf_Struct__table *org_apache_arrow_flatbuf_Struct__mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Struct__vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Struct__mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_List_table *org_apache_arrow_flatbuf_List_table_t;
typedef struct org_apache_arrow_flatbuf_List_table *org_apache_arrow_flatbuf_List_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_List_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_List_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_LargeList_table *org_apache_arrow_flatbuf_LargeList_table_t;
typedef struct org_apache_arrow_flatbuf_LargeList_table *org_apache_arrow_flatbuf_LargeList_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_LargeList_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_LargeList_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_FixedSizeList_table *org_apache_arrow_flatbuf_FixedSizeList_table_t;
typedef struct org_apache_arrow_flatbuf_FixedSizeList_table *org_apache_arrow_flatbuf_FixedSizeList_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_FixedSizeList_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_FixedSizeList_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Map_table *org_apache_arrow_flatbuf_Map_table_t;
typedef struct org_apache_arrow_flatbuf_Map_table *org_apache_arrow_flatbuf_Map_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Map_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Map_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Union_table *org_apache_arrow_flatbuf_Union_table_t;
typedef struct org_apache_arrow_flatbuf_Union_table *org_apache_arrow_flatbuf_Union_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Union_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Union_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Int_table *org_apache_arrow_flatbuf_Int_table_t;
typedef struct org_apache_arrow_flatbuf_Int_table *org_apache_arrow_flatbuf_Int_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Int_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Int_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_FloatingPoint_table *org_apache_arrow_flatbuf_FloatingPoint_table_t;
typedef struct org_apache_arrow_flatbuf_FloatingPoint_table *org_apache_arrow_flatbuf_FloatingPoint_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_FloatingPoint_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_FloatingPoint_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Utf8_table *org_apache_arrow_flatbuf_Utf8_table_t;
typedef struct org_apache_arrow_flatbuf_Utf8_table *org_apache_arrow_flatbuf_Utf8_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Utf8_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Utf8_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Binary_table *org_apache_arrow_flatbuf_Binary_table_t;
typedef struct org_apache_arrow_flatbuf_Binary_table *org_apache_arrow_flatbuf_Binary_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Binary_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Binary_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_LargeUtf8_table *org_apache_arrow_flatbuf_LargeUtf8_table_t;
typedef struct org_apache_arrow_flatbuf_LargeUtf8_table *org_apache_arrow_flatbuf_LargeUtf8_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_LargeUtf8_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_LargeUtf8_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_LargeBinary_table *org_apache_arrow_flatbuf_LargeBinary_table_t;
typedef struct org_apache_arrow_flatbuf_LargeBinary_table *org_apache_arrow_flatbuf_LargeBinary_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_LargeBinary_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_LargeBinary_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_FixedSizeBinary_table *org_apache_arrow_flatbuf_FixedSizeBinary_table_t;
typedef struct org_apache_arrow_flatbuf_FixedSizeBinary_table *org_apache_arrow_flatbuf_FixedSizeBinary_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_FixedSizeBinary_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_FixedSizeBinary_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Bool_table *org_apache_arrow_flatbuf_Bool_table_t;
typedef struct org_apache_arrow_flatbuf_Bool_table *org_apache_arrow_flatbuf_Bool_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Bool_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Bool_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_RunEndEncoded_table *org_apache_arrow_flatbuf_RunEndEncoded_table_t;
typedef struct org_apache_arrow_flatbuf_RunEndEncoded_table *org_apache_arrow_flatbuf_RunEndEncoded_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_RunEndEncoded_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_RunEndEncoded_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Decimal_table *org_apache_arrow_flatbuf_Decimal_table_t;
typedef struct org_apache_arrow_flatbuf_Decimal_table *org_apache_arrow_flatbuf_Decimal_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Decimal_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Decimal_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Date_table *org_apache_arrow_flatbuf_Date_table_t;
typedef struct org_apache_arrow_flatbuf_Date_table *org_apache_arrow_flatbuf_Date_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Date_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Date_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Time_table *org_apache_arrow_flatbuf_Time_table_t;
typedef struct org_apache_arrow_flatbuf_Time_table *org_apache_arrow_flatbuf_Time_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Time_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Time_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Timestamp_table *org_apache_arrow_flatbuf_Timestamp_table_t;
typedef struct org_apache_arrow_flatbuf_Timestamp_table *org_apache_arrow_flatbuf_Timestamp_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Timestamp_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Timestamp_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Interval_table *org_apache_arrow_flatbuf_Interval_table_t;
typedef struct org_apache_arrow_flatbuf_Interval_table *org_apache_arrow_flatbuf_Interval_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Interval_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Interval_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Duration_table *org_apache_arrow_flatbuf_Duration_table_t;
typedef struct org_apache_arrow_flatbuf_Duration_table *org_apache_arrow_flatbuf_Duration_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Duration_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Duration_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_KeyValue_table *org_apache_arrow_flatbuf_KeyValue_table_t;
typedef struct org_apache_arrow_flatbuf_KeyValue_table *org_apache_arrow_flatbuf_KeyValue_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_KeyValue_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_KeyValue_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_DictionaryEncoding_table *org_apache_arrow_flatbuf_DictionaryEncoding_table_t;
typedef struct org_apache_arrow_flatbuf_DictionaryEncoding_table *org_apache_arrow_flatbuf_DictionaryEncoding_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_DictionaryEncoding_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_DictionaryEncoding_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Field_table *org_apache_arrow_flatbuf_Field_table_t;
typedef struct org_apache_arrow_flatbuf_Field_table *org_apache_arrow_flatbuf_Field_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Field_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Field_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Schema_table *org_apache_arrow_flatbuf_Schema_table_t;
typedef struct org_apache_arrow_flatbuf_Schema_table *org_apache_arrow_flatbuf_Schema_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Schema_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Schema_mutable_vec_t;
#ifndef org_apache_arrow_flatbuf_Null_file_identifier
#define org_apache_arrow_flatbuf_Null_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Null_file_identifier */
#ifndef org_apache_arrow_flatbuf_Null_identifier
#define org_apache_arrow_flatbuf_Null_identifier 0
#endif
#define org_apache_arrow_flatbuf_Null_type_hash ((flatbuffers_thash_t)0x7b36a4dd)
#define org_apache_arrow_flatbuf_Null_type_identifier "\xdd\xa4\x36\x7b"
#ifndef org_apache_arrow_flatbuf_Null_file_extension
#define org_apache_arrow_flatbuf_Null_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Struct__file_identifier
#define org_apache_arrow_flatbuf_Struct__file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Struct__file_identifier */
#ifndef org_apache_arrow_flatbuf_Struct__identifier
#define org_apache_arrow_flatbuf_Struct__identifier 0
#endif
#define org_apache_arrow_flatbuf_Struct__type_hash ((flatbuffers_thash_t)0x6310f362)
#define org_apache_arrow_flatbuf_Struct__type_identifier "\x62\xf3\x10\x63"
#ifndef org_apache_arrow_flatbuf_Struct__file_extension
#define org_apache_arrow_flatbuf_Struct__file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_List_file_identifier
#define org_apache_arrow_flatbuf_List_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_List_file_identifier */
#ifndef org_apache_arrow_flatbuf_List_identifier
#define org_apache_arrow_flatbuf_List_identifier 0
#endif
#define org_apache_arrow_flatbuf_List_type_hash ((flatbuffers_thash_t)0xd4ce5878)
#define org_apache_arrow_flatbuf_List_type_identifier "\x78\x58\xce\xd4"
#ifndef org_apache_arrow_flatbuf_List_file_extension
#define org_apache_arrow_flatbuf_List_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_LargeList_file_identifier
#define org_apache_arrow_flatbuf_LargeList_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_LargeList_file_identifier */
#ifndef org_apache_arrow_flatbuf_LargeList_identifier
#define org_apache_arrow_flatbuf_LargeList_identifier 0
#endif
#define org_apache_arrow_flatbuf_LargeList_type_hash ((flatbuffers_thash_t)0x38aa7e27)
#define org_apache_arrow_flatbuf_LargeList_type_identifier "\x27\x7e\xaa\x38"
#ifndef org_apache_arrow_flatbuf_LargeList_file_extension
#define org_apache_arrow_flatbuf_LargeList_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_FixedSizeList_file_identifier
#define org_apache_arrow_flatbuf_FixedSizeList_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_FixedSizeList_file_identifier */
#ifndef org_apache_arrow_flatbuf_FixedSizeList_identifier
#define org_apache_arrow_flatbuf_FixedSizeList_identifier 0
#endif
#define org_apache_arrow_flatbuf_FixedSizeList_type_hash ((flatbuffers_thash_t)0xcef245bb)
#define org_apache_arrow_flatbuf_FixedSizeList_type_identifier "\xbb\x45\xf2\xce"
#ifndef org_apache_arrow_flatbuf_FixedSizeList_file_extension
#define org_apache_arrow_flatbuf_FixedSizeList_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Map_file_identifier
#define org_apache_arrow_flatbuf_Map_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Map_file_identifier */
#ifndef org_apache_arrow_flatbuf_Map_identifier
#define org_apache_arrow_flatbuf_Map_identifier 0
#endif
#define org_apache_arrow_flatbuf_Map_type_hash ((flatbuffers_thash_t)0xcebef8e6)
#define org_apache_arrow_flatbuf_Map_type_identifier "\xe6\xf8\xbe\xce"
#ifndef org_apache_arrow_flatbuf_Map_file_extension
#define org_apache_arrow_flatbuf_Map_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Union_file_identifier
#define org_apache_arrow_flatbuf_Union_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Union_file_identifier */
#ifndef org_apache_arrow_flatbuf_Union_identifier
#define org_apache_arrow_flatbuf_Union_identifier 0
#endif
#define org_apache_arrow_flatbuf_Union_type_hash ((flatbuffers_thash_t)0x896bda57)
#define org_apache_arrow_flatbuf_Union_type_identifier "\x57\xda\x6b\x89"
#ifndef org_apache_arrow_flatbuf_Union_file_extension
#define org_apache_arrow_flatbuf_Union_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Int_file_identifier
#define org_apache_arrow_flatbuf_Int_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Int_file_identifier */
#ifndef org_apache_arrow_flatbuf_Int_identifier
#define org_apache_arrow_flatbuf_Int_identifier 0
#endif
#define org_apache_arrow_flatbuf_Int_type_hash ((flatbuffers_thash_t)0x30789001)
#define org_apache_arrow_flatbuf_Int_type_identifier "\x01\x90\x78\x30"
#ifndef org_apache_arrow_flatbuf_Int_file_extension
#define org_apache_arrow_flatbuf_Int_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_FloatingPoint_file_identifier
#define org_apache_arrow_flatbuf_FloatingPoint_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_FloatingPoint_file_identifier */
#ifndef org_apache_arrow_flatbuf_FloatingPoint_identifier
#define org_apache_arrow_flatbuf_FloatingPoint_identifier 0
#endif
#define org_apache_arrow_flatbuf_FloatingPoint_type_hash ((flatbuffers_thash_t)0xf7d06268)
#define org_apache_arrow_flatbuf_FloatingPoint_type_identifier "\x68\x62\xd0\xf7"
#ifndef org_apache_arrow_flatbuf_FloatingPoint_file_extension
#define org_apache_arrow_flatbuf_FloatingPoint_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Utf8_file_identifier
#define org_apache_arrow_flatbuf_Utf8_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Utf8_file_identifier */
#ifndef org_apache_arrow_flatbuf_Utf8_identifier
#define org_apache_arrow_flatbuf_Utf8_identifier 0
#endif
#define org_apache_arrow_flatbuf_Utf8_type_hash ((flatbuffers_thash_t)0x8fe60d37)
#define org_apache_arrow_flatbuf_Utf8_type_identifier "\x37\x0d\xe6\x8f"
#ifndef org_apache_arrow_flatbuf_Utf8_file_extension
#define org_apache_arrow_flatbuf_Utf8_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Binary_file_identifier
#define org_apache_arrow_flatbuf_Binary_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Binary_file_identifier */
#ifndef org_apache_arrow_flatbuf_Binary_identifier
#define org_apache_arrow_flatbuf_Binary_identifier 0
#endif
#define org_apache_arrow_flatbuf_Binary_type_hash ((flatbuffers_thash_t)0x8e21a795)
#define org_apache_arrow_flatbuf_Binary_type_identifier "\x95\xa7\x21\x8e"
#ifndef org_apache_arrow_flatbuf_Binary_file_extension
#define org_apache_arrow_flatbuf_Binary_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_LargeUtf8_file_identifier
#define org_apache_arrow_flatbuf_LargeUtf8_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_LargeUtf8_file_identifier */
#ifndef org_apache_arrow_flatbuf_LargeUtf8_identifier
#define org_apache_arrow_flatbuf_LargeUtf8_identifier 0
#endif
#define org_apache_arrow_flatbuf_LargeUtf8_type_hash ((flatbuffers_thash_t)0x24ed2fb0)
#define org_apache_arrow_flatbuf_LargeUtf8_type_identifier "\xb0\x2f\xed\x24"
#ifndef org_apache_arrow_flatbuf_LargeUtf8_file_extension
#define org_apache_arrow_flatbuf_LargeUtf8_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_LargeBinary_file_identifier
#define org_apache_arrow_flatbuf_LargeBinary_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_LargeBinary_file_identifier */
#ifndef org_apache_arrow_flatbuf_LargeBinary_identifier
#define org_apache_arrow_flatbuf_LargeBinary_identifier 0
#endif
#define org_apache_arrow_flatbuf_LargeBinary_type_hash ((flatbuffers_thash_t)0xbd437872)
#define org_apache_arrow_flatbuf_LargeBinary_type_identifier "\x72\x78\x43\xbd"
#ifndef org_apache_arrow_flatbuf_LargeBinary_file_extension
#define org_apache_arrow_flatbuf_LargeBinary_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_FixedSizeBinary_file_identifier
#define org_apache_arrow_flatbuf_FixedSizeBinary_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_FixedSizeBinary_file_identifier */
#ifndef org_apache_arrow_flatbuf_FixedSizeBinary_identifier
#define org_apache_arrow_flatbuf_FixedSizeBinary_identifier 0
#endif
#define org_apache_arrow_flatbuf_FixedSizeBinary_type_hash ((flatbuffers_thash_t)0x80d0f4ce)
#define org_apache_arrow_flatbuf_FixedSizeBinary_type_identifier "\xce\xf4\xd0\x80"
#ifndef org_apache_arrow_flatbuf_FixedSizeBinary_file_extension
#define org_apache_arrow_flatbuf_FixedSizeBinary_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Bool_file_identifier
#define org_apache_arrow_flatbuf_Bool_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Bool_file_identifier */
#ifndef org_apache_arrow_flatbuf_Bool_identifier
#define org_apache_arrow_flatbuf_Bool_identifier 0
#endif
#define org_apache_arrow_flatbuf_Bool_type_hash ((flatbuffers_thash_t)0x96bf83f0)
#define org_apache_arrow_flatbuf_Bool_type_identifier "\xf0\x83\xbf\x96"
#ifndef org_apache_arrow_flatbuf_Bool_file_extension
#define org_apache_arrow_flatbuf_Bool_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_RunEndEncoded_file_identifier
#define org_apache_arrow_flatbuf_RunEndEncoded_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_RunEndEncoded_file_identifier */
#ifndef org_apache_arrow_flatbuf_RunEndEncoded_identifier
#define org_apache_arrow_flatbuf_RunEndEncoded_identifier 0
#endif
#define org_apache_arrow_flatbuf_RunEndEncoded_type_hash ((flatbuffers_thash_t)0x5a98bcc)
#define org_apache_arrow_flatbuf_RunEndEncoded_type_identifier "\xcc\x8b\xa9\x05"
#ifndef org_apache_arrow_flatbuf_RunEndEncoded_file_extension
#define org_apache_arrow_flatbuf_RunEndEncoded_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Decimal_file_identifier
#define org_apache_arrow_flatbuf_Decimal_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Decimal_file_identifier */
#ifndef org_apache_arrow_flatbuf_Decimal_identifier
#define org_apache_arrow_flatbuf_Decimal_identifier 0
#endif
#define org_apache_arrow_flatbuf_Decimal_type_hash ((flatbuffers_thash_t)0x91d1beb7)
#define org_apache_arrow_flatbuf_Decimal_type_identifier "\xb7\xbe\xd1\x91"
#ifndef org_apache_arrow_flatbuf_Decimal_file_extension
#define org_apache_arrow_flatbuf_Decimal_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Date_file_identifier
#define org_apache_arrow_flatbuf_Date_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Date_file_identifier */
#ifndef org_apache_arrow_flatbuf_Date_identifier
#define org_apache_arrow_flatbuf_Date_identifier 0
#endif
#define org_apache_arrow_flatbuf_Date_type_hash ((flatbuffers_thash_t)0xe0ccf624)
#define org_apache_arrow_flatbuf_Date_type_identifier "\x24\xf6\xcc\xe0"
#ifndef org_apache_arrow_flatbuf_Date_file_extension
#define org_apache_arrow_flatbuf_Date_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Time_file_identifier
#define org_apache_arrow_flatbuf_Time_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Time_file_identifier */
#ifndef org_apache_arrow_flatbuf_Time_identifier
#define org_apache_arrow_flatbuf_Time_identifier 0
#endif
#define org_apache_arrow_flatbuf_Time_type_hash ((flatbuffers_thash_t)0x2442a489)
#define org_apache_arrow_flatbuf_Time_type_identifier "\x89\xa4\x42\x24"
#ifndef org_apache_arrow_flatbuf_Time_file_extension
#define org_apache_arrow_flatbuf_Time_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Timestamp_file_identifier
#define org_apache_arrow_flatbuf_Timestamp_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Timestamp_file_identifier */
#ifndef org_apache_arrow_flatbuf_Timestamp_identifier
#define org_apache_arrow_flatbuf_Timestamp_identifier 0
#endif
#define org_apache_arrow_flatbuf_Timestamp_type_hash ((flatbuffers_thash_t)0x1fddf080)
#define org_apache_arrow_flatbuf_Timestamp_type_identifier "\x80\xf0\xdd\x1f"
#ifndef org_apache_arrow_flatbuf_Timestamp_file_extension
#define org_apache_arrow_flatbuf_Timestamp_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Interval_file_identifier
#define org_apache_arrow_flatbuf_Interval_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Interval_file_identifier */
#ifndef org_apache_arrow_flatbuf_Interval_identifier
#define org_apache_arrow_flatbuf_Interval_identifier 0
#endif
#define org_apache_arrow_flatbuf_Interval_type_hash ((flatbuffers_thash_t)0x1e2d6809)
#define org_apache_arrow_flatbuf_Interval_type_identifier "\x09\x68\x2d\x1e"
#ifndef org_apache_arrow_flatbuf_Interval_file_extension
#define org_apache_arrow_flatbuf_Interval_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Duration_file_identifier
#define org_apache_arrow_flatbuf_Duration_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Duration_file_identifier */
#ifndef org_apache_arrow_flatbuf_Duration_identifier
#define org_apache_arrow_flatbuf_Duration_identifier 0
#endif
#define org_apache_arrow_flatbuf_Duration_type_hash ((flatbuffers_thash_t)0x1ecea6b0)
#define org_apache_arrow_flatbuf_Duration_type_identifier "\xb0\xa6\xce\x1e"
#ifndef org_apache_arrow_flatbuf_Duration_file_extension
#define org_apache_arrow_flatbuf_Duration_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_KeyValue_file_identifier
#define org_apache_arrow_flatbuf_KeyValue_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_KeyValue_file_identifier */
#ifndef org_apache_arrow_flatbuf_KeyValue_identifier
#define org_apache_arrow_flatbuf_KeyValue_identifier 0
#endif
#define org_apache_arrow_flatbuf_KeyValue_type_hash ((flatbuffers_thash_t)0x3b264744)
#define org_apache_arrow_flatbuf_KeyValue_type_identifier "\x44\x47\x26\x3b"
#ifndef org_apache_arrow_flatbuf_KeyValue_file_extension
#define org_apache_arrow_flatbuf_KeyValue_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_DictionaryEncoding_file_identifier
#define org_apache_arrow_flatbuf_DictionaryEncoding_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_DictionaryEncoding_file_identifier */
#ifndef org_apache_arrow_flatbuf_DictionaryEncoding_identifier
#define org_apache_arrow_flatbuf_DictionaryEncoding_identifier 0
#endif
#define org_apache_arrow_flatbuf_DictionaryEncoding_type_hash ((flatbuffers_thash_t)0x8c703261)
#define org_apache_arrow_flatbuf_DictionaryEncoding_type_identifier "\x61\x32\x70\x8c"
#ifndef org_apache_arrow_flatbuf_DictionaryEncoding_file_extension
#define org_apache_arrow_flatbuf_DictionaryEncoding_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Field_file_identifier
#define org_apache_arrow_flatbuf_Field_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Field_file_identifier */
#ifndef org_apache_arrow_flatbuf_Field_identifier
#define org_apache_arrow_flatbuf_Field_identifier 0
#endif
#define org_apache_arrow_flatbuf_Field_type_hash ((flatbuffers_thash_t)0xd981525c)
#define org_apache_arrow_flatbuf_Field_type_identifier "\x5c\x52\x81\xd9"
#ifndef org_apache_arrow_flatbuf_Field_file_extension
#define org_apache_arrow_flatbuf_Field_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Buffer_file_identifier
#define org_apache_arrow_flatbuf_Buffer_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Buffer_file_identifier */
#ifndef org_apache_arrow_flatbuf_Buffer_identifier
#define org_apache_arrow_flatbuf_Buffer_identifier 0
#endif
#define org_apache_arrow_flatbuf_Buffer_type_hash ((flatbuffers_thash_t)0x519d7fea)
#define org_apache_arrow_flatbuf_Buffer_type_identifier "\xea\x7f\x9d\x51"
#ifndef org_apache_arrow_flatbuf_Buffer_file_extension
#define org_apache_arrow_flatbuf_Buffer_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Schema_file_identifier
#define org_apache_arrow_flatbuf_Schema_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Schema_file_identifier */
#ifndef org_apache_arrow_flatbuf_Schema_identifier
#define org_apache_arrow_flatbuf_Schema_identifier 0
#endif
#define org_apache_arrow_flatbuf_Schema_type_hash ((flatbuffers_thash_t)0x406570b)
#define org_apache_arrow_flatbuf_Schema_type_identifier "\x0b\x57\x06\x04"
#ifndef org_apache_arrow_flatbuf_Schema_file_extension
#define org_apache_arrow_flatbuf_Schema_file_extension "bin"
#endif

typedef int16_t org_apache_arrow_flatbuf_MetadataVersion_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_MetadataVersion, org_apache_arrow_flatbuf_MetadataVersion_enum_t, 16)
/**  0.1.0 (October 2016). */
#define org_apache_arrow_flatbuf_MetadataVersion_V1 ((org_apache_arrow_flatbuf_MetadataVersion_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_MetadataVersion_V2 ((org_apache_arrow_flatbuf_MetadataVersion_enum_t)INT16_C(1))
#define org_apache_arrow_flatbuf_MetadataVersion_V3 ((org_apache_arrow_flatbuf_MetadataVersion_enum_t)INT16_C(2))
#define org_apache_arrow_flatbuf_MetadataVersion_V4 ((org_apache_arrow_flatbuf_MetadataVersion_enum_t)INT16_C(3))
#define org_apache_arrow_flatbuf_MetadataVersion_V5 ((org_apache_arrow_flatbuf_MetadataVersion_enum_t)INT16_C(4))

static inline const char *org_apache_arrow_flatbuf_MetadataVersion_name(org_apache_arrow_flatbuf_MetadataVersion_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_MetadataVersion_V1: return "V1";
    case org_apache_arrow_flatbuf_MetadataVersion_V2: return "V2";
    case org_apache_arrow_flatbuf_MetadataVersion_V3: return "V3";
    case org_apache_arrow_flatbuf_MetadataVersion_V4: return "V4";
    case org_apache_arrow_flatbuf_MetadataVersion_V5: return "V5";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_MetadataVersion_is_known_value(org_apache_arrow_flatbuf_MetadataVersion_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_MetadataVersion_V1: return 1;
    case org_apache_arrow_flatbuf_MetadataVersion_V2: return 1;
    case org_apache_arrow_flatbuf_MetadataVersion_V3: return 1;
    case org_apache_arrow_flatbuf_MetadataVersion_V4: return 1;
    case org_apache_arrow_flatbuf_MetadataVersion_V5: return 1;
    default: return 0;
    }
}

/**  Represents Arrow Features that might not have full support
 *  within implementations. This is intended to be used in
 *  two scenarios:
 *   1.  A mechanism for readers of Arrow Streams
 *       and files to understand that the stream or file makes
 *       use of a feature that isn't supported or unknown to
 *       the implementation (and therefore can meet the Arrow
 *       forward compatibility guarantees).
 *   2.  A means of negotiating between a client and server
 *       what features a stream is allowed to use. The enums
 *       values here are intented to represent higher level
 *       features, additional details maybe negotiated
 *       with key-value pairs specific to the protocol.
 *
 *  Enums added to this list should be assigned power-of-two values
 *  to facilitate exchanging and comparing bitmaps for supported
 *  features. */
typedef int64_t org_apache_arrow_flatbuf_Feature_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_Feature, org_apache_arrow_flatbuf_Feature_enum_t, 64)
/**  Needed to make flatbuffers happy. */
#define org_apache_arrow_flatbuf_Feature_UNUSED ((org_apache_arrow_flatbuf_Feature_enum_t)INT64_C(0))
#define org_apache_arrow_flatbuf_Feature_DICTIONARY_REPLACEMENT ((org_apache_arrow_flatbuf_Feature_enum_t)INT64_C(1))
#define org_apache_arrow_flatbuf_Feature_COMPRESSED_BODY ((org_apache_arrow_flatbuf_Feature_enum_t)INT64_C(2))

static inline const char *org_apache_arrow_flatbuf_Feature_name(org_apache_arrow_flatbuf_Feature_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_Feature_UNUSED: return "UNUSED";
    case org_apache_arrow_flatbuf_Feature_DICTIONARY_REPLACEMENT: return "DICTIONARY_REPLACEMENT";
    case org_apache_arrow_flatbuf_Feature_COMPRESSED_BODY: return "COMPRESSED_BODY";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_Feature_is_known_value(org_apache_arrow_flatbuf_Feature_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_Feature_UNUSED: return 1;
    case org_apache_arrow_flatbuf_Feature_DICTIONARY_REPLACEMENT: return 1;
    case org_apache_arrow_flatbuf_Feature_COMPRESSED_BODY: return 1;
    default: return 0;
    }
}

typedef int16_t org_apache_arrow_flatbuf_UnionMode_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_UnionMode, org_apache_arrow_flatbuf_UnionMode_enum_t, 16)
#define org_apache_arrow_flatbuf_UnionMode_Sparse ((org_apache_arrow_flatbuf_UnionMode_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_UnionMode_Dense ((org_apache_arrow_flatbuf_UnionMode_enum_t)INT16_C(1))

static inline const char *org_apache_arrow_flatbuf_UnionMode_name(org_apache_arrow_flatbuf_UnionMode_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_UnionMode_Sparse: return "Sparse";
    case org_apache_arrow_flatbuf_UnionMode_Dense: return "Dense";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_UnionMode_is_known_value(org_apache_arrow_flatbuf_UnionMode_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_UnionMode_Sparse: return 1;
    case org_apache_arrow_flatbuf_UnionMode_Dense: return 1;
    default: return 0;
    }
}

typedef int16_t org_apache_arrow_flatbuf_Precision_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_Precision, org_apache_arrow_flatbuf_Precision_enum_t, 16)
#define org_apache_arrow_flatbuf_Precision_HALF ((org_apache_arrow_flatbuf_Precision_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_Precision_SINGLE ((org_apache_arrow_flatbuf_Precision_enum_t)INT16_C(1))
#define org_apache_arrow_flatbuf_Precision_DOUBLE ((org_apache_arrow_flatbuf_Precision_enum_t)INT16_C(2))

static inline const char *org_apache_arrow_flatbuf_Precision_name(org_apache_arrow_flatbuf_Precision_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_Precision_HALF: return "HALF";
    case org_apache_arrow_flatbuf_Precision_SINGLE: return "SINGLE";
    case org_apache_arrow_flatbuf_Precision_DOUBLE: return "DOUBLE";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_Precision_is_known_value(org_apache_arrow_flatbuf_Precision_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_Precision_HALF: return 1;
    case org_apache_arrow_flatbuf_Precision_SINGLE: return 1;
    case org_apache_arrow_flatbuf_Precision_DOUBLE: return 1;
    default: return 0;
    }
}

typedef int16_t org_apache_arrow_flatbuf_DateUnit_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_DateUnit, org_apache_arrow_flatbuf_DateUnit_enum_t, 16)
#define org_apache_arrow_flatbuf_DateUnit_DAY ((org_apache_arrow_flatbuf_DateUnit_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_DateUnit_MILLISECOND ((org_apache_arrow_flatbuf_DateUnit_enum_t)INT16_C(1))

static inline const char *org_apache_arrow_flatbuf_DateUnit_name(org_apache_arrow_flatbuf_DateUnit_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_DateUnit_DAY: return "DAY";
    case org_apache_arrow_flatbuf_DateUnit_MILLISECOND: return "MILLISECOND";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_DateUnit_is_known_value(org_apache_arrow_flatbuf_DateUnit_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_DateUnit_DAY: return 1;
    case org_apache_arrow_flatbuf_DateUnit_MILLISECOND: return 1;
    default: return 0;
    }
}

typedef int16_t org_apache_arrow_flatbuf_TimeUnit_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t, 16)
#define org_apache_arrow_flatbuf_TimeUnit_SECOND ((org_apache_arrow_flatbuf_TimeUnit_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_TimeUnit_MILLISECOND ((org_apache_arrow_flatbuf_TimeUnit_enum_t)INT16_C(1))
#define org_apache_arrow_flatbuf_TimeUnit_MICROSECOND ((org_apache_arrow_flatbuf_TimeUnit_enum_t)INT16_C(2))
#define org_apache_arrow_flatbuf_TimeUnit_NANOSECOND ((org_apache_arrow_flatbuf_TimeUnit_enum_t)INT16_C(3))

static inline const char *org_apache_arrow_flatbuf_TimeUnit_name(org_apache_arrow_flatbuf_TimeUnit_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_TimeUnit_SECOND: return "SECOND";
    case org_apache_arrow_flatbuf_TimeUnit_MILLISECOND: return "MILLISECOND";
    case org_apache_arrow_flatbuf_TimeUnit_MICROSECOND: return "MICROSECOND";
    case org_apache_arrow_flatbuf_TimeUnit_NANOSECOND: return "NANOSECOND";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_TimeUnit_is_known_value(org_apache_arrow_flatbuf_TimeUnit_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_TimeUnit_SECOND: return 1;
    case org_apache_arrow_flatbuf_TimeUnit_MILLISECOND: return 1;
    case org_apache_arrow_flatbuf_TimeUnit_MICROSECOND: return 1;
    case org_apache_arrow_flatbuf_TimeUnit_NANOSECOND: return 1;
    default: return 0;
    }
}

typedef int16_t org_apache_arrow_flatbuf_IntervalUnit_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_IntervalUnit, org_apache_arrow_flatbuf_IntervalUnit_enum_t, 16)
#define org_apache_arrow_flatbuf_IntervalUnit_YEAR_MONTH ((org_apache_arrow_flatbuf_IntervalUnit_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_IntervalUnit_DAY_TIME ((org_apache_arrow_flatbuf_IntervalUnit_enum_t)INT16_C(1))
#define org_apache_arrow_flatbuf_IntervalUnit_MONTH_DAY_NANO ((org_apache_arrow_flatbuf_IntervalUnit_enum_t)INT16_C(2))

static inline const char *org_apache_arrow_flatbuf_IntervalUnit_name(org_apache_arrow_flatbuf_IntervalUnit_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_IntervalUnit_YEAR_MONTH: return "YEAR_MONTH";
    case org_apache_arrow_flatbuf_IntervalUnit_DAY_TIME: return "DAY_TIME";
    case org_apache_arrow_flatbuf_IntervalUnit_MONTH_DAY_NANO: return "MONTH_DAY_NANO";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_IntervalUnit_is_known_value(org_apache_arrow_flatbuf_IntervalUnit_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_IntervalUnit_YEAR_MONTH: return 1;
    case org_apache_arrow_flatbuf_IntervalUnit_DAY_TIME: return 1;
    case org_apache_arrow_flatbuf_IntervalUnit_MONTH_DAY_NANO: return 1;
    default: return 0;
    }
}

/**  ----------------------------------------------------------------------
 *  Dictionary encoding metadata
 *  Maintained for forwards compatibility, in the future
 *  Dictionaries might be explicit maps between integers and values
 *  allowing for non-contiguous index values */
typedef int16_t org_apache_arrow_flatbuf_DictionaryKind_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_DictionaryKind, org_apache_arrow_flatbuf_DictionaryKind_enum_t, 16)
#define org_apache_arrow_flatbuf_DictionaryKind_DenseArray ((org_apache_arrow_flatbuf_DictionaryKind_enum_t)INT16_C(0))

static inline const char *org_apache_arrow_flatbuf_DictionaryKind_name(org_apache_arrow_flatbuf_DictionaryKind_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_DictionaryKind_DenseArray: return "DenseArray";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_DictionaryKind_is_known_value(org_apache_arrow_flatbuf_DictionaryKind_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_DictionaryKind_DenseArray: return 1;
    default: return 0;
    }
}

/**  ----------------------------------------------------------------------
 *  Endianness of the platform producing the data */
typedef int16_t org_apache_arrow_flatbuf_Endianness_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_Endianness, org_apache_arrow_flatbuf_Endianness_enum_t, 16)
#define org_apache_arrow_flatbuf_Endianness_Little ((org_apache_arrow_flatbuf_Endianness_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_Endianness_Big ((org_apache_arrow_flatbuf_Endianness_enum_t)INT16_C(1))

static inline const char *org_apache_arrow_flatbuf_Endianness_name(org_apache_arrow_flatbuf_Endianness_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_Endianness_Little: return "Little";
    case org_apache_arrow_flatbuf_Endianness_Big: return "Big";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_Endianness_is_known_value(org_apache_arrow_flatbuf_Endianness_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_Endianness_Little: return 1;
    case org_apache_arrow_flatbuf_Endianness_Big: return 1;
    default: return 0;
    }
}


/**  ----------------------------------------------------------------------
 *  A Buffer represents a single contiguous memory segment */
struct org_apache_arrow_flatbuf_Buffer {
    /**  The relative offset into the shared memory page where the bytes for this
     *  buffer starts */
    alignas(8) int64_t offset;
    /**  The absolute length (in bytes) of the memory buffer. The memory is found
     *  from offset (inclusive) to offset + length (non-inclusive). When building
     *  messages using the encapsulated IPC message, padding bytes may be written
     *  after a buffer, but such padding bytes do not need to be accounted for in
     *  the size here. */
    alignas(8) int64_t length;
};
static_assert(sizeof(org_apache_arrow_flatbuf_Buffer_t) == 16, "struct size mismatch");

static inline const org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer__const_ptr_add(const org_apache_arrow_flatbuf_Buffer_t *p, size_t i) { return p + i; }
static inline org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer__ptr_add(org_apache_arrow_flatbuf_Buffer_t *p, size_t i) { return p + i; }
static inline org_apache_arrow_flatbuf_Buffer_struct_t org_apache_arrow_flatbuf_Buffer_vec_at(org_apache_arrow_flatbuf_Buffer_vec_t vec, size_t i)
__flatbuffers_struct_vec_at(vec, i)
static inline size_t org_apache_arrow_flatbuf_Buffer__size(void) { return 16; }
static inline size_t org_apache_arrow_flatbuf_Buffer_vec_len(org_apache_arrow_flatbuf_Buffer_vec_t vec)
__flatbuffers_vec_len(vec)
__flatbuffers_struct_as_root(org_apache_arrow_flatbuf_Buffer)

__flatbuffers_define_struct_scalar_field(org_apache_arrow_flatbuf_Buffer, offset, flatbuffers_int64, int64_t)
__flatbuffers_define_struct_scalar_field(org_apache_arrow_flatbuf_Buffer, length, flatbuffers_int64, int64_t)


/**  These are stored in the flatbuffer in the Type union below */
struct org_apache_arrow_flatbuf_Null_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Null_vec_len(org_apache_arrow_flatbuf_Null_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Null_table_t org_apache_arrow_flatbuf_Null_vec_at(org_apache_arrow_flatbuf_Null_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Null_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Null)


/**  A Struct_ in the flatbuffer metadata is the same as an Arrow Struct
 *  (according to the physical memory layout). We used Struct_ here as
 *  Struct is a reserved word in Flatbuffers */
struct org_apache_arrow_flatbuf_Struct__table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Struct__vec_len(org_apache_arrow_flatbuf_Struct__vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Struct__table_t org_apache_arrow_flatbuf_Struct__vec_at(org_apache_arrow_flatbuf_Struct__vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Struct__table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Struct_)


struct org_apache_arrow_flatbuf_List_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_List_vec_len(org_apache_arrow_flatbuf_List_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_List_table_t org_apache_arrow_flatbuf_List_vec_at(org_apache_arrow_flatbuf_List_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_List_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_List)


/**  Same as List, but with 64-bit offsets, allowing to represent
 *  extremely large data values. */
struct org_apache_arrow_flatbuf_LargeList_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_LargeList_vec_len(org_apache_arrow_flatbuf_LargeList_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_LargeList_table_t org_apache_arrow_flatbuf_LargeList_vec_at(org_apache_arrow_flatbuf_LargeList_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_LargeList_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_LargeList)


struct org_apache_arrow_flatbuf_FixedSizeList_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_FixedSizeList_vec_len(org_apache_arrow_flatbuf_FixedSizeList_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_FixedSizeList_table_t org_apache_arrow_flatbuf_FixedSizeList_vec_at(org_apache_arrow_flatbuf_FixedSizeList_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_FixedSizeList_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_FixedSizeList)

/**  Number of list items per value */
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_FixedSizeList, listSize, flatbuffers_int32, int32_t, INT32_C(0))

/**  A Map is a logical nested type that is represented as
 *
 *  List<entries: Struct<key: K, value: V>>
 *
 *  In this layout, the keys and values are each respectively contiguous. We do
 *  not constrain the key and value types, so the application is responsible
 *  for ensuring that the keys are hashable and unique. Whether the keys are sorted
 *  may be set in the metadata for this field.
 *
 *  In a field with Map type, the field has a child Struct field, which then
 *  has two children: key type and the second the value type. The names of the
 *  child fields may be respectively "entries", "key", and "value", but this is
 *  not enforced.
 *
 *  Map
 *  ```text
 *    - child[0] entries: Struct
 *      - child[0] key: K
 *      - child[1] value: V
 *  ```
 *  Neither the "entries" field nor the "key" field may be nullable.
 *
 *  The metadata is structured so that Arrow systems without special handling
 *  for Map can make Map an alias for List. The "layout" attribute for the Map
 *  field must have the same contents as a List. */
struct org_apache_arrow_flatbuf_Map_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Map_vec_len(org_apache_arrow_flatbuf_Map_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Map_table_t org_apache_arrow_flatbuf_Map_vec_at(org_apache_arrow_flatbuf_Map_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Map_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Map)

/**  Set to true if the keys within each value are sorted */
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Map, keysSorted, flatbuffers_bool, flatbuffers_bool_t, UINT8_C(0))

/**  A union is a complex type with children in Field
 *  By default ids in the type vector refer to the offsets in the children
 *  optionally typeIds provides an indirection between the child offset and the type id
 *  for each child `typeIds[offset]` is the id used in the type vector */
struct org_apache_arrow_flatbuf_Union_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Union_vec_len(org_apache_arrow_flatbuf_Union_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Union_table_t org_apache_arrow_flatbuf_Union_vec_at(org_apache_arrow_flatbuf_Union_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Union_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Union)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Union, mode, org_apache_arrow_flatbuf_UnionMode, org_apache_arrow_flatbuf_UnionMode_enum_t, INT16_C(0))
__flatbuffers_define_vector_field(1, org_apache_arrow_flatbuf_Union, typeIds, flatbuffers_int32_vec_t, 0)

struct org_apache_arrow_flatbuf_Int_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Int_vec_len(org_apache_arrow_flatbuf_Int_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Int_table_t org_apache_arrow_flatbuf_Int_vec_at(org_apache_arrow_flatbuf_Int_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Int_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Int)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Int, bitWidth, flatbuffers_int32, int32_t, INT32_C(0))
__flatbuffers_define_scalar_field(1, org_apache_arrow_flatbuf_Int, is_signed, flatbuffers_bool, flatbuffers_bool_t, UINT8_C(0))

struct org_apache_arrow_flatbuf_FloatingPoint_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_FloatingPoint_vec_len(org_apache_arrow_flatbuf_FloatingPoint_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_FloatingPoint_table_t org_apache_arrow_flatbuf_FloatingPoint_vec_at(org_apache_arrow_flatbuf_FloatingPoint_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_FloatingPoint_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_FloatingPoint)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_FloatingPoint, precision, org_apache_arrow_flatbuf_Precision, org_apache_arrow_flatbuf_Precision_enum_t, INT16_C(0))

/**  Unicode with UTF-8 encoding */
struct org_apache_arrow_flatbuf_Utf8_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Utf8_vec_len(org_apache_arrow_flatbuf_Utf8_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Utf8_table_t org_apache_arrow_flatbuf_Utf8_vec_at(org_apache_arrow_flatbuf_Utf8_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Utf8_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Utf8)


/**  Opaque binary data */
struct org_apache_arrow_flatbuf_Binary_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Binary_vec_len(org_apache_arrow_flatbuf_Binary_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Binary_table_t org_apache_arrow_flatbuf_Binary_vec_at(org_apache_arrow_flatbuf_Binary_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Binary_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Binary)


/**  Same as Utf8, but with 64-bit offsets, allowing to represent
 *  extremely large data values. */
struct org_apache_arrow_flatbuf_LargeUtf8_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_LargeUtf8_vec_len(org_apache_arrow_flatbuf_LargeUtf8_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_LargeUtf8_table_t org_apache_arrow_flatbuf_LargeUtf8_vec_at(org_apache_arrow_flatbuf_LargeUtf8_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_LargeUtf8_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_LargeUtf8)


/**  Same as Binary, but with 64-bit offsets, allowing to represent
 *  extremely large data values. */
struct org_apache_arrow_flatbuf_LargeBinary_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_LargeBinary_vec_len(org_apache_arrow_flatbuf_LargeBinary_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_LargeBinary_table_t org_apache_arrow_flatbuf_LargeBinary_vec_at(org_apache_arrow_flatbuf_LargeBinary_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_LargeBinary_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_LargeBinary)


struct org_apache_arrow_flatbuf_FixedSizeBinary_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_FixedSizeBinary_vec_len(org_apache_arrow_flatbuf_FixedSizeBinary_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_FixedSizeBinary_table_t org_apache_arrow_flatbuf_FixedSizeBinary_vec_at(org_apache_arrow_flatbuf_FixedSizeBinary_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_FixedSizeBinary_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_FixedSizeBinary)

/**  Number of bytes per value */
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_FixedSizeBinary, byteWidth, flatbuffers_int32, int32_t, INT32_C(0))

struct org_apache_arrow_flatbuf_Bool_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Bool_vec_len(org_apache_arrow_flatbuf_Bool_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Bool_table_t org_apache_arrow_flatbuf_Bool_vec_at(org_apache_arrow_flatbuf_Bool_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Bool_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Bool)


/**  Contains two child arrays, run_ends and values.
 *  The run_ends child array must be a 16/32/64-bit integer array
 *  which encodes the indices at which the run with the value in
 *  each corresponding index in the values child array ends.
 *  Like list/struct types, the value array can be of any type. */
struct org_apache_arrow_flatbuf_RunEndEncoded_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_RunEndEncoded_vec_len(org_apache_arrow_flatbuf_RunEndEncoded_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_RunEndEncoded_table_t org_apache_arrow_flatbuf_RunEndEncoded_vec_at(org_apache_arrow_flatbuf_RunEndEncoded_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_RunEndEncoded_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_RunEndEncoded)


/**  Exact decimal value represented as an integer value in two's
 *  complement. Currently only 128-bit (16-byte) and 256-bit (32-byte) integers
 *  are used. The representation uses the endianness indicated
 *  in the Schema. */
struct org_apache_arrow_flatbuf_Decimal_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Decimal_vec_len(org_apache_arrow_flatbuf_Decimal_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Decimal_table_t org_apache_arrow_flatbuf_Decimal_vec_at(org_apache_arrow_flatbuf_Decimal_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Decimal_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Decimal)

/**  Total number of decimal digits */
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Decimal, precision, flatbuffers_int32, int32_t, INT32_C(0))
/**  Number of digits after the decimal point "." */
__flatbuffers_define_scalar_field(1, org_apache_arrow_flatbuf_Decimal, scale, flatbuffers_int32, int32_t, INT32_C(0))
/**  Number of bits per value. The only accepted widths are 128 and 256.
 *  We use bitWidth for consistency with Int::bitWidth. */
__flatbuffers_define_scalar_field(2, org_apache_arrow_flatbuf_Decimal, bitWidth, flatbuffers_int32, int32_t, INT32_C(128))

/**  Date is either a 32-bit or 64-bit signed integer type representing an
 *  elapsed time since UNIX epoch (1970-01-01), stored in either of two units:
 *
 *  * Milliseconds (64 bits) indicating UNIX time elapsed since the epoch (no
 *    leap seconds), where the values are evenly divisible by 86400000
 *  * Days (32 bits) since the UNIX epoch */
struct org_apache_arrow_flatbuf_Date_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Date_vec_len(org_apache_arrow_flatbuf_Date_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Date_table_t org_apache_arrow_flatbuf_Date_vec_at(org_apache_arrow_flatbuf_Date_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Date_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Date)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Date, unit, org_apache_arrow_flatbuf_DateUnit, org_apache_arrow_flatbuf_DateUnit_enum_t, INT16_C(1))

/**  Time is either a 32-bit or 64-bit signed integer type representing an
 *  elapsed time since midnight, stored in either of four units: seconds,
 *  milliseconds, microseconds or nanoseconds.
 *
 *  The integer `bitWidth` depends on the `unit` and must be one of the following:
 *  * SECOND and MILLISECOND: 32 bits
 *  * MICROSECOND and NANOSECOND: 64 bits
 *
 *  The allowed values are between 0 (inclusive) and 86400 (=24*60*60) seconds
 *  (exclusive), adjusted for the time unit (for example, up to 86400000
 *  exclusive for the MILLISECOND unit).
 *  This definition doesn't allow for leap seconds. Time values from
 *  measurements with leap seconds will need to be corrected when ingesting
 *  into Arrow (for example by replacing the value 86400 with 86399). */
struct org_apache_arrow_flatbuf_Time_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Time_vec_len(org_apache_arrow_flatbuf_Time_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Time_table_t org_apache_arrow_flatbuf_Time_vec_at(org_apache_arrow_flatbuf_Time_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Time_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Time)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Time, unit, org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t, INT16_C(1))
__flatbuffers_define_scalar_field(1, org_apache_arrow_flatbuf_Time, bitWidth, flatbuffers_int32, int32_t, INT32_C(32))

/**  Timestamp is a 64-bit signed integer representing an elapsed time since a
 *  fixed epoch, stored in either of four units: seconds, milliseconds,
 *  microseconds or nanoseconds, and is optionally annotated with a timezone.
 *
 *  Timestamp values do not include any leap seconds (in other words, all
 *  days are considered 86400 seconds long).
 *
 *  Timestamps with a non-empty timezone
 *  ------------------------------------
 *
 *  If a Timestamp column has a non-empty timezone value, its epoch is
 *  1970-01-01 00:00:00 (January 1st 1970, midnight) in the *UTC* timezone
 *  (the Unix epoch), regardless of the Timestamp's own timezone.
 *
 *  Therefore, timestamp values with a non-empty timezone correspond to
 *  physical points in time together with some additional information about
 *  how the data was obtained and/or how to display it (the timezone).
 *
 *    For example, the timestamp value 0 with the timezone string "Europe/Paris"
 *    corresponds to "January 1st 1970, 00h00" in the UTC timezone, but the
 *    application may prefer to display it as "January 1st 1970, 01h00" in
 *    the Europe/Paris timezone (which is the same physical point in time).
 *
 *  One consequence is that timestamp values with a non-empty timezone
 *  can be compared and ordered directly, since they all share the same
 *  well-known point of reference (the Unix epoch).
 *
 *  Timestamps with an unset / empty timezone
 *  -----------------------------------------
 *
 *  If a Timestamp column has no timezone value, its epoch is
 *  1970-01-01 00:00:00 (January 1st 1970, midnight) in an *unknown* timezone.
 *
 *  Therefore, timestamp values without a timezone cannot be meaningfully
 *  interpreted as physical points in time, but only as calendar / clock
 *  indications ("wall clock time") in an unspecified timezone.
 *
 *    For example, the timestamp value 0 with an empty timezone string
 *    corresponds to "January 1st 1970, 00h00" in an unknown timezone: there
 *    is not enough information to interpret it as a well-defined physical
 *    point in time.
 *
 *  One consequence is that timestamp values without a timezone cannot
 *  be reliably compared or ordered, since they may have different points of
 *  reference.  In particular, it is *not* possible to interpret an unset
 *  or empty timezone as the same as "UTC".
 *
 *  Conversion between timezones
 *  ----------------------------
 *
 *  If a Timestamp column has a non-empty timezone, changing the timezone
 *  to a different non-empty value is a metadata-only operation:
 *  the timestamp values need not change as their point of reference remains
 *  the same (the Unix epoch).
 *
 *  However, if a Timestamp column has no timezone value, changing it to a
 *  non-empty value requires to think about the desired semantics.
 *  One possibility is to assume that the original timestamp values are
 *  relative to the epoch of the timezone being set; timestamp values should
 *  then adjusted to the Unix epoch (for example, changing the timezone from
 *  empty to "Europe/Paris" would require converting the timestamp values
 *  from "Europe/Paris" to "UTC", which seems counter-intuitive but is
 *  nevertheless correct).
 *
 *  Guidelines for encoding data from external libraries
 *  ----------------------------------------------------
 *
 *  Date & time libraries often have multiple different data types for temporal
 *  data. In order to ease interoperability between different implementations the
 *  Arrow project has some recommendations for encoding these types into a Timestamp
 *  column.
 *
 *  An "instant" represents a physical point in time that has no relevant timezone
 *  (for example, astronomical data). To encode an instant, use a Timestamp with
 *  the timezone string set to "UTC", and make sure the Timestamp values
 *  are relative to the UTC epoch (January 1st 1970, midnight).
 *
 *  A "zoned date-time" represents a physical point in time annotated with an
 *  informative timezone (for example, the timezone in which the data was
 *  recorded).  To encode a zoned date-time, use a Timestamp with the timezone
 *  string set to the name of the timezone, and make sure the Timestamp values
 *  are relative to the UTC epoch (January 1st 1970, midnight).
 *
 *   (There is some ambiguity between an instant and a zoned date-time with the
 *    UTC timezone.  Both of these are stored the same in Arrow.  Typically,
 *    this distinction does not matter.  If it does, then an application should
 *    use custom metadata or an extension type to distinguish between the two cases.)
 *
 *  An "offset date-time" represents a physical point in time combined with an
 *  explicit offset from UTC.  To encode an offset date-time, use a Timestamp
 *  with the timezone string set to the numeric timezone offset string
 *  (e.g. "+03:00"), and make sure the Timestamp values are relative to
 *  the UTC epoch (January 1st 1970, midnight).
 *
 *  A "naive date-time" (also called "local date-time" in some libraries)
 *  represents a wall clock time combined with a calendar date, but with
 *  no indication of how to map this information to a physical point in time.
 *  Naive date-times must be handled with care because of this missing
 *  information, and also because daylight saving time (DST) may make
 *  some values ambiguous or non-existent. A naive date-time may be
 *  stored as a struct with Date and Time fields. However, it may also be
 *  encoded into a Timestamp column with an empty timezone. The timestamp
 *  values should be computed "as if" the timezone of the date-time values
 *  was UTC; for example, the naive date-time "January 1st 1970, 00h00" would
 *  be encoded as timestamp value 0. */
struct org_apache_arrow_flatbuf_Timestamp_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Timestamp_vec_len(org_apache_arrow_flatbuf_Timestamp_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Timestamp_table_t org_apache_arrow_flatbuf_Timestamp_vec_at(org_apache_arrow_flatbuf_Timestamp_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Timestamp_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Timestamp)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Timestamp, unit, org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t, INT16_C(0))
/**  The timezone is an optional string indicating the name of a timezone,
 *  one of:
 *
 *  * As used in the Olson timezone database (the "tz database" or
 *    "tzdata"), such as "America/New_York".
 *  * An absolute timezone offset of the form "+XX:XX" or "-XX:XX",
 *    such as "+07:30".
 *
 *  Whether a timezone string is present indicates different semantics about
 *  the data (see above). */
__flatbuffers_define_string_field(1, org_apache_arrow_flatbuf_Timestamp, timezone, 0)

struct org_apache_arrow_flatbuf_Interval_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Interval_vec_len(org_apache_arrow_flatbuf_Interval_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Interval_table_t org_apache_arrow_flatbuf_Interval_vec_at(org_apache_arrow_flatbuf_Interval_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Interval_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Interval)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Interval, unit, org_apache_arrow_flatbuf_IntervalUnit, org_apache_arrow_flatbuf_IntervalUnit_enum_t, INT16_C(0))

struct org_apache_arrow_flatbuf_Duration_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Duration_vec_len(org_apache_arrow_flatbuf_Duration_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Duration_table_t org_apache_arrow_flatbuf_Duration_vec_at(org_apache_arrow_flatbuf_Duration_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Duration_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Duration)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Duration, unit, org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t, INT16_C(1))
/**  ----------------------------------------------------------------------
 *  Top-level Type value, enabling extensible type-specific metadata. We can
 *  add new logical types to Type without breaking backwards compatibility */
typedef uint8_t org_apache_arrow_flatbuf_Type_union_type_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_Type, org_apache_arrow_flatbuf_Type_union_type_t, 8)
__flatbuffers_define_union(flatbuffers_, org_apache_arrow_flatbuf_Type)
/**  ----------------------------------------------------------------------
 *  user defined key value pairs to add custom metadata to arrow
 *  key namespacing is the responsibility of the user */
#define org_apache_arrow_flatbuf_Type_NONE ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(0))
#define org_apache_arrow_flatbuf_Type_Null ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(1))
#define org_apache_arrow_flatbuf_Type_Int ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(2))
#define org_apache_arrow_flatbuf_Type_FloatingPoint ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(3))
#define org_apache_arrow_flatbuf_Type_Binary ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(4))
#define org_apache_arrow_flatbuf_Type_Utf8 ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(5))
#define org_apache_arrow_flatbuf_Type_Bool ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(6))
#define org_apache_arrow_flatbuf_Type_Decimal ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(7))
#define org_apache_arrow_flatbuf_Type_Date ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(8))
#define org_apache_arrow_flatbuf_Type_Time ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(9))
#define org_apache_arrow_flatbuf_Type_Timestamp ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(10))
#define org_apache_arrow_flatbuf_Type_Interval ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(11))
#define org_apache_arrow_flatbuf_Type_List ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(12))
#define org_apache_arrow_flatbuf_Type_Struct_ ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(13))
#define org_apache_arrow_flatbuf_Type_Union ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(14))
#define org_apache_arrow_flatbuf_Type_FixedSizeBinary ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(15))
#define org_apache_arrow_flatbuf_Type_FixedSizeList ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(16))
#define org_apache_arrow_flatbuf_Type_Map ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(17))
#define org_apache_arrow_flatbuf_Type_Duration ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(18))
#define org_apache_arrow_flatbuf_Type_LargeBinary ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(19))
#define org_apache_arrow_flatbuf_Type_LargeUtf8 ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(20))
#define org_apache_arrow_flatbuf_Type_LargeList ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(21))
#define org_apache_arrow_flatbuf_Type_RunEndEncoded ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(22))

static inline const char *org_apache_arrow_flatbuf_Type_type_name(org_apache_arrow_flatbuf_Type_union_type_t type)
{
    switch (type) {
    case org_apache_arrow_flatbuf_Type_NONE: return "NONE";
    case org_apache_arrow_flatbuf_Type_Null: return "Null";
    case org_apache_arrow_flatbuf_Type_Int: return "Int";
    case org_apache_arrow_flatbuf_Type_FloatingPoint: return "FloatingPoint";
    case org_apache_arrow_flatbuf_Type_Binary: return "Binary";
    case org_apache_arrow_flatbuf_Type_Utf8: return "Utf8";
    case org_apache_arrow_flatbuf_Type_Bool: return "Bool";
    case org_apache_arrow_flatbuf_Type_Decimal: return "Decimal";
    case org_apache_arrow_flatbuf_Type_Date: return "Date";
    case org_apache_arrow_flatbuf_Type_Time: return "Time";
    case org_apache_arrow_flatbuf_Type_Timestamp: return "Timestamp";
    case org_apache_arrow_flatbuf_Type_Interval: return "Interval";
    case org_apache_arrow_flatbuf_Type_List: return "List";
    case org_apache_arrow_flatbuf_Type_Struct_: return "Struct_";
    case org_apache_arrow_flatbuf_Type_Union: return "Union";
    case org_apache_arrow_flatbuf_Type_FixedSizeBinary: return "FixedSizeBinary";
    case org_apache_arrow_flatbuf_Type_FixedSizeList: return "FixedSizeList";
    case org_apache_arrow_flatbuf_Type_Map: return "Map";
    case org_apache_arrow_flatbuf_Type_Duration: return "Duration";
    case org_apache_arrow_flatbuf_Type_LargeBinary: return "LargeBinary";
    case org_apache_arrow_flatbuf_Type_LargeUtf8: return "LargeUtf8";
    case org_apache_arrow_flatbuf_Type_LargeList: return "LargeList";
    case org_apache_arrow_flatbuf_Type_RunEndEncoded: return "RunEndEncoded";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_Type_is_known_type(org_apache_arrow_flatbuf_Type_union_type_t type)
{
    switch (type) {
    case org_apache_arrow_flatbuf_Type_NONE: return 1;
    case org_apache_arrow_flatbuf_Type_Null: return 1;
    case org_apache_arrow_flatbuf_Type_Int: return 1;
    case org_apache_arrow_flatbuf_Type_FloatingPoint: return 1;
    case org_apache_arrow_flatbuf_Type_Binary: return 1;
    case org_apache_arrow_flatbuf_Type_Utf8: return 1;
    case org_apache_arrow_flatbuf_Type_Bool: return 1;
    case org_apache_arrow_flatbuf_Type_Decimal: return 1;
    case org_apache_arrow_flatbuf_Type_Date: return 1;
    case org_apache_arrow_flatbuf_Type_Time: return 1;
    case org_apache_arrow_flatbuf_Type_Timestamp: return 1;
    case org_apache_arrow_flatbuf_Type_Interval: return 1;
    case org_apache_arrow_flatbuf_Type_List: return 1;
    case org_apache_arrow_flatbuf_Type_Struct_: return 1;
    case org_apache_arrow_flatbuf_Type_Union: return 1;
    case org_apache_arrow_flatbuf_Type_FixedSizeBinary: return 1;
    case org_apache_arrow_flatbuf_Type_FixedSizeList: return 1;
    case org_apache_arrow_flatbuf_Type_Map: return 1;
    case org_apache_arrow_flatbuf_Type_Duration: return 1;
    case org_apache_arrow_flatbuf_Type_LargeBinary: return 1;
    case org_apache_arrow_flatbuf_Type_LargeUtf8: return 1;
    case org_apache_arrow_flatbuf_Type_LargeList: return 1;
    case org_apache_arrow_flatbuf_Type_RunEndEncoded: return 1;
    default: return 0;
    }
}


struct org_apache_arrow_flatbuf_KeyValue_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_KeyValue_vec_len(org_apache_arrow_flatbuf_KeyValue_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_KeyValue_table_t org_apache_arrow_flatbuf_KeyValue_vec_at(org_apache_arrow_flatbuf_KeyValue_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_KeyValue_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_KeyValue)

__flatbuffers_define_string_field(0, org_apache_arrow_flatbuf_KeyValue, key, 0)
__flatbuffers_define_string_field(1, org_apache_arrow_flatbuf_KeyValue, value, 0)

struct org_apache_arrow_flatbuf_DictionaryEncoding_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_DictionaryEncoding_vec_len(org_apache_arrow_flatbuf_DictionaryEncoding_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_DictionaryEncoding_table_t org_apache_arrow_flatbuf_DictionaryEncoding_vec_at(org_apache_arrow_flatbuf_DictionaryEncoding_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_DictionaryEncoding_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_DictionaryEncoding)

/**  The known dictionary id in the application where this data is used. In
 *  the file or streaming formats, the dictionary ids are found in the
 *  DictionaryBatch messages */
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_DictionaryEncoding, id, flatbuffers_int64, int64_t, INT64_C(0))
/**  The dictionary indices are constrained to be non-negative integers. If
 *  this field is null, the indices must be signed int32. To maximize
 *  cross-language compatibility and performance, implementations are
 *  recommended to prefer signed integer types over unsigned integer types
 *  and to avoid uint64 indices unless they are required by an application. */
__flatbuffers_define_table_field(1, org_apache_arrow_flatbuf_DictionaryEncoding, indexType, org_apache_arrow_flatbuf_Int_table_t, 0)
/**  By default, dictionaries are not ordered, or the order does not have
 *  semantic meaning. In some statistical, applications, dictionary-encoding
 *  is used to represent ordered categorical data, and we provide a way to
 *  preserve that metadata here */
__flatbuffers_define_scalar_field(2, org_apache_arrow_flatbuf_DictionaryEncoding, isOrdered, flatbuffers_bool, flatbuffers_bool_t, UINT8_C(0))
__flatbuffers_define_scalar_field(3, org_apache_arrow_flatbuf_DictionaryEncoding, dictionaryKind, org_apache_arrow_flatbuf_DictionaryKind, org_apache_arrow_flatbuf_DictionaryKind_enum_t, INT16_C(0))

/**  ----------------------------------------------------------------------
 *  A field represents a named column in a record / row batch or child of a
 *  nested type. */
struct org_apache_arrow_flatbuf_Field_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Field_vec_len(org_apache_arrow_flatbuf_Field_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Field_table_t org_apache_arrow_flatbuf_Field_vec_at(org_apache_arrow_flatbuf_Field_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Field_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Field)

/**  Name is not required, in i.e. a List */
__flatbuffers_define_string_field(0, org_apache_arrow_flatbuf_Field, name, 0)
/**  Whether or not this field can contain nulls. Should be true in general. */
__flatbuffers_define_scalar_field(1, org_apache_arrow_flatbuf_Field, nullable, flatbuffers_bool, flatbuffers_bool_t, UINT8_C(0))
/**  This is the type of the decoded value if the field is dictionary encoded. */
__flatbuffers_define_union_field(flatbuffers_, 3, org_apache_arrow_flatbuf_Field, type, org_apache_arrow_flatbuf_Type, 0)
/**  Present only if the field is dictionary encoded. */
__flatbuffers_define_table_field(4, org_apache_arrow_flatbuf_Field, dictionary, org_apache_arrow_flatbuf_DictionaryEncoding_table_t, 0)
/**  children apply only to nested data types like Struct, List and Union. For
 *  primitive types children will have length 0. */
__flatbuffers_define_vector_field(5, org_apache_arrow_flatbuf_Field, children, org_apache_arrow_flatbuf_Field_vec_t, 0)
/**  User-defined metadata */
__flatbuffers_define_vector_field(6, org_apache_arrow_flatbuf_Field, custom_metadata, org_apache_arrow_flatbuf_KeyValue_vec_t, 0)

/**  ----------------------------------------------------------------------
 *  A Schema describes the columns in a row batch */
struct org_apache_arrow_flatbuf_Schema_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Schema_vec_len(org_apache_arrow_flatbuf_Schema_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Schema_table_t org_apache_arrow_flatbuf_Schema_vec_at(org_apache_arrow_flatbuf_Schema_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Schema_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Schema)

/**  endianness of the buffer
 *  it is Little Endian by default
 *  if endianness doesn't match the underlying system then the vectors need to be converted */
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Schema, endianness, org_apache_arrow_flatbuf_Endianness, org_apache_arrow_flatbuf_Endianness_enum_t, INT16_C(0))
__flatbuffers_define_vector_field(1, org_apache_arrow_flatbuf_Schema, fields, org_apache_arrow_flatbuf_Field_vec_t, 0)
__flatbuffers_define_vector_field(2, org_apache_arrow_flatbuf_Schema, custom_metadata, org_apache_arrow_flatbuf_KeyValue_vec_t, 0)
/**  Features used in the stream/file. */
__flatbuffers_define_vector_field(3, org_apache_arrow_flatbuf_Schema, features, org_apache_arrow_flatbuf_Feature_vec_t, 0)


#include "flatcc/flatcc_epilogue.h"
#endif /* SCHEMA_READER_H */
#ifndef SCHEMA_BUILDER_H
#define SCHEMA_BUILDER_H

/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

#ifndef SCHEMA_READER_H
#include "Schema_reader.h"
#endif
#ifndef FLATBUFFERS_COMMON_BUILDER_H
#include "flatbuffers_common_builder.h"
#endif
#include "flatcc/flatcc_prologue.h"
#ifndef flatbuffers_identifier
#define flatbuffers_identifier 0
#endif
#ifndef flatbuffers_extension
#define flatbuffers_extension "bin"
#endif

#define __org_apache_arrow_flatbuf_MetadataVersion_formal_args , org_apache_arrow_flatbuf_MetadataVersion_enum_t v0
#define __org_apache_arrow_flatbuf_MetadataVersion_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_MetadataVersion, org_apache_arrow_flatbuf_MetadataVersion_enum_t)
#define __org_apache_arrow_flatbuf_Feature_formal_args , org_apache_arrow_flatbuf_Feature_enum_t v0
#define __org_apache_arrow_flatbuf_Feature_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_Feature, org_apache_arrow_flatbuf_Feature_enum_t)
#define __org_apache_arrow_flatbuf_UnionMode_formal_args , org_apache_arrow_flatbuf_UnionMode_enum_t v0
#define __org_apache_arrow_flatbuf_UnionMode_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_UnionMode, org_apache_arrow_flatbuf_UnionMode_enum_t)
#define __org_apache_arrow_flatbuf_Precision_formal_args , org_apache_arrow_flatbuf_Precision_enum_t v0
#define __org_apache_arrow_flatbuf_Precision_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_Precision, org_apache_arrow_flatbuf_Precision_enum_t)
#define __org_apache_arrow_flatbuf_DateUnit_formal_args , org_apache_arrow_flatbuf_DateUnit_enum_t v0
#define __org_apache_arrow_flatbuf_DateUnit_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_DateUnit, org_apache_arrow_flatbuf_DateUnit_enum_t)
#define __org_apache_arrow_flatbuf_TimeUnit_formal_args , org_apache_arrow_flatbuf_TimeUnit_enum_t v0
#define __org_apache_arrow_flatbuf_TimeUnit_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t)
#define __org_apache_arrow_flatbuf_IntervalUnit_formal_args , org_apache_arrow_flatbuf_IntervalUnit_enum_t v0
#define __org_apache_arrow_flatbuf_IntervalUnit_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_IntervalUnit, org_apache_arrow_flatbuf_IntervalUnit_enum_t)
#define __org_apache_arrow_flatbuf_DictionaryKind_formal_args , org_apache_arrow_flatbuf_DictionaryKind_enum_t v0
#define __org_apache_arrow_flatbuf_DictionaryKind_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_DictionaryKind, org_apache_arrow_flatbuf_DictionaryKind_enum_t)
#define __org_apache_arrow_flatbuf_Endianness_formal_args , org_apache_arrow_flatbuf_Endianness_enum_t v0
#define __org_apache_arrow_flatbuf_Endianness_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_Endianness, org_apache_arrow_flatbuf_Endianness_enum_t)

#define __org_apache_arrow_flatbuf_Buffer_formal_args , int64_t v0, int64_t v1
#define __org_apache_arrow_flatbuf_Buffer_call_args , v0, v1
static inline org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_assign(org_apache_arrow_flatbuf_Buffer_t *p, int64_t v0, int64_t v1)
{ p->offset = v0; p->length = v1;
  return p; }
static inline org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_copy(org_apache_arrow_flatbuf_Buffer_t *p, const org_apache_arrow_flatbuf_Buffer_t *p2)
{ p->offset = p2->offset; p->length = p2->length;
  return p; }
static inline org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_assign_to_pe(org_apache_arrow_flatbuf_Buffer_t *p, int64_t v0, int64_t v1)
{ flatbuffers_int64_assign_to_pe(&p->offset, v0); flatbuffers_int64_assign_to_pe(&p->length, v1);
  return p; }
static inline org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_copy_to_pe(org_apache_arrow_flatbuf_Buffer_t *p, const org_apache_arrow_flatbuf_Buffer_t *p2)
{ flatbuffers_int64_copy_to_pe(&p->offset, &p2->offset); flatbuffers_int64_copy_to_pe(&p->length, &p2->length);
  return p; }
static inline org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_assign_from_pe(org_apache_arrow_flatbuf_Buffer_t *p, int64_t v0, int64_t v1)
{ flatbuffers_int64_assign_from_pe(&p->offset, v0); flatbuffers_int64_assign_from_pe(&p->length, v1);
  return p; }
static inline org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_copy_from_pe(org_apache_arrow_flatbuf_Buffer_t *p, const org_apache_arrow_flatbuf_Buffer_t *p2)
{ flatbuffers_int64_copy_from_pe(&p->offset, &p2->offset); flatbuffers_int64_copy_from_pe(&p->length, &p2->length);
  return p; }
__flatbuffers_build_struct(flatbuffers_, org_apache_arrow_flatbuf_Buffer, 16, 8, org_apache_arrow_flatbuf_Buffer_file_identifier, org_apache_arrow_flatbuf_Buffer_type_identifier)
__flatbuffers_define_fixed_array_primitives(flatbuffers_, org_apache_arrow_flatbuf_Buffer, org_apache_arrow_flatbuf_Buffer_t)

typedef flatbuffers_union_ref_t org_apache_arrow_flatbuf_Type_union_ref_t;
typedef flatbuffers_union_vec_ref_t org_apache_arrow_flatbuf_Type_union_vec_ref_t;
static org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Type_union_t t);

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Null_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Null_ref_t;
static org_apache_arrow_flatbuf_Null_ref_t org_apache_arrow_flatbuf_Null_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Null_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Null, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Struct__required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Struct__ref_t;
static org_apache_arrow_flatbuf_Struct__ref_t org_apache_arrow_flatbuf_Struct__clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Struct__table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Struct_, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_List_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_List_ref_t;
static org_apache_arrow_flatbuf_List_ref_t org_apache_arrow_flatbuf_List_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_List_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_List, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_LargeList_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_LargeList_ref_t;
static org_apache_arrow_flatbuf_LargeList_ref_t org_apache_arrow_flatbuf_LargeList_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_LargeList_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_LargeList, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_FixedSizeList_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_FixedSizeList_ref_t;
static org_apache_arrow_flatbuf_FixedSizeList_ref_t org_apache_arrow_flatbuf_FixedSizeList_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_FixedSizeList_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_FixedSizeList, 1)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Map_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Map_ref_t;
static org_apache_arrow_flatbuf_Map_ref_t org_apache_arrow_flatbuf_Map_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Map_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Map, 1)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Union_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Union_ref_t;
static org_apache_arrow_flatbuf_Union_ref_t org_apache_arrow_flatbuf_Union_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Union_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Union, 2)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Int_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Int_ref_t;
static org_apache_arrow_flatbuf_Int_ref_t org_apache_arrow_flatbuf_Int_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Int_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Int, 2)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_FloatingPoint_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_FloatingPoint_ref_t;
static org_apache_arrow_flatbuf_FloatingPoint_ref_t org_apache_arrow_flatbuf_FloatingPoint_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_FloatingPoint_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_FloatingPoint, 1)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Utf8_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Utf8_ref_t;
static org_apache_arrow_flatbuf_Utf8_ref_t org_apache_arrow_flatbuf_Utf8_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Utf8_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Utf8, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Binary_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Binary_ref_t;
static org_apache_arrow_flatbuf_Binary_ref_t org_apache_arrow_flatbuf_Binary_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Binary_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Binary, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_LargeUtf8_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_LargeUtf8_ref_t;
static org_apache_arrow_flatbuf_LargeUtf8_ref_t org_apache_arrow_flatbuf_LargeUtf8_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_LargeUtf8_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_LargeUtf8, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_LargeBinary_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_LargeBinary_ref_t;
static org_apache_arrow_flatbuf_LargeBinary_ref_t org_apache_arrow_flatbuf_LargeBinary_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_LargeBinary_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_LargeBinary, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_FixedSizeBinary_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_FixedSizeBinary_ref_t;
static org_apache_arrow_flatbuf_FixedSizeBinary_ref_t org_apache_arrow_flatbuf_FixedSizeBinary_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_FixedSizeBinary_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_FixedSizeBinary, 1)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Bool_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Bool_ref_t;
static org_apache_arrow_flatbuf_Bool_ref_t org_apache_arrow_flatbuf_Bool_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Bool_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Bool, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_RunEndEncoded_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_RunEndEncoded_ref_t;
static org_apache_arrow_flatbuf_RunEndEncoded_ref_t org_apache_arrow_flatbuf_RunEndEncoded_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_RunEndEncoded_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_RunEndEncoded, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Decimal_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Decimal_ref_t;
static org_apache_arrow_flatbuf_Decimal_ref_t org_apache_arrow_flatbuf_Decimal_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Decimal_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Decimal, 3)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Date_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Date_ref_t;
static org_apache_arrow_flatbuf_Date_ref_t org_apache_arrow_flatbuf_Date_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Date_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Date, 1)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Time_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Time_ref_t;
static org_apache_arrow_flatbuf_Time_ref_t org_apache_arrow_flatbuf_Time_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Time_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Time, 2)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Timestamp_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Timestamp_ref_t;
static org_apache_arrow_flatbuf_Timestamp_ref_t org_apache_arrow_flatbuf_Timestamp_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Timestamp_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Timestamp, 2)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Interval_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Interval_ref_t;
static org_apache_arrow_flatbuf_Interval_ref_t org_apache_arrow_flatbuf_Interval_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Interval_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Interval, 1)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Duration_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Duration_ref_t;
static org_apache_arrow_flatbuf_Duration_ref_t org_apache_arrow_flatbuf_Duration_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Duration_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Duration, 1)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_KeyValue_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_KeyValue_ref_t;
static org_apache_arrow_flatbuf_KeyValue_ref_t org_apache_arrow_flatbuf_KeyValue_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_KeyValue_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_KeyValue, 2)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_DictionaryEncoding_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_DictionaryEncoding_ref_t;
static org_apache_arrow_flatbuf_DictionaryEncoding_ref_t org_apache_arrow_flatbuf_DictionaryEncoding_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_DictionaryEncoding_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_DictionaryEncoding, 4)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Field_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Field_ref_t;
static org_apache_arrow_flatbuf_Field_ref_t org_apache_arrow_flatbuf_Field_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Field_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Field, 7)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Schema_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Schema_ref_t;
static org_apache_arrow_flatbuf_Schema_ref_t org_apache_arrow_flatbuf_Schema_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Schema_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Schema, 4)

#define __org_apache_arrow_flatbuf_Null_formal_args
#define __org_apache_arrow_flatbuf_Null_call_args
static inline org_apache_arrow_flatbuf_Null_ref_t org_apache_arrow_flatbuf_Null_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Null_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Null, org_apache_arrow_flatbuf_Null_file_identifier, org_apache_arrow_flatbuf_Null_type_identifier)

#define __org_apache_arrow_flatbuf_Struct__formal_args
#define __org_apache_arrow_flatbuf_Struct__call_args
static inline org_apache_arrow_flatbuf_Struct__ref_t org_apache_arrow_flatbuf_Struct__create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Struct__formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Struct_, org_apache_arrow_flatbuf_Struct__file_identifier, org_apache_arrow_flatbuf_Struct__type_identifier)

#define __org_apache_arrow_flatbuf_List_formal_args
#define __org_apache_arrow_flatbuf_List_call_args
static inline org_apache_arrow_flatbuf_List_ref_t org_apache_arrow_flatbuf_List_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_List_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_List, org_apache_arrow_flatbuf_List_file_identifier, org_apache_arrow_flatbuf_List_type_identifier)

#define __org_apache_arrow_flatbuf_LargeList_formal_args
#define __org_apache_arrow_flatbuf_LargeList_call_args
static inline org_apache_arrow_flatbuf_LargeList_ref_t org_apache_arrow_flatbuf_LargeList_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_LargeList_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_LargeList, org_apache_arrow_flatbuf_LargeList_file_identifier, org_apache_arrow_flatbuf_LargeList_type_identifier)

#define __org_apache_arrow_flatbuf_FixedSizeList_formal_args , int32_t v0
#define __org_apache_arrow_flatbuf_FixedSizeList_call_args , v0
static inline org_apache_arrow_flatbuf_FixedSizeList_ref_t org_apache_arrow_flatbuf_FixedSizeList_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_FixedSizeList_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_FixedSizeList, org_apache_arrow_flatbuf_FixedSizeList_file_identifier, org_apache_arrow_flatbuf_FixedSizeList_type_identifier)

#define __org_apache_arrow_flatbuf_Map_formal_args , flatbuffers_bool_t v0
#define __org_apache_arrow_flatbuf_Map_call_args , v0
static inline org_apache_arrow_flatbuf_Map_ref_t org_apache_arrow_flatbuf_Map_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Map_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Map, org_apache_arrow_flatbuf_Map_file_identifier, org_apache_arrow_flatbuf_Map_type_identifier)

#define __org_apache_arrow_flatbuf_Union_formal_args , org_apache_arrow_flatbuf_UnionMode_enum_t v0, flatbuffers_int32_vec_ref_t v1
#define __org_apache_arrow_flatbuf_Union_call_args , v0, v1
static inline org_apache_arrow_flatbuf_Union_ref_t org_apache_arrow_flatbuf_Union_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Union_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Union, org_apache_arrow_flatbuf_Union_file_identifier, org_apache_arrow_flatbuf_Union_type_identifier)

#define __org_apache_arrow_flatbuf_Int_formal_args , int32_t v0, flatbuffers_bool_t v1
#define __org_apache_arrow_flatbuf_Int_call_args , v0, v1
static inline org_apache_arrow_flatbuf_Int_ref_t org_apache_arrow_flatbuf_Int_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Int_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Int, org_apache_arrow_flatbuf_Int_file_identifier, org_apache_arrow_flatbuf_Int_type_identifier)

#define __org_apache_arrow_flatbuf_FloatingPoint_formal_args , org_apache_arrow_flatbuf_Precision_enum_t v0
#define __org_apache_arrow_flatbuf_FloatingPoint_call_args , v0
static inline org_apache_arrow_flatbuf_FloatingPoint_ref_t org_apache_arrow_flatbuf_FloatingPoint_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_FloatingPoint_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_FloatingPoint, org_apache_arrow_flatbuf_FloatingPoint_file_identifier, org_apache_arrow_flatbuf_FloatingPoint_type_identifier)

#define __org_apache_arrow_flatbuf_Utf8_formal_args
#define __org_apache_arrow_flatbuf_Utf8_call_args
static inline org_apache_arrow_flatbuf_Utf8_ref_t org_apache_arrow_flatbuf_Utf8_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Utf8_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Utf8, org_apache_arrow_flatbuf_Utf8_file_identifier, org_apache_arrow_flatbuf_Utf8_type_identifier)

#define __org_apache_arrow_flatbuf_Binary_formal_args
#define __org_apache_arrow_flatbuf_Binary_call_args
static inline org_apache_arrow_flatbuf_Binary_ref_t org_apache_arrow_flatbuf_Binary_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Binary_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Binary, org_apache_arrow_flatbuf_Binary_file_identifier, org_apache_arrow_flatbuf_Binary_type_identifier)

#define __org_apache_arrow_flatbuf_LargeUtf8_formal_args
#define __org_apache_arrow_flatbuf_LargeUtf8_call_args
static inline org_apache_arrow_flatbuf_LargeUtf8_ref_t org_apache_arrow_flatbuf_LargeUtf8_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_LargeUtf8_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_LargeUtf8, org_apache_arrow_flatbuf_LargeUtf8_file_identifier, org_apache_arrow_flatbuf_LargeUtf8_type_identifier)

#define __org_apache_arrow_flatbuf_LargeBinary_formal_args
#define __org_apache_arrow_flatbuf_LargeBinary_call_args
static inline org_apache_arrow_flatbuf_LargeBinary_ref_t org_apache_arrow_flatbuf_LargeBinary_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_LargeBinary_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_LargeBinary, org_apache_arrow_flatbuf_LargeBinary_file_identifier, org_apache_arrow_flatbuf_LargeBinary_type_identifier)

#define __org_apache_arrow_flatbuf_FixedSizeBinary_formal_args , int32_t v0
#define __org_apache_arrow_flatbuf_FixedSizeBinary_call_args , v0
static inline org_apache_arrow_flatbuf_FixedSizeBinary_ref_t org_apache_arrow_flatbuf_FixedSizeBinary_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_FixedSizeBinary_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_FixedSizeBinary, org_apache_arrow_flatbuf_FixedSizeBinary_file_identifier, org_apache_arrow_flatbuf_FixedSizeBinary_type_identifier)

#define __org_apache_arrow_flatbuf_Bool_formal_args
#define __org_apache_arrow_flatbuf_Bool_call_args
static inline org_apache_arrow_flatbuf_Bool_ref_t org_apache_arrow_flatbuf_Bool_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Bool_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Bool, org_apache_arrow_flatbuf_Bool_file_identifier, org_apache_arrow_flatbuf_Bool_type_identifier)

#define __org_apache_arrow_flatbuf_RunEndEncoded_formal_args
#define __org_apache_arrow_flatbuf_RunEndEncoded_call_args
static inline org_apache_arrow_flatbuf_RunEndEncoded_ref_t org_apache_arrow_flatbuf_RunEndEncoded_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_RunEndEncoded_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_RunEndEncoded, org_apache_arrow_flatbuf_RunEndEncoded_file_identifier, org_apache_arrow_flatbuf_RunEndEncoded_type_identifier)

#define __org_apache_arrow_flatbuf_Decimal_formal_args , int32_t v0, int32_t v1, int32_t v2
#define __org_apache_arrow_flatbuf_Decimal_call_args , v0, v1, v2
static inline org_apache_arrow_flatbuf_Decimal_ref_t org_apache_arrow_flatbuf_Decimal_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Decimal_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Decimal, org_apache_arrow_flatbuf_Decimal_file_identifier, org_apache_arrow_flatbuf_Decimal_type_identifier)

#define __org_apache_arrow_flatbuf_Date_formal_args , org_apache_arrow_flatbuf_DateUnit_enum_t v0
#define __org_apache_arrow_flatbuf_Date_call_args , v0
static inline org_apache_arrow_flatbuf_Date_ref_t org_apache_arrow_flatbuf_Date_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Date_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Date, org_apache_arrow_flatbuf_Date_file_identifier, org_apache_arrow_flatbuf_Date_type_identifier)

#define __org_apache_arrow_flatbuf_Time_formal_args , org_apache_arrow_flatbuf_TimeUnit_enum_t v0, int32_t v1
#define __org_apache_arrow_flatbuf_Time_call_args , v0, v1
static inline org_apache_arrow_flatbuf_Time_ref_t org_apache_arrow_flatbuf_Time_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Time_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Time, org_apache_arrow_flatbuf_Time_file_identifier, org_apache_arrow_flatbuf_Time_type_identifier)

#define __org_apache_arrow_flatbuf_Timestamp_formal_args , org_apache_arrow_flatbuf_TimeUnit_enum_t v0, flatbuffers_string_ref_t v1
#define __org_apache_arrow_flatbuf_Timestamp_call_args , v0, v1
static inline org_apache_arrow_flatbuf_Timestamp_ref_t org_apache_arrow_flatbuf_Timestamp_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Timestamp_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Timestamp, org_apache_arrow_flatbuf_Timestamp_file_identifier, org_apache_arrow_flatbuf_Timestamp_type_identifier)

#define __org_apache_arrow_flatbuf_Interval_formal_args , org_apache_arrow_flatbuf_IntervalUnit_enum_t v0
#define __org_apache_arrow_flatbuf_Interval_call_args , v0
static inline org_apache_arrow_flatbuf_Interval_ref_t org_apache_arrow_flatbuf_Interval_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Interval_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Interval, org_apache_arrow_flatbuf_Interval_file_identifier, org_apache_arrow_flatbuf_Interval_type_identifier)

#define __org_apache_arrow_flatbuf_Duration_formal_args , org_apache_arrow_flatbuf_TimeUnit_enum_t v0
#define __org_apache_arrow_flatbuf_Duration_call_args , v0
static inline org_apache_arrow_flatbuf_Duration_ref_t org_apache_arrow_flatbuf_Duration_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Duration_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Duration, org_apache_arrow_flatbuf_Duration_file_identifier, org_apache_arrow_flatbuf_Duration_type_identifier)

#define __org_apache_arrow_flatbuf_KeyValue_formal_args , flatbuffers_string_ref_t v0, flatbuffers_string_ref_t v1
#define __org_apache_arrow_flatbuf_KeyValue_call_args , v0, v1
static inline org_apache_arrow_flatbuf_KeyValue_ref_t org_apache_arrow_flatbuf_KeyValue_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_KeyValue_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_KeyValue, org_apache_arrow_flatbuf_KeyValue_file_identifier, org_apache_arrow_flatbuf_KeyValue_type_identifier)

#define __org_apache_arrow_flatbuf_DictionaryEncoding_formal_args , int64_t v0, org_apache_arrow_flatbuf_Int_ref_t v1, flatbuffers_bool_t v2, org_apache_arrow_flatbuf_DictionaryKind_enum_t v3
#define __org_apache_arrow_flatbuf_DictionaryEncoding_call_args , v0, v1, v2, v3
static inline org_apache_arrow_flatbuf_DictionaryEncoding_ref_t org_apache_arrow_flatbuf_DictionaryEncoding_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_DictionaryEncoding_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_DictionaryEncoding, org_apache_arrow_flatbuf_DictionaryEncoding_file_identifier, org_apache_arrow_flatbuf_DictionaryEncoding_type_identifier)

#define __org_apache_arrow_flatbuf_Field_formal_args ,\
  flatbuffers_string_ref_t v0, flatbuffers_bool_t v1, org_apache_arrow_flatbuf_Type_union_ref_t v3, org_apache_arrow_flatbuf_DictionaryEncoding_ref_t v4, org_apache_arrow_flatbuf_Field_vec_ref_t v5, org_apache_arrow_flatbuf_KeyValue_vec_ref_t v6
#define __org_apache_arrow_flatbuf_Field_call_args ,\
  v0, v1, v3, v4, v5, v6
static inline org_apache_arrow_flatbuf_Field_ref_t org_apache_arrow_flatbuf_Field_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Field_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Field, org_apache_arrow_flatbuf_Field_file_identifier, org_apache_arrow_flatbuf_Field_type_identifier)

#define __org_apache_arrow_flatbuf_Schema_formal_args , org_apache_arrow_flatbuf_Endianness_enum_t v0, org_apache_arrow_flatbuf_Field_vec_ref_t v1, org_apache_arrow_flatbuf_KeyValue_vec_ref_t v2, org_apache_arrow_flatbuf_Feature_vec_ref_t v3
#define __org_apache_arrow_flatbuf_Schema_call_args , v0, v1, v2, v3
static inline org_apache_arrow_flatbuf_Schema_ref_t org_apache_arrow_flatbuf_Schema_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Schema_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Schema, org_apache_arrow_flatbuf_Schema_file_identifier, org_apache_arrow_flatbuf_Schema_type_identifier)

static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_NONE(void)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_NONE; uref.value = 0; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Null(org_apache_arrow_flatbuf_Null_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Null; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Int(org_apache_arrow_flatbuf_Int_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Int; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_FloatingPoint(org_apache_arrow_flatbuf_FloatingPoint_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_FloatingPoint; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Binary(org_apache_arrow_flatbuf_Binary_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Binary; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Utf8(org_apache_arrow_flatbuf_Utf8_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Utf8; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Bool(org_apache_arrow_flatbuf_Bool_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Bool; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Decimal(org_apache_arrow_flatbuf_Decimal_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Decimal; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Date(org_apache_arrow_flatbuf_Date_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Date; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Time(org_apache_arrow_flatbuf_Time_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Time; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Timestamp(org_apache_arrow_flatbuf_Timestamp_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Timestamp; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Interval(org_apache_arrow_flatbuf_Interval_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Interval; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_List(org_apache_arrow_flatbuf_List_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_List; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Struct_(org_apache_arrow_flatbuf_Struct__ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Struct_; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Union(org_apache_arrow_flatbuf_Union_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Union; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_FixedSizeBinary(org_apache_arrow_flatbuf_FixedSizeBinary_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_FixedSizeBinary; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_FixedSizeList(org_apache_arrow_flatbuf_FixedSizeList_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_FixedSizeList; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Map(org_apache_arrow_flatbuf_Map_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Map; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Duration(org_apache_arrow_flatbuf_Duration_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Duration; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_LargeBinary(org_apache_arrow_flatbuf_LargeBinary_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_LargeBinary; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_LargeUtf8(org_apache_arrow_flatbuf_LargeUtf8_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_LargeUtf8; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_LargeList(org_apache_arrow_flatbuf_LargeList_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_LargeList; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_RunEndEncoded(org_apache_arrow_flatbuf_RunEndEncoded_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_RunEndEncoded; uref.value = ref; return uref; }
__flatbuffers_build_union_vector(flatbuffers_, org_apache_arrow_flatbuf_Type)

static org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Type_union_t u)
{
    switch (u.type) {
    case 1: return org_apache_arrow_flatbuf_Type_as_Null(org_apache_arrow_flatbuf_Null_clone(B, (org_apache_arrow_flatbuf_Null_table_t)u.value));
    case 2: return org_apache_arrow_flatbuf_Type_as_Int(org_apache_arrow_flatbuf_Int_clone(B, (org_apache_arrow_flatbuf_Int_table_t)u.value));
    case 3: return org_apache_arrow_flatbuf_Type_as_FloatingPoint(org_apache_arrow_flatbuf_FloatingPoint_clone(B, (org_apache_arrow_flatbuf_FloatingPoint_table_t)u.value));
    case 4: return org_apache_arrow_flatbuf_Type_as_Binary(org_apache_arrow_flatbuf_Binary_clone(B, (org_apache_arrow_flatbuf_Binary_table_t)u.value));
    case 5: return org_apache_arrow_flatbuf_Type_as_Utf8(org_apache_arrow_flatbuf_Utf8_clone(B, (org_apache_arrow_flatbuf_Utf8_table_t)u.value));
    case 6: return org_apache_arrow_flatbuf_Type_as_Bool(org_apache_arrow_flatbuf_Bool_clone(B, (org_apache_arrow_flatbuf_Bool_table_t)u.value));
    case 7: return org_apache_arrow_flatbuf_Type_as_Decimal(org_apache_arrow_flatbuf_Decimal_clone(B, (org_apache_arrow_flatbuf_Decimal_table_t)u.value));
    case 8: return org_apache_arrow_flatbuf_Type_as_Date(org_apache_arrow_flatbuf_Date_clone(B, (org_apache_arrow_flatbuf_Date_table_t)u.value));
    case 9: return org_apache_arrow_flatbuf_Type_as_Time(org_apache_arrow_flatbuf_Time_clone(B, (org_apache_arrow_flatbuf_Time_table_t)u.value));
    case 10: return org_apache_arrow_flatbuf_Type_as_Timestamp(org_apache_arrow_flatbuf_Timestamp_clone(B, (org_apache_arrow_flatbuf_Timestamp_table_t)u.value));
    case 11: return org_apache_arrow_flatbuf_Type_as_Interval(org_apache_arrow_flatbuf_Interval_clone(B, (org_apache_arrow_flatbuf_Interval_table_t)u.value));
    case 12: return org_apache_arrow_flatbuf_Type_as_List(org_apache_arrow_flatbuf_List_clone(B, (org_apache_arrow_flatbuf_List_table_t)u.value));
    case 13: return org_apache_arrow_flatbuf_Type_as_Struct_(org_apache_arrow_flatbuf_Struct__clone(B, (org_apache_arrow_flatbuf_Struct__table_t)u.value));
    case 14: return org_apache_arrow_flatbuf_Type_as_Union(org_apache_arrow_flatbuf_Union_clone(B, (org_apache_arrow_flatbuf_Union_table_t)u.value));
    case 15: return org_apache_arrow_flatbuf_Type_as_FixedSizeBinary(org_apache_arrow_flatbuf_FixedSizeBinary_clone(B, (org_apache_arrow_flatbuf_FixedSizeBinary_table_t)u.value));
    case 16: return org_apache_arrow_flatbuf_Type_as_FixedSizeList(org_apache_arrow_flatbuf_FixedSizeList_clone(B, (org_apache_arrow_flatbuf_FixedSizeList_table_t)u.value));
    case 17: return org_apache_arrow_flatbuf_Type_as_Map(org_apache_arrow_flatbuf_Map_clone(B, (org_apache_arrow_flatbuf_Map_table_t)u.value));
    case 18: return org_apache_arrow_flatbuf_Type_as_Duration(org_apache_arrow_flatbuf_Duration_clone(B, (org_apache_arrow_flatbuf_Duration_table_t)u.value));
    case 19: return org_apache_arrow_flatbuf_Type_as_LargeBinary(org_apache_arrow_flatbuf_LargeBinary_clone(B, (org_apache_arrow_flatbuf_LargeBinary_table_t)u.value));
    case 20: return org_apache_arrow_flatbuf_Type_as_LargeUtf8(org_apache_arrow_flatbuf_LargeUtf8_clone(B, (org_apache_arrow_flatbuf_LargeUtf8_table_t)u.value));
    case 21: return org_apache_arrow_flatbuf_Type_as_LargeList(org_apache_arrow_flatbuf_LargeList_clone(B, (org_apache_arrow_flatbuf_LargeList_table_t)u.value));
    case 22: return org_apache_arrow_flatbuf_Type_as_RunEndEncoded(org_apache_arrow_flatbuf_RunEndEncoded_clone(B, (org_apache_arrow_flatbuf_RunEndEncoded_table_t)u.value));
    default: return org_apache_arrow_flatbuf_Type_as_NONE();
    }
}


static inline org_apache_arrow_flatbuf_Null_ref_t org_apache_arrow_flatbuf_Null_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Null_formal_args)
{
    if (org_apache_arrow_flatbuf_Null_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Null_end(B);
}

static org_apache_arrow_flatbuf_Null_ref_t org_apache_arrow_flatbuf_Null_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Null_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Null_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Null_end(B));
}


static inline org_apache_arrow_flatbuf_Struct__ref_t org_apache_arrow_flatbuf_Struct__create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Struct__formal_args)
{
    if (org_apache_arrow_flatbuf_Struct__start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Struct__end(B);
}

static org_apache_arrow_flatbuf_Struct__ref_t org_apache_arrow_flatbuf_Struct__clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Struct__table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Struct__start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Struct__end(B));
}


static inline org_apache_arrow_flatbuf_List_ref_t org_apache_arrow_flatbuf_List_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_List_formal_args)
{
    if (org_apache_arrow_flatbuf_List_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_List_end(B);
}

static org_apache_arrow_flatbuf_List_ref_t org_apache_arrow_flatbuf_List_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_List_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_List_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_List_end(B));
}


static inline org_apache_arrow_flatbuf_LargeList_ref_t org_apache_arrow_flatbuf_LargeList_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_LargeList_formal_args)
{
    if (org_apache_arrow_flatbuf_LargeList_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_LargeList_end(B);
}

static org_apache_arrow_flatbuf_LargeList_ref_t org_apache_arrow_flatbuf_LargeList_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_LargeList_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_LargeList_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_LargeList_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_FixedSizeList_listSize, flatbuffers_int32, int32_t, 4, 4, INT32_C(0), org_apache_arrow_flatbuf_FixedSizeList)

static inline org_apache_arrow_flatbuf_FixedSizeList_ref_t org_apache_arrow_flatbuf_FixedSizeList_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_FixedSizeList_formal_args)
{
    if (org_apache_arrow_flatbuf_FixedSizeList_start(B)
        || org_apache_arrow_flatbuf_FixedSizeList_listSize_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_FixedSizeList_end(B);
}

static org_apache_arrow_flatbuf_FixedSizeList_ref_t org_apache_arrow_flatbuf_FixedSizeList_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_FixedSizeList_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_FixedSizeList_start(B)
        || org_apache_arrow_flatbuf_FixedSizeList_listSize_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_FixedSizeList_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Map_keysSorted, flatbuffers_bool, flatbuffers_bool_t, 1, 1, UINT8_C(0), org_apache_arrow_flatbuf_Map)

static inline org_apache_arrow_flatbuf_Map_ref_t org_apache_arrow_flatbuf_Map_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Map_formal_args)
{
    if (org_apache_arrow_flatbuf_Map_start(B)
        || org_apache_arrow_flatbuf_Map_keysSorted_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Map_end(B);
}

static org_apache_arrow_flatbuf_Map_ref_t org_apache_arrow_flatbuf_Map_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Map_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Map_start(B)
        || org_apache_arrow_flatbuf_Map_keysSorted_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Map_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Union_mode, org_apache_arrow_flatbuf_UnionMode, org_apache_arrow_flatbuf_UnionMode_enum_t, 2, 2, INT16_C(0), org_apache_arrow_flatbuf_Union)
__flatbuffers_build_vector_field(1, flatbuffers_, org_apache_arrow_flatbuf_Union_typeIds, flatbuffers_int32, int32_t, org_apache_arrow_flatbuf_Union)

static inline org_apache_arrow_flatbuf_Union_ref_t org_apache_arrow_flatbuf_Union_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Union_formal_args)
{
    if (org_apache_arrow_flatbuf_Union_start(B)
        || org_apache_arrow_flatbuf_Union_typeIds_add(B, v1)
        || org_apache_arrow_flatbuf_Union_mode_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Union_end(B);
}

static org_apache_arrow_flatbuf_Union_ref_t org_apache_arrow_flatbuf_Union_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Union_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Union_start(B)
        || org_apache_arrow_flatbuf_Union_typeIds_pick(B, t)
        || org_apache_arrow_flatbuf_Union_mode_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Union_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Int_bitWidth, flatbuffers_int32, int32_t, 4, 4, INT32_C(0), org_apache_arrow_flatbuf_Int)
__flatbuffers_build_scalar_field(1, flatbuffers_, org_apache_arrow_flatbuf_Int_is_signed, flatbuffers_bool, flatbuffers_bool_t, 1, 1, UINT8_C(0), org_apache_arrow_flatbuf_Int)

static inline org_apache_arrow_flatbuf_Int_ref_t org_apache_arrow_flatbuf_Int_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Int_formal_args)
{
    if (org_apache_arrow_flatbuf_Int_start(B)
        || org_apache_arrow_flatbuf_Int_bitWidth_add(B, v0)
        || org_apache_arrow_flatbuf_Int_is_signed_add(B, v1)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Int_end(B);
}

static org_apache_arrow_flatbuf_Int_ref_t org_apache_arrow_flatbuf_Int_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Int_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Int_start(B)
        || org_apache_arrow_flatbuf_Int_bitWidth_pick(B, t)
        || org_apache_arrow_flatbuf_Int_is_signed_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Int_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_FloatingPoint_precision, org_apache_arrow_flatbuf_Precision, org_apache_arrow_flatbuf_Precision_enum_t, 2, 2, INT16_C(0), org_apache_arrow_flatbuf_FloatingPoint)

static inline org_apache_arrow_flatbuf_FloatingPoint_ref_t org_apache_arrow_flatbuf_FloatingPoint_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_FloatingPoint_formal_args)
{
    if (org_apache_arrow_flatbuf_FloatingPoint_start(B)
        || org_apache_arrow_flatbuf_FloatingPoint_precision_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_FloatingPoint_end(B);
}

static org_apache_arrow_flatbuf_FloatingPoint_ref_t org_apache_arrow_flatbuf_FloatingPoint_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_FloatingPoint_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_FloatingPoint_start(B)
        || org_apache_arrow_flatbuf_FloatingPoint_precision_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_FloatingPoint_end(B));
}


static inline org_apache_arrow_flatbuf_Utf8_ref_t org_apache_arrow_flatbuf_Utf8_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Utf8_formal_args)
{
    if (org_apache_arrow_flatbuf_Utf8_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Utf8_end(B);
}

static org_apache_arrow_flatbuf_Utf8_ref_t org_apache_arrow_flatbuf_Utf8_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Utf8_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Utf8_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Utf8_end(B));
}


static inline org_apache_arrow_flatbuf_Binary_ref_t org_apache_arrow_flatbuf_Binary_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Binary_formal_args)
{
    if (org_apache_arrow_flatbuf_Binary_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Binary_end(B);
}

static org_apache_arrow_flatbuf_Binary_ref_t org_apache_arrow_flatbuf_Binary_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Binary_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Binary_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Binary_end(B));
}


static inline org_apache_arrow_flatbuf_LargeUtf8_ref_t org_apache_arrow_flatbuf_LargeUtf8_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_LargeUtf8_formal_args)
{
    if (org_apache_arrow_flatbuf_LargeUtf8_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_LargeUtf8_end(B);
}

static org_apache_arrow_flatbuf_LargeUtf8_ref_t org_apache_arrow_flatbuf_LargeUtf8_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_LargeUtf8_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_LargeUtf8_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_LargeUtf8_end(B));
}


static inline org_apache_arrow_flatbuf_LargeBinary_ref_t org_apache_arrow_flatbuf_LargeBinary_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_LargeBinary_formal_args)
{
    if (org_apache_arrow_flatbuf_LargeBinary_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_LargeBinary_end(B);
}

static org_apache_arrow_flatbuf_LargeBinary_ref_t org_apache_arrow_flatbuf_LargeBinary_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_LargeBinary_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_LargeBinary_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_LargeBinary_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_FixedSizeBinary_byteWidth, flatbuffers_int32, int32_t, 4, 4, INT32_C(0), org_apache_arrow_flatbuf_FixedSizeBinary)

static inline org_apache_arrow_flatbuf_FixedSizeBinary_ref_t org_apache_arrow_flatbuf_FixedSizeBinary_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_FixedSizeBinary_formal_args)
{
    if (org_apache_arrow_flatbuf_FixedSizeBinary_start(B)
        || org_apache_arrow_flatbuf_FixedSizeBinary_byteWidth_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_FixedSizeBinary_end(B);
}

static org_apache_arrow_flatbuf_FixedSizeBinary_ref_t org_apache_arrow_flatbuf_FixedSizeBinary_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_FixedSizeBinary_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_FixedSizeBinary_start(B)
        || org_apache_arrow_flatbuf_FixedSizeBinary_byteWidth_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_FixedSizeBinary_end(B));
}


static inline org_apache_arrow_flatbuf_Bool_ref_t org_apache_arrow_flatbuf_Bool_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Bool_formal_args)
{
    if (org_apache_arrow_flatbuf_Bool_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Bool_end(B);
}

static org_apache_arrow_flatbuf_Bool_ref_t org_apache_arrow_flatbuf_Bool_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Bool_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Bool_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Bool_end(B));
}


static inline org_apache_arrow_flatbuf_RunEndEncoded_ref_t org_apache_arrow_flatbuf_RunEndEncoded_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_RunEndEncoded_formal_args)
{
    if (org_apache_arrow_flatbuf_RunEndEncoded_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_RunEndEncoded_end(B);
}

static org_apache_arrow_flatbuf_RunEndEncoded_ref_t org_apache_arrow_flatbuf_RunEndEncoded_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_RunEndEncoded_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_RunEndEncoded_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_RunEndEncoded_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Decimal_precision, flatbuffers_int32, int32_t, 4, 4, INT32_C(0), org_apache_arrow_flatbuf_Decimal)
__flatbuffers_build_scalar_field(1, flatbuffers_, org_apache_arrow_flatbuf_Decimal_scale, flatbuffers_int32, int32_t, 4, 4, INT32_C(0), org_apache_arrow_flatbuf_Decimal)
__flatbuffers_build_scalar_field(2, flatbuffers_, org_apache_arrow_flatbuf_Decimal_bitWidth, flatbuffers_int32, int32_t, 4, 4, INT32_C(128), org_apache_arrow_flatbuf_Decimal)

static inline org_apache_arrow_flatbuf_Decimal_ref_t org_apache_arrow_flatbuf_Decimal_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Decimal_formal_args)
{
    if (org_apache_arrow_flatbuf_Decimal_start(B)
        || org_apache_arrow_flatbuf_Decimal_precision_add(B, v0)
        || org_apache_arrow_flatbuf_Decimal_scale_add(B, v1)
        || org_apache_arrow_flatbuf_Decimal_bitWidth_add(B, v2)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Decimal_end(B);
}

static org_apache_arrow_flatbuf_Decimal_ref_t org_apache_arrow_flatbuf_Decimal_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Decimal_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Decimal_start(B)
        || org_apache_arrow_flatbuf_Decimal_precision_pick(B, t)
        || org_apache_arrow_flatbuf_Decimal_scale_pick(B, t)
        || org_apache_arrow_flatbuf_Decimal_bitWidth_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Decimal_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Date_unit, org_apache_arrow_flatbuf_DateUnit, org_apache_arrow_flatbuf_DateUnit_enum_t, 2, 2, INT16_C(1), org_apache_arrow_flatbuf_Date)

static inline org_apache_arrow_flatbuf_Date_ref_t org_apache_arrow_flatbuf_Date_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Date_formal_args)
{
    if (org_apache_arrow_flatbuf_Date_start(B)
        || org_apache_arrow_flatbuf_Date_unit_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Date_end(B);
}

static org_apache_arrow_flatbuf_Date_ref_t org_apache_arrow_flatbuf_Date_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Date_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Date_start(B)
        || org_apache_arrow_flatbuf_Date_unit_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Date_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Time_unit, org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t, 2, 2, INT16_C(1), org_apache_arrow_flatbuf_Time)
__flatbuffers_build_scalar_field(1, flatbuffers_, org_apache_arrow_flatbuf_Time_bitWidth, flatbuffers_int32, int32_t, 4, 4, INT32_C(32), org_apache_arrow_flatbuf_Time)

static inline org_apache_arrow_flatbuf_Time_ref_t org_apache_arrow_flatbuf_Time_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Time_formal_args)
{
    if (org_apache_arrow_flatbuf_Time_start(B)
        || org_apache_arrow_flatbuf_Time_bitWidth_add(B, v1)
        || org_apache_arrow_flatbuf_Time_unit_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Time_end(B);
}

static org_apache_arrow_flatbuf_Time_ref_t org_apache_arrow_flatbuf_Time_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Time_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Time_start(B)
        || org_apache_arrow_flatbuf_Time_bitWidth_pick(B, t)
        || org_apache_arrow_flatbuf_Time_unit_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Time_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Timestamp_unit, org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t, 2, 2, INT16_C(0), org_apache_arrow_flatbuf_Timestamp)
__flatbuffers_build_string_field(1, flatbuffers_, org_apache_arrow_flatbuf_Timestamp_timezone, org_apache_arrow_flatbuf_Timestamp)

static inline org_apache_arrow_flatbuf_Timestamp_ref_t org_apache_arrow_flatbuf_Timestamp_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Timestamp_formal_args)
{
    if (org_apache_arrow_flatbuf_Timestamp_start(B)
        || org_apache_arrow_flatbuf_Timestamp_timezone_add(B, v1)
        || org_apache_arrow_flatbuf_Timestamp_unit_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Timestamp_end(B);
}

static org_apache_arrow_flatbuf_Timestamp_ref_t org_apache_arrow_flatbuf_Timestamp_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Timestamp_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Timestamp_start(B)
        || org_apache_arrow_flatbuf_Timestamp_timezone_pick(B, t)
        || org_apache_arrow_flatbuf_Timestamp_unit_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Timestamp_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Interval_unit, org_apache_arrow_flatbuf_IntervalUnit, org_apache_arrow_flatbuf_IntervalUnit_enum_t, 2, 2, INT16_C(0), org_apache_arrow_flatbuf_Interval)

static inline org_apache_arrow_flatbuf_Interval_ref_t org_apache_arrow_flatbuf_Interval_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Interval_formal_args)
{
    if (org_apache_arrow_flatbuf_Interval_start(B)
        || org_apache_arrow_flatbuf_Interval_unit_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Interval_end(B);
}

static org_apache_arrow_flatbuf_Interval_ref_t org_apache_arrow_flatbuf_Interval_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Interval_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Interval_start(B)
        || org_apache_arrow_flatbuf_Interval_unit_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Interval_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Duration_unit, org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t, 2, 2, INT16_C(1), org_apache_arrow_flatbuf_Duration)

static inline org_apache_arrow_flatbuf_Duration_ref_t org_apache_arrow_flatbuf_Duration_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Duration_formal_args)
{
    if (org_apache_arrow_flatbuf_Duration_start(B)
        || org_apache_arrow_flatbuf_Duration_unit_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Duration_end(B);
}

static org_apache_arrow_flatbuf_Duration_ref_t org_apache_arrow_flatbuf_Duration_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Duration_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Duration_start(B)
        || org_apache_arrow_flatbuf_Duration_unit_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Duration_end(B));
}

__flatbuffers_build_string_field(0, flatbuffers_, org_apache_arrow_flatbuf_KeyValue_key, org_apache_arrow_flatbuf_KeyValue)
__flatbuffers_build_string_field(1, flatbuffers_, org_apache_arrow_flatbuf_KeyValue_value, org_apache_arrow_flatbuf_KeyValue)

static inline org_apache_arrow_flatbuf_KeyValue_ref_t org_apache_arrow_flatbuf_KeyValue_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_KeyValue_formal_args)
{
    if (org_apache_arrow_flatbuf_KeyValue_start(B)
        || org_apache_arrow_flatbuf_KeyValue_key_add(B, v0)
        || org_apache_arrow_flatbuf_KeyValue_value_add(B, v1)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_KeyValue_end(B);
}

static org_apache_arrow_flatbuf_KeyValue_ref_t org_apache_arrow_flatbuf_KeyValue_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_KeyValue_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_KeyValue_start(B)
        || org_apache_arrow_flatbuf_KeyValue_key_pick(B, t)
        || org_apache_arrow_flatbuf_KeyValue_value_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_KeyValue_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_DictionaryEncoding_id, flatbuffers_int64, int64_t, 8, 8, INT64_C(0), org_apache_arrow_flatbuf_DictionaryEncoding)
__flatbuffers_build_table_field(1, flatbuffers_, org_apache_arrow_flatbuf_DictionaryEncoding_indexType, org_apache_arrow_flatbuf_Int, org_apache_arrow_flatbuf_DictionaryEncoding)
__flatbuffers_build_scalar_field(2, flatbuffers_, org_apache_arrow_flatbuf_DictionaryEncoding_isOrdered, flatbuffers_bool, flatbuffers_bool_t, 1, 1, UINT8_C(0), org_apache_arrow_flatbuf_DictionaryEncoding)
__flatbuffers_build_scalar_field(3, flatbuffers_, org_apache_arrow_flatbuf_DictionaryEncoding_dictionaryKind, org_apache_arrow_flatbuf_DictionaryKind, org_apache_arrow_flatbuf_DictionaryKind_enum_t, 2, 2, INT16_C(0), org_apache_arrow_flatbuf_DictionaryEncoding)

static inline org_apache_arrow_flatbuf_DictionaryEncoding_ref_t org_apache_arrow_flatbuf_DictionaryEncoding_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_DictionaryEncoding_formal_args)
{
    if (org_apache_arrow_flatbuf_DictionaryEncoding_start(B)
        || org_apache_arrow_flatbuf_DictionaryEncoding_id_add(B, v0)
        || org_apache_arrow_flatbuf_DictionaryEncoding_indexType_add(B, v1)
        || org_apache_arrow_flatbuf_DictionaryEncoding_dictionaryKind_add(B, v3)
        || org_apache_arrow_flatbuf_DictionaryEncoding_isOrdered_add(B, v2)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_DictionaryEncoding_end(B);
}

static org_apache_arrow_flatbuf_DictionaryEncoding_ref_t org_apache_arrow_flatbuf_DictionaryEncoding_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_DictionaryEncoding_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_DictionaryEncoding_start(B)
        || org_apache_arrow_flatbuf_DictionaryEncoding_id_pick(B, t)
        || org_apache_arrow_flatbuf_DictionaryEncoding_indexType_pick(B, t)
        || org_apache_arrow_flatbuf_DictionaryEncoding_dictionaryKind_pick(B, t)
        || org_apache_arrow_flatbuf_DictionaryEncoding_isOrdered_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_DictionaryEncoding_end(B));
}

__flatbuffers_build_string_field(0, flatbuffers_, org_apache_arrow_flatbuf_Field_name, org_apache_arrow_flatbuf_Field)
__flatbuffers_build_scalar_field(1, flatbuffers_, org_apache_arrow_flatbuf_Field_nullable, flatbuffers_bool, flatbuffers_bool_t, 1, 1, UINT8_C(0), org_apache_arrow_flatbuf_Field)
__flatbuffers_build_union_field(3, flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, org_apache_arrow_flatbuf_Field)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Null, org_apache_arrow_flatbuf_Null)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Int, org_apache_arrow_flatbuf_Int)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, FloatingPoint, org_apache_arrow_flatbuf_FloatingPoint)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Binary, org_apache_arrow_flatbuf_Binary)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Utf8, org_apache_arrow_flatbuf_Utf8)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Bool, org_apache_arrow_flatbuf_Bool)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Decimal, org_apache_arrow_flatbuf_Decimal)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Date, org_apache_arrow_flatbuf_Date)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Time, org_apache_arrow_flatbuf_Time)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Timestamp, org_apache_arrow_flatbuf_Timestamp)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Interval, org_apache_arrow_flatbuf_Interval)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, List, org_apache_arrow_flatbuf_List)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Struct_, org_apache_arrow_flatbuf_Struct_)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Union, org_apache_arrow_flatbuf_Union)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, FixedSizeBinary, org_apache_arrow_flatbuf_FixedSizeBinary)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, FixedSizeList, org_apache_arrow_flatbuf_FixedSizeList)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Map, org_apache_arrow_flatbuf_Map)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Duration, org_apache_arrow_flatbuf_Duration)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, LargeBinary, org_apache_arrow_flatbuf_LargeBinary)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, LargeUtf8, org_apache_arrow_flatbuf_LargeUtf8)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, LargeList, org_apache_arrow_flatbuf_LargeList)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, RunEndEncoded, org_apache_arrow_flatbuf_RunEndEncoded)
__flatbuffers_build_table_field(4, flatbuffers_, org_apache_arrow_flatbuf_Field_dictionary, org_apache_arrow_flatbuf_DictionaryEncoding, org_apache_arrow_flatbuf_Field)
__flatbuffers_build_table_vector_field(5, flatbuffers_, org_apache_arrow_flatbuf_Field_children, org_apache_arrow_flatbuf_Field, org_apache_arrow_flatbuf_Field)
__flatbuffers_build_table_vector_field(6, flatbuffers_, org_apache_arrow_flatbuf_Field_custom_metadata, org_apache_arrow_flatbuf_KeyValue, org_apache_arrow_flatbuf_Field)

static inline org_apache_arrow_flatbuf_Field_ref_t org_apache_arrow_flatbuf_Field_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Field_formal_args)
{
    if (org_apache_arrow_flatbuf_Field_start(B)
        || org_apache_arrow_flatbuf_Field_name_add(B, v0)
        || org_apache_arrow_flatbuf_Field_type_add_value(B, v3)
        || org_apache_arrow_flatbuf_Field_dictionary_add(B, v4)
        || org_apache_arrow_flatbuf_Field_children_add(B, v5)
        || org_apache_arrow_flatbuf_Field_custom_metadata_add(B, v6)
        || org_apache_arrow_flatbuf_Field_nullable_add(B, v1)
        || org_apache_arrow_flatbuf_Field_type_add_type(B, v3.type)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Field_end(B);
}

static org_apache_arrow_flatbuf_Field_ref_t org_apache_arrow_flatbuf_Field_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Field_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Field_start(B)
        || org_apache_arrow_flatbuf_Field_name_pick(B, t)
        || org_apache_arrow_flatbuf_Field_type_pick(B, t)
        || org_apache_arrow_flatbuf_Field_dictionary_pick(B, t)
        || org_apache_arrow_flatbuf_Field_children_pick(B, t)
        || org_apache_arrow_flatbuf_Field_custom_metadata_pick(B, t)
        || org_apache_arrow_flatbuf_Field_nullable_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Field_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Schema_endianness, org_apache_arrow_flatbuf_Endianness, org_apache_arrow_flatbuf_Endianness_enum_t, 2, 2, INT16_C(0), org_apache_arrow_flatbuf_Schema)
__flatbuffers_build_table_vector_field(1, flatbuffers_, org_apache_arrow_flatbuf_Schema_fields, org_apache_arrow_flatbuf_Field, org_apache_arrow_flatbuf_Schema)
__flatbuffers_build_table_vector_field(2, flatbuffers_, org_apache_arrow_flatbuf_Schema_custom_metadata, org_apache_arrow_flatbuf_KeyValue, org_apache_arrow_flatbuf_Schema)
__flatbuffers_build_vector_field(3, flatbuffers_, org_apache_arrow_flatbuf_Schema_features, org_apache_arrow_flatbuf_Feature, org_apache_arrow_flatbuf_Feature_enum_t, org_apache_arrow_flatbuf_Schema)

static inline org_apache_arrow_flatbuf_Schema_ref_t org_apache_arrow_flatbuf_Schema_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Schema_formal_args)
{
    if (org_apache_arrow_flatbuf_Schema_start(B)
        || org_apache_arrow_flatbuf_Schema_fields_add(B, v1)
        || org_apache_arrow_flatbuf_Schema_custom_metadata_add(B, v2)
        || org_apache_arrow_flatbuf_Schema_features_add(B, v3)
        || org_apache_arrow_flatbuf_Schema_endianness_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Schema_end(B);
}

static org_apache_arrow_flatbuf_Schema_ref_t org_apache_arrow_flatbuf_Schema_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Schema_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Schema_start(B)
        || org_apache_arrow_flatbuf_Schema_fields_pick(B, t)
        || org_apache_arrow_flatbuf_Schema_custom_metadata_pick(B, t)
        || org_apache_arrow_flatbuf_Schema_features_pick(B, t)
        || org_apache_arrow_flatbuf_Schema_endianness_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Schema_end(B));
}

#include "flatcc/flatcc_epilogue.h"
#endif /* SCHEMA_BUILDER_H */
#ifndef SCHEMA_VERIFIER_H
#define SCHEMA_VERIFIER_H

/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

#ifndef SCHEMA_READER_H
#include "Schema_reader.h"
#endif
#include "flatcc/flatcc_verifier.h"
#include "flatcc/flatcc_prologue.h"

static int org_apache_arrow_flatbuf_Null_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Struct__verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_List_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_LargeList_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_FixedSizeList_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Map_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Union_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Int_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_FloatingPoint_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Utf8_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Binary_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_LargeUtf8_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_LargeBinary_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_FixedSizeBinary_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Bool_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_RunEndEncoded_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Decimal_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Date_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Time_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Timestamp_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Interval_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Duration_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_KeyValue_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_DictionaryEncoding_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Field_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Schema_verify_table(flatcc_table_verifier_descriptor_t *td);

static int org_apache_arrow_flatbuf_Type_union_verifier(flatcc_union_verifier_descriptor_t *ud)
{
    switch (ud->type) {
    case 1: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Null_verify_table); /* Null */
    case 2: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Int_verify_table); /* Int */
    case 3: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_FloatingPoint_verify_table); /* FloatingPoint */
    case 4: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Binary_verify_table); /* Binary */
    case 5: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Utf8_verify_table); /* Utf8 */
    case 6: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Bool_verify_table); /* Bool */
    case 7: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Decimal_verify_table); /* Decimal */
    case 8: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Date_verify_table); /* Date */
    case 9: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Time_verify_table); /* Time */
    case 10: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Timestamp_verify_table); /* Timestamp */
    case 11: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Interval_verify_table); /* Interval */
    case 12: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_List_verify_table); /* List */
    case 13: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Struct__verify_table); /* Struct_ */
    case 14: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Union_verify_table); /* Union */
    case 15: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_FixedSizeBinary_verify_table); /* FixedSizeBinary */
    case 16: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_FixedSizeList_verify_table); /* FixedSizeList */
    case 17: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Map_verify_table); /* Map */
    case 18: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Duration_verify_table); /* Duration */
    case 19: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_LargeBinary_verify_table); /* LargeBinary */
    case 20: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_LargeUtf8_verify_table); /* LargeUtf8 */
    case 21: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_LargeList_verify_table); /* LargeList */
    case 22: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_RunEndEncoded_verify_table); /* RunEndEncoded */
    default: return flatcc_verify_ok;
    }
}

static inline int org_apache_arrow_flatbuf_Buffer_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_struct_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Buffer_identifier, 16, 8);
}

static inline int org_apache_arrow_flatbuf_Buffer_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_struct_as_typed_root(buf, bufsiz, org_apache_arrow_flatbuf_Buffer_type_hash, 16, 8);
}

static inline int org_apache_arrow_flatbuf_Buffer_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_struct_as_typed_root(buf, bufsiz, thash, 16, 8);
}

static inline int org_apache_arrow_flatbuf_Buffer_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_struct_as_root(buf, bufsiz, fid, 16, 8);
}

static int org_apache_arrow_flatbuf_Null_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Null_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Null_identifier, &org_apache_arrow_flatbuf_Null_verify_table);
}

static inline int org_apache_arrow_flatbuf_Null_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Null_type_identifier, &org_apache_arrow_flatbuf_Null_verify_table);
}

static inline int org_apache_arrow_flatbuf_Null_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Null_verify_table);
}

static inline int org_apache_arrow_flatbuf_Null_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Null_verify_table);
}

static int org_apache_arrow_flatbuf_Struct__verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Struct__verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Struct__identifier, &org_apache_arrow_flatbuf_Struct__verify_table);
}

static inline int org_apache_arrow_flatbuf_Struct__verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Struct__type_identifier, &org_apache_arrow_flatbuf_Struct__verify_table);
}

static inline int org_apache_arrow_flatbuf_Struct__verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Struct__verify_table);
}

static inline int org_apache_arrow_flatbuf_Struct__verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Struct__verify_table);
}

static int org_apache_arrow_flatbuf_List_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_List_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_List_identifier, &org_apache_arrow_flatbuf_List_verify_table);
}

static inline int org_apache_arrow_flatbuf_List_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_List_type_identifier, &org_apache_arrow_flatbuf_List_verify_table);
}

static inline int org_apache_arrow_flatbuf_List_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_List_verify_table);
}

static inline int org_apache_arrow_flatbuf_List_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_List_verify_table);
}

static int org_apache_arrow_flatbuf_LargeList_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_LargeList_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_LargeList_identifier, &org_apache_arrow_flatbuf_LargeList_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeList_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_LargeList_type_identifier, &org_apache_arrow_flatbuf_LargeList_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeList_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_LargeList_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeList_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_LargeList_verify_table);
}

static int org_apache_arrow_flatbuf_FixedSizeList_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 4, 4) /* listSize */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_FixedSizeList_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_FixedSizeList_identifier, &org_apache_arrow_flatbuf_FixedSizeList_verify_table);
}

static inline int org_apache_arrow_flatbuf_FixedSizeList_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_FixedSizeList_type_identifier, &org_apache_arrow_flatbuf_FixedSizeList_verify_table);
}

static inline int org_apache_arrow_flatbuf_FixedSizeList_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_FixedSizeList_verify_table);
}

static inline int org_apache_arrow_flatbuf_FixedSizeList_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_FixedSizeList_verify_table);
}

static int org_apache_arrow_flatbuf_Map_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 1, 1) /* keysSorted */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Map_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Map_identifier, &org_apache_arrow_flatbuf_Map_verify_table);
}

static inline int org_apache_arrow_flatbuf_Map_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Map_type_identifier, &org_apache_arrow_flatbuf_Map_verify_table);
}

static inline int org_apache_arrow_flatbuf_Map_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Map_verify_table);
}

static inline int org_apache_arrow_flatbuf_Map_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Map_verify_table);
}

static int org_apache_arrow_flatbuf_Union_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* mode */)) return ret;
    if ((ret = flatcc_verify_vector_field(td, 1, 0, 4, 4, INT64_C(1073741823)) /* typeIds */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Union_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Union_identifier, &org_apache_arrow_flatbuf_Union_verify_table);
}

static inline int org_apache_arrow_flatbuf_Union_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Union_type_identifier, &org_apache_arrow_flatbuf_Union_verify_table);
}

static inline int org_apache_arrow_flatbuf_Union_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Union_verify_table);
}

static inline int org_apache_arrow_flatbuf_Union_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Union_verify_table);
}

static int org_apache_arrow_flatbuf_Int_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 4, 4) /* bitWidth */)) return ret;
    if ((ret = flatcc_verify_field(td, 1, 1, 1) /* is_signed */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Int_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Int_identifier, &org_apache_arrow_flatbuf_Int_verify_table);
}

static inline int org_apache_arrow_flatbuf_Int_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Int_type_identifier, &org_apache_arrow_flatbuf_Int_verify_table);
}

static inline int org_apache_arrow_flatbuf_Int_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Int_verify_table);
}

static inline int org_apache_arrow_flatbuf_Int_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Int_verify_table);
}

static int org_apache_arrow_flatbuf_FloatingPoint_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* precision */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_FloatingPoint_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_FloatingPoint_identifier, &org_apache_arrow_flatbuf_FloatingPoint_verify_table);
}

static inline int org_apache_arrow_flatbuf_FloatingPoint_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_FloatingPoint_type_identifier, &org_apache_arrow_flatbuf_FloatingPoint_verify_table);
}

static inline int org_apache_arrow_flatbuf_FloatingPoint_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_FloatingPoint_verify_table);
}

static inline int org_apache_arrow_flatbuf_FloatingPoint_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_FloatingPoint_verify_table);
}

static int org_apache_arrow_flatbuf_Utf8_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Utf8_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Utf8_identifier, &org_apache_arrow_flatbuf_Utf8_verify_table);
}

static inline int org_apache_arrow_flatbuf_Utf8_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Utf8_type_identifier, &org_apache_arrow_flatbuf_Utf8_verify_table);
}

static inline int org_apache_arrow_flatbuf_Utf8_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Utf8_verify_table);
}

static inline int org_apache_arrow_flatbuf_Utf8_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Utf8_verify_table);
}

static int org_apache_arrow_flatbuf_Binary_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Binary_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Binary_identifier, &org_apache_arrow_flatbuf_Binary_verify_table);
}

static inline int org_apache_arrow_flatbuf_Binary_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Binary_type_identifier, &org_apache_arrow_flatbuf_Binary_verify_table);
}

static inline int org_apache_arrow_flatbuf_Binary_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Binary_verify_table);
}

static inline int org_apache_arrow_flatbuf_Binary_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Binary_verify_table);
}

static int org_apache_arrow_flatbuf_LargeUtf8_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_LargeUtf8_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_LargeUtf8_identifier, &org_apache_arrow_flatbuf_LargeUtf8_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeUtf8_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_LargeUtf8_type_identifier, &org_apache_arrow_flatbuf_LargeUtf8_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeUtf8_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_LargeUtf8_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeUtf8_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_LargeUtf8_verify_table);
}

static int org_apache_arrow_flatbuf_LargeBinary_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_LargeBinary_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_LargeBinary_identifier, &org_apache_arrow_flatbuf_LargeBinary_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeBinary_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_LargeBinary_type_identifier, &org_apache_arrow_flatbuf_LargeBinary_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeBinary_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_LargeBinary_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeBinary_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_LargeBinary_verify_table);
}

static int org_apache_arrow_flatbuf_FixedSizeBinary_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 4, 4) /* byteWidth */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_FixedSizeBinary_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_FixedSizeBinary_identifier, &org_apache_arrow_flatbuf_FixedSizeBinary_verify_table);
}

static inline int org_apache_arrow_flatbuf_FixedSizeBinary_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_FixedSizeBinary_type_identifier, &org_apache_arrow_flatbuf_FixedSizeBinary_verify_table);
}

static inline int org_apache_arrow_flatbuf_FixedSizeBinary_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_FixedSizeBinary_verify_table);
}

static inline int org_apache_arrow_flatbuf_FixedSizeBinary_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_FixedSizeBinary_verify_table);
}

static int org_apache_arrow_flatbuf_Bool_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Bool_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Bool_identifier, &org_apache_arrow_flatbuf_Bool_verify_table);
}

static inline int org_apache_arrow_flatbuf_Bool_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Bool_type_identifier, &org_apache_arrow_flatbuf_Bool_verify_table);
}

static inline int org_apache_arrow_flatbuf_Bool_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Bool_verify_table);
}

static inline int org_apache_arrow_flatbuf_Bool_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Bool_verify_table);
}

static int org_apache_arrow_flatbuf_RunEndEncoded_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_RunEndEncoded_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_RunEndEncoded_identifier, &org_apache_arrow_flatbuf_RunEndEncoded_verify_table);
}

static inline int org_apache_arrow_flatbuf_RunEndEncoded_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_RunEndEncoded_type_identifier, &org_apache_arrow_flatbuf_RunEndEncoded_verify_table);
}

static inline int org_apache_arrow_flatbuf_RunEndEncoded_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_RunEndEncoded_verify_table);
}

static inline int org_apache_arrow_flatbuf_RunEndEncoded_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_RunEndEncoded_verify_table);
}

static int org_apache_arrow_flatbuf_Decimal_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 4, 4) /* precision */)) return ret;
    if ((ret = flatcc_verify_field(td, 1, 4, 4) /* scale */)) return ret;
    if ((ret = flatcc_verify_field(td, 2, 4, 4) /* bitWidth */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Decimal_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Decimal_identifier, &org_apache_arrow_flatbuf_Decimal_verify_table);
}

static inline int org_apache_arrow_flatbuf_Decimal_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Decimal_type_identifier, &org_apache_arrow_flatbuf_Decimal_verify_table);
}

static inline int org_apache_arrow_flatbuf_Decimal_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Decimal_verify_table);
}

static inline int org_apache_arrow_flatbuf_Decimal_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Decimal_verify_table);
}

static int org_apache_arrow_flatbuf_Date_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* unit */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Date_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Date_identifier, &org_apache_arrow_flatbuf_Date_verify_table);
}

static inline int org_apache_arrow_flatbuf_Date_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Date_type_identifier, &org_apache_arrow_flatbuf_Date_verify_table);
}

static inline int org_apache_arrow_flatbuf_Date_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Date_verify_table);
}

static inline int org_apache_arrow_flatbuf_Date_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Date_verify_table);
}

static int org_apache_arrow_flatbuf_Time_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* unit */)) return ret;
    if ((ret = flatcc_verify_field(td, 1, 4, 4) /* bitWidth */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Time_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Time_identifier, &org_apache_arrow_flatbuf_Time_verify_table);
}

static inline int org_apache_arrow_flatbuf_Time_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Time_type_identifier, &org_apache_arrow_flatbuf_Time_verify_table);
}

static inline int org_apache_arrow_flatbuf_Time_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Time_verify_table);
}

static inline int org_apache_arrow_flatbuf_Time_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Time_verify_table);
}

static int org_apache_arrow_flatbuf_Timestamp_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* unit */)) return ret;
    if ((ret = flatcc_verify_string_field(td, 1, 0) /* timezone */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Timestamp_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Timestamp_identifier, &org_apache_arrow_flatbuf_Timestamp_verify_table);
}

static inline int org_apache_arrow_flatbuf_Timestamp_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Timestamp_type_identifier, &org_apache_arrow_flatbuf_Timestamp_verify_table);
}

static inline int org_apache_arrow_flatbuf_Timestamp_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Timestamp_verify_table);
}

static inline int org_apache_arrow_flatbuf_Timestamp_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Timestamp_verify_table);
}

static int org_apache_arrow_flatbuf_Interval_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* unit */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Interval_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Interval_identifier, &org_apache_arrow_flatbuf_Interval_verify_table);
}

static inline int org_apache_arrow_flatbuf_Interval_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Interval_type_identifier, &org_apache_arrow_flatbuf_Interval_verify_table);
}

static inline int org_apache_arrow_flatbuf_Interval_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Interval_verify_table);
}

static inline int org_apache_arrow_flatbuf_Interval_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Interval_verify_table);
}

static int org_apache_arrow_flatbuf_Duration_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* unit */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Duration_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Duration_identifier, &org_apache_arrow_flatbuf_Duration_verify_table);
}

static inline int org_apache_arrow_flatbuf_Duration_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Duration_type_identifier, &org_apache_arrow_flatbuf_Duration_verify_table);
}

static inline int org_apache_arrow_flatbuf_Duration_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Duration_verify_table);
}

static inline int org_apache_arrow_flatbuf_Duration_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Duration_verify_table);
}

static int org_apache_arrow_flatbuf_KeyValue_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_string_field(td, 0, 0) /* key */)) return ret;
    if ((ret = flatcc_verify_string_field(td, 1, 0) /* value */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_KeyValue_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_KeyValue_identifier, &org_apache_arrow_flatbuf_KeyValue_verify_table);
}

static inline int org_apache_arrow_flatbuf_KeyValue_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_KeyValue_type_identifier, &org_apache_arrow_flatbuf_KeyValue_verify_table);
}

static inline int org_apache_arrow_flatbuf_KeyValue_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_KeyValue_verify_table);
}

static inline int org_apache_arrow_flatbuf_KeyValue_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_KeyValue_verify_table);
}

static int org_apache_arrow_flatbuf_DictionaryEncoding_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 8, 8) /* id */)) return ret;
    if ((ret = flatcc_verify_table_field(td, 1, 0, &org_apache_arrow_flatbuf_Int_verify_table) /* indexType */)) return ret;
    if ((ret = flatcc_verify_field(td, 2, 1, 1) /* isOrdered */)) return ret;
    if ((ret = flatcc_verify_field(td, 3, 2, 2) /* dictionaryKind */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_DictionaryEncoding_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_DictionaryEncoding_identifier, &org_apache_arrow_flatbuf_DictionaryEncoding_verify_table);
}

static inline int org_apache_arrow_flatbuf_DictionaryEncoding_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_DictionaryEncoding_type_identifier, &org_apache_arrow_flatbuf_DictionaryEncoding_verify_table);
}

static inline int org_apache_arrow_flatbuf_DictionaryEncoding_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_DictionaryEncoding_verify_table);
}

static inline int org_apache_arrow_flatbuf_DictionaryEncoding_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_DictionaryEncoding_verify_table);
}

static int org_apache_arrow_flatbuf_Field_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_string_field(td, 0, 0) /* name */)) return ret;
    if ((ret = flatcc_verify_field(td, 1, 1, 1) /* nullable */)) return ret;
    if ((ret = flatcc_verify_union_field(td, 3, 0, &org_apache_arrow_flatbuf_Type_union_verifier) /* type */)) return ret;
    if ((ret = flatcc_verify_table_field(td, 4, 0, &org_apache_arrow_flatbuf_DictionaryEncoding_verify_table) /* dictionary */)) return ret;
    if ((ret = flatcc_verify_table_vector_field(td, 5, 0, &org_apache_arrow_flatbuf_Field_verify_table) /* children */)) return ret;
    if ((ret = flatcc_verify_table_vector_field(td, 6, 0, &org_apache_arrow_flatbuf_KeyValue_verify_table) /* custom_metadata */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Field_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Field_identifier, &org_apache_arrow_flatbuf_Field_verify_table);
}

static inline int org_apache_arrow_flatbuf_Field_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Field_type_identifier, &org_apache_arrow_flatbuf_Field_verify_table);
}

static inline int org_apache_arrow_flatbuf_Field_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Field_verify_table);
}

static inline int org_apache_arrow_flatbuf_Field_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Field_verify_table);
}

static int org_apache_arrow_flatbuf_Schema_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* endianness */)) return ret;
    if ((ret = flatcc_verify_table_vector_field(td, 1, 0, &org_apache_arrow_flatbuf_Field_verify_table) /* fields */)) return ret;
    if ((ret = flatcc_verify_table_vector_field(td, 2, 0, &org_apache_arrow_flatbuf_KeyValue_verify_table) /* custom_metadata */)) return ret;
    if ((ret = flatcc_verify_vector_field(td, 3, 0, 8, 8, INT64_C(536870911)) /* features */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Schema_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Schema_identifier, &org_apache_arrow_flatbuf_Schema_verify_table);
}

static inline int org_apache_arrow_flatbuf_Schema_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Schema_type_identifier, &org_apache_arrow_flatbuf_Schema_verify_table);
}

static inline int org_apache_arrow_flatbuf_Schema_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Schema_verify_table);
}

static inline int org_apache_arrow_flatbuf_Schema_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Schema_verify_table);
}

#include "flatcc/flatcc_epilogue.h"
#endif /* SCHEMA_VERIFIER_H */
#ifndef TENSOR_READER_H
#define TENSOR_READER_H

/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

#ifndef FLATBUFFERS_COMMON_READER_H
#include "flatbuffers_common_reader.h"
#endif
#ifndef SCHEMA_READER_H
#include "Schema_reader.h"
#endif
#include "flatcc/flatcc_flatbuffers.h"
#ifndef __alignas_is_defined
#include <stdalign.h>
#endif
#include "flatcc/flatcc_prologue.h"
#ifndef flatbuffers_identifier
#define flatbuffers_identifier 0
#endif
#ifndef flatbuffers_extension
#define flatbuffers_extension "bin"
#endif


typedef const struct org_apache_arrow_flatbuf_TensorDim_table *org_apache_arrow_flatbuf_TensorDim_table_t;
typedef struct org_apache_arrow_flatbuf_TensorDim_table *org_apache_arrow_flatbuf_TensorDim_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_TensorDim_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_TensorDim_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Tensor_table *org_apache_arrow_flatbuf_Tensor_table_t;
typedef struct org_apache_arrow_flatbuf_Tensor_table *org_apache_arrow_flatbuf_Tensor_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Tensor_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Tensor_mutable_vec_t;
#ifndef org_apache_arrow_flatbuf_TensorDim_file_identifier
#define org_apache_arrow_flatbuf_TensorDim_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_TensorDim_file_identifier */
#ifndef org_apache_arrow_flatbuf_TensorDim_identifier
#define org_apache_arrow_flatbuf_TensorDim_identifier 0
#endif
#define org_apache_arrow_flatbuf_TensorDim_type_hash ((flatbuffers_thash_t)0xbc6d7b25)
#define org_apache_arrow_flatbuf_TensorDim_type_identifier "\x25\x7b\x6d\xbc"
#ifndef org_apache_arrow_flatbuf_TensorDim_file_extension
#define org_apache_arrow_flatbuf_TensorDim_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Tensor_file_identifier
#define org_apache_arrow_flatbuf_Tensor_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Tensor_file_identifier */
#ifndef org_apache_arrow_flatbuf_Tensor_identifier
#define org_apache_arrow_flatbuf_Tensor_identifier 0
#endif
#define org_apache_arrow_flatbuf_Tensor_type_hash ((flatbuffers_thash_t)0x1764df19)
#define org_apache_arrow_flatbuf_Tensor_type_identifier "\x19\xdf\x64\x17"
#ifndef org_apache_arrow_flatbuf_Tensor_file_extension
#define org_apache_arrow_flatbuf_Tensor_file_extension "bin"
#endif



/**  ----------------------------------------------------------------------
 *  Data structures for dense tensors
 *  Shape data for a single axis in a tensor */
struct org_apache_arrow_flatbuf_TensorDim_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_TensorDim_vec_len(org_apache_arrow_flatbuf_TensorDim_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_TensorDim_table_t org_apache_arrow_flatbuf_TensorDim_vec_at(org_apache_arrow_flatbuf_TensorDim_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_TensorDim_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_TensorDim)

/**  Length of dimension */
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_TensorDim, size, flatbuffers_int64, int64_t, INT64_C(0))
/**  Name of the dimension, optional */
__flatbuffers_define_string_field(1, org_apache_arrow_flatbuf_TensorDim, name, 0)

struct org_apache_arrow_flatbuf_Tensor_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Tensor_vec_len(org_apache_arrow_flatbuf_Tensor_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Tensor_table_t org_apache_arrow_flatbuf_Tensor_vec_at(org_apache_arrow_flatbuf_Tensor_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Tensor_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Tensor)

/**  The type of data contained in a value cell. Currently only fixed-width
 *  value types are supported, no strings or nested types */
__flatbuffers_define_union_field(flatbuffers_, 1, org_apache_arrow_flatbuf_Tensor, type, org_apache_arrow_flatbuf_Type, 1)
/**  The dimensions of the tensor, optionally named */
__flatbuffers_define_vector_field(2, org_apache_arrow_flatbuf_Tensor, shape, org_apache_arrow_flatbuf_TensorDim_vec_t, 1)
/**  Non-negative byte offsets to advance one value cell along each dimension
 *  If omitted, default to row-major order (C-like). */
__flatbuffers_define_vector_field(3, org_apache_arrow_flatbuf_Tensor, strides, flatbuffers_int64_vec_t, 0)
/**  The location and size of the tensor's data */
__flatbuffers_define_struct_field(4, org_apache_arrow_flatbuf_Tensor, data, org_apache_arrow_flatbuf_Buffer_struct_t, 1)


#include "flatcc/flatcc_epilogue.h"
#endif /* TENSOR_READER_H */
#ifndef TENSOR_BUILDER_H
#define TENSOR_BUILDER_H

/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

#ifndef TENSOR_READER_H
#include "Tensor_reader.h"
#endif
#ifndef FLATBUFFERS_COMMON_BUILDER_H
#include "flatbuffers_common_builder.h"
#endif
#ifndef SCHEMA_BUILDER_H
#include "Schema_builder.h"
#endif
#include "flatcc/flatcc_prologue.h"
#ifndef flatbuffers_identifier
#define flatbuffers_identifier 0
#endif
#ifndef flatbuffers_extension
#define flatbuffers_extension "bin"
#endif

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_TensorDim_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_TensorDim_ref_t;
static org_apache_arrow_flatbuf_TensorDim_ref_t org_apache_arrow_flatbuf_TensorDim_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_TensorDim_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_TensorDim, 2)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Tensor_required[] = { 1, 2, 4, 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Tensor_ref_t;
static org_apache_arrow_flatbuf_Tensor_ref_t org_apache_arrow_flatbuf_Tensor_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Tensor_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Tensor, 5)

#define __org_apache_arrow_flatbuf_TensorDim_formal_args , int64_t v0, flatbuffers_string_ref_t v1
#define __org_apache_arrow_flatbuf_TensorDim_call_args , v0, v1
static inline org_apache_arrow_flatbuf_TensorDim_ref_t org_apache_arrow_flatbuf_TensorDim_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_TensorDim_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_TensorDim, org_apache_arrow_flatbuf_TensorDim_file_identifier, org_apache_arrow_flatbuf_TensorDim_type_identifier)

#define __org_apache_arrow_flatbuf_Tensor_formal_args , org_apache_arrow_flatbuf_Type_union_ref_t v1, org_apache_arrow_flatbuf_TensorDim_vec_ref_t v2, flatbuffers_int64_vec_ref_t v3, org_apache_arrow_flatbuf_Buffer_t *v4
#define __org_apache_arrow_flatbuf_Tensor_call_args , v1, v2, v3, v4
static inline org_apache_arrow_flatbuf_Tensor_ref_t org_apache_arrow_flatbuf_Tensor_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Tensor_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Tensor, org_apache_arrow_flatbuf_Tensor_file_identifier, org_apache_arrow_flatbuf_Tensor_type_identifier)

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_TensorDim_size, flatbuffers_int64, int64_t, 8, 8, INT64_C(0), org_apache_arrow_flatbuf_TensorDim)
__flatbuffers_build_string_field(1, flatbuffers_, org_apache_arrow_flatbuf_TensorDim_name, org_apache_arrow_flatbuf_TensorDim)

static inline org_apache_arrow_flatbuf_TensorDim_ref_t org_apache_arrow_flatbuf_TensorDim_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_TensorDim_formal_args)
{
    if (org_apache_arrow_flatbuf_TensorDim_start(B)
        || org_apache_arrow_flatbuf_TensorDim_size_add(B, v0)
        || org_apache_arrow_flatbuf_TensorDim_name_add(B, v1)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_TensorDim_end(B);
}

static org_apache_arrow_flatbuf_TensorDim_ref_t org_apache_arrow_flatbuf_TensorDim_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_TensorDim_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_TensorDim_start(B)
        || org_apache_arrow_flatbuf_TensorDim_size_pick(B, t)
        || org_apache_arrow_flatbuf_TensorDim_name_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_TensorDim_end(B));
}

__flatbuffers_build_union_field(1, flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, org_apache_arrow_flatbuf_Tensor)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, Null, org_apache_arrow_flatbuf_Null)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, Int, org_apache_arrow_flatbuf_Int)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, FloatingPoint, org_apache_arrow_flatbuf_FloatingPoint)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, Binary, org_apache_arrow_flatbuf_Binary)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, Utf8, org_apache_arrow_flatbuf_Utf8)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, Bool, org_apache_arrow_flatbuf_Bool)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, Decimal, org_apache_arrow_flatbuf_Decimal)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, Date, org_apache_arrow_flatbuf_Date)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, Time, org_apache_arrow_flatbuf_Time)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, Timestamp, org_apache_arrow_flatbuf_Timestamp)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, Interval, org_apache_arrow_flatbuf_Interval)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, List, org_apache_arrow_flatbuf_List)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, Struct_, org_apache_arrow_flatbuf_Struct_)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, Union, org_apache_arrow_flatbuf_Union)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, FixedSizeBinary, org_apache_arrow_flatbuf_FixedSizeBinary)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, FixedSizeList, org_apache_arrow_flatbuf_FixedSizeList)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, Map, org_apache_arrow_flatbuf_Map)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, Duration, org_apache_arrow_flatbuf_Duration)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, LargeBinary, org_apache_arrow_flatbuf_LargeBinary)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, LargeUtf8, org_apache_arrow_flatbuf_LargeUtf8)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, LargeList, org_apache_arrow_flatbuf_LargeList)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, RunEndEncoded, org_apache_arrow_flatbuf_RunEndEncoded)
__flatbuffers_build_table_vector_field(2, flatbuffers_, org_apache_arrow_flatbuf_Tensor_shape, org_apache_arrow_flatbuf_TensorDim, org_apache_arrow_flatbuf_Tensor)
__flatbuffers_build_vector_field(3, flatbuffers_, org_apache_arrow_flatbuf_Tensor_strides, flatbuffers_int64, int64_t, org_apache_arrow_flatbuf_Tensor)
__flatbuffers_build_struct_field(4, flatbuffers_, org_apache_arrow_flatbuf_Tensor_data, org_apache_arrow_flatbuf_Buffer, 16, 8, org_apache_arrow_flatbuf_Tensor)

static inline org_apache_arrow_flatbuf_Tensor_ref_t org_apache_arrow_flatbuf_Tensor_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Tensor_formal_args)
{
    if (org_apache_arrow_flatbuf_Tensor_start(B)
        || org_apache_arrow_flatbuf_Tensor_data_add(B, v4)
        || org_apache_arrow_flatbuf_Tensor_type_add_value(B, v1)
        || org_apache_arrow_flatbuf_Tensor_shape_add(B, v2)
        || org_apache_arrow_flatbuf_Tensor_strides_add(B, v3)
        || org_apache_arrow_flatbuf_Tensor_type_add_type(B, v1.type)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Tensor_end(B);
}

static org_apache_arrow_flatbuf_Tensor_ref_t org_apache_arrow_flatbuf_Tensor_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Tensor_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Tensor_start(B)
        || org_apache_arrow_flatbuf_Tensor_data_pick(B, t)
        || org_apache_arrow_flatbuf_Tensor_type_pick(B, t)
        || org_apache_arrow_flatbuf_Tensor_shape_pick(B, t)
        || org_apache_arrow_flatbuf_Tensor_strides_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Tensor_end(B));
}

#include "flatcc/flatcc_epilogue.h"
#endif /* TENSOR_BUILDER_H */
#ifndef TENSOR_VERIFIER_H
#define TENSOR_VERIFIER_H

/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

#ifndef TENSOR_READER_H
#include "Tensor_reader.h"
#endif
#include "flatcc/flatcc_verifier.h"
#ifndef SCHEMA_VERIFIER_H
#include "Schema_verifier.h"
#endif
#include "flatcc/flatcc_prologue.h"

static int org_apache_arrow_flatbuf_TensorDim_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Tensor_verify_table(flatcc_table_verifier_descriptor_t *td);

static int org_apache_arrow_flatbuf_TensorDim_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 8, 8) /* size */)) return ret;
    if ((ret = flatcc_verify_string_field(td, 1, 0) /* name */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_TensorDim_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_TensorDim_identifier, &org_apache_arrow_flatbuf_TensorDim_verify_table);
}

static inline int org_apache_arrow_flatbuf_TensorDim_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_TensorDim_type_identifier, &org_apache_arrow_flatbuf_TensorDim_verify_table);
}

static inline int org_apache_arrow_flatbuf_TensorDim_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_TensorDim_verify_table);
}

static inline int org_apache_arrow_flatbuf_TensorDim_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_TensorDim_verify_table);
}

static int org_apache_arrow_flatbuf_Tensor_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_union_field(td, 1, 1, &org_apache_arrow_flatbuf_Type_union_verifier) /* type */)) return ret;
    if ((ret = flatcc_verify_table_vector_field(td, 2, 1, &org_apache_arrow_flatbuf_TensorDim_verify_table) /* shape */)) return ret;
    if ((ret = flatcc_verify_vector_field(td, 3, 0, 8, 8, INT64_C(536870911)) /* strides */)) return ret;
    if ((ret = flatcc_verify_field(td, 4, 16, 8) /* data */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Tensor_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Tensor_identifier, &org_apache_arrow_flatbuf_Tensor_verify_table);
}

static inline int org_apache_arrow_flatbuf_Tensor_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Tensor_type_identifier, &org_apache_arrow_flatbuf_Tensor_verify_table);
}

static inline int org_apache_arrow_flatbuf_Tensor_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Tensor_verify_table);
}

static inline int org_apache_arrow_flatbuf_Tensor_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Tensor_verify_table);
}

#include "flatcc/flatcc_epilogue.h"
#endif /* TENSOR_VERIFIER_H */
#ifndef SPARSETENSOR_READER_H
#define SPARSETENSOR_READER_H

/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

#ifndef FLATBUFFERS_COMMON_READER_H
#include "flatbuffers_common_reader.h"
#endif
#ifndef TENSOR_READER_H
#include "Tensor_reader.h"
#endif
#include "flatcc/flatcc_flatbuffers.h"
#ifndef __alignas_is_defined
#include <stdalign.h>
#endif
#include "flatcc/flatcc_prologue.h"
#ifndef flatbuffers_identifier
#define flatbuffers_identifier 0
#endif
#ifndef flatbuffers_extension
#define flatbuffers_extension "bin"
#endif


typedef const struct org_apache_arrow_flatbuf_SparseTensorIndexCOO_table *org_apache_arrow_flatbuf_SparseTensorIndexCOO_table_t;
typedef struct org_apache_arrow_flatbuf_SparseTensorIndexCOO_table *org_apache_arrow_flatbuf_SparseTensorIndexCOO_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_SparseTensorIndexCOO_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_SparseTensorIndexCOO_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_SparseMatrixIndexCSX_table *org_apache_arrow_flatbuf_SparseMatrixIndexCSX_table_t;
typedef struct org_apache_arrow_flatbuf_SparseMatrixIndexCSX_table *org_apache_arrow_flatbuf_SparseMatrixIndexCSX_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_SparseMatrixIndexCSX_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_SparseMatrixIndexCSX_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_SparseTensorIndexCSF_table *org_apache_arrow_flatbuf_SparseTensorIndexCSF_table_t;
typedef struct org_apache_arrow_flatbuf_SparseTensorIndexCSF_table *org_apache_arrow_flatbuf_SparseTensorIndexCSF_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_SparseTensorIndexCSF_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_SparseTensorIndexCSF_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_SparseTensor_table *org_apache_arrow_flatbuf_SparseTensor_table_t;
typedef struct org_apache_arrow_flatbuf_SparseTensor_table *org_apache_arrow_flatbuf_SparseTensor_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_SparseTensor_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_SparseTensor_mutable_vec_t;
#ifndef org_apache_arrow_flatbuf_SparseTensorIndexCOO_file_identifier
#define org_apache_arrow_flatbuf_SparseTensorIndexCOO_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_SparseTensorIndexCOO_file_identifier */
#ifndef org_apache_arrow_flatbuf_SparseTensorIndexCOO_identifier
#define org_apache_arrow_flatbuf_SparseTensorIndexCOO_identifier 0
#endif
#define org_apache_arrow_flatbuf_SparseTensorIndexCOO_type_hash ((flatbuffers_thash_t)0x3b31385a)
#define org_apache_arrow_flatbuf_SparseTensorIndexCOO_type_identifier "\x5a\x38\x31\x3b"
#ifndef org_apache_arrow_flatbuf_SparseTensorIndexCOO_file_extension
#define org_apache_arrow_flatbuf_SparseTensorIndexCOO_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_SparseMatrixIndexCSX_file_identifier
#define org_apache_arrow_flatbuf_SparseMatrixIndexCSX_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_SparseMatrixIndexCSX_file_identifier */
#ifndef org_apache_arrow_flatbuf_SparseMatrixIndexCSX_identifier
#define org_apache_arrow_flatbuf_SparseMatrixIndexCSX_identifier 0
#endif
#define org_apache_arrow_flatbuf_SparseMatrixIndexCSX_type_hash ((flatbuffers_thash_t)0xec57ea87)
#define org_apache_arrow_flatbuf_SparseMatrixIndexCSX_type_identifier "\x87\xea\x57\xec"
#ifndef org_apache_arrow_flatbuf_SparseMatrixIndexCSX_file_extension
#define org_apache_arrow_flatbuf_SparseMatrixIndexCSX_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_SparseTensorIndexCSF_file_identifier
#define org_apache_arrow_flatbuf_SparseTensorIndexCSF_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_SparseTensorIndexCSF_file_identifier */
#ifndef org_apache_arrow_flatbuf_SparseTensorIndexCSF_identifier
#define org_apache_arrow_flatbuf_SparseTensorIndexCSF_identifier 0
#endif
#define org_apache_arrow_flatbuf_SparseTensorIndexCSF_type_hash ((flatbuffers_thash_t)0xf44edda9)
#define org_apache_arrow_flatbuf_SparseTensorIndexCSF_type_identifier "\xa9\xdd\x4e\xf4"
#ifndef org_apache_arrow_flatbuf_SparseTensorIndexCSF_file_extension
#define org_apache_arrow_flatbuf_SparseTensorIndexCSF_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_SparseTensor_file_identifier
#define org_apache_arrow_flatbuf_SparseTensor_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_SparseTensor_file_identifier */
#ifndef org_apache_arrow_flatbuf_SparseTensor_identifier
#define org_apache_arrow_flatbuf_SparseTensor_identifier 0
#endif
#define org_apache_arrow_flatbuf_SparseTensor_type_hash ((flatbuffers_thash_t)0xae6f7239)
#define org_apache_arrow_flatbuf_SparseTensor_type_identifier "\x39\x72\x6f\xae"
#ifndef org_apache_arrow_flatbuf_SparseTensor_file_extension
#define org_apache_arrow_flatbuf_SparseTensor_file_extension "bin"
#endif

typedef int16_t org_apache_arrow_flatbuf_SparseMatrixCompressedAxis_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_SparseMatrixCompressedAxis, org_apache_arrow_flatbuf_SparseMatrixCompressedAxis_enum_t, 16)
#define org_apache_arrow_flatbuf_SparseMatrixCompressedAxis_Row ((org_apache_arrow_flatbuf_SparseMatrixCompressedAxis_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_SparseMatrixCompressedAxis_Column ((org_apache_arrow_flatbuf_SparseMatrixCompressedAxis_enum_t)INT16_C(1))

static inline const char *org_apache_arrow_flatbuf_SparseMatrixCompressedAxis_name(org_apache_arrow_flatbuf_SparseMatrixCompressedAxis_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_SparseMatrixCompressedAxis_Row: return "Row";
    case org_apache_arrow_flatbuf_SparseMatrixCompressedAxis_Column: return "Column";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_SparseMatrixCompressedAxis_is_known_value(org_apache_arrow_flatbuf_SparseMatrixCompressedAxis_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_SparseMatrixCompressedAxis_Row: return 1;
    case org_apache_arrow_flatbuf_SparseMatrixCompressedAxis_Column: return 1;
    default: return 0;
    }
}



/**  ----------------------------------------------------------------------
 *  EXPERIMENTAL: Data structures for sparse tensors
 *  Coordinate (COO) format of sparse tensor index.
 *
 *  COO's index list are represented as a NxM matrix,
 *  where N is the number of non-zero values,
 *  and M is the number of dimensions of a sparse tensor.
 *
 *  indicesBuffer stores the location and size of the data of this indices
 *  matrix.  The value type and the stride of the indices matrix is
 *  specified in indicesType and indicesStrides fields.
 *
 *  For example, let X be a 2x3x4x5 tensor, and it has the following
 *  6 non-zero values:
 *  ```text
 *    X[0, 1, 2, 0] := 1
 *    X[1, 1, 2, 3] := 2
 *    X[0, 2, 1, 0] := 3
 *    X[0, 1, 3, 0] := 4
 *    X[0, 1, 2, 1] := 5
 *    X[1, 2, 0, 4] := 6
 *  ```
 *  In COO format, the index matrix of X is the following 4x6 matrix:
 *  ```text
 *    [[0, 0, 0, 0, 1, 1],
 *     [1, 1, 1, 2, 1, 2],
 *     [2, 2, 3, 1, 2, 0],
 *     [0, 1, 0, 0, 3, 4]]
 *  ```
 *  When isCanonical is true, the indices is sorted in lexicographical order
 *  (row-major order), and it does not have duplicated entries.  Otherwise,
 *  the indices may not be sorted, or may have duplicated entries. */
struct org_apache_arrow_flatbuf_SparseTensorIndexCOO_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_SparseTensorIndexCOO_vec_len(org_apache_arrow_flatbuf_SparseTensorIndexCOO_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_SparseTensorIndexCOO_table_t org_apache_arrow_flatbuf_SparseTensorIndexCOO_vec_at(org_apache_arrow_flatbuf_SparseTensorIndexCOO_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_SparseTensorIndexCOO_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_SparseTensorIndexCOO)

/**  The type of values in indicesBuffer */
__flatbuffers_define_table_field(0, org_apache_arrow_flatbuf_SparseTensorIndexCOO, indicesType, org_apache_arrow_flatbuf_Int_table_t, 1)
/**  Non-negative byte offsets to advance one value cell along each dimension
 *  If omitted, default to row-major order (C-like). */
__flatbuffers_define_vector_field(1, org_apache_arrow_flatbuf_SparseTensorIndexCOO, indicesStrides, flatbuffers_int64_vec_t, 0)
/**  The location and size of the indices matrix's data */
__flatbuffers_define_struct_field(2, org_apache_arrow_flatbuf_SparseTensorIndexCOO, indicesBuffer, org_apache_arrow_flatbuf_Buffer_struct_t, 1)
/**  This flag is true if and only if the indices matrix is sorted in
 *  row-major order, and does not have duplicated entries.
 *  This sort order is the same as of Tensorflow's SparseTensor,
 *  but it is inverse order of SciPy's canonical coo_matrix
 *  (SciPy employs column-major order for its coo_matrix). */
__flatbuffers_define_scalar_field(3, org_apache_arrow_flatbuf_SparseTensorIndexCOO, isCanonical, flatbuffers_bool, flatbuffers_bool_t, UINT8_C(0))

/**  Compressed Sparse format, that is matrix-specific. */
struct org_apache_arrow_flatbuf_SparseMatrixIndexCSX_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_SparseMatrixIndexCSX_vec_len(org_apache_arrow_flatbuf_SparseMatrixIndexCSX_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_SparseMatrixIndexCSX_table_t org_apache_arrow_flatbuf_SparseMatrixIndexCSX_vec_at(org_apache_arrow_flatbuf_SparseMatrixIndexCSX_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_SparseMatrixIndexCSX_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_SparseMatrixIndexCSX)

/**  Which axis, row or column, is compressed */
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_SparseMatrixIndexCSX, compressedAxis, org_apache_arrow_flatbuf_SparseMatrixCompressedAxis, org_apache_arrow_flatbuf_SparseMatrixCompressedAxis_enum_t, INT16_C(0))
/**  The type of values in indptrBuffer */
__flatbuffers_define_table_field(1, org_apache_arrow_flatbuf_SparseMatrixIndexCSX, indptrType, org_apache_arrow_flatbuf_Int_table_t, 1)
/**  indptrBuffer stores the location and size of indptr array that
 *  represents the range of the rows.
 *  The i-th row spans from `indptr[i]` to `indptr[i+1]` in the data.
 *  The length of this array is 1 + (the number of rows), and the type
 *  of index value is long.
 *
 *  For example, let X be the following 6x4 matrix:
 *  ```text
 *    X := [[0, 1, 2, 0],
 *          [0, 0, 3, 0],
 *          [0, 4, 0, 5],
 *          [0, 0, 0, 0],
 *          [6, 0, 7, 8],
 *          [0, 9, 0, 0]].
 *  ```
 *  The array of non-zero values in X is:
 *  ```text
 *    values(X) = [1, 2, 3, 4, 5, 6, 7, 8, 9].
 *  ```
 *  And the indptr of X is:
 *  ```text
 *    indptr(X) = [0, 2, 3, 5, 5, 8, 10].
 *  ``` */
__flatbuffers_define_struct_field(2, org_apache_arrow_flatbuf_SparseMatrixIndexCSX, indptrBuffer, org_apache_arrow_flatbuf_Buffer_struct_t, 1)
/**  The type of values in indicesBuffer */
__flatbuffers_define_table_field(3, org_apache_arrow_flatbuf_SparseMatrixIndexCSX, indicesType, org_apache_arrow_flatbuf_Int_table_t, 1)
/**  indicesBuffer stores the location and size of the array that
 *  contains the column indices of the corresponding non-zero values.
 *  The type of index value is long.
 *
 *  For example, the indices of the above X is:
 *  ```text
 *    indices(X) = [1, 2, 2, 1, 3, 0, 2, 3, 1].
 *  ```
 *  Note that the indices are sorted in lexicographical order for each row. */
__flatbuffers_define_struct_field(4, org_apache_arrow_flatbuf_SparseMatrixIndexCSX, indicesBuffer, org_apache_arrow_flatbuf_Buffer_struct_t, 1)

/**  Compressed Sparse Fiber (CSF) sparse tensor index. */
struct org_apache_arrow_flatbuf_SparseTensorIndexCSF_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_SparseTensorIndexCSF_vec_len(org_apache_arrow_flatbuf_SparseTensorIndexCSF_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_SparseTensorIndexCSF_table_t org_apache_arrow_flatbuf_SparseTensorIndexCSF_vec_at(org_apache_arrow_flatbuf_SparseTensorIndexCSF_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_SparseTensorIndexCSF_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_SparseTensorIndexCSF)

/**  CSF is a generalization of compressed sparse row (CSR) index.
 *  See [smith2017knl](http://shaden.io/pub-files/smith2017knl.pdf)
 *
 *  CSF index recursively compresses each dimension of a tensor into a set
 *  of prefix trees. Each path from a root to leaf forms one tensor
 *  non-zero index. CSF is implemented with two arrays of buffers and one
 *  arrays of integers.
 *
 *  For example, let X be a 2x3x4x5 tensor and let it have the following
 *  8 non-zero values:
 *  ```text
 *    X[0, 0, 0, 1] := 1
 *    X[0, 0, 0, 2] := 2
 *    X[0, 1, 0, 0] := 3
 *    X[0, 1, 0, 2] := 4
 *    X[0, 1, 1, 0] := 5
 *    X[1, 1, 1, 0] := 6
 *    X[1, 1, 1, 1] := 7
 *    X[1, 1, 1, 2] := 8
 *  ```
 *  As a prefix tree this would be represented as:
 *  ```text
 *          0          1
 *         / \         |
 *        0   1        1
 *       /   / \       |
 *      0   0   1      1
 *     /|  /|   |    /| |
 *    1 2 0 2   0   0 1 2
 *  ```
 *  The type of values in indptrBuffers */
__flatbuffers_define_table_field(0, org_apache_arrow_flatbuf_SparseTensorIndexCSF, indptrType, org_apache_arrow_flatbuf_Int_table_t, 1)
/**  indptrBuffers stores the sparsity structure.
 *  Each two consecutive dimensions in a tensor correspond to a buffer in
 *  indptrBuffers. A pair of consecutive values at `indptrBuffers[dim][i]`
 *  and `indptrBuffers[dim][i + 1]` signify a range of nodes in
 *  `indicesBuffers[dim + 1]` who are children of `indicesBuffers[dim][i]` node.
 *
 *  For example, the indptrBuffers for the above X is:
 *  ```text
 *    indptrBuffer(X) = [
 *                        [0, 2, 3],
 *                        [0, 1, 3, 4],
 *                        [0, 2, 4, 5, 8]
 *                      ].
 *  ``` */
__flatbuffers_define_vector_field(1, org_apache_arrow_flatbuf_SparseTensorIndexCSF, indptrBuffers, org_apache_arrow_flatbuf_Buffer_vec_t, 1)
/**  The type of values in indicesBuffers */
__flatbuffers_define_table_field(2, org_apache_arrow_flatbuf_SparseTensorIndexCSF, indicesType, org_apache_arrow_flatbuf_Int_table_t, 1)
/**  indicesBuffers stores values of nodes.
 *  Each tensor dimension corresponds to a buffer in indicesBuffers.
 *  For example, the indicesBuffers for the above X is:
 *  ```text
 *    indicesBuffer(X) = [
 *                         [0, 1],
 *                         [0, 1, 1],
 *                         [0, 0, 1, 1],
 *                         [1, 2, 0, 2, 0, 0, 1, 2]
 *                       ].
 *  ``` */
__flatbuffers_define_vector_field(3, org_apache_arrow_flatbuf_SparseTensorIndexCSF, indicesBuffers, org_apache_arrow_flatbuf_Buffer_vec_t, 1)
/**  axisOrder stores the sequence in which dimensions were traversed to
 *  produce the prefix tree.
 *  For example, the axisOrder for the above X is:
 *  ```text
 *    axisOrder(X) = [0, 1, 2, 3].
 *  ``` */
__flatbuffers_define_vector_field(4, org_apache_arrow_flatbuf_SparseTensorIndexCSF, axisOrder, flatbuffers_int32_vec_t, 1)
typedef uint8_t org_apache_arrow_flatbuf_SparseTensorIndex_union_type_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_SparseTensorIndex, org_apache_arrow_flatbuf_SparseTensorIndex_union_type_t, 8)
__flatbuffers_define_union(flatbuffers_, org_apache_arrow_flatbuf_SparseTensorIndex)
#define org_apache_arrow_flatbuf_SparseTensorIndex_NONE ((org_apache_arrow_flatbuf_SparseTensorIndex_union_type_t)UINT8_C(0))
#define org_apache_arrow_flatbuf_SparseTensorIndex_SparseTensorIndexCOO ((org_apache_arrow_flatbuf_SparseTensorIndex_union_type_t)UINT8_C(1))
#define org_apache_arrow_flatbuf_SparseTensorIndex_SparseMatrixIndexCSX ((org_apache_arrow_flatbuf_SparseTensorIndex_union_type_t)UINT8_C(2))
#define org_apache_arrow_flatbuf_SparseTensorIndex_SparseTensorIndexCSF ((org_apache_arrow_flatbuf_SparseTensorIndex_union_type_t)UINT8_C(3))

static inline const char *org_apache_arrow_flatbuf_SparseTensorIndex_type_name(org_apache_arrow_flatbuf_SparseTensorIndex_union_type_t type)
{
    switch (type) {
    case org_apache_arrow_flatbuf_SparseTensorIndex_NONE: return "NONE";
    case org_apache_arrow_flatbuf_SparseTensorIndex_SparseTensorIndexCOO: return "SparseTensorIndexCOO";
    case org_apache_arrow_flatbuf_SparseTensorIndex_SparseMatrixIndexCSX: return "SparseMatrixIndexCSX";
    case org_apache_arrow_flatbuf_SparseTensorIndex_SparseTensorIndexCSF: return "SparseTensorIndexCSF";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_SparseTensorIndex_is_known_type(org_apache_arrow_flatbuf_SparseTensorIndex_union_type_t type)
{
    switch (type) {
    case org_apache_arrow_flatbuf_SparseTensorIndex_NONE: return 1;
    case org_apache_arrow_flatbuf_SparseTensorIndex_SparseTensorIndexCOO: return 1;
    case org_apache_arrow_flatbuf_SparseTensorIndex_SparseMatrixIndexCSX: return 1;
    case org_apache_arrow_flatbuf_SparseTensorIndex_SparseTensorIndexCSF: return 1;
    default: return 0;
    }
}


struct org_apache_arrow_flatbuf_SparseTensor_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_SparseTensor_vec_len(org_apache_arrow_flatbuf_SparseTensor_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_SparseTensor_table_t org_apache_arrow_flatbuf_SparseTensor_vec_at(org_apache_arrow_flatbuf_SparseTensor_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_SparseTensor_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_SparseTensor)

/**  The type of data contained in a value cell.
 *  Currently only fixed-width value types are supported,
 *  no strings or nested types. */
__flatbuffers_define_union_field(flatbuffers_, 1, org_apache_arrow_flatbuf_SparseTensor, type, org_apache_arrow_flatbuf_Type, 1)
/**  The dimensions of the tensor, optionally named. */
__flatbuffers_define_vector_field(2, org_apache_arrow_flatbuf_SparseTensor, shape, org_apache_arrow_flatbuf_TensorDim_vec_t, 1)
/**  The number of non-zero values in a sparse tensor. */
__flatbuffers_define_scalar_field(3, org_apache_arrow_flatbuf_SparseTensor, non_zero_length, flatbuffers_int64, int64_t, INT64_C(0))
/**  Sparse tensor index */
__flatbuffers_define_union_field(flatbuffers_, 5, org_apache_arrow_flatbuf_SparseTensor, sparseIndex, org_apache_arrow_flatbuf_SparseTensorIndex, 1)
/**  The location and size of the tensor's data */
__flatbuffers_define_struct_field(6, org_apache_arrow_flatbuf_SparseTensor, data, org_apache_arrow_flatbuf_Buffer_struct_t, 1)


#include "flatcc/flatcc_epilogue.h"
#endif /* SPARSETENSOR_READER_H */
#ifndef SPARSETENSOR_BUILDER_H
#define SPARSETENSOR_BUILDER_H

/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

#ifndef SPARSETENSOR_READER_H
#include "SparseTensor_reader.h"
#endif
#ifndef FLATBUFFERS_COMMON_BUILDER_H
#include "flatbuffers_common_builder.h"
#endif
#ifndef TENSOR_BUILDER_H
#include "Tensor_builder.h"
#endif
#include "flatcc/flatcc_prologue.h"
#ifndef flatbuffers_identifier
#define flatbuffers_identifier 0
#endif
#ifndef flatbuffers_extension
#define flatbuffers_extension "bin"
#endif

#define __org_apache_arrow_flatbuf_SparseMatrixCompressedAxis_formal_args , org_apache_arrow_flatbuf_SparseMatrixCompressedAxis_enum_t v0
#define __org_apache_arrow_flatbuf_SparseMatrixCompressedAxis_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_SparseMatrixCompressedAxis, org_apache_arrow_flatbuf_SparseMatrixCompressedAxis_enum_t)

typedef flatbuffers_union_ref_t org_apache_arrow_flatbuf_SparseTensorIndex_union_ref_t;
typedef flatbuffers_union_vec_ref_t org_apache_arrow_flatbuf_SparseTensorIndex_union_vec_ref_t;
static org_apache_arrow_flatbuf_SparseTensorIndex_union_ref_t org_apache_arrow_flatbuf_SparseTensorIndex_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_SparseTensorIndex_union_t t);

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_SparseTensorIndexCOO_required[] = { 0, 2, 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_SparseTensorIndexCOO_ref_t;
static org_apache_arrow_flatbuf_SparseTensorIndexCOO_ref_t org_apache_arrow_flatbuf_SparseTensorIndexCOO_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_SparseTensorIndexCOO_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_SparseTensorIndexCOO, 4)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_SparseMatrixIndexCSX_required[] = { 1, 2, 3, 4, 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_SparseMatrixIndexCSX_ref_t;
static org_apache_arrow_flatbuf_SparseMatrixIndexCSX_ref_t org_apache_arrow_flatbuf_SparseMatrixIndexCSX_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_SparseMatrixIndexCSX_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_SparseMatrixIndexCSX, 5)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_SparseTensorIndexCSF_required[] = { 0, 1, 2, 3, 4, 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_SparseTensorIndexCSF_ref_t;
static org_apache_arrow_flatbuf_SparseTensorIndexCSF_ref_t org_apache_arrow_flatbuf_SparseTensorIndexCSF_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_SparseTensorIndexCSF_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_SparseTensorIndexCSF, 5)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_SparseTensor_required[] = { 1, 2, 5, 6, 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_SparseTensor_ref_t;
static org_apache_arrow_flatbuf_SparseTensor_ref_t org_apache_arrow_flatbuf_SparseTensor_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_SparseTensor_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor, 7)

#define __org_apache_arrow_flatbuf_SparseTensorIndexCOO_formal_args , org_apache_arrow_flatbuf_Int_ref_t v0, flatbuffers_int64_vec_ref_t v1, org_apache_arrow_flatbuf_Buffer_t *v2, flatbuffers_bool_t v3
#define __org_apache_arrow_flatbuf_SparseTensorIndexCOO_call_args , v0, v1, v2, v3
static inline org_apache_arrow_flatbuf_SparseTensorIndexCOO_ref_t org_apache_arrow_flatbuf_SparseTensorIndexCOO_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_SparseTensorIndexCOO_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_SparseTensorIndexCOO, org_apache_arrow_flatbuf_SparseTensorIndexCOO_file_identifier, org_apache_arrow_flatbuf_SparseTensorIndexCOO_type_identifier)

#define __org_apache_arrow_flatbuf_SparseMatrixIndexCSX_formal_args ,\
  org_apache_arrow_flatbuf_SparseMatrixCompressedAxis_enum_t v0, org_apache_arrow_flatbuf_Int_ref_t v1, org_apache_arrow_flatbuf_Buffer_t *v2, org_apache_arrow_flatbuf_Int_ref_t v3, org_apache_arrow_flatbuf_Buffer_t *v4
#define __org_apache_arrow_flatbuf_SparseMatrixIndexCSX_call_args ,\
  v0, v1, v2, v3, v4
static inline org_apache_arrow_flatbuf_SparseMatrixIndexCSX_ref_t org_apache_arrow_flatbuf_SparseMatrixIndexCSX_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_SparseMatrixIndexCSX_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_SparseMatrixIndexCSX, org_apache_arrow_flatbuf_SparseMatrixIndexCSX_file_identifier, org_apache_arrow_flatbuf_SparseMatrixIndexCSX_type_identifier)

#define __org_apache_arrow_flatbuf_SparseTensorIndexCSF_formal_args ,\
  org_apache_arrow_flatbuf_Int_ref_t v0, org_apache_arrow_flatbuf_Buffer_vec_ref_t v1, org_apache_arrow_flatbuf_Int_ref_t v2, org_apache_arrow_flatbuf_Buffer_vec_ref_t v3, flatbuffers_int32_vec_ref_t v4
#define __org_apache_arrow_flatbuf_SparseTensorIndexCSF_call_args ,\
  v0, v1, v2, v3, v4
static inline org_apache_arrow_flatbuf_SparseTensorIndexCSF_ref_t org_apache_arrow_flatbuf_SparseTensorIndexCSF_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_SparseTensorIndexCSF_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_SparseTensorIndexCSF, org_apache_arrow_flatbuf_SparseTensorIndexCSF_file_identifier, org_apache_arrow_flatbuf_SparseTensorIndexCSF_type_identifier)

#define __org_apache_arrow_flatbuf_SparseTensor_formal_args ,\
  org_apache_arrow_flatbuf_Type_union_ref_t v1, org_apache_arrow_flatbuf_TensorDim_vec_ref_t v2, int64_t v3, org_apache_arrow_flatbuf_SparseTensorIndex_union_ref_t v5, org_apache_arrow_flatbuf_Buffer_t *v6
#define __org_apache_arrow_flatbuf_SparseTensor_call_args ,\
  v1, v2, v3, v5, v6
static inline org_apache_arrow_flatbuf_SparseTensor_ref_t org_apache_arrow_flatbuf_SparseTensor_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_SparseTensor_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor, org_apache_arrow_flatbuf_SparseTensor_file_identifier, org_apache_arrow_flatbuf_SparseTensor_type_identifier)

static inline org_apache_arrow_flatbuf_SparseTensorIndex_union_ref_t org_apache_arrow_flatbuf_SparseTensorIndex_as_NONE(void)
{ org_apache_arrow_flatbuf_SparseTensorIndex_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_SparseTensorIndex_NONE; uref.value = 0; return uref; }
static inline org_apache_arrow_flatbuf_SparseTensorIndex_union_ref_t org_apache_arrow_flatbuf_SparseTensorIndex_as_SparseTensorIndexCOO(org_apache_arrow_flatbuf_SparseTensorIndexCOO_ref_t ref)
{ org_apache_arrow_flatbuf_SparseTensorIndex_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_SparseTensorIndex_SparseTensorIndexCOO; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_SparseTensorIndex_union_ref_t org_apache_arrow_flatbuf_SparseTensorIndex_as_SparseMatrixIndexCSX(org_apache_arrow_flatbuf_SparseMatrixIndexCSX_ref_t ref)
{ org_apache_arrow_flatbuf_SparseTensorIndex_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_SparseTensorIndex_SparseMatrixIndexCSX; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_SparseTensorIndex_union_ref_t org_apache_arrow_flatbuf_SparseTensorIndex_as_SparseTensorIndexCSF(org_apache_arrow_flatbuf_SparseTensorIndexCSF_ref_t ref)
{ org_apache_arrow_flatbuf_SparseTensorIndex_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_SparseTensorIndex_SparseTensorIndexCSF; uref.value = ref; return uref; }
__flatbuffers_build_union_vector(flatbuffers_, org_apache_arrow_flatbuf_SparseTensorIndex)

static org_apache_arrow_flatbuf_SparseTensorIndex_union_ref_t org_apache_arrow_flatbuf_SparseTensorIndex_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_SparseTensorIndex_union_t u)
{
    switch (u.type) {
    case 1: return org_apache_arrow_flatbuf_SparseTensorIndex_as_SparseTensorIndexCOO(org_apache_arrow_flatbuf_SparseTensorIndexCOO_clone(B, (org_apache_arrow_flatbuf_SparseTensorIndexCOO_table_t)u.value));
    case 2: return org_apache_arrow_flatbuf_SparseTensorIndex_as_SparseMatrixIndexCSX(org_apache_arrow_flatbuf_SparseMatrixIndexCSX_clone(B, (org_apache_arrow_flatbuf_SparseMatrixIndexCSX_table_t)u.value));
    case 3: return org_apache_arrow_flatbuf_SparseTensorIndex_as_SparseTensorIndexCSF(org_apache_arrow_flatbuf_SparseTensorIndexCSF_clone(B, (org_apache_arrow_flatbuf_SparseTensorIndexCSF_table_t)u.value));
    default: return org_apache_arrow_flatbuf_SparseTensorIndex_as_NONE();
    }
}

__flatbuffers_build_table_field(0, flatbuffers_, org_apache_arrow_flatbuf_SparseTensorIndexCOO_indicesType, org_apache_arrow_flatbuf_Int, org_apache_arrow_flatbuf_SparseTensorIndexCOO)
__flatbuffers_build_vector_field(1, flatbuffers_, org_apache_arrow_flatbuf_SparseTensorIndexCOO_indicesStrides, flatbuffers_int64, int64_t, org_apache_arrow_flatbuf_SparseTensorIndexCOO)
__flatbuffers_build_struct_field(2, flatbuffers_, org_apache_arrow_flatbuf_SparseTensorIndexCOO_indicesBuffer, org_apache_arrow_flatbuf_Buffer, 16, 8, org_apache_arrow_flatbuf_SparseTensorIndexCOO)
__flatbuffers_build_scalar_field(3, flatbuffers_, org_apache_arrow_flatbuf_SparseTensorIndexCOO_isCanonical, flatbuffers_bool, flatbuffers_bool_t, 1, 1, UINT8_C(0), org_apache_arrow_flatbuf_SparseTensorIndexCOO)

static inline org_apache_arrow_flatbuf_SparseTensorIndexCOO_ref_t org_apache_arrow_flatbuf_SparseTensorIndexCOO_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_SparseTensorIndexCOO_formal_args)
{
    if (org_apache_arrow_flatbuf_SparseTensorIndexCOO_start(B)
        || org_apache_arrow_flatbuf_SparseTensorIndexCOO_indicesBuffer_add(B, v2)
        || org_apache_arrow_flatbuf_SparseTensorIndexCOO_indicesType_add(B, v0)
        || org_apache_arrow_flatbuf_SparseTensorIndexCOO_indicesStrides_add(B, v1)
        || org_apache_arrow_flatbuf_SparseTensorIndexCOO_isCanonical_add(B, v3)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_SparseTensorIndexCOO_end(B);
}

static org_apache_arrow_flatbuf_SparseTensorIndexCOO_ref_t org_apache_arrow_flatbuf_SparseTensorIndexCOO_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_SparseTensorIndexCOO_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_SparseTensorIndexCOO_start(B)
        || org_apache_arrow_flatbuf_SparseTensorIndexCOO_indicesBuffer_pick(B, t)
        || org_apache_arrow_flatbuf_SparseTensorIndexCOO_indicesType_pick(B, t)
        || org_apache_arrow_flatbuf_SparseTensorIndexCOO_indicesStrides_pick(B, t)
        || org_apache_arrow_flatbuf_SparseTensorIndexCOO_isCanonical_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_SparseTensorIndexCOO_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_SparseMatrixIndexCSX_compressedAxis, org_apache_arrow_flatbuf_SparseMatrixCompressedAxis, org_apache_arrow_flatbuf_SparseMatrixCompressedAxis_enum_t, 2, 2, INT16_C(0), org_apache_arrow_flatbuf_SparseMatrixIndexCSX)
__flatbuffers_build_table_field(1, flatbuffers_, org_apache_arrow_flatbuf_SparseMatrixIndexCSX_indptrType, org_apache_arrow_flatbuf_Int, org_apache_arrow_flatbuf_SparseMatrixIndexCSX)
__flatbuffers_build_struct_field(2, flatbuffers_, org_apache_arrow_flatbuf_SparseMatrixIndexCSX_indptrBuffer, org_apache_arrow_flatbuf_Buffer, 16, 8, org_apache_arrow_flatbuf_SparseMatrixIndexCSX)
__flatbuffers_build_table_field(3, flatbuffers_, org_apache_arrow_flatbuf_SparseMatrixIndexCSX_indicesType, org_apache_arrow_flatbuf_Int, org_apache_arrow_flatbuf_SparseMatrixIndexCSX)
__flatbuffers_build_struct_field(4, flatbuffers_, org_apache_arrow_flatbuf_SparseMatrixIndexCSX_indicesBuffer, org_apache_arrow_flatbuf_Buffer, 16, 8, org_apache_arrow_flatbuf_SparseMatrixIndexCSX)

static inline org_apache_arrow_flatbuf_SparseMatrixIndexCSX_ref_t org_apache_arrow_flatbuf_SparseMatrixIndexCSX_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_SparseMatrixIndexCSX_formal_args)
{
    if (org_apache_arrow_flatbuf_SparseMatrixIndexCSX_start(B)
        || org_apache_arrow_flatbuf_SparseMatrixIndexCSX_indptrBuffer_add(B, v2)
        || org_apache_arrow_flatbuf_SparseMatrixIndexCSX_indicesBuffer_add(B, v4)
        || org_apache_arrow_flatbuf_SparseMatrixIndexCSX_indptrType_add(B, v1)
        || org_apache_arrow_flatbuf_SparseMatrixIndexCSX_indicesType_add(B, v3)
        || org_apache_arrow_flatbuf_SparseMatrixIndexCSX_compressedAxis_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_SparseMatrixIndexCSX_end(B);
}

static org_apache_arrow_flatbuf_SparseMatrixIndexCSX_ref_t org_apache_arrow_flatbuf_SparseMatrixIndexCSX_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_SparseMatrixIndexCSX_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_SparseMatrixIndexCSX_start(B)
        || org_apache_arrow_flatbuf_SparseMatrixIndexCSX_indptrBuffer_pick(B, t)
        || org_apache_arrow_flatbuf_SparseMatrixIndexCSX_indicesBuffer_pick(B, t)
        || org_apache_arrow_flatbuf_SparseMatrixIndexCSX_indptrType_pick(B, t)
        || org_apache_arrow_flatbuf_SparseMatrixIndexCSX_indicesType_pick(B, t)
        || org_apache_arrow_flatbuf_SparseMatrixIndexCSX_compressedAxis_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_SparseMatrixIndexCSX_end(B));
}

__flatbuffers_build_table_field(0, flatbuffers_, org_apache_arrow_flatbuf_SparseTensorIndexCSF_indptrType, org_apache_arrow_flatbuf_Int, org_apache_arrow_flatbuf_SparseTensorIndexCSF)
__flatbuffers_build_vector_field(1, flatbuffers_, org_apache_arrow_flatbuf_SparseTensorIndexCSF_indptrBuffers, org_apache_arrow_flatbuf_Buffer, org_apache_arrow_flatbuf_Buffer_t, org_apache_arrow_flatbuf_SparseTensorIndexCSF)
__flatbuffers_build_table_field(2, flatbuffers_, org_apache_arrow_flatbuf_SparseTensorIndexCSF_indicesType, org_apache_arrow_flatbuf_Int, org_apache_arrow_flatbuf_SparseTensorIndexCSF)
__flatbuffers_build_vector_field(3, flatbuffers_, org_apache_arrow_flatbuf_SparseTensorIndexCSF_indicesBuffers, org_apache_arrow_flatbuf_Buffer, org_apache_arrow_flatbuf_Buffer_t, org_apache_arrow_flatbuf_SparseTensorIndexCSF)
__flatbuffers_build_vector_field(4, flatbuffers_, org_apache_arrow_flatbuf_SparseTensorIndexCSF_axisOrder, flatbuffers_int32, int32_t, org_apache_arrow_flatbuf_SparseTensorIndexCSF)

static inline org_apache_arrow_flatbuf_SparseTensorIndexCSF_ref_t org_apache_arrow_flatbuf_SparseTensorIndexCSF_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_SparseTensorIndexCSF_formal_args)
{
    if (org_apache_arrow_flatbuf_SparseTensorIndexCSF_start(B)
        || org_apache_arrow_flatbuf_SparseTensorIndexCSF_indptrType_add(B, v0)
        || org_apache_arrow_flatbuf_SparseTensorIndexCSF_indptrBuffers_add(B, v1)
        || org_apache_arrow_flatbuf_SparseTensorIndexCSF_indicesType_add(B, v2)
        || org_apache_arrow_flatbuf_SparseTensorIndexCSF_indicesBuffers_add(B, v3)
        || org_apache_arrow_flatbuf_SparseTensorIndexCSF_axisOrder_add(B, v4)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_SparseTensorIndexCSF_end(B);
}

static org_apache_arrow_flatbuf_SparseTensorIndexCSF_ref_t org_apache_arrow_flatbuf_SparseTensorIndexCSF_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_SparseTensorIndexCSF_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_SparseTensorIndexCSF_start(B)
        || org_apache_arrow_flatbuf_SparseTensorIndexCSF_indptrType_pick(B, t)
        || org_apache_arrow_flatbuf_SparseTensorIndexCSF_indptrBuffers_pick(B, t)
        || org_apache_arrow_flatbuf_SparseTensorIndexCSF_indicesType_pick(B, t)
        || org_apache_arrow_flatbuf_SparseTensorIndexCSF_indicesBuffers_pick(B, t)
        || org_apache_arrow_flatbuf_SparseTensorIndexCSF_axisOrder_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_SparseTensorIndexCSF_end(B));
}

__flatbuffers_build_union_field(1, flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, org_apache_arrow_flatbuf_SparseTensor)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, Null, org_apache_arrow_flatbuf_Null)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, Int, org_apache_arrow_flatbuf_Int)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, FloatingPoint, org_apache_arrow_flatbuf_FloatingPoint)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, Binary, org_apache_arrow_flatbuf_Binary)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, Utf8, org_apache_arrow_flatbuf_Utf8)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, Bool, org_apache_arrow_flatbuf_Bool)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, Decimal, org_apache_arrow_flatbuf_Decimal)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, Date, org_apache_arrow_flatbuf_Date)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, Time, org_apache_arrow_flatbuf_Time)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, Timestamp, org_apache_arrow_flatbuf_Timestamp)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, Interval, org_apache_arrow_flatbuf_Interval)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, List, org_apache_arrow_flatbuf_List)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, Struct_, org_apache_arrow_flatbuf_Struct_)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, Union, org_apache_arrow_flatbuf_Union)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, FixedSizeBinary, org_apache_arrow_flatbuf_FixedSizeBinary)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, FixedSizeList, org_apache_arrow_flatbuf_FixedSizeList)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, Map, org_apache_arrow_flatbuf_Map)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, Duration, org_apache_arrow_flatbuf_Duration)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, LargeBinary, org_apache_arrow_flatbuf_LargeBinary)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, LargeUtf8, org_apache_arrow_flatbuf_LargeUtf8)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, LargeList, org_apache_arrow_flatbuf_LargeList)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, RunEndEncoded, org_apache_arrow_flatbuf_RunEndEncoded)
__flatbuffers_build_table_vector_field(2, flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_shape, org_apache_arrow_flatbuf_TensorDim, org_apache_arrow_flatbuf_SparseTensor)
__flatbuffers_build_scalar_field(3, flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_non_zero_length, flatbuffers_int64, int64_t, 8, 8, INT64_C(0), org_apache_arrow_flatbuf_SparseTensor)
__flatbuffers_build_union_field(5, flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_sparseIndex, org_apache_arrow_flatbuf_SparseTensorIndex, org_apache_arrow_flatbuf_SparseTensor)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_sparseIndex, org_apache_arrow_flatbuf_SparseTensorIndex, SparseTensorIndexCOO, org_apache_arrow_flatbuf_SparseTensorIndexCOO)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_sparseIndex, org_apache_arrow_flatbuf_SparseTensorIndex, SparseMatrixIndexCSX, org_apache_arrow_flatbuf_SparseMatrixIndexCSX)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_sparseIndex, org_apache_arrow_flatbuf_SparseTensorIndex, SparseTensorIndexCSF, org_apache_arrow_flatbuf_SparseTensorIndexCSF)
__flatbuffers_build_struct_field(6, flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_data, org_apache_arrow_flatbuf_Buffer, 16, 8, org_apache_arrow_flatbuf_SparseTensor)

static inline org_apache_arrow_flatbuf_SparseTensor_ref_t org_apache_arrow_flatbuf_SparseTensor_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_SparseTensor_formal_args)
{
    if (org_apache_arrow_flatbuf_SparseTensor_start(B)
        || org_apache_arrow_flatbuf_SparseTensor_non_zero_length_add(B, v3)
        || org_apache_arrow_flatbuf_SparseTensor_data_add(B, v6)
        || org_apache_arrow_flatbuf_SparseTensor_type_add_value(B, v1)
        || org_apache_arrow_flatbuf_SparseTensor_shape_add(B, v2)
        || org_apache_arrow_flatbuf_SparseTensor_sparseIndex_add_value(B, v5)
        || org_apache_arrow_flatbuf_SparseTensor_type_add_type(B, v1.type)
        || org_apache_arrow_flatbuf_SparseTensor_sparseIndex_add_type(B, v5.type)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_SparseTensor_end(B);
}

static org_apache_arrow_flatbuf_SparseTensor_ref_t org_apache_arrow_flatbuf_SparseTensor_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_SparseTensor_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_SparseTensor_start(B)
        || org_apache_arrow_flatbuf_SparseTensor_non_zero_length_pick(B, t)
        || org_apache_arrow_flatbuf_SparseTensor_data_pick(B, t)
        || org_apache_arrow_flatbuf_SparseTensor_type_pick(B, t)
        || org_apache_arrow_flatbuf_SparseTensor_shape_pick(B, t)
        || org_apache_arrow_flatbuf_SparseTensor_sparseIndex_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_SparseTensor_end(B));
}

#include "flatcc/flatcc_epilogue.h"
#endif /* SPARSETENSOR_BUILDER_H */
#ifndef SPARSETENSOR_VERIFIER_H
#define SPARSETENSOR_VERIFIER_H

/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

#ifndef SPARSETENSOR_READER_H
#include "SparseTensor_reader.h"
#endif
#include "flatcc/flatcc_verifier.h"
#ifndef TENSOR_VERIFIER_H
#include "Tensor_verifier.h"
#endif
#include "flatcc/flatcc_prologue.h"

static int org_apache_arrow_flatbuf_SparseTensorIndexCOO_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_SparseMatrixIndexCSX_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_SparseTensorIndexCSF_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_SparseTensor_verify_table(flatcc_table_verifier_descriptor_t *td);

static int org_apache_arrow_flatbuf_SparseTensorIndex_union_verifier(flatcc_union_verifier_descriptor_t *ud)
{
    switch (ud->type) {
    case 1: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_SparseTensorIndexCOO_verify_table); /* SparseTensorIndexCOO */
    case 2: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_SparseMatrixIndexCSX_verify_table); /* SparseMatrixIndexCSX */
    case 3: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_SparseTensorIndexCSF_verify_table); /* SparseTensorIndexCSF */
    default: return flatcc_verify_ok;
    }
}

static int org_apache_arrow_flatbuf_SparseTensorIndexCOO_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_table_field(td, 0, 1, &org_apache_arrow_flatbuf_Int_verify_table) /* indicesType */)) return ret;
    if ((ret = flatcc_verify_vector_field(td, 1, 0, 8, 8, INT64_C(536870911)) /* indicesStrides */)) return ret;
    if ((ret = flatcc_verify_field(td, 2, 16, 8) /* indicesBuffer */)) return ret;
    if ((ret = flatcc_verify_field(td, 3, 1, 1) /* isCanonical */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_SparseTensorIndexCOO_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_SparseTensorIndexCOO_identifier, &org_apache_arrow_flatbuf_SparseTensorIndexCOO_verify_table);
}

static inline int org_apache_arrow_flatbuf_SparseTensorIndexCOO_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_SparseTensorIndexCOO_type_identifier, &org_apache_arrow_flatbuf_SparseTensorIndexCOO_verify_table);
}

static inline int org_apache_arrow_flatbuf_SparseTensorIndexCOO_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_SparseTensorIndexCOO_verify_table);
}

static inline int org_apache_arrow_flatbuf_SparseTensorIndexCOO_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_SparseTensorIndexCOO_verify_table);
}

static int org_apache_arrow_flatbuf_SparseMatrixIndexCSX_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* compressedAxis */)) return ret;
    if ((ret = flatcc_verify_table_field(td, 1, 1, &org_apache_arrow_flatbuf_Int_verify_table) /* indptrType */)) return ret;
    if ((ret = flatcc_verify_field(td, 2, 16, 8) /* indptrBuffer */)) return ret;
    if ((ret = flatcc_verify_table_field(td, 3, 1, &org_apache_arrow_flatbuf_Int_verify_table) /* indicesType */)) return ret;
    if ((ret = flatcc_verify_field(td, 4, 16, 8) /* indicesBuffer */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_SparseMatrixIndexCSX_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_SparseMatrixIndexCSX_identifier, &org_apache_arrow_flatbuf_SparseMatrixIndexCSX_verify_table);
}

static inline int org_apache_arrow_flatbuf_SparseMatrixIndexCSX_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_SparseMatrixIndexCSX_type_identifier, &org_apache_arrow_flatbuf_SparseMatrixIndexCSX_verify_table);
}

static inline int org_apache_arrow_flatbuf_SparseMatrixIndexCSX_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_SparseMatrixIndexCSX_verify_table);
}

static inline int org_apache_arrow_flatbuf_SparseMatrixIndexCSX_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_SparseMatrixIndexCSX_verify_table);
}

static int org_apache_arrow_flatbuf_SparseTensorIndexCSF_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_table_field(td, 0, 1, &org_apache_arrow_flatbuf_Int_verify_table) /* indptrType */)) return ret;
    if ((ret = flatcc_verify_vector_field(td, 1, 1, 16, 8, INT64_C(268435455)) /* indptrBuffers */)) return ret;
    if ((ret = flatcc_verify_table_field(td, 2, 1, &org_apache_arrow_flatbuf_Int_verify_table) /* indicesType */)) return ret;
    if ((ret = flatcc_verify_vector_field(td, 3, 1, 16, 8, INT64_C(268435455)) /* indicesBuffers */)) return ret;
    if ((ret = flatcc_verify_vector_field(td, 4, 1, 4, 4, INT64_C(1073741823)) /* axisOrder */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_SparseTensorIndexCSF_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_SparseTensorIndexCSF_identifier, &org_apache_arrow_flatbuf_SparseTensorIndexCSF_verify_table);
}

static inline int org_apache_arrow_flatbuf_SparseTensorIndexCSF_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_SparseTensorIndexCSF_type_identifier, &org_apache_arrow_flatbuf_SparseTensorIndexCSF_verify_table);
}

static inline int org_apache_arrow_flatbuf_SparseTensorIndexCSF_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_SparseTensorIndexCSF_verify_table);
}

static inline int org_apache_arrow_flatbuf_SparseTensorIndexCSF_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_SparseTensorIndexCSF_verify_table);
}

static int org_apache_arrow_flatbuf_SparseTensor_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_union_field(td, 1, 1, &org_apache_arrow_flatbuf_Type_union_verifier) /* type */)) return ret;
    if ((ret = flatcc_verify_table_vector_field(td, 2, 1, &org_apache_arrow_flatbuf_TensorDim_verify_table) /* shape */)) return ret;
    if ((ret = flatcc_verify_field(td, 3, 8, 8) /* non_zero_length */)) return ret;
    if ((ret = flatcc_verify_union_field(td, 5, 1, &org_apache_arrow_flatbuf_SparseTensorIndex_union_verifier) /* sparseIndex */)) return ret;
    if ((ret = flatcc_verify_field(td, 6, 16, 8) /* data */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_SparseTensor_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_SparseTensor_identifier, &org_apache_arrow_flatbuf_SparseTensor_verify_table);
}

static inline int org_apache_arrow_flatbuf_SparseTensor_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_SparseTensor_type_identifier, &org_apache_arrow_flatbuf_SparseTensor_verify_table);
}

static inline int org_apache_arrow_flatbuf_SparseTensor_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_SparseTensor_verify_table);
}

static inline int org_apache_arrow_flatbuf_SparseTensor_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_SparseTensor_verify_table);
}

#include "flatcc/flatcc_epilogue.h"
#endif /* SPARSETENSOR_VERIFIER_H */
#ifndef MESSAGE_READER_H
#define MESSAGE_READER_H

/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

#ifndef FLATBUFFERS_COMMON_READER_H
#include "flatbuffers_common_reader.h"
#endif
#ifndef TENSOR_READER_H
#include "Tensor_reader.h"
#endif
#ifndef SPARSETENSOR_READER_H
#include "SparseTensor_reader.h"
#endif
#ifndef SCHEMA_READER_H
#include "Schema_reader.h"
#endif
#include "flatcc/flatcc_flatbuffers.h"
#ifndef __alignas_is_defined
#include <stdalign.h>
#endif
#include "flatcc/flatcc_prologue.h"
#ifndef flatbuffers_identifier
#define flatbuffers_identifier 0
#endif
#ifndef flatbuffers_extension
#define flatbuffers_extension "bin"
#endif

typedef struct org_apache_arrow_flatbuf_FieldNode org_apache_arrow_flatbuf_FieldNode_t;
typedef const org_apache_arrow_flatbuf_FieldNode_t *org_apache_arrow_flatbuf_FieldNode_struct_t;
typedef org_apache_arrow_flatbuf_FieldNode_t *org_apache_arrow_flatbuf_FieldNode_mutable_struct_t;
typedef const org_apache_arrow_flatbuf_FieldNode_t *org_apache_arrow_flatbuf_FieldNode_vec_t;
typedef org_apache_arrow_flatbuf_FieldNode_t *org_apache_arrow_flatbuf_FieldNode_mutable_vec_t;

typedef const struct org_apache_arrow_flatbuf_BodyCompression_table *org_apache_arrow_flatbuf_BodyCompression_table_t;
typedef struct org_apache_arrow_flatbuf_BodyCompression_table *org_apache_arrow_flatbuf_BodyCompression_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_BodyCompression_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_BodyCompression_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_RecordBatch_table *org_apache_arrow_flatbuf_RecordBatch_table_t;
typedef struct org_apache_arrow_flatbuf_RecordBatch_table *org_apache_arrow_flatbuf_RecordBatch_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_RecordBatch_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_RecordBatch_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_DictionaryBatch_table *org_apache_arrow_flatbuf_DictionaryBatch_table_t;
typedef struct org_apache_arrow_flatbuf_DictionaryBatch_table *org_apache_arrow_flatbuf_DictionaryBatch_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_DictionaryBatch_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_DictionaryBatch_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Message_table *org_apache_arrow_flatbuf_Message_table_t;
typedef struct org_apache_arrow_flatbuf_Message_table *org_apache_arrow_flatbuf_Message_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Message_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Message_mutable_vec_t;
#ifndef org_apache_arrow_flatbuf_FieldNode_file_identifier
#define org_apache_arrow_flatbuf_FieldNode_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_FieldNode_file_identifier */
#ifndef org_apache_arrow_flatbuf_FieldNode_identifier
#define org_apache_arrow_flatbuf_FieldNode_identifier 0
#endif
#define org_apache_arrow_flatbuf_FieldNode_type_hash ((flatbuffers_thash_t)0x931857b8)
#define org_apache_arrow_flatbuf_FieldNode_type_identifier "\xb8\x57\x18\x93"
#ifndef org_apache_arrow_flatbuf_FieldNode_file_extension
#define org_apache_arrow_flatbuf_FieldNode_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_BodyCompression_file_identifier
#define org_apache_arrow_flatbuf_BodyCompression_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_BodyCompression_file_identifier */
#ifndef org_apache_arrow_flatbuf_BodyCompression_identifier
#define org_apache_arrow_flatbuf_BodyCompression_identifier 0
#endif
#define org_apache_arrow_flatbuf_BodyCompression_type_hash ((flatbuffers_thash_t)0xbc821116)
#define org_apache_arrow_flatbuf_BodyCompression_type_identifier "\x16\x11\x82\xbc"
#ifndef org_apache_arrow_flatbuf_BodyCompression_file_extension
#define org_apache_arrow_flatbuf_BodyCompression_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_RecordBatch_file_identifier
#define org_apache_arrow_flatbuf_RecordBatch_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_RecordBatch_file_identifier */
#ifndef org_apache_arrow_flatbuf_RecordBatch_identifier
#define org_apache_arrow_flatbuf_RecordBatch_identifier 0
#endif
#define org_apache_arrow_flatbuf_RecordBatch_type_hash ((flatbuffers_thash_t)0x43c558b)
#define org_apache_arrow_flatbuf_RecordBatch_type_identifier "\x8b\x55\x3c\x04"
#ifndef org_apache_arrow_flatbuf_RecordBatch_file_extension
#define org_apache_arrow_flatbuf_RecordBatch_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_DictionaryBatch_file_identifier
#define org_apache_arrow_flatbuf_DictionaryBatch_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_DictionaryBatch_file_identifier */
#ifndef org_apache_arrow_flatbuf_DictionaryBatch_identifier
#define org_apache_arrow_flatbuf_DictionaryBatch_identifier 0
#endif
#define org_apache_arrow_flatbuf_DictionaryBatch_type_hash ((flatbuffers_thash_t)0x5c6da7bc)
#define org_apache_arrow_flatbuf_DictionaryBatch_type_identifier "\xbc\xa7\x6d\x5c"
#ifndef org_apache_arrow_flatbuf_DictionaryBatch_file_extension
#define org_apache_arrow_flatbuf_DictionaryBatch_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Message_file_identifier
#define org_apache_arrow_flatbuf_Message_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Message_file_identifier */
#ifndef org_apache_arrow_flatbuf_Message_identifier
#define org_apache_arrow_flatbuf_Message_identifier 0
#endif
#define org_apache_arrow_flatbuf_Message_type_hash ((flatbuffers_thash_t)0xc3efd227)
#define org_apache_arrow_flatbuf_Message_type_identifier "\x27\xd2\xef\xc3"
#ifndef org_apache_arrow_flatbuf_Message_file_extension
#define org_apache_arrow_flatbuf_Message_file_extension "bin"
#endif

typedef int8_t org_apache_arrow_flatbuf_CompressionType_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_CompressionType, org_apache_arrow_flatbuf_CompressionType_enum_t, 8)
#define org_apache_arrow_flatbuf_CompressionType_LZ4_FRAME ((org_apache_arrow_flatbuf_CompressionType_enum_t)INT8_C(0))
#define org_apache_arrow_flatbuf_CompressionType_ZSTD ((org_apache_arrow_flatbuf_CompressionType_enum_t)INT8_C(1))

static inline const char *org_apache_arrow_flatbuf_CompressionType_name(org_apache_arrow_flatbuf_CompressionType_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_CompressionType_LZ4_FRAME: return "LZ4_FRAME";
    case org_apache_arrow_flatbuf_CompressionType_ZSTD: return "ZSTD";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_CompressionType_is_known_value(org_apache_arrow_flatbuf_CompressionType_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_CompressionType_LZ4_FRAME: return 1;
    case org_apache_arrow_flatbuf_CompressionType_ZSTD: return 1;
    default: return 0;
    }
}

/**  Provided for forward compatibility in case we need to support different
 *  strategies for compressing the IPC message body (like whole-body
 *  compression rather than buffer-level) in the future */
typedef int8_t org_apache_arrow_flatbuf_BodyCompressionMethod_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_BodyCompressionMethod, org_apache_arrow_flatbuf_BodyCompressionMethod_enum_t, 8)
/**  Each constituent buffer is first compressed with the indicated
 *  compressor, and then written with the uncompressed length in the first 8
 *  bytes as a 64-bit little-endian signed integer followed by the compressed
 *  buffer bytes (and then padding as required by the protocol). The
 *  uncompressed length may be set to -1 to indicate that the data that
 *  follows is not compressed, which can be useful for cases where
 *  compression does not yield appreciable savings. */
#define org_apache_arrow_flatbuf_BodyCompressionMethod_BUFFER ((org_apache_arrow_flatbuf_BodyCompressionMethod_enum_t)INT8_C(0))

static inline const char *org_apache_arrow_flatbuf_BodyCompressionMethod_name(org_apache_arrow_flatbuf_BodyCompressionMethod_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_BodyCompressionMethod_BUFFER: return "BUFFER";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_BodyCompressionMethod_is_known_value(org_apache_arrow_flatbuf_BodyCompressionMethod_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_BodyCompressionMethod_BUFFER: return 1;
    default: return 0;
    }
}


/**  ----------------------------------------------------------------------
 *  Data structures for describing a table row batch (a collection of
 *  equal-length Arrow arrays)
 *  Metadata about a field at some level of a nested type tree (but not
 *  its children).
 *
 *  For example, a List<Int16> with values `[[1, 2, 3], null, [4], [5, 6], null]`
 *  would have {length: 5, null_count: 2} for its List node, and {length: 6,
 *  null_count: 0} for its Int16 node, as separate FieldNode structs */
struct org_apache_arrow_flatbuf_FieldNode {
    /**  The number of value slots in the Arrow array at this level of a nested
     *  tree */
    alignas(8) int64_t length;
    /**  The number of observed nulls. Fields with null_count == 0 may choose not
     *  to write their physical validity bitmap out as a materialized buffer,
     *  instead setting the length of the bitmap buffer to 0. */
    alignas(8) int64_t null_count;
};
static_assert(sizeof(org_apache_arrow_flatbuf_FieldNode_t) == 16, "struct size mismatch");

static inline const org_apache_arrow_flatbuf_FieldNode_t *org_apache_arrow_flatbuf_FieldNode__const_ptr_add(const org_apache_arrow_flatbuf_FieldNode_t *p, size_t i) { return p + i; }
static inline org_apache_arrow_flatbuf_FieldNode_t *org_apache_arrow_flatbuf_FieldNode__ptr_add(org_apache_arrow_flatbuf_FieldNode_t *p, size_t i) { return p + i; }
static inline org_apache_arrow_flatbuf_FieldNode_struct_t org_apache_arrow_flatbuf_FieldNode_vec_at(org_apache_arrow_flatbuf_FieldNode_vec_t vec, size_t i)
__flatbuffers_struct_vec_at(vec, i)
static inline size_t org_apache_arrow_flatbuf_FieldNode__size(void) { return 16; }
static inline size_t org_apache_arrow_flatbuf_FieldNode_vec_len(org_apache_arrow_flatbuf_FieldNode_vec_t vec)
__flatbuffers_vec_len(vec)
__flatbuffers_struct_as_root(org_apache_arrow_flatbuf_FieldNode)

__flatbuffers_define_struct_scalar_field(org_apache_arrow_flatbuf_FieldNode, length, flatbuffers_int64, int64_t)
__flatbuffers_define_struct_scalar_field(org_apache_arrow_flatbuf_FieldNode, null_count, flatbuffers_int64, int64_t)


/**  Optional compression for the memory buffers constituting IPC message
 *  bodies. Intended for use with RecordBatch but could be used for other
 *  message types */
struct org_apache_arrow_flatbuf_BodyCompression_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_BodyCompression_vec_len(org_apache_arrow_flatbuf_BodyCompression_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_BodyCompression_table_t org_apache_arrow_flatbuf_BodyCompression_vec_at(org_apache_arrow_flatbuf_BodyCompression_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_BodyCompression_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_BodyCompression)

/**  Compressor library.
 *  For LZ4_FRAME, each compressed buffer must consist of a single frame. */
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_BodyCompression, codec, org_apache_arrow_flatbuf_CompressionType, org_apache_arrow_flatbuf_CompressionType_enum_t, INT8_C(0))
/**  Indicates the way the record batch body was compressed */
__flatbuffers_define_scalar_field(1, org_apache_arrow_flatbuf_BodyCompression, method, org_apache_arrow_flatbuf_BodyCompressionMethod, org_apache_arrow_flatbuf_BodyCompressionMethod_enum_t, INT8_C(0))

/**  A data header describing the shared memory layout of a "record" or "row"
 *  batch. Some systems call this a "row batch" internally and others a "record
 *  batch". */
struct org_apache_arrow_flatbuf_RecordBatch_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_RecordBatch_vec_len(org_apache_arrow_flatbuf_RecordBatch_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_RecordBatch_table_t org_apache_arrow_flatbuf_RecordBatch_vec_at(org_apache_arrow_flatbuf_RecordBatch_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_RecordBatch_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_RecordBatch)

/**  number of records / rows. The arrays in the batch should all have this
 *  length */
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_RecordBatch, length, flatbuffers_int64, int64_t, INT64_C(0))
/**  Nodes correspond to the pre-ordered flattened logical schema */
__flatbuffers_define_vector_field(1, org_apache_arrow_flatbuf_RecordBatch, nodes, org_apache_arrow_flatbuf_FieldNode_vec_t, 0)
/**  Buffers correspond to the pre-ordered flattened buffer tree
 *
 *  The number of buffers appended to this list depends on the schema. For
 *  example, most primitive arrays will have 2 buffers, 1 for the validity
 *  bitmap and 1 for the values. For struct arrays, there will only be a
 *  single buffer for the validity (nulls) bitmap */
__flatbuffers_define_vector_field(2, org_apache_arrow_flatbuf_RecordBatch, buffers, org_apache_arrow_flatbuf_Buffer_vec_t, 0)
/**  Optional compression of the message body */
__flatbuffers_define_table_field(3, org_apache_arrow_flatbuf_RecordBatch, compression, org_apache_arrow_flatbuf_BodyCompression_table_t, 0)

/**  For sending dictionary encoding information. Any Field can be
 *  dictionary-encoded, but in this case none of its children may be
 *  dictionary-encoded.
 *  There is one vector / column per dictionary, but that vector / column
 *  may be spread across multiple dictionary batches by using the isDelta
 *  flag */
struct org_apache_arrow_flatbuf_DictionaryBatch_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_DictionaryBatch_vec_len(org_apache_arrow_flatbuf_DictionaryBatch_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_DictionaryBatch_table_t org_apache_arrow_flatbuf_DictionaryBatch_vec_at(org_apache_arrow_flatbuf_DictionaryBatch_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_DictionaryBatch_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_DictionaryBatch)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_DictionaryBatch, id, flatbuffers_int64, int64_t, INT64_C(0))
__flatbuffers_define_table_field(1, org_apache_arrow_flatbuf_DictionaryBatch, data, org_apache_arrow_flatbuf_RecordBatch_table_t, 0)
/**  If isDelta is true the values in the dictionary are to be appended to a
 *  dictionary with the indicated id. If isDelta is false this dictionary
 *  should replace the existing dictionary. */
__flatbuffers_define_scalar_field(2, org_apache_arrow_flatbuf_DictionaryBatch, isDelta, flatbuffers_bool, flatbuffers_bool_t, UINT8_C(0))
/**  ----------------------------------------------------------------------
 *  The root Message type
 *  This union enables us to easily send different message types without
 *  redundant storage, and in the future we can easily add new message types.
 *
 *  Arrow implementations do not need to implement all of the message types,
 *  which may include experimental metadata types. For maximum compatibility,
 *  it is best to send data using RecordBatch */
typedef uint8_t org_apache_arrow_flatbuf_MessageHeader_union_type_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_MessageHeader, org_apache_arrow_flatbuf_MessageHeader_union_type_t, 8)
__flatbuffers_define_union(flatbuffers_, org_apache_arrow_flatbuf_MessageHeader)
#define org_apache_arrow_flatbuf_MessageHeader_NONE ((org_apache_arrow_flatbuf_MessageHeader_union_type_t)UINT8_C(0))
#define org_apache_arrow_flatbuf_MessageHeader_Schema ((org_apache_arrow_flatbuf_MessageHeader_union_type_t)UINT8_C(1))
#define org_apache_arrow_flatbuf_MessageHeader_DictionaryBatch ((org_apache_arrow_flatbuf_MessageHeader_union_type_t)UINT8_C(2))
#define org_apache_arrow_flatbuf_MessageHeader_RecordBatch ((org_apache_arrow_flatbuf_MessageHeader_union_type_t)UINT8_C(3))
#define org_apache_arrow_flatbuf_MessageHeader_Tensor ((org_apache_arrow_flatbuf_MessageHeader_union_type_t)UINT8_C(4))
#define org_apache_arrow_flatbuf_MessageHeader_SparseTensor ((org_apache_arrow_flatbuf_MessageHeader_union_type_t)UINT8_C(5))

static inline const char *org_apache_arrow_flatbuf_MessageHeader_type_name(org_apache_arrow_flatbuf_MessageHeader_union_type_t type)
{
    switch (type) {
    case org_apache_arrow_flatbuf_MessageHeader_NONE: return "NONE";
    case org_apache_arrow_flatbuf_MessageHeader_Schema: return "Schema";
    case org_apache_arrow_flatbuf_MessageHeader_DictionaryBatch: return "DictionaryBatch";
    case org_apache_arrow_flatbuf_MessageHeader_RecordBatch: return "RecordBatch";
    case org_apache_arrow_flatbuf_MessageHeader_Tensor: return "Tensor";
    case org_apache_arrow_flatbuf_MessageHeader_SparseTensor: return "SparseTensor";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_MessageHeader_is_known_type(org_apache_arrow_flatbuf_MessageHeader_union_type_t type)
{
    switch (type) {
    case org_apache_arrow_flatbuf_MessageHeader_NONE: return 1;
    case org_apache_arrow_flatbuf_MessageHeader_Schema: return 1;
    case org_apache_arrow_flatbuf_MessageHeader_DictionaryBatch: return 1;
    case org_apache_arrow_flatbuf_MessageHeader_RecordBatch: return 1;
    case org_apache_arrow_flatbuf_MessageHeader_Tensor: return 1;
    case org_apache_arrow_flatbuf_MessageHeader_SparseTensor: return 1;
    default: return 0;
    }
}


struct org_apache_arrow_flatbuf_Message_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Message_vec_len(org_apache_arrow_flatbuf_Message_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Message_table_t org_apache_arrow_flatbuf_Message_vec_at(org_apache_arrow_flatbuf_Message_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Message_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Message)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Message, version, org_apache_arrow_flatbuf_MetadataVersion, org_apache_arrow_flatbuf_MetadataVersion_enum_t, INT16_C(0))
__flatbuffers_define_union_field(flatbuffers_, 2, org_apache_arrow_flatbuf_Message, header, org_apache_arrow_flatbuf_MessageHeader, 0)
__flatbuffers_define_scalar_field(3, org_apache_arrow_flatbuf_Message, bodyLength, flatbuffers_int64, int64_t, INT64_C(0))
__flatbuffers_define_vector_field(4, org_apache_arrow_flatbuf_Message, custom_metadata, org_apache_arrow_flatbuf_KeyValue_vec_t, 0)


#include "flatcc/flatcc_epilogue.h"
#endif /* MESSAGE_READER_H */
#ifndef MESSAGE_BUILDER_H
#define MESSAGE_BUILDER_H

/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

#ifndef MESSAGE_READER_H
#include "Message_reader.h"
#endif
#ifndef FLATBUFFERS_COMMON_BUILDER_H
#include "flatbuffers_common_builder.h"
#endif
#ifndef TENSOR_BUILDER_H
#include "Tensor_builder.h"
#endif
#ifndef SPARSETENSOR_BUILDER_H
#include "SparseTensor_builder.h"
#endif
#ifndef SCHEMA_BUILDER_H
#include "Schema_builder.h"
#endif
#include "flatcc/flatcc_prologue.h"
#ifndef flatbuffers_identifier
#define flatbuffers_identifier 0
#endif
#ifndef flatbuffers_extension
#define flatbuffers_extension "bin"
#endif

#define __org_apache_arrow_flatbuf_CompressionType_formal_args , org_apache_arrow_flatbuf_CompressionType_enum_t v0
#define __org_apache_arrow_flatbuf_CompressionType_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_CompressionType, org_apache_arrow_flatbuf_CompressionType_enum_t)
#define __org_apache_arrow_flatbuf_BodyCompressionMethod_formal_args , org_apache_arrow_flatbuf_BodyCompressionMethod_enum_t v0
#define __org_apache_arrow_flatbuf_BodyCompressionMethod_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_BodyCompressionMethod, org_apache_arrow_flatbuf_BodyCompressionMethod_enum_t)

#define __org_apache_arrow_flatbuf_FieldNode_formal_args , int64_t v0, int64_t v1
#define __org_apache_arrow_flatbuf_FieldNode_call_args , v0, v1
static inline org_apache_arrow_flatbuf_FieldNode_t *org_apache_arrow_flatbuf_FieldNode_assign(org_apache_arrow_flatbuf_FieldNode_t *p, int64_t v0, int64_t v1)
{ p->length = v0; p->null_count = v1;
  return p; }
static inline org_apache_arrow_flatbuf_FieldNode_t *org_apache_arrow_flatbuf_FieldNode_copy(org_apache_arrow_flatbuf_FieldNode_t *p, const org_apache_arrow_flatbuf_FieldNode_t *p2)
{ p->length = p2->length; p->null_count = p2->null_count;
  return p; }
static inline org_apache_arrow_flatbuf_FieldNode_t *org_apache_arrow_flatbuf_FieldNode_assign_to_pe(org_apache_arrow_flatbuf_FieldNode_t *p, int64_t v0, int64_t v1)
{ flatbuffers_int64_assign_to_pe(&p->length, v0); flatbuffers_int64_assign_to_pe(&p->null_count, v1);
  return p; }
static inline org_apache_arrow_flatbuf_FieldNode_t *org_apache_arrow_flatbuf_FieldNode_copy_to_pe(org_apache_arrow_flatbuf_FieldNode_t *p, const org_apache_arrow_flatbuf_FieldNode_t *p2)
{ flatbuffers_int64_copy_to_pe(&p->length, &p2->length); flatbuffers_int64_copy_to_pe(&p->null_count, &p2->null_count);
  return p; }
static inline org_apache_arrow_flatbuf_FieldNode_t *org_apache_arrow_flatbuf_FieldNode_assign_from_pe(org_apache_arrow_flatbuf_FieldNode_t *p, int64_t v0, int64_t v1)
{ flatbuffers_int64_assign_from_pe(&p->length, v0); flatbuffers_int64_assign_from_pe(&p->null_count, v1);
  return p; }
static inline org_apache_arrow_flatbuf_FieldNode_t *org_apache_arrow_flatbuf_FieldNode_copy_from_pe(org_apache_arrow_flatbuf_FieldNode_t *p, const org_apache_arrow_flatbuf_FieldNode_t *p2)
{ flatbuffers_int64_copy_from_pe(&p->length, &p2->length); flatbuffers_int64_copy_from_pe(&p->null_count, &p2->null_count);
  return p; }
__flatbuffers_build_struct(flatbuffers_, org_apache_arrow_flatbuf_FieldNode, 16, 8, org_apache_arrow_flatbuf_FieldNode_file_identifier, org_apache_arrow_flatbuf_FieldNode_type_identifier)
__flatbuffers_define_fixed_array_primitives(flatbuffers_, org_apache_arrow_flatbuf_FieldNode, org_apache_arrow_flatbuf_FieldNode_t)

typedef flatbuffers_union_ref_t org_apache_arrow_flatbuf_MessageHeader_union_ref_t;
typedef flatbuffers_union_vec_ref_t org_apache_arrow_flatbuf_MessageHeader_union_vec_ref_t;
static org_apache_arrow_flatbuf_MessageHeader_union_ref_t org_apache_arrow_flatbuf_MessageHeader_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_MessageHeader_union_t t);

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_BodyCompression_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_BodyCompression_ref_t;
static org_apache_arrow_flatbuf_BodyCompression_ref_t org_apache_arrow_flatbuf_BodyCompression_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_BodyCompression_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_BodyCompression, 2)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_RecordBatch_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_RecordBatch_ref_t;
static org_apache_arrow_flatbuf_RecordBatch_ref_t org_apache_arrow_flatbuf_RecordBatch_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_RecordBatch_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_RecordBatch, 4)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_DictionaryBatch_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_DictionaryBatch_ref_t;
static org_apache_arrow_flatbuf_DictionaryBatch_ref_t org_apache_arrow_flatbuf_DictionaryBatch_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_DictionaryBatch_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_DictionaryBatch, 3)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Message_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Message_ref_t;
static org_apache_arrow_flatbuf_Message_ref_t org_apache_arrow_flatbuf_Message_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Message_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Message, 5)

#define __org_apache_arrow_flatbuf_BodyCompression_formal_args , org_apache_arrow_flatbuf_CompressionType_enum_t v0, org_apache_arrow_flatbuf_BodyCompressionMethod_enum_t v1
#define __org_apache_arrow_flatbuf_BodyCompression_call_args , v0, v1
static inline org_apache_arrow_flatbuf_BodyCompression_ref_t org_apache_arrow_flatbuf_BodyCompression_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_BodyCompression_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_BodyCompression, org_apache_arrow_flatbuf_BodyCompression_file_identifier, org_apache_arrow_flatbuf_BodyCompression_type_identifier)

#define __org_apache_arrow_flatbuf_RecordBatch_formal_args , int64_t v0, org_apache_arrow_flatbuf_FieldNode_vec_ref_t v1, org_apache_arrow_flatbuf_Buffer_vec_ref_t v2, org_apache_arrow_flatbuf_BodyCompression_ref_t v3
#define __org_apache_arrow_flatbuf_RecordBatch_call_args , v0, v1, v2, v3
static inline org_apache_arrow_flatbuf_RecordBatch_ref_t org_apache_arrow_flatbuf_RecordBatch_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_RecordBatch_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_RecordBatch, org_apache_arrow_flatbuf_RecordBatch_file_identifier, org_apache_arrow_flatbuf_RecordBatch_type_identifier)

#define __org_apache_arrow_flatbuf_DictionaryBatch_formal_args , int64_t v0, org_apache_arrow_flatbuf_RecordBatch_ref_t v1, flatbuffers_bool_t v2
#define __org_apache_arrow_flatbuf_DictionaryBatch_call_args , v0, v1, v2
static inline org_apache_arrow_flatbuf_DictionaryBatch_ref_t org_apache_arrow_flatbuf_DictionaryBatch_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_DictionaryBatch_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_DictionaryBatch, org_apache_arrow_flatbuf_DictionaryBatch_file_identifier, org_apache_arrow_flatbuf_DictionaryBatch_type_identifier)

#define __org_apache_arrow_flatbuf_Message_formal_args , org_apache_arrow_flatbuf_MetadataVersion_enum_t v0, org_apache_arrow_flatbuf_MessageHeader_union_ref_t v2, int64_t v3, org_apache_arrow_flatbuf_KeyValue_vec_ref_t v4
#define __org_apache_arrow_flatbuf_Message_call_args , v0, v2, v3, v4
static inline org_apache_arrow_flatbuf_Message_ref_t org_apache_arrow_flatbuf_Message_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Message_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Message, org_apache_arrow_flatbuf_Message_file_identifier, org_apache_arrow_flatbuf_Message_type_identifier)

static inline org_apache_arrow_flatbuf_MessageHeader_union_ref_t org_apache_arrow_flatbuf_MessageHeader_as_NONE(void)
{ org_apache_arrow_flatbuf_MessageHeader_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_MessageHeader_NONE; uref.value = 0; return uref; }
static inline org_apache_arrow_flatbuf_MessageHeader_union_ref_t org_apache_arrow_flatbuf_MessageHeader_as_Schema(org_apache_arrow_flatbuf_Schema_ref_t ref)
{ org_apache_arrow_flatbuf_MessageHeader_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_MessageHeader_Schema; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_MessageHeader_union_ref_t org_apache_arrow_flatbuf_MessageHeader_as_DictionaryBatch(org_apache_arrow_flatbuf_DictionaryBatch_ref_t ref)
{ org_apache_arrow_flatbuf_MessageHeader_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_MessageHeader_DictionaryBatch; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_MessageHeader_union_ref_t org_apache_arrow_flatbuf_MessageHeader_as_RecordBatch(org_apache_arrow_flatbuf_RecordBatch_ref_t ref)
{ org_apache_arrow_flatbuf_MessageHeader_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_MessageHeader_RecordBatch; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_MessageHeader_union_ref_t org_apache_arrow_flatbuf_MessageHeader_as_Tensor(org_apache_arrow_flatbuf_Tensor_ref_t ref)
{ org_apache_arrow_flatbuf_MessageHeader_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_MessageHeader_Tensor; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_MessageHeader_union_ref_t org_apache_arrow_flatbuf_MessageHeader_as_SparseTensor(org_apache_arrow_flatbuf_SparseTensor_ref_t ref)
{ org_apache_arrow_flatbuf_MessageHeader_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_MessageHeader_SparseTensor; uref.value = ref; return uref; }
__flatbuffers_build_union_vector(flatbuffers_, org_apache_arrow_flatbuf_MessageHeader)

static org_apache_arrow_flatbuf_MessageHeader_union_ref_t org_apache_arrow_flatbuf_MessageHeader_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_MessageHeader_union_t u)
{
    switch (u.type) {
    case 1: return org_apache_arrow_flatbuf_MessageHeader_as_Schema(org_apache_arrow_flatbuf_Schema_clone(B, (org_apache_arrow_flatbuf_Schema_table_t)u.value));
    case 2: return org_apache_arrow_flatbuf_MessageHeader_as_DictionaryBatch(org_apache_arrow_flatbuf_DictionaryBatch_clone(B, (org_apache_arrow_flatbuf_DictionaryBatch_table_t)u.value));
    case 3: return org_apache_arrow_flatbuf_MessageHeader_as_RecordBatch(org_apache_arrow_flatbuf_RecordBatch_clone(B, (org_apache_arrow_flatbuf_RecordBatch_table_t)u.value));
    case 4: return org_apache_arrow_flatbuf_MessageHeader_as_Tensor(org_apache_arrow_flatbuf_Tensor_clone(B, (org_apache_arrow_flatbuf_Tensor_table_t)u.value));
    case 5: return org_apache_arrow_flatbuf_MessageHeader_as_SparseTensor(org_apache_arrow_flatbuf_SparseTensor_clone(B, (org_apache_arrow_flatbuf_SparseTensor_table_t)u.value));
    default: return org_apache_arrow_flatbuf_MessageHeader_as_NONE();
    }
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_BodyCompression_codec, org_apache_arrow_flatbuf_CompressionType, org_apache_arrow_flatbuf_CompressionType_enum_t, 1, 1, INT8_C(0), org_apache_arrow_flatbuf_BodyCompression)
__flatbuffers_build_scalar_field(1, flatbuffers_, org_apache_arrow_flatbuf_BodyCompression_method, org_apache_arrow_flatbuf_BodyCompressionMethod, org_apache_arrow_flatbuf_BodyCompressionMethod_enum_t, 1, 1, INT8_C(0), org_apache_arrow_flatbuf_BodyCompression)

static inline org_apache_arrow_flatbuf_BodyCompression_ref_t org_apache_arrow_flatbuf_BodyCompression_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_BodyCompression_formal_args)
{
    if (org_apache_arrow_flatbuf_BodyCompression_start(B)
        || org_apache_arrow_flatbuf_BodyCompression_codec_add(B, v0)
        || org_apache_arrow_flatbuf_BodyCompression_method_add(B, v1)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_BodyCompression_end(B);
}

static org_apache_arrow_flatbuf_BodyCompression_ref_t org_apache_arrow_flatbuf_BodyCompression_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_BodyCompression_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_BodyCompression_start(B)
        || org_apache_arrow_flatbuf_BodyCompression_codec_pick(B, t)
        || org_apache_arrow_flatbuf_BodyCompression_method_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_BodyCompression_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_RecordBatch_length, flatbuffers_int64, int64_t, 8, 8, INT64_C(0), org_apache_arrow_flatbuf_RecordBatch)
__flatbuffers_build_vector_field(1, flatbuffers_, org_apache_arrow_flatbuf_RecordBatch_nodes, org_apache_arrow_flatbuf_FieldNode, org_apache_arrow_flatbuf_FieldNode_t, org_apache_arrow_flatbuf_RecordBatch)
__flatbuffers_build_vector_field(2, flatbuffers_, org_apache_arrow_flatbuf_RecordBatch_buffers, org_apache_arrow_flatbuf_Buffer, org_apache_arrow_flatbuf_Buffer_t, org_apache_arrow_flatbuf_RecordBatch)
__flatbuffers_build_table_field(3, flatbuffers_, org_apache_arrow_flatbuf_RecordBatch_compression, org_apache_arrow_flatbuf_BodyCompression, org_apache_arrow_flatbuf_RecordBatch)

static inline org_apache_arrow_flatbuf_RecordBatch_ref_t org_apache_arrow_flatbuf_RecordBatch_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_RecordBatch_formal_args)
{
    if (org_apache_arrow_flatbuf_RecordBatch_start(B)
        || org_apache_arrow_flatbuf_RecordBatch_length_add(B, v0)
        || org_apache_arrow_flatbuf_RecordBatch_nodes_add(B, v1)
        || org_apache_arrow_flatbuf_RecordBatch_buffers_add(B, v2)
        || org_apache_arrow_flatbuf_RecordBatch_compression_add(B, v3)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_RecordBatch_end(B);
}

static org_apache_arrow_flatbuf_RecordBatch_ref_t org_apache_arrow_flatbuf_RecordBatch_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_RecordBatch_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_RecordBatch_start(B)
        || org_apache_arrow_flatbuf_RecordBatch_length_pick(B, t)
        || org_apache_arrow_flatbuf_RecordBatch_nodes_pick(B, t)
        || org_apache_arrow_flatbuf_RecordBatch_buffers_pick(B, t)
        || org_apache_arrow_flatbuf_RecordBatch_compression_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_RecordBatch_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_DictionaryBatch_id, flatbuffers_int64, int64_t, 8, 8, INT64_C(0), org_apache_arrow_flatbuf_DictionaryBatch)
__flatbuffers_build_table_field(1, flatbuffers_, org_apache_arrow_flatbuf_DictionaryBatch_data, org_apache_arrow_flatbuf_RecordBatch, org_apache_arrow_flatbuf_DictionaryBatch)
__flatbuffers_build_scalar_field(2, flatbuffers_, org_apache_arrow_flatbuf_DictionaryBatch_isDelta, flatbuffers_bool, flatbuffers_bool_t, 1, 1, UINT8_C(0), org_apache_arrow_flatbuf_DictionaryBatch)

static inline org_apache_arrow_flatbuf_DictionaryBatch_ref_t org_apache_arrow_flatbuf_DictionaryBatch_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_DictionaryBatch_formal_args)
{
    if (org_apache_arrow_flatbuf_DictionaryBatch_start(B)
        || org_apache_arrow_flatbuf_DictionaryBatch_id_add(B, v0)
        || org_apache_arrow_flatbuf_DictionaryBatch_data_add(B, v1)
        || org_apache_arrow_flatbuf_DictionaryBatch_isDelta_add(B, v2)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_DictionaryBatch_end(B);
}

static org_apache_arrow_flatbuf_DictionaryBatch_ref_t org_apache_arrow_flatbuf_DictionaryBatch_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_DictionaryBatch_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_DictionaryBatch_start(B)
        || org_apache_arrow_flatbuf_DictionaryBatch_id_pick(B, t)
        || org_apache_arrow_flatbuf_DictionaryBatch_data_pick(B, t)
        || org_apache_arrow_flatbuf_DictionaryBatch_isDelta_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_DictionaryBatch_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Message_version, org_apache_arrow_flatbuf_MetadataVersion, org_apache_arrow_flatbuf_MetadataVersion_enum_t, 2, 2, INT16_C(0), org_apache_arrow_flatbuf_Message)
__flatbuffers_build_union_field(2, flatbuffers_, org_apache_arrow_flatbuf_Message_header, org_apache_arrow_flatbuf_MessageHeader, org_apache_arrow_flatbuf_Message)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Message_header, org_apache_arrow_flatbuf_MessageHeader, Schema, org_apache_arrow_flatbuf_Schema)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Message_header, org_apache_arrow_flatbuf_MessageHeader, DictionaryBatch, org_apache_arrow_flatbuf_DictionaryBatch)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Message_header, org_apache_arrow_flatbuf_MessageHeader, RecordBatch, org_apache_arrow_flatbuf_RecordBatch)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Message_header, org_apache_arrow_flatbuf_MessageHeader, Tensor, org_apache_arrow_flatbuf_Tensor)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Message_header, org_apache_arrow_flatbuf_MessageHeader, SparseTensor, org_apache_arrow_flatbuf_SparseTensor)
__flatbuffers_build_scalar_field(3, flatbuffers_, org_apache_arrow_flatbuf_Message_bodyLength, flatbuffers_int64, int64_t, 8, 8, INT64_C(0), org_apache_arrow_flatbuf_Message)
__flatbuffers_build_table_vector_field(4, flatbuffers_, org_apache_arrow_flatbuf_Message_custom_metadata, org_apache_arrow_flatbuf_KeyValue, org_apache_arrow_flatbuf_Message)

static inline org_apache_arrow_flatbuf_Message_ref_t org_apache_arrow_flatbuf_Message_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Message_formal_args)
{
    if (org_apache_arrow_flatbuf_Message_start(B)
        || org_apache_arrow_flatbuf_Message_bodyLength_add(B, v3)
        || org_apache_arrow_flatbuf_Message_header_add_value(B, v2)
        || org_apache_arrow_flatbuf_Message_custom_metadata_add(B, v4)
        || org_apache_arrow_flatbuf_Message_version_add(B, v0)
        || org_apache_arrow_flatbuf_Message_header_add_type(B, v2.type)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Message_end(B);
}

static org_apache_arrow_flatbuf_Message_ref_t org_apache_arrow_flatbuf_Message_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Message_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Message_start(B)
        || org_apache_arrow_flatbuf_Message_bodyLength_pick(B, t)
        || org_apache_arrow_flatbuf_Message_header_pick(B, t)
        || org_apache_arrow_flatbuf_Message_custom_metadata_pick(B, t)
        || org_apache_arrow_flatbuf_Message_version_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Message_end(B));
}

#include "flatcc/flatcc_epilogue.h"
#endif /* MESSAGE_BUILDER_H */
#ifndef MESSAGE_VERIFIER_H
#define MESSAGE_VERIFIER_H

/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

#ifndef MESSAGE_READER_H
#include "Message_reader.h"
#endif
#include "flatcc/flatcc_verifier.h"
#ifndef TENSOR_VERIFIER_H
#include "Tensor_verifier.h"
#endif
#ifndef SPARSETENSOR_VERIFIER_H
#include "SparseTensor_verifier.h"
#endif
#ifndef SCHEMA_VERIFIER_H
#include "Schema_verifier.h"
#endif
#include "flatcc/flatcc_prologue.h"

static int org_apache_arrow_flatbuf_BodyCompression_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_RecordBatch_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_DictionaryBatch_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Message_verify_table(flatcc_table_verifier_descriptor_t *td);

static int org_apache_arrow_flatbuf_MessageHeader_union_verifier(flatcc_union_verifier_descriptor_t *ud)
{
    switch (ud->type) {
    case 1: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Schema_verify_table); /* Schema */
    case 2: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_DictionaryBatch_verify_table); /* DictionaryBatch */
    case 3: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_RecordBatch_verify_table); /* RecordBatch */
    case 4: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Tensor_verify_table); /* Tensor */
    case 5: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_SparseTensor_verify_table); /* SparseTensor */
    default: return flatcc_verify_ok;
    }
}

static inline int org_apache_arrow_flatbuf_FieldNode_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_struct_as_root(buf, bufsiz, org_apache_arrow_flatbuf_FieldNode_identifier, 16, 8);
}

static inline int org_apache_arrow_flatbuf_FieldNode_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_struct_as_typed_root(buf, bufsiz, org_apache_arrow_flatbuf_FieldNode_type_hash, 16, 8);
}

static inline int org_apache_arrow_flatbuf_FieldNode_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_struct_as_typed_root(buf, bufsiz, thash, 16, 8);
}

static inline int org_apache_arrow_flatbuf_FieldNode_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_struct_as_root(buf, bufsiz, fid, 16, 8);
}

static int org_apache_arrow_flatbuf_BodyCompression_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 1, 1) /* codec */)) return ret;
    if ((ret = flatcc_verify_field(td, 1, 1, 1) /* method */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_BodyCompression_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_BodyCompression_identifier, &org_apache_arrow_flatbuf_BodyCompression_verify_table);
}

static inline int org_apache_arrow_flatbuf_BodyCompression_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_BodyCompression_type_identifier, &org_apache_arrow_flatbuf_BodyCompression_verify_table);
}

static inline int org_apache_arrow_flatbuf_BodyCompression_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_BodyCompression_verify_table);
}

static inline int org_apache_arrow_flatbuf_BodyCompression_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_BodyCompression_verify_table);
}

static int org_apache_arrow_flatbuf_RecordBatch_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 8, 8) /* length */)) return ret;
    if ((ret = flatcc_verify_vector_field(td, 1, 0, 16, 8, INT64_C(268435455)) /* nodes */)) return ret;
    if ((ret = flatcc_verify_vector_field(td, 2, 0, 16, 8, INT64_C(268435455)) /* buffers */)) return ret;
    if ((ret = flatcc_verify_table_field(td, 3, 0, &org_apache_arrow_flatbuf_BodyCompression_verify_table) /* compression */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_RecordBatch_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_RecordBatch_identifier, &org_apache_arrow_flatbuf_RecordBatch_verify_table);
}

static inline int org_apache_arrow_flatbuf_RecordBatch_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_RecordBatch_type_identifier, &org_apache_arrow_flatbuf_RecordBatch_verify_table);
}

static inline int org_apache_arrow_flatbuf_RecordBatch_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_RecordBatch_verify_table);
}

static inline int org_apache_arrow_flatbuf_RecordBatch_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_RecordBatch_verify_table);
}

static int org_apache_arrow_flatbuf_DictionaryBatch_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 8, 8) /* id */)) return ret;
    if ((ret = flatcc_verify_table_field(td, 1, 0, &org_apache_arrow_flatbuf_RecordBatch_verify_table) /* data */)) return ret;
    if ((ret = flatcc_verify_field(td, 2, 1, 1) /* isDelta */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_DictionaryBatch_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_DictionaryBatch_identifier, &org_apache_arrow_flatbuf_DictionaryBatch_verify_table);
}

static inline int org_apache_arrow_flatbuf_DictionaryBatch_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_DictionaryBatch_type_identifier, &org_apache_arrow_flatbuf_DictionaryBatch_verify_table);
}

static inline int org_apache_arrow_flatbuf_DictionaryBatch_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_DictionaryBatch_verify_table);
}

static inline int org_apache_arrow_flatbuf_DictionaryBatch_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_DictionaryBatch_verify_table);
}

static int org_apache_arrow_flatbuf_Message_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* version */)) return ret;
    if ((ret = flatcc_verify_union_field(td, 2, 0, &org_apache_arrow_flatbuf_MessageHeader_union_verifier) /* header */)) return ret;
    if ((ret = flatcc_verify_field(td, 3, 8, 8) /* bodyLength */)) return ret;
    if ((ret = flatcc_verify_table_vector_field(td, 4, 0, &org_apache_arrow_flatbuf_KeyValue_verify_table) /* custom_metadata */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Message_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Message_identifier, &org_apache_arrow_flatbuf_Message_verify_table);
}

static inline int org_apache_arrow_flatbuf_Message_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Message_type_identifier, &org_apache_arrow_flatbuf_Message_verify_table);
}

static inline int org_apache_arrow_flatbuf_Message_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Message_verify_table);
}

static inline int org_apache_arrow_flatbuf_Message_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Message_verify_table);
}

#include "flatcc/flatcc_epilogue.h"
#endif /* MESSAGE_VERIFIER_H */
#ifndef SCHEMA_READER_H
#define SCHEMA_READER_H

/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

#ifndef FLATBUFFERS_COMMON_READER_H
#include "flatbuffers_common_reader.h"
#endif
#include "flatcc/flatcc_flatbuffers.h"
#ifndef __alignas_is_defined
#include <stdalign.h>
#endif
#include "flatcc/flatcc_prologue.h"
#ifndef flatbuffers_identifier
#define flatbuffers_identifier 0
#endif
#ifndef flatbuffers_extension
#define flatbuffers_extension "bin"
#endif

typedef struct org_apache_arrow_flatbuf_Buffer org_apache_arrow_flatbuf_Buffer_t;
typedef const org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_struct_t;
typedef org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_mutable_struct_t;
typedef const org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_vec_t;
typedef org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_mutable_vec_t;

typedef const struct org_apache_arrow_flatbuf_Null_table *org_apache_arrow_flatbuf_Null_table_t;
typedef struct org_apache_arrow_flatbuf_Null_table *org_apache_arrow_flatbuf_Null_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Null_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Null_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Struct__table *org_apache_arrow_flatbuf_Struct__table_t;
typedef struct org_apache_arrow_flatbuf_Struct__table *org_apache_arrow_flatbuf_Struct__mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Struct__vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Struct__mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_List_table *org_apache_arrow_flatbuf_List_table_t;
typedef struct org_apache_arrow_flatbuf_List_table *org_apache_arrow_flatbuf_List_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_List_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_List_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_LargeList_table *org_apache_arrow_flatbuf_LargeList_table_t;
typedef struct org_apache_arrow_flatbuf_LargeList_table *org_apache_arrow_flatbuf_LargeList_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_LargeList_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_LargeList_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_FixedSizeList_table *org_apache_arrow_flatbuf_FixedSizeList_table_t;
typedef struct org_apache_arrow_flatbuf_FixedSizeList_table *org_apache_arrow_flatbuf_FixedSizeList_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_FixedSizeList_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_FixedSizeList_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Map_table *org_apache_arrow_flatbuf_Map_table_t;
typedef struct org_apache_arrow_flatbuf_Map_table *org_apache_arrow_flatbuf_Map_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Map_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Map_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Union_table *org_apache_arrow_flatbuf_Union_table_t;
typedef struct org_apache_arrow_flatbuf_Union_table *org_apache_arrow_flatbuf_Union_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Union_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Union_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Int_table *org_apache_arrow_flatbuf_Int_table_t;
typedef struct org_apache_arrow_flatbuf_Int_table *org_apache_arrow_flatbuf_Int_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Int_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Int_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_FloatingPoint_table *org_apache_arrow_flatbuf_FloatingPoint_table_t;
typedef struct org_apache_arrow_flatbuf_FloatingPoint_table *org_apache_arrow_flatbuf_FloatingPoint_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_FloatingPoint_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_FloatingPoint_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Utf8_table *org_apache_arrow_flatbuf_Utf8_table_t;
typedef struct org_apache_arrow_flatbuf_Utf8_table *org_apache_arrow_flatbuf_Utf8_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Utf8_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Utf8_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Binary_table *org_apache_arrow_flatbuf_Binary_table_t;
typedef struct org_apache_arrow_flatbuf_Binary_table *org_apache_arrow_flatbuf_Binary_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Binary_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Binary_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_LargeUtf8_table *org_apache_arrow_flatbuf_LargeUtf8_table_t;
typedef struct org_apache_arrow_flatbuf_LargeUtf8_table *org_apache_arrow_flatbuf_LargeUtf8_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_LargeUtf8_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_LargeUtf8_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_LargeBinary_table *org_apache_arrow_flatbuf_LargeBinary_table_t;
typedef struct org_apache_arrow_flatbuf_LargeBinary_table *org_apache_arrow_flatbuf_LargeBinary_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_LargeBinary_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_LargeBinary_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_FixedSizeBinary_table *org_apache_arrow_flatbuf_FixedSizeBinary_table_t;
typedef struct org_apache_arrow_flatbuf_FixedSizeBinary_table *org_apache_arrow_flatbuf_FixedSizeBinary_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_FixedSizeBinary_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_FixedSizeBinary_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Bool_table *org_apache_arrow_flatbuf_Bool_table_t;
typedef struct org_apache_arrow_flatbuf_Bool_table *org_apache_arrow_flatbuf_Bool_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Bool_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Bool_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_RunEndEncoded_table *org_apache_arrow_flatbuf_RunEndEncoded_table_t;
typedef struct org_apache_arrow_flatbuf_RunEndEncoded_table *org_apache_arrow_flatbuf_RunEndEncoded_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_RunEndEncoded_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_RunEndEncoded_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Decimal_table *org_apache_arrow_flatbuf_Decimal_table_t;
typedef struct org_apache_arrow_flatbuf_Decimal_table *org_apache_arrow_flatbuf_Decimal_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Decimal_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Decimal_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Date_table *org_apache_arrow_flatbuf_Date_table_t;
typedef struct org_apache_arrow_flatbuf_Date_table *org_apache_arrow_flatbuf_Date_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Date_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Date_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Time_table *org_apache_arrow_flatbuf_Time_table_t;
typedef struct org_apache_arrow_flatbuf_Time_table *org_apache_arrow_flatbuf_Time_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Time_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Time_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Timestamp_table *org_apache_arrow_flatbuf_Timestamp_table_t;
typedef struct org_apache_arrow_flatbuf_Timestamp_table *org_apache_arrow_flatbuf_Timestamp_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Timestamp_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Timestamp_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Interval_table *org_apache_arrow_flatbuf_Interval_table_t;
typedef struct org_apache_arrow_flatbuf_Interval_table *org_apache_arrow_flatbuf_Interval_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Interval_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Interval_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Duration_table *org_apache_arrow_flatbuf_Duration_table_t;
typedef struct org_apache_arrow_flatbuf_Duration_table *org_apache_arrow_flatbuf_Duration_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Duration_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Duration_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_KeyValue_table *org_apache_arrow_flatbuf_KeyValue_table_t;
typedef struct org_apache_arrow_flatbuf_KeyValue_table *org_apache_arrow_flatbuf_KeyValue_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_KeyValue_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_KeyValue_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_DictionaryEncoding_table *org_apache_arrow_flatbuf_DictionaryEncoding_table_t;
typedef struct org_apache_arrow_flatbuf_DictionaryEncoding_table *org_apache_arrow_flatbuf_DictionaryEncoding_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_DictionaryEncoding_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_DictionaryEncoding_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Field_table *org_apache_arrow_flatbuf_Field_table_t;
typedef struct org_apache_arrow_flatbuf_Field_table *org_apache_arrow_flatbuf_Field_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Field_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Field_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Schema_table *org_apache_arrow_flatbuf_Schema_table_t;
typedef struct org_apache_arrow_flatbuf_Schema_table *org_apache_arrow_flatbuf_Schema_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Schema_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Schema_mutable_vec_t;
#ifndef org_apache_arrow_flatbuf_Null_file_identifier
#define org_apache_arrow_flatbuf_Null_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Null_file_identifier */
#ifndef org_apache_arrow_flatbuf_Null_identifier
#define org_apache_arrow_flatbuf_Null_identifier 0
#endif
#define org_apache_arrow_flatbuf_Null_type_hash ((flatbuffers_thash_t)0x7b36a4dd)
#define org_apache_arrow_flatbuf_Null_type_identifier "\xdd\xa4\x36\x7b"
#ifndef org_apache_arrow_flatbuf_Null_file_extension
#define org_apache_arrow_flatbuf_Null_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Struct__file_identifier
#define org_apache_arrow_flatbuf_Struct__file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Struct__file_identifier */
#ifndef org_apache_arrow_flatbuf_Struct__identifier
#define org_apache_arrow_flatbuf_Struct__identifier 0
#endif
#define org_apache_arrow_flatbuf_Struct__type_hash ((flatbuffers_thash_t)0x6310f362)
#define org_apache_arrow_flatbuf_Struct__type_identifier "\x62\xf3\x10\x63"
#ifndef org_apache_arrow_flatbuf_Struct__file_extension
#define org_apache_arrow_flatbuf_Struct__file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_List_file_identifier
#define org_apache_arrow_flatbuf_List_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_List_file_identifier */
#ifndef org_apache_arrow_flatbuf_List_identifier
#define org_apache_arrow_flatbuf_List_identifier 0
#endif
#define org_apache_arrow_flatbuf_List_type_hash ((flatbuffers_thash_t)0xd4ce5878)
#define org_apache_arrow_flatbuf_List_type_identifier "\x78\x58\xce\xd4"
#ifndef org_apache_arrow_flatbuf_List_file_extension
#define org_apache_arrow_flatbuf_List_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_LargeList_file_identifier
#define org_apache_arrow_flatbuf_LargeList_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_LargeList_file_identifier */
#ifndef org_apache_arrow_flatbuf_LargeList_identifier
#define org_apache_arrow_flatbuf_LargeList_identifier 0
#endif
#define org_apache_arrow_flatbuf_LargeList_type_hash ((flatbuffers_thash_t)0x38aa7e27)
#define org_apache_arrow_flatbuf_LargeList_type_identifier "\x27\x7e\xaa\x38"
#ifndef org_apache_arrow_flatbuf_LargeList_file_extension
#define org_apache_arrow_flatbuf_LargeList_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_FixedSizeList_file_identifier
#define org_apache_arrow_flatbuf_FixedSizeList_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_FixedSizeList_file_identifier */
#ifndef org_apache_arrow_flatbuf_FixedSizeList_identifier
#define org_apache_arrow_flatbuf_FixedSizeList_identifier 0
#endif
#define org_apache_arrow_flatbuf_FixedSizeList_type_hash ((flatbuffers_thash_t)0xcef245bb)
#define org_apache_arrow_flatbuf_FixedSizeList_type_identifier "\xbb\x45\xf2\xce"
#ifndef org_apache_arrow_flatbuf_FixedSizeList_file_extension
#define org_apache_arrow_flatbuf_FixedSizeList_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Map_file_identifier
#define org_apache_arrow_flatbuf_Map_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Map_file_identifier */
#ifndef org_apache_arrow_flatbuf_Map_identifier
#define org_apache_arrow_flatbuf_Map_identifier 0
#endif
#define org_apache_arrow_flatbuf_Map_type_hash ((flatbuffers_thash_t)0xcebef8e6)
#define org_apache_arrow_flatbuf_Map_type_identifier "\xe6\xf8\xbe\xce"
#ifndef org_apache_arrow_flatbuf_Map_file_extension
#define org_apache_arrow_flatbuf_Map_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Union_file_identifier
#define org_apache_arrow_flatbuf_Union_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Union_file_identifier */
#ifndef org_apache_arrow_flatbuf_Union_identifier
#define org_apache_arrow_flatbuf_Union_identifier 0
#endif
#define org_apache_arrow_flatbuf_Union_type_hash ((flatbuffers_thash_t)0x896bda57)
#define org_apache_arrow_flatbuf_Union_type_identifier "\x57\xda\x6b\x89"
#ifndef org_apache_arrow_flatbuf_Union_file_extension
#define org_apache_arrow_flatbuf_Union_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Int_file_identifier
#define org_apache_arrow_flatbuf_Int_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Int_file_identifier */
#ifndef org_apache_arrow_flatbuf_Int_identifier
#define org_apache_arrow_flatbuf_Int_identifier 0
#endif
#define org_apache_arrow_flatbuf_Int_type_hash ((flatbuffers_thash_t)0x30789001)
#define org_apache_arrow_flatbuf_Int_type_identifier "\x01\x90\x78\x30"
#ifndef org_apache_arrow_flatbuf_Int_file_extension
#define org_apache_arrow_flatbuf_Int_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_FloatingPoint_file_identifier
#define org_apache_arrow_flatbuf_FloatingPoint_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_FloatingPoint_file_identifier */
#ifndef org_apache_arrow_flatbuf_FloatingPoint_identifier
#define org_apache_arrow_flatbuf_FloatingPoint_identifier 0
#endif
#define org_apache_arrow_flatbuf_FloatingPoint_type_hash ((flatbuffers_thash_t)0xf7d06268)
#define org_apache_arrow_flatbuf_FloatingPoint_type_identifier "\x68\x62\xd0\xf7"
#ifndef org_apache_arrow_flatbuf_FloatingPoint_file_extension
#define org_apache_arrow_flatbuf_FloatingPoint_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Utf8_file_identifier
#define org_apache_arrow_flatbuf_Utf8_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Utf8_file_identifier */
#ifndef org_apache_arrow_flatbuf_Utf8_identifier
#define org_apache_arrow_flatbuf_Utf8_identifier 0
#endif
#define org_apache_arrow_flatbuf_Utf8_type_hash ((flatbuffers_thash_t)0x8fe60d37)
#define org_apache_arrow_flatbuf_Utf8_type_identifier "\x37\x0d\xe6\x8f"
#ifndef org_apache_arrow_flatbuf_Utf8_file_extension
#define org_apache_arrow_flatbuf_Utf8_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Binary_file_identifier
#define org_apache_arrow_flatbuf_Binary_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Binary_file_identifier */
#ifndef org_apache_arrow_flatbuf_Binary_identifier
#define org_apache_arrow_flatbuf_Binary_identifier 0
#endif
#define org_apache_arrow_flatbuf_Binary_type_hash ((flatbuffers_thash_t)0x8e21a795)
#define org_apache_arrow_flatbuf_Binary_type_identifier "\x95\xa7\x21\x8e"
#ifndef org_apache_arrow_flatbuf_Binary_file_extension
#define org_apache_arrow_flatbuf_Binary_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_LargeUtf8_file_identifier
#define org_apache_arrow_flatbuf_LargeUtf8_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_LargeUtf8_file_identifier */
#ifndef org_apache_arrow_flatbuf_LargeUtf8_identifier
#define org_apache_arrow_flatbuf_LargeUtf8_identifier 0
#endif
#define org_apache_arrow_flatbuf_LargeUtf8_type_hash ((flatbuffers_thash_t)0x24ed2fb0)
#define org_apache_arrow_flatbuf_LargeUtf8_type_identifier "\xb0\x2f\xed\x24"
#ifndef org_apache_arrow_flatbuf_LargeUtf8_file_extension
#define org_apache_arrow_flatbuf_LargeUtf8_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_LargeBinary_file_identifier
#define org_apache_arrow_flatbuf_LargeBinary_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_LargeBinary_file_identifier */
#ifndef org_apache_arrow_flatbuf_LargeBinary_identifier
#define org_apache_arrow_flatbuf_LargeBinary_identifier 0
#endif
#define org_apache_arrow_flatbuf_LargeBinary_type_hash ((flatbuffers_thash_t)0xbd437872)
#define org_apache_arrow_flatbuf_LargeBinary_type_identifier "\x72\x78\x43\xbd"
#ifndef org_apache_arrow_flatbuf_LargeBinary_file_extension
#define org_apache_arrow_flatbuf_LargeBinary_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_FixedSizeBinary_file_identifier
#define org_apache_arrow_flatbuf_FixedSizeBinary_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_FixedSizeBinary_file_identifier */
#ifndef org_apache_arrow_flatbuf_FixedSizeBinary_identifier
#define org_apache_arrow_flatbuf_FixedSizeBinary_identifier 0
#endif
#define org_apache_arrow_flatbuf_FixedSizeBinary_type_hash ((flatbuffers_thash_t)0x80d0f4ce)
#define org_apache_arrow_flatbuf_FixedSizeBinary_type_identifier "\xce\xf4\xd0\x80"
#ifndef org_apache_arrow_flatbuf_FixedSizeBinary_file_extension
#define org_apache_arrow_flatbuf_FixedSizeBinary_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Bool_file_identifier
#define org_apache_arrow_flatbuf_Bool_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Bool_file_identifier */
#ifndef org_apache_arrow_flatbuf_Bool_identifier
#define org_apache_arrow_flatbuf_Bool_identifier 0
#endif
#define org_apache_arrow_flatbuf_Bool_type_hash ((flatbuffers_thash_t)0x96bf83f0)
#define org_apache_arrow_flatbuf_Bool_type_identifier "\xf0\x83\xbf\x96"
#ifndef org_apache_arrow_flatbuf_Bool_file_extension
#define org_apache_arrow_flatbuf_Bool_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_RunEndEncoded_file_identifier
#define org_apache_arrow_flatbuf_RunEndEncoded_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_RunEndEncoded_file_identifier */
#ifndef org_apache_arrow_flatbuf_RunEndEncoded_identifier
#define org_apache_arrow_flatbuf_RunEndEncoded_identifier 0
#endif
#define org_apache_arrow_flatbuf_RunEndEncoded_type_hash ((flatbuffers_thash_t)0x5a98bcc)
#define org_apache_arrow_flatbuf_RunEndEncoded_type_identifier "\xcc\x8b\xa9\x05"
#ifndef org_apache_arrow_flatbuf_RunEndEncoded_file_extension
#define org_apache_arrow_flatbuf_RunEndEncoded_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Decimal_file_identifier
#define org_apache_arrow_flatbuf_Decimal_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Decimal_file_identifier */
#ifndef org_apache_arrow_flatbuf_Decimal_identifier
#define org_apache_arrow_flatbuf_Decimal_identifier 0
#endif
#define org_apache_arrow_flatbuf_Decimal_type_hash ((flatbuffers_thash_t)0x91d1beb7)
#define org_apache_arrow_flatbuf_Decimal_type_identifier "\xb7\xbe\xd1\x91"
#ifndef org_apache_arrow_flatbuf_Decimal_file_extension
#define org_apache_arrow_flatbuf_Decimal_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Date_file_identifier
#define org_apache_arrow_flatbuf_Date_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Date_file_identifier */
#ifndef org_apache_arrow_flatbuf_Date_identifier
#define org_apache_arrow_flatbuf_Date_identifier 0
#endif
#define org_apache_arrow_flatbuf_Date_type_hash ((flatbuffers_thash_t)0xe0ccf624)
#define org_apache_arrow_flatbuf_Date_type_identifier "\x24\xf6\xcc\xe0"
#ifndef org_apache_arrow_flatbuf_Date_file_extension
#define org_apache_arrow_flatbuf_Date_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Time_file_identifier
#define org_apache_arrow_flatbuf_Time_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Time_file_identifier */
#ifndef org_apache_arrow_flatbuf_Time_identifier
#define org_apache_arrow_flatbuf_Time_identifier 0
#endif
#define org_apache_arrow_flatbuf_Time_type_hash ((flatbuffers_thash_t)0x2442a489)
#define org_apache_arrow_flatbuf_Time_type_identifier "\x89\xa4\x42\x24"
#ifndef org_apache_arrow_flatbuf_Time_file_extension
#define org_apache_arrow_flatbuf_Time_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Timestamp_file_identifier
#define org_apache_arrow_flatbuf_Timestamp_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Timestamp_file_identifier */
#ifndef org_apache_arrow_flatbuf_Timestamp_identifier
#define org_apache_arrow_flatbuf_Timestamp_identifier 0
#endif
#define org_apache_arrow_flatbuf_Timestamp_type_hash ((flatbuffers_thash_t)0x1fddf080)
#define org_apache_arrow_flatbuf_Timestamp_type_identifier "\x80\xf0\xdd\x1f"
#ifndef org_apache_arrow_flatbuf_Timestamp_file_extension
#define org_apache_arrow_flatbuf_Timestamp_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Interval_file_identifier
#define org_apache_arrow_flatbuf_Interval_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Interval_file_identifier */
#ifndef org_apache_arrow_flatbuf_Interval_identifier
#define org_apache_arrow_flatbuf_Interval_identifier 0
#endif
#define org_apache_arrow_flatbuf_Interval_type_hash ((flatbuffers_thash_t)0x1e2d6809)
#define org_apache_arrow_flatbuf_Interval_type_identifier "\x09\x68\x2d\x1e"
#ifndef org_apache_arrow_flatbuf_Interval_file_extension
#define org_apache_arrow_flatbuf_Interval_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Duration_file_identifier
#define org_apache_arrow_flatbuf_Duration_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Duration_file_identifier */
#ifndef org_apache_arrow_flatbuf_Duration_identifier
#define org_apache_arrow_flatbuf_Duration_identifier 0
#endif
#define org_apache_arrow_flatbuf_Duration_type_hash ((flatbuffers_thash_t)0x1ecea6b0)
#define org_apache_arrow_flatbuf_Duration_type_identifier "\xb0\xa6\xce\x1e"
#ifndef org_apache_arrow_flatbuf_Duration_file_extension
#define org_apache_arrow_flatbuf_Duration_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_KeyValue_file_identifier
#define org_apache_arrow_flatbuf_KeyValue_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_KeyValue_file_identifier */
#ifndef org_apache_arrow_flatbuf_KeyValue_identifier
#define org_apache_arrow_flatbuf_KeyValue_identifier 0
#endif
#define org_apache_arrow_flatbuf_KeyValue_type_hash ((flatbuffers_thash_t)0x3b264744)
#define org_apache_arrow_flatbuf_KeyValue_type_identifier "\x44\x47\x26\x3b"
#ifndef org_apache_arrow_flatbuf_KeyValue_file_extension
#define org_apache_arrow_flatbuf_KeyValue_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_DictionaryEncoding_file_identifier
#define org_apache_arrow_flatbuf_DictionaryEncoding_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_DictionaryEncoding_file_identifier */
#ifndef org_apache_arrow_flatbuf_DictionaryEncoding_identifier
#define org_apache_arrow_flatbuf_DictionaryEncoding_identifier 0
#endif
#define org_apache_arrow_flatbuf_DictionaryEncoding_type_hash ((flatbuffers_thash_t)0x8c703261)
#define org_apache_arrow_flatbuf_DictionaryEncoding_type_identifier "\x61\x32\x70\x8c"
#ifndef org_apache_arrow_flatbuf_DictionaryEncoding_file_extension
#define org_apache_arrow_flatbuf_DictionaryEncoding_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Field_file_identifier
#define org_apache_arrow_flatbuf_Field_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Field_file_identifier */
#ifndef org_apache_arrow_flatbuf_Field_identifier
#define org_apache_arrow_flatbuf_Field_identifier 0
#endif
#define org_apache_arrow_flatbuf_Field_type_hash ((flatbuffers_thash_t)0xd981525c)
#define org_apache_arrow_flatbuf_Field_type_identifier "\x5c\x52\x81\xd9"
#ifndef org_apache_arrow_flatbuf_Field_file_extension
#define org_apache_arrow_flatbuf_Field_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Buffer_file_identifier
#define org_apache_arrow_flatbuf_Buffer_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Buffer_file_identifier */
#ifndef org_apache_arrow_flatbuf_Buffer_identifier
#define org_apache_arrow_flatbuf_Buffer_identifier 0
#endif
#define org_apache_arrow_flatbuf_Buffer_type_hash ((flatbuffers_thash_t)0x519d7fea)
#define org_apache_arrow_flatbuf_Buffer_type_identifier "\xea\x7f\x9d\x51"
#ifndef org_apache_arrow_flatbuf_Buffer_file_extension
#define org_apache_arrow_flatbuf_Buffer_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Schema_file_identifier
#define org_apache_arrow_flatbuf_Schema_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Schema_file_identifier */
#ifndef org_apache_arrow_flatbuf_Schema_identifier
#define org_apache_arrow_flatbuf_Schema_identifier 0
#endif
#define org_apache_arrow_flatbuf_Schema_type_hash ((flatbuffers_thash_t)0x406570b)
#define org_apache_arrow_flatbuf_Schema_type_identifier "\x0b\x57\x06\x04"
#ifndef org_apache_arrow_flatbuf_Schema_file_extension
#define org_apache_arrow_flatbuf_Schema_file_extension "bin"
#endif

typedef int16_t org_apache_arrow_flatbuf_MetadataVersion_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_MetadataVersion, org_apache_arrow_flatbuf_MetadataVersion_enum_t, 16)
/**  0.1.0 (October 2016). */
#define org_apache_arrow_flatbuf_MetadataVersion_V1 ((org_apache_arrow_flatbuf_MetadataVersion_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_MetadataVersion_V2 ((org_apache_arrow_flatbuf_MetadataVersion_enum_t)INT16_C(1))
#define org_apache_arrow_flatbuf_MetadataVersion_V3 ((org_apache_arrow_flatbuf_MetadataVersion_enum_t)INT16_C(2))
#define org_apache_arrow_flatbuf_MetadataVersion_V4 ((org_apache_arrow_flatbuf_MetadataVersion_enum_t)INT16_C(3))
#define org_apache_arrow_flatbuf_MetadataVersion_V5 ((org_apache_arrow_flatbuf_MetadataVersion_enum_t)INT16_C(4))

static inline const char *org_apache_arrow_flatbuf_MetadataVersion_name(org_apache_arrow_flatbuf_MetadataVersion_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_MetadataVersion_V1: return "V1";
    case org_apache_arrow_flatbuf_MetadataVersion_V2: return "V2";
    case org_apache_arrow_flatbuf_MetadataVersion_V3: return "V3";
    case org_apache_arrow_flatbuf_MetadataVersion_V4: return "V4";
    case org_apache_arrow_flatbuf_MetadataVersion_V5: return "V5";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_MetadataVersion_is_known_value(org_apache_arrow_flatbuf_MetadataVersion_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_MetadataVersion_V1: return 1;
    case org_apache_arrow_flatbuf_MetadataVersion_V2: return 1;
    case org_apache_arrow_flatbuf_MetadataVersion_V3: return 1;
    case org_apache_arrow_flatbuf_MetadataVersion_V4: return 1;
    case org_apache_arrow_flatbuf_MetadataVersion_V5: return 1;
    default: return 0;
    }
}

/**  Represents Arrow Features that might not have full support
 *  within implementations. This is intended to be used in
 *  two scenarios:
 *   1.  A mechanism for readers of Arrow Streams
 *       and files to understand that the stream or file makes
 *       use of a feature that isn't supported or unknown to
 *       the implementation (and therefore can meet the Arrow
 *       forward compatibility guarantees).
 *   2.  A means of negotiating between a client and server
 *       what features a stream is allowed to use. The enums
 *       values here are intented to represent higher level
 *       features, additional details maybe negotiated
 *       with key-value pairs specific to the protocol.
 *
 *  Enums added to this list should be assigned power-of-two values
 *  to facilitate exchanging and comparing bitmaps for supported
 *  features. */
typedef int64_t org_apache_arrow_flatbuf_Feature_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_Feature, org_apache_arrow_flatbuf_Feature_enum_t, 64)
/**  Needed to make flatbuffers happy. */
#define org_apache_arrow_flatbuf_Feature_UNUSED ((org_apache_arrow_flatbuf_Feature_enum_t)INT64_C(0))
#define org_apache_arrow_flatbuf_Feature_DICTIONARY_REPLACEMENT ((org_apache_arrow_flatbuf_Feature_enum_t)INT64_C(1))
#define org_apache_arrow_flatbuf_Feature_COMPRESSED_BODY ((org_apache_arrow_flatbuf_Feature_enum_t)INT64_C(2))

static inline const char *org_apache_arrow_flatbuf_Feature_name(org_apache_arrow_flatbuf_Feature_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_Feature_UNUSED: return "UNUSED";
    case org_apache_arrow_flatbuf_Feature_DICTIONARY_REPLACEMENT: return "DICTIONARY_REPLACEMENT";
    case org_apache_arrow_flatbuf_Feature_COMPRESSED_BODY: return "COMPRESSED_BODY";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_Feature_is_known_value(org_apache_arrow_flatbuf_Feature_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_Feature_UNUSED: return 1;
    case org_apache_arrow_flatbuf_Feature_DICTIONARY_REPLACEMENT: return 1;
    case org_apache_arrow_flatbuf_Feature_COMPRESSED_BODY: return 1;
    default: return 0;
    }
}

typedef int16_t org_apache_arrow_flatbuf_UnionMode_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_UnionMode, org_apache_arrow_flatbuf_UnionMode_enum_t, 16)
#define org_apache_arrow_flatbuf_UnionMode_Sparse ((org_apache_arrow_flatbuf_UnionMode_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_UnionMode_Dense ((org_apache_arrow_flatbuf_UnionMode_enum_t)INT16_C(1))

static inline const char *org_apache_arrow_flatbuf_UnionMode_name(org_apache_arrow_flatbuf_UnionMode_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_UnionMode_Sparse: return "Sparse";
    case org_apache_arrow_flatbuf_UnionMode_Dense: return "Dense";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_UnionMode_is_known_value(org_apache_arrow_flatbuf_UnionMode_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_UnionMode_Sparse: return 1;
    case org_apache_arrow_flatbuf_UnionMode_Dense: return 1;
    default: return 0;
    }
}

typedef int16_t org_apache_arrow_flatbuf_Precision_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_Precision, org_apache_arrow_flatbuf_Precision_enum_t, 16)
#define org_apache_arrow_flatbuf_Precision_HALF ((org_apache_arrow_flatbuf_Precision_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_Precision_SINGLE ((org_apache_arrow_flatbuf_Precision_enum_t)INT16_C(1))
#define org_apache_arrow_flatbuf_Precision_DOUBLE ((org_apache_arrow_flatbuf_Precision_enum_t)INT16_C(2))

static inline const char *org_apache_arrow_flatbuf_Precision_name(org_apache_arrow_flatbuf_Precision_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_Precision_HALF: return "HALF";
    case org_apache_arrow_flatbuf_Precision_SINGLE: return "SINGLE";
    case org_apache_arrow_flatbuf_Precision_DOUBLE: return "DOUBLE";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_Precision_is_known_value(org_apache_arrow_flatbuf_Precision_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_Precision_HALF: return 1;
    case org_apache_arrow_flatbuf_Precision_SINGLE: return 1;
    case org_apache_arrow_flatbuf_Precision_DOUBLE: return 1;
    default: return 0;
    }
}

typedef int16_t org_apache_arrow_flatbuf_DateUnit_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_DateUnit, org_apache_arrow_flatbuf_DateUnit_enum_t, 16)
#define org_apache_arrow_flatbuf_DateUnit_DAY ((org_apache_arrow_flatbuf_DateUnit_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_DateUnit_MILLISECOND ((org_apache_arrow_flatbuf_DateUnit_enum_t)INT16_C(1))

static inline const char *org_apache_arrow_flatbuf_DateUnit_name(org_apache_arrow_flatbuf_DateUnit_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_DateUnit_DAY: return "DAY";
    case org_apache_arrow_flatbuf_DateUnit_MILLISECOND: return "MILLISECOND";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_DateUnit_is_known_value(org_apache_arrow_flatbuf_DateUnit_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_DateUnit_DAY: return 1;
    case org_apache_arrow_flatbuf_DateUnit_MILLISECOND: return 1;
    default: return 0;
    }
}

typedef int16_t org_apache_arrow_flatbuf_TimeUnit_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t, 16)
#define org_apache_arrow_flatbuf_TimeUnit_SECOND ((org_apache_arrow_flatbuf_TimeUnit_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_TimeUnit_MILLISECOND ((org_apache_arrow_flatbuf_TimeUnit_enum_t)INT16_C(1))
#define org_apache_arrow_flatbuf_TimeUnit_MICROSECOND ((org_apache_arrow_flatbuf_TimeUnit_enum_t)INT16_C(2))
#define org_apache_arrow_flatbuf_TimeUnit_NANOSECOND ((org_apache_arrow_flatbuf_TimeUnit_enum_t)INT16_C(3))

static inline const char *org_apache_arrow_flatbuf_TimeUnit_name(org_apache_arrow_flatbuf_TimeUnit_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_TimeUnit_SECOND: return "SECOND";
    case org_apache_arrow_flatbuf_TimeUnit_MILLISECOND: return "MILLISECOND";
    case org_apache_arrow_flatbuf_TimeUnit_MICROSECOND: return "MICROSECOND";
    case org_apache_arrow_flatbuf_TimeUnit_NANOSECOND: return "NANOSECOND";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_TimeUnit_is_known_value(org_apache_arrow_flatbuf_TimeUnit_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_TimeUnit_SECOND: return 1;
    case org_apache_arrow_flatbuf_TimeUnit_MILLISECOND: return 1;
    case org_apache_arrow_flatbuf_TimeUnit_MICROSECOND: return 1;
    case org_apache_arrow_flatbuf_TimeUnit_NANOSECOND: return 1;
    default: return 0;
    }
}

typedef int16_t org_apache_arrow_flatbuf_IntervalUnit_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_IntervalUnit, org_apache_arrow_flatbuf_IntervalUnit_enum_t, 16)
#define org_apache_arrow_flatbuf_IntervalUnit_YEAR_MONTH ((org_apache_arrow_flatbuf_IntervalUnit_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_IntervalUnit_DAY_TIME ((org_apache_arrow_flatbuf_IntervalUnit_enum_t)INT16_C(1))
#define org_apache_arrow_flatbuf_IntervalUnit_MONTH_DAY_NANO ((org_apache_arrow_flatbuf_IntervalUnit_enum_t)INT16_C(2))

static inline const char *org_apache_arrow_flatbuf_IntervalUnit_name(org_apache_arrow_flatbuf_IntervalUnit_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_IntervalUnit_YEAR_MONTH: return "YEAR_MONTH";
    case org_apache_arrow_flatbuf_IntervalUnit_DAY_TIME: return "DAY_TIME";
    case org_apache_arrow_flatbuf_IntervalUnit_MONTH_DAY_NANO: return "MONTH_DAY_NANO";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_IntervalUnit_is_known_value(org_apache_arrow_flatbuf_IntervalUnit_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_IntervalUnit_YEAR_MONTH: return 1;
    case org_apache_arrow_flatbuf_IntervalUnit_DAY_TIME: return 1;
    case org_apache_arrow_flatbuf_IntervalUnit_MONTH_DAY_NANO: return 1;
    default: return 0;
    }
}

/**  ----------------------------------------------------------------------
 *  Dictionary encoding metadata
 *  Maintained for forwards compatibility, in the future
 *  Dictionaries might be explicit maps between integers and values
 *  allowing for non-contiguous index values */
typedef int16_t org_apache_arrow_flatbuf_DictionaryKind_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_DictionaryKind, org_apache_arrow_flatbuf_DictionaryKind_enum_t, 16)
#define org_apache_arrow_flatbuf_DictionaryKind_DenseArray ((org_apache_arrow_flatbuf_DictionaryKind_enum_t)INT16_C(0))

static inline const char *org_apache_arrow_flatbuf_DictionaryKind_name(org_apache_arrow_flatbuf_DictionaryKind_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_DictionaryKind_DenseArray: return "DenseArray";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_DictionaryKind_is_known_value(org_apache_arrow_flatbuf_DictionaryKind_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_DictionaryKind_DenseArray: return 1;
    default: return 0;
    }
}

/**  ----------------------------------------------------------------------
 *  Endianness of the platform producing the data */
typedef int16_t org_apache_arrow_flatbuf_Endianness_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_Endianness, org_apache_arrow_flatbuf_Endianness_enum_t, 16)
#define org_apache_arrow_flatbuf_Endianness_Little ((org_apache_arrow_flatbuf_Endianness_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_Endianness_Big ((org_apache_arrow_flatbuf_Endianness_enum_t)INT16_C(1))

static inline const char *org_apache_arrow_flatbuf_Endianness_name(org_apache_arrow_flatbuf_Endianness_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_Endianness_Little: return "Little";
    case org_apache_arrow_flatbuf_Endianness_Big: return "Big";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_Endianness_is_known_value(org_apache_arrow_flatbuf_Endianness_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_Endianness_Little: return 1;
    case org_apache_arrow_flatbuf_Endianness_Big: return 1;
    default: return 0;
    }
}


/**  ----------------------------------------------------------------------
 *  A Buffer represents a single contiguous memory segment */
struct org_apache_arrow_flatbuf_Buffer {
    /**  The relative offset into the shared memory page where the bytes for this
     *  buffer starts */
    alignas(8) int64_t offset;
    /**  The absolute length (in bytes) of the memory buffer. The memory is found
     *  from offset (inclusive) to offset + length (non-inclusive). When building
     *  messages using the encapsulated IPC message, padding bytes may be written
     *  after a buffer, but such padding bytes do not need to be accounted for in
     *  the size here. */
    alignas(8) int64_t length;
};
static_assert(sizeof(org_apache_arrow_flatbuf_Buffer_t) == 16, "struct size mismatch");

static inline const org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer__const_ptr_add(const org_apache_arrow_flatbuf_Buffer_t *p, size_t i) { return p + i; }
static inline org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer__ptr_add(org_apache_arrow_flatbuf_Buffer_t *p, size_t i) { return p + i; }
static inline org_apache_arrow_flatbuf_Buffer_struct_t org_apache_arrow_flatbuf_Buffer_vec_at(org_apache_arrow_flatbuf_Buffer_vec_t vec, size_t i)
__flatbuffers_struct_vec_at(vec, i)
static inline size_t org_apache_arrow_flatbuf_Buffer__size(void) { return 16; }
static inline size_t org_apache_arrow_flatbuf_Buffer_vec_len(org_apache_arrow_flatbuf_Buffer_vec_t vec)
__flatbuffers_vec_len(vec)
__flatbuffers_struct_as_root(org_apache_arrow_flatbuf_Buffer)

__flatbuffers_define_struct_scalar_field(org_apache_arrow_flatbuf_Buffer, offset, flatbuffers_int64, int64_t)
__flatbuffers_define_struct_scalar_field(org_apache_arrow_flatbuf_Buffer, length, flatbuffers_int64, int64_t)


/**  These are stored in the flatbuffer in the Type union below */
struct org_apache_arrow_flatbuf_Null_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Null_vec_len(org_apache_arrow_flatbuf_Null_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Null_table_t org_apache_arrow_flatbuf_Null_vec_at(org_apache_arrow_flatbuf_Null_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Null_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Null)


/**  A Struct_ in the flatbuffer metadata is the same as an Arrow Struct
 *  (according to the physical memory layout). We used Struct_ here as
 *  Struct is a reserved word in Flatbuffers */
struct org_apache_arrow_flatbuf_Struct__table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Struct__vec_len(org_apache_arrow_flatbuf_Struct__vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Struct__table_t org_apache_arrow_flatbuf_Struct__vec_at(org_apache_arrow_flatbuf_Struct__vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Struct__table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Struct_)


struct org_apache_arrow_flatbuf_List_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_List_vec_len(org_apache_arrow_flatbuf_List_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_List_table_t org_apache_arrow_flatbuf_List_vec_at(org_apache_arrow_flatbuf_List_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_List_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_List)


/**  Same as List, but with 64-bit offsets, allowing to represent
 *  extremely large data values. */
struct org_apache_arrow_flatbuf_LargeList_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_LargeList_vec_len(org_apache_arrow_flatbuf_LargeList_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_LargeList_table_t org_apache_arrow_flatbuf_LargeList_vec_at(org_apache_arrow_flatbuf_LargeList_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_LargeList_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_LargeList)


struct org_apache_arrow_flatbuf_FixedSizeList_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_FixedSizeList_vec_len(org_apache_arrow_flatbuf_FixedSizeList_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_FixedSizeList_table_t org_apache_arrow_flatbuf_FixedSizeList_vec_at(org_apache_arrow_flatbuf_FixedSizeList_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_FixedSizeList_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_FixedSizeList)

/**  Number of list items per value */
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_FixedSizeList, listSize, flatbuffers_int32, int32_t, INT32_C(0))

/**  A Map is a logical nested type that is represented as
 *
 *  List<entries: Struct<key: K, value: V>>
 *
 *  In this layout, the keys and values are each respectively contiguous. We do
 *  not constrain the key and value types, so the application is responsible
 *  for ensuring that the keys are hashable and unique. Whether the keys are sorted
 *  may be set in the metadata for this field.
 *
 *  In a field with Map type, the field has a child Struct field, which then
 *  has two children: key type and the second the value type. The names of the
 *  child fields may be respectively "entries", "key", and "value", but this is
 *  not enforced.
 *
 *  Map
 *  ```text
 *    - child[0] entries: Struct
 *      - child[0] key: K
 *      - child[1] value: V
 *  ```
 *  Neither the "entries" field nor the "key" field may be nullable.
 *
 *  The metadata is structured so that Arrow systems without special handling
 *  for Map can make Map an alias for List. The "layout" attribute for the Map
 *  field must have the same contents as a List. */
struct org_apache_arrow_flatbuf_Map_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Map_vec_len(org_apache_arrow_flatbuf_Map_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Map_table_t org_apache_arrow_flatbuf_Map_vec_at(org_apache_arrow_flatbuf_Map_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Map_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Map)

/**  Set to true if the keys within each value are sorted */
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Map, keysSorted, flatbuffers_bool, flatbuffers_bool_t, UINT8_C(0))

/**  A union is a complex type with children in Field
 *  By default ids in the type vector refer to the offsets in the children
 *  optionally typeIds provides an indirection between the child offset and the type id
 *  for each child `typeIds[offset]` is the id used in the type vector */
struct org_apache_arrow_flatbuf_Union_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Union_vec_len(org_apache_arrow_flatbuf_Union_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Union_table_t org_apache_arrow_flatbuf_Union_vec_at(org_apache_arrow_flatbuf_Union_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Union_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Union)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Union, mode, org_apache_arrow_flatbuf_UnionMode, org_apache_arrow_flatbuf_UnionMode_enum_t, INT16_C(0))
__flatbuffers_define_vector_field(1, org_apache_arrow_flatbuf_Union, typeIds, flatbuffers_int32_vec_t, 0)

struct org_apache_arrow_flatbuf_Int_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Int_vec_len(org_apache_arrow_flatbuf_Int_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Int_table_t org_apache_arrow_flatbuf_Int_vec_at(org_apache_arrow_flatbuf_Int_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Int_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Int)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Int, bitWidth, flatbuffers_int32, int32_t, INT32_C(0))
__flatbuffers_define_scalar_field(1, org_apache_arrow_flatbuf_Int, is_signed, flatbuffers_bool, flatbuffers_bool_t, UINT8_C(0))

struct org_apache_arrow_flatbuf_FloatingPoint_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_FloatingPoint_vec_len(org_apache_arrow_flatbuf_FloatingPoint_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_FloatingPoint_table_t org_apache_arrow_flatbuf_FloatingPoint_vec_at(org_apache_arrow_flatbuf_FloatingPoint_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_FloatingPoint_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_FloatingPoint)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_FloatingPoint, precision, org_apache_arrow_flatbuf_Precision, org_apache_arrow_flatbuf_Precision_enum_t, INT16_C(0))

/**  Unicode with UTF-8 encoding */
struct org_apache_arrow_flatbuf_Utf8_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Utf8_vec_len(org_apache_arrow_flatbuf_Utf8_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Utf8_table_t org_apache_arrow_flatbuf_Utf8_vec_at(org_apache_arrow_flatbuf_Utf8_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Utf8_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Utf8)


/**  Opaque binary data */
struct org_apache_arrow_flatbuf_Binary_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Binary_vec_len(org_apache_arrow_flatbuf_Binary_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Binary_table_t org_apache_arrow_flatbuf_Binary_vec_at(org_apache_arrow_flatbuf_Binary_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Binary_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Binary)


/**  Same as Utf8, but with 64-bit offsets, allowing to represent
 *  extremely large data values. */
struct org_apache_arrow_flatbuf_LargeUtf8_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_LargeUtf8_vec_len(org_apache_arrow_flatbuf_LargeUtf8_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_LargeUtf8_table_t org_apache_arrow_flatbuf_LargeUtf8_vec_at(org_apache_arrow_flatbuf_LargeUtf8_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_LargeUtf8_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_LargeUtf8)


/**  Same as Binary, but with 64-bit offsets, allowing to represent
 *  extremely large data values. */
struct org_apache_arrow_flatbuf_LargeBinary_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_LargeBinary_vec_len(org_apache_arrow_flatbuf_LargeBinary_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_LargeBinary_table_t org_apache_arrow_flatbuf_LargeBinary_vec_at(org_apache_arrow_flatbuf_LargeBinary_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_LargeBinary_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_LargeBinary)


struct org_apache_arrow_flatbuf_FixedSizeBinary_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_FixedSizeBinary_vec_len(org_apache_arrow_flatbuf_FixedSizeBinary_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_FixedSizeBinary_table_t org_apache_arrow_flatbuf_FixedSizeBinary_vec_at(org_apache_arrow_flatbuf_FixedSizeBinary_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_FixedSizeBinary_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_FixedSizeBinary)

/**  Number of bytes per value */
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_FixedSizeBinary, byteWidth, flatbuffers_int32, int32_t, INT32_C(0))

struct org_apache_arrow_flatbuf_Bool_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Bool_vec_len(org_apache_arrow_flatbuf_Bool_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Bool_table_t org_apache_arrow_flatbuf_Bool_vec_at(org_apache_arrow_flatbuf_Bool_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Bool_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Bool)


/**  Contains two child arrays, run_ends and values.
 *  The run_ends child array must be a 16/32/64-bit integer array
 *  which encodes the indices at which the run with the value in
 *  each corresponding index in the values child array ends.
 *  Like list/struct types, the value array can be of any type. */
struct org_apache_arrow_flatbuf_RunEndEncoded_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_RunEndEncoded_vec_len(org_apache_arrow_flatbuf_RunEndEncoded_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_RunEndEncoded_table_t org_apache_arrow_flatbuf_RunEndEncoded_vec_at(org_apache_arrow_flatbuf_RunEndEncoded_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_RunEndEncoded_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_RunEndEncoded)


/**  Exact decimal value represented as an integer value in two's
 *  complement. Currently only 128-bit (16-byte) and 256-bit (32-byte) integers
 *  are used. The representation uses the endianness indicated
 *  in the Schema. */
struct org_apache_arrow_flatbuf_Decimal_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Decimal_vec_len(org_apache_arrow_flatbuf_Decimal_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Decimal_table_t org_apache_arrow_flatbuf_Decimal_vec_at(org_apache_arrow_flatbuf_Decimal_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Decimal_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Decimal)

/**  Total number of decimal digits */
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Decimal, precision, flatbuffers_int32, int32_t, INT32_C(0))
/**  Number of digits after the decimal point "." */
__flatbuffers_define_scalar_field(1, org_apache_arrow_flatbuf_Decimal, scale, flatbuffers_int32, int32_t, INT32_C(0))
/**  Number of bits per value. The only accepted widths are 128 and 256.
 *  We use bitWidth for consistency with Int::bitWidth. */
__flatbuffers_define_scalar_field(2, org_apache_arrow_flatbuf_Decimal, bitWidth, flatbuffers_int32, int32_t, INT32_C(128))

/**  Date is either a 32-bit or 64-bit signed integer type representing an
 *  elapsed time since UNIX epoch (1970-01-01), stored in either of two units:
 *
 *  * Milliseconds (64 bits) indicating UNIX time elapsed since the epoch (no
 *    leap seconds), where the values are evenly divisible by 86400000
 *  * Days (32 bits) since the UNIX epoch */
struct org_apache_arrow_flatbuf_Date_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Date_vec_len(org_apache_arrow_flatbuf_Date_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Date_table_t org_apache_arrow_flatbuf_Date_vec_at(org_apache_arrow_flatbuf_Date_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Date_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Date)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Date, unit, org_apache_arrow_flatbuf_DateUnit, org_apache_arrow_flatbuf_DateUnit_enum_t, INT16_C(1))

/**  Time is either a 32-bit or 64-bit signed integer type representing an
 *  elapsed time since midnight, stored in either of four units: seconds,
 *  milliseconds, microseconds or nanoseconds.
 *
 *  The integer `bitWidth` depends on the `unit` and must be one of the following:
 *  * SECOND and MILLISECOND: 32 bits
 *  * MICROSECOND and NANOSECOND: 64 bits
 *
 *  The allowed values are between 0 (inclusive) and 86400 (=24*60*60) seconds
 *  (exclusive), adjusted for the time unit (for example, up to 86400000
 *  exclusive for the MILLISECOND unit).
 *  This definition doesn't allow for leap seconds. Time values from
 *  measurements with leap seconds will need to be corrected when ingesting
 *  into Arrow (for example by replacing the value 86400 with 86399). */
struct org_apache_arrow_flatbuf_Time_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Time_vec_len(org_apache_arrow_flatbuf_Time_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Time_table_t org_apache_arrow_flatbuf_Time_vec_at(org_apache_arrow_flatbuf_Time_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Time_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Time)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Time, unit, org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t, INT16_C(1))
__flatbuffers_define_scalar_field(1, org_apache_arrow_flatbuf_Time, bitWidth, flatbuffers_int32, int32_t, INT32_C(32))

/**  Timestamp is a 64-bit signed integer representing an elapsed time since a
 *  fixed epoch, stored in either of four units: seconds, milliseconds,
 *  microseconds or nanoseconds, and is optionally annotated with a timezone.
 *
 *  Timestamp values do not include any leap seconds (in other words, all
 *  days are considered 86400 seconds long).
 *
 *  Timestamps with a non-empty timezone
 *  ------------------------------------
 *
 *  If a Timestamp column has a non-empty timezone value, its epoch is
 *  1970-01-01 00:00:00 (January 1st 1970, midnight) in the *UTC* timezone
 *  (the Unix epoch), regardless of the Timestamp's own timezone.
 *
 *  Therefore, timestamp values with a non-empty timezone correspond to
 *  physical points in time together with some additional information about
 *  how the data was obtained and/or how to display it (the timezone).
 *
 *    For example, the timestamp value 0 with the timezone string "Europe/Paris"
 *    corresponds to "January 1st 1970, 00h00" in the UTC timezone, but the
 *    application may prefer to display it as "January 1st 1970, 01h00" in
 *    the Europe/Paris timezone (which is the same physical point in time).
 *
 *  One consequence is that timestamp values with a non-empty timezone
 *  can be compared and ordered directly, since they all share the same
 *  well-known point of reference (the Unix epoch).
 *
 *  Timestamps with an unset / empty timezone
 *  -----------------------------------------
 *
 *  If a Timestamp column has no timezone value, its epoch is
 *  1970-01-01 00:00:00 (January 1st 1970, midnight) in an *unknown* timezone.
 *
 *  Therefore, timestamp values without a timezone cannot be meaningfully
 *  interpreted as physical points in time, but only as calendar / clock
 *  indications ("wall clock time") in an unspecified timezone.
 *
 *    For example, the timestamp value 0 with an empty timezone string
 *    corresponds to "January 1st 1970, 00h00" in an unknown timezone: there
 *    is not enough information to interpret it as a well-defined physical
 *    point in time.
 *
 *  One consequence is that timestamp values without a timezone cannot
 *  be reliably compared or ordered, since they may have different points of
 *  reference.  In particular, it is *not* possible to interpret an unset
 *  or empty timezone as the same as "UTC".
 *
 *  Conversion between timezones
 *  ----------------------------
 *
 *  If a Timestamp column has a non-empty timezone, changing the timezone
 *  to a different non-empty value is a metadata-only operation:
 *  the timestamp values need not change as their point of reference remains
 *  the same (the Unix epoch).
 *
 *  However, if a Timestamp column has no timezone value, changing it to a
 *  non-empty value requires to think about the desired semantics.
 *  One possibility is to assume that the original timestamp values are
 *  relative to the epoch of the timezone being set; timestamp values should
 *  then adjusted to the Unix epoch (for example, changing the timezone from
 *  empty to "Europe/Paris" would require converting the timestamp values
 *  from "Europe/Paris" to "UTC", which seems counter-intuitive but is
 *  nevertheless correct).
 *
 *  Guidelines for encoding data from external libraries
 *  ----------------------------------------------------
 *
 *  Date & time libraries often have multiple different data types for temporal
 *  data. In order to ease interoperability between different implementations the
 *  Arrow project has some recommendations for encoding these types into a Timestamp
 *  column.
 *
 *  An "instant" represents a physical point in time that has no relevant timezone
 *  (for example, astronomical data). To encode an instant, use a Timestamp with
 *  the timezone string set to "UTC", and make sure the Timestamp values
 *  are relative to the UTC epoch (January 1st 1970, midnight).
 *
 *  A "zoned date-time" represents a physical point in time annotated with an
 *  informative timezone (for example, the timezone in which the data was
 *  recorded).  To encode a zoned date-time, use a Timestamp with the timezone
 *  string set to the name of the timezone, and make sure the Timestamp values
 *  are relative to the UTC epoch (January 1st 1970, midnight).
 *
 *   (There is some ambiguity between an instant and a zoned date-time with the
 *    UTC timezone.  Both of these are stored the same in Arrow.  Typically,
 *    this distinction does not matter.  If it does, then an application should
 *    use custom metadata or an extension type to distinguish between the two cases.)
 *
 *  An "offset date-time" represents a physical point in time combined with an
 *  explicit offset from UTC.  To encode an offset date-time, use a Timestamp
 *  with the timezone string set to the numeric timezone offset string
 *  (e.g. "+03:00"), and make sure the Timestamp values are relative to
 *  the UTC epoch (January 1st 1970, midnight).
 *
 *  A "naive date-time" (also called "local date-time" in some libraries)
 *  represents a wall clock time combined with a calendar date, but with
 *  no indication of how to map this information to a physical point in time.
 *  Naive date-times must be handled with care because of this missing
 *  information, and also because daylight saving time (DST) may make
 *  some values ambiguous or non-existent. A naive date-time may be
 *  stored as a struct with Date and Time fields. However, it may also be
 *  encoded into a Timestamp column with an empty timezone. The timestamp
 *  values should be computed "as if" the timezone of the date-time values
 *  was UTC; for example, the naive date-time "January 1st 1970, 00h00" would
 *  be encoded as timestamp value 0. */
struct org_apache_arrow_flatbuf_Timestamp_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Timestamp_vec_len(org_apache_arrow_flatbuf_Timestamp_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Timestamp_table_t org_apache_arrow_flatbuf_Timestamp_vec_at(org_apache_arrow_flatbuf_Timestamp_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Timestamp_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Timestamp)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Timestamp, unit, org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t, INT16_C(0))
/**  The timezone is an optional string indicating the name of a timezone,
 *  one of:
 *
 *  * As used in the Olson timezone database (the "tz database" or
 *    "tzdata"), such as "America/New_York".
 *  * An absolute timezone offset of the form "+XX:XX" or "-XX:XX",
 *    such as "+07:30".
 *
 *  Whether a timezone string is present indicates different semantics about
 *  the data (see above). */
__flatbuffers_define_string_field(1, org_apache_arrow_flatbuf_Timestamp, timezone, 0)

struct org_apache_arrow_flatbuf_Interval_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Interval_vec_len(org_apache_arrow_flatbuf_Interval_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Interval_table_t org_apache_arrow_flatbuf_Interval_vec_at(org_apache_arrow_flatbuf_Interval_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Interval_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Interval)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Interval, unit, org_apache_arrow_flatbuf_IntervalUnit, org_apache_arrow_flatbuf_IntervalUnit_enum_t, INT16_C(0))

struct org_apache_arrow_flatbuf_Duration_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Duration_vec_len(org_apache_arrow_flatbuf_Duration_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Duration_table_t org_apache_arrow_flatbuf_Duration_vec_at(org_apache_arrow_flatbuf_Duration_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Duration_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Duration)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Duration, unit, org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t, INT16_C(1))
/**  ----------------------------------------------------------------------
 *  Top-level Type value, enabling extensible type-specific metadata. We can
 *  add new logical types to Type without breaking backwards compatibility */
typedef uint8_t org_apache_arrow_flatbuf_Type_union_type_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_Type, org_apache_arrow_flatbuf_Type_union_type_t, 8)
__flatbuffers_define_union(flatbuffers_, org_apache_arrow_flatbuf_Type)
/**  ----------------------------------------------------------------------
 *  user defined key value pairs to add custom metadata to arrow
 *  key namespacing is the responsibility of the user */
#define org_apache_arrow_flatbuf_Type_NONE ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(0))
#define org_apache_arrow_flatbuf_Type_Null ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(1))
#define org_apache_arrow_flatbuf_Type_Int ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(2))
#define org_apache_arrow_flatbuf_Type_FloatingPoint ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(3))
#define org_apache_arrow_flatbuf_Type_Binary ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(4))
#define org_apache_arrow_flatbuf_Type_Utf8 ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(5))
#define org_apache_arrow_flatbuf_Type_Bool ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(6))
#define org_apache_arrow_flatbuf_Type_Decimal ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(7))
#define org_apache_arrow_flatbuf_Type_Date ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(8))
#define org_apache_arrow_flatbuf_Type_Time ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(9))
#define org_apache_arrow_flatbuf_Type_Timestamp ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(10))
#define org_apache_arrow_flatbuf_Type_Interval ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(11))
#define org_apache_arrow_flatbuf_Type_List ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(12))
#define org_apache_arrow_flatbuf_Type_Struct_ ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(13))
#define org_apache_arrow_flatbuf_Type_Union ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(14))
#define org_apache_arrow_flatbuf_Type_FixedSizeBinary ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(15))
#define org_apache_arrow_flatbuf_Type_FixedSizeList ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(16))
#define org_apache_arrow_flatbuf_Type_Map ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(17))
#define org_apache_arrow_flatbuf_Type_Duration ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(18))
#define org_apache_arrow_flatbuf_Type_LargeBinary ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(19))
#define org_apache_arrow_flatbuf_Type_LargeUtf8 ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(20))
#define org_apache_arrow_flatbuf_Type_LargeList ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(21))
#define org_apache_arrow_flatbuf_Type_RunEndEncoded ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(22))

static inline const char *org_apache_arrow_flatbuf_Type_type_name(org_apache_arrow_flatbuf_Type_union_type_t type)
{
    switch (type) {
    case org_apache_arrow_flatbuf_Type_NONE: return "NONE";
    case org_apache_arrow_flatbuf_Type_Null: return "Null";
    case org_apache_arrow_flatbuf_Type_Int: return "Int";
    case org_apache_arrow_flatbuf_Type_FloatingPoint: return "FloatingPoint";
    case org_apache_arrow_flatbuf_Type_Binary: return "Binary";
    case org_apache_arrow_flatbuf_Type_Utf8: return "Utf8";
    case org_apache_arrow_flatbuf_Type_Bool: return "Bool";
    case org_apache_arrow_flatbuf_Type_Decimal: return "Decimal";
    case org_apache_arrow_flatbuf_Type_Date: return "Date";
    case org_apache_arrow_flatbuf_Type_Time: return "Time";
    case org_apache_arrow_flatbuf_Type_Timestamp: return "Timestamp";
    case org_apache_arrow_flatbuf_Type_Interval: return "Interval";
    case org_apache_arrow_flatbuf_Type_List: return "List";
    case org_apache_arrow_flatbuf_Type_Struct_: return "Struct_";
    case org_apache_arrow_flatbuf_Type_Union: return "Union";
    case org_apache_arrow_flatbuf_Type_FixedSizeBinary: return "FixedSizeBinary";
    case org_apache_arrow_flatbuf_Type_FixedSizeList: return "FixedSizeList";
    case org_apache_arrow_flatbuf_Type_Map: return "Map";
    case org_apache_arrow_flatbuf_Type_Duration: return "Duration";
    case org_apache_arrow_flatbuf_Type_LargeBinary: return "LargeBinary";
    case org_apache_arrow_flatbuf_Type_LargeUtf8: return "LargeUtf8";
    case org_apache_arrow_flatbuf_Type_LargeList: return "LargeList";
    case org_apache_arrow_flatbuf_Type_RunEndEncoded: return "RunEndEncoded";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_Type_is_known_type(org_apache_arrow_flatbuf_Type_union_type_t type)
{
    switch (type) {
    case org_apache_arrow_flatbuf_Type_NONE: return 1;
    case org_apache_arrow_flatbuf_Type_Null: return 1;
    case org_apache_arrow_flatbuf_Type_Int: return 1;
    case org_apache_arrow_flatbuf_Type_FloatingPoint: return 1;
    case org_apache_arrow_flatbuf_Type_Binary: return 1;
    case org_apache_arrow_flatbuf_Type_Utf8: return 1;
    case org_apache_arrow_flatbuf_Type_Bool: return 1;
    case org_apache_arrow_flatbuf_Type_Decimal: return 1;
    case org_apache_arrow_flatbuf_Type_Date: return 1;
    case org_apache_arrow_flatbuf_Type_Time: return 1;
    case org_apache_arrow_flatbuf_Type_Timestamp: return 1;
    case org_apache_arrow_flatbuf_Type_Interval: return 1;
    case org_apache_arrow_flatbuf_Type_List: return 1;
    case org_apache_arrow_flatbuf_Type_Struct_: return 1;
    case org_apache_arrow_flatbuf_Type_Union: return 1;
    case org_apache_arrow_flatbuf_Type_FixedSizeBinary: return 1;
    case org_apache_arrow_flatbuf_Type_FixedSizeList: return 1;
    case org_apache_arrow_flatbuf_Type_Map: return 1;
    case org_apache_arrow_flatbuf_Type_Duration: return 1;
    case org_apache_arrow_flatbuf_Type_LargeBinary: return 1;
    case org_apache_arrow_flatbuf_Type_LargeUtf8: return 1;
    case org_apache_arrow_flatbuf_Type_LargeList: return 1;
    case org_apache_arrow_flatbuf_Type_RunEndEncoded: return 1;
    default: return 0;
    }
}


struct org_apache_arrow_flatbuf_KeyValue_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_KeyValue_vec_len(org_apache_arrow_flatbuf_KeyValue_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_KeyValue_table_t org_apache_arrow_flatbuf_KeyValue_vec_at(org_apache_arrow_flatbuf_KeyValue_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_KeyValue_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_KeyValue)

__flatbuffers_define_string_field(0, org_apache_arrow_flatbuf_KeyValue, key, 0)
__flatbuffers_define_string_field(1, org_apache_arrow_flatbuf_KeyValue, value, 0)

struct org_apache_arrow_flatbuf_DictionaryEncoding_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_DictionaryEncoding_vec_len(org_apache_arrow_flatbuf_DictionaryEncoding_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_DictionaryEncoding_table_t org_apache_arrow_flatbuf_DictionaryEncoding_vec_at(org_apache_arrow_flatbuf_DictionaryEncoding_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_DictionaryEncoding_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_DictionaryEncoding)

/**  The known dictionary id in the application where this data is used. In
 *  the file or streaming formats, the dictionary ids are found in the
 *  DictionaryBatch messages */
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_DictionaryEncoding, id, flatbuffers_int64, int64_t, INT64_C(0))
/**  The dictionary indices are constrained to be non-negative integers. If
 *  this field is null, the indices must be signed int32. To maximize
 *  cross-language compatibility and performance, implementations are
 *  recommended to prefer signed integer types over unsigned integer types
 *  and to avoid uint64 indices unless they are required by an application. */
__flatbuffers_define_table_field(1, org_apache_arrow_flatbuf_DictionaryEncoding, indexType, org_apache_arrow_flatbuf_Int_table_t, 0)
/**  By default, dictionaries are not ordered, or the order does not have
 *  semantic meaning. In some statistical, applications, dictionary-encoding
 *  is used to represent ordered categorical data, and we provide a way to
 *  preserve that metadata here */
__flatbuffers_define_scalar_field(2, org_apache_arrow_flatbuf_DictionaryEncoding, isOrdered, flatbuffers_bool, flatbuffers_bool_t, UINT8_C(0))
__flatbuffers_define_scalar_field(3, org_apache_arrow_flatbuf_DictionaryEncoding, dictionaryKind, org_apache_arrow_flatbuf_DictionaryKind, org_apache_arrow_flatbuf_DictionaryKind_enum_t, INT16_C(0))

/**  ----------------------------------------------------------------------
 *  A field represents a named column in a record / row batch or child of a
 *  nested type. */
struct org_apache_arrow_flatbuf_Field_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Field_vec_len(org_apache_arrow_flatbuf_Field_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Field_table_t org_apache_arrow_flatbuf_Field_vec_at(org_apache_arrow_flatbuf_Field_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Field_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Field)

/**  Name is not required, in i.e. a List */
__flatbuffers_define_string_field(0, org_apache_arrow_flatbuf_Field, name, 0)
/**  Whether or not this field can contain nulls. Should be true in general. */
__flatbuffers_define_scalar_field(1, org_apache_arrow_flatbuf_Field, nullable, flatbuffers_bool, flatbuffers_bool_t, UINT8_C(0))
/**  This is the type of the decoded value if the field is dictionary encoded. */
__flatbuffers_define_union_field(flatbuffers_, 3, org_apache_arrow_flatbuf_Field, type, org_apache_arrow_flatbuf_Type, 0)
/**  Present only if the field is dictionary encoded. */
__flatbuffers_define_table_field(4, org_apache_arrow_flatbuf_Field, dictionary, org_apache_arrow_flatbuf_DictionaryEncoding_table_t, 0)
/**  children apply only to nested data types like Struct, List and Union. For
 *  primitive types children will have length 0. */
__flatbuffers_define_vector_field(5, org_apache_arrow_flatbuf_Field, children, org_apache_arrow_flatbuf_Field_vec_t, 0)
/**  User-defined metadata */
__flatbuffers_define_vector_field(6, org_apache_arrow_flatbuf_Field, custom_metadata, org_apache_arrow_flatbuf_KeyValue_vec_t, 0)

/**  ----------------------------------------------------------------------
 *  A Schema describes the columns in a row batch */
struct org_apache_arrow_flatbuf_Schema_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Schema_vec_len(org_apache_arrow_flatbuf_Schema_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Schema_table_t org_apache_arrow_flatbuf_Schema_vec_at(org_apache_arrow_flatbuf_Schema_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Schema_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Schema)

/**  endianness of the buffer
 *  it is Little Endian by default
 *  if endianness doesn't match the underlying system then the vectors need to be converted */
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Schema, endianness, org_apache_arrow_flatbuf_Endianness, org_apache_arrow_flatbuf_Endianness_enum_t, INT16_C(0))
__flatbuffers_define_vector_field(1, org_apache_arrow_flatbuf_Schema, fields, org_apache_arrow_flatbuf_Field_vec_t, 0)
__flatbuffers_define_vector_field(2, org_apache_arrow_flatbuf_Schema, custom_metadata, org_apache_arrow_flatbuf_KeyValue_vec_t, 0)
/**  Features used in the stream/file. */
__flatbuffers_define_vector_field(3, org_apache_arrow_flatbuf_Schema, features, org_apache_arrow_flatbuf_Feature_vec_t, 0)


#include "flatcc/flatcc_epilogue.h"
#endif /* SCHEMA_READER_H */
#ifndef SCHEMA_BUILDER_H
#define SCHEMA_BUILDER_H

/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

#ifndef SCHEMA_READER_H
#include "Schema_reader.h"
#endif
#ifndef FLATBUFFERS_COMMON_BUILDER_H
#include "flatbuffers_common_builder.h"
#endif
#include "flatcc/flatcc_prologue.h"
#ifndef flatbuffers_identifier
#define flatbuffers_identifier 0
#endif
#ifndef flatbuffers_extension
#define flatbuffers_extension "bin"
#endif

#define __org_apache_arrow_flatbuf_MetadataVersion_formal_args , org_apache_arrow_flatbuf_MetadataVersion_enum_t v0
#define __org_apache_arrow_flatbuf_MetadataVersion_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_MetadataVersion, org_apache_arrow_flatbuf_MetadataVersion_enum_t)
#define __org_apache_arrow_flatbuf_Feature_formal_args , org_apache_arrow_flatbuf_Feature_enum_t v0
#define __org_apache_arrow_flatbuf_Feature_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_Feature, org_apache_arrow_flatbuf_Feature_enum_t)
#define __org_apache_arrow_flatbuf_UnionMode_formal_args , org_apache_arrow_flatbuf_UnionMode_enum_t v0
#define __org_apache_arrow_flatbuf_UnionMode_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_UnionMode, org_apache_arrow_flatbuf_UnionMode_enum_t)
#define __org_apache_arrow_flatbuf_Precision_formal_args , org_apache_arrow_flatbuf_Precision_enum_t v0
#define __org_apache_arrow_flatbuf_Precision_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_Precision, org_apache_arrow_flatbuf_Precision_enum_t)
#define __org_apache_arrow_flatbuf_DateUnit_formal_args , org_apache_arrow_flatbuf_DateUnit_enum_t v0
#define __org_apache_arrow_flatbuf_DateUnit_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_DateUnit, org_apache_arrow_flatbuf_DateUnit_enum_t)
#define __org_apache_arrow_flatbuf_TimeUnit_formal_args , org_apache_arrow_flatbuf_TimeUnit_enum_t v0
#define __org_apache_arrow_flatbuf_TimeUnit_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t)
#define __org_apache_arrow_flatbuf_IntervalUnit_formal_args , org_apache_arrow_flatbuf_IntervalUnit_enum_t v0
#define __org_apache_arrow_flatbuf_IntervalUnit_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_IntervalUnit, org_apache_arrow_flatbuf_IntervalUnit_enum_t)
#define __org_apache_arrow_flatbuf_DictionaryKind_formal_args , org_apache_arrow_flatbuf_DictionaryKind_enum_t v0
#define __org_apache_arrow_flatbuf_DictionaryKind_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_DictionaryKind, org_apache_arrow_flatbuf_DictionaryKind_enum_t)
#define __org_apache_arrow_flatbuf_Endianness_formal_args , org_apache_arrow_flatbuf_Endianness_enum_t v0
#define __org_apache_arrow_flatbuf_Endianness_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_Endianness, org_apache_arrow_flatbuf_Endianness_enum_t)

#define __org_apache_arrow_flatbuf_Buffer_formal_args , int64_t v0, int64_t v1
#define __org_apache_arrow_flatbuf_Buffer_call_args , v0, v1
static inline org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_assign(org_apache_arrow_flatbuf_Buffer_t *p, int64_t v0, int64_t v1)
{ p->offset = v0; p->length = v1;
  return p; }
static inline org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_copy(org_apache_arrow_flatbuf_Buffer_t *p, const org_apache_arrow_flatbuf_Buffer_t *p2)
{ p->offset = p2->offset; p->length = p2->length;
  return p; }
static inline org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_assign_to_pe(org_apache_arrow_flatbuf_Buffer_t *p, int64_t v0, int64_t v1)
{ flatbuffers_int64_assign_to_pe(&p->offset, v0); flatbuffers_int64_assign_to_pe(&p->length, v1);
  return p; }
static inline org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_copy_to_pe(org_apache_arrow_flatbuf_Buffer_t *p, const org_apache_arrow_flatbuf_Buffer_t *p2)
{ flatbuffers_int64_copy_to_pe(&p->offset, &p2->offset); flatbuffers_int64_copy_to_pe(&p->length, &p2->length);
  return p; }
static inline org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_assign_from_pe(org_apache_arrow_flatbuf_Buffer_t *p, int64_t v0, int64_t v1)
{ flatbuffers_int64_assign_from_pe(&p->offset, v0); flatbuffers_int64_assign_from_pe(&p->length, v1);
  return p; }
static inline org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_copy_from_pe(org_apache_arrow_flatbuf_Buffer_t *p, const org_apache_arrow_flatbuf_Buffer_t *p2)
{ flatbuffers_int64_copy_from_pe(&p->offset, &p2->offset); flatbuffers_int64_copy_from_pe(&p->length, &p2->length);
  return p; }
__flatbuffers_build_struct(flatbuffers_, org_apache_arrow_flatbuf_Buffer, 16, 8, org_apache_arrow_flatbuf_Buffer_file_identifier, org_apache_arrow_flatbuf_Buffer_type_identifier)
__flatbuffers_define_fixed_array_primitives(flatbuffers_, org_apache_arrow_flatbuf_Buffer, org_apache_arrow_flatbuf_Buffer_t)

typedef flatbuffers_union_ref_t org_apache_arrow_flatbuf_Type_union_ref_t;
typedef flatbuffers_union_vec_ref_t org_apache_arrow_flatbuf_Type_union_vec_ref_t;
static org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Type_union_t t);

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Null_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Null_ref_t;
static org_apache_arrow_flatbuf_Null_ref_t org_apache_arrow_flatbuf_Null_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Null_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Null, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Struct__required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Struct__ref_t;
static org_apache_arrow_flatbuf_Struct__ref_t org_apache_arrow_flatbuf_Struct__clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Struct__table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Struct_, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_List_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_List_ref_t;
static org_apache_arrow_flatbuf_List_ref_t org_apache_arrow_flatbuf_List_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_List_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_List, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_LargeList_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_LargeList_ref_t;
static org_apache_arrow_flatbuf_LargeList_ref_t org_apache_arrow_flatbuf_LargeList_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_LargeList_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_LargeList, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_FixedSizeList_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_FixedSizeList_ref_t;
static org_apache_arrow_flatbuf_FixedSizeList_ref_t org_apache_arrow_flatbuf_FixedSizeList_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_FixedSizeList_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_FixedSizeList, 1)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Map_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Map_ref_t;
static org_apache_arrow_flatbuf_Map_ref_t org_apache_arrow_flatbuf_Map_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Map_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Map, 1)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Union_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Union_ref_t;
static org_apache_arrow_flatbuf_Union_ref_t org_apache_arrow_flatbuf_Union_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Union_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Union, 2)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Int_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Int_ref_t;
static org_apache_arrow_flatbuf_Int_ref_t org_apache_arrow_flatbuf_Int_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Int_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Int, 2)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_FloatingPoint_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_FloatingPoint_ref_t;
static org_apache_arrow_flatbuf_FloatingPoint_ref_t org_apache_arrow_flatbuf_FloatingPoint_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_FloatingPoint_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_FloatingPoint, 1)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Utf8_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Utf8_ref_t;
static org_apache_arrow_flatbuf_Utf8_ref_t org_apache_arrow_flatbuf_Utf8_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Utf8_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Utf8, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Binary_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Binary_ref_t;
static org_apache_arrow_flatbuf_Binary_ref_t org_apache_arrow_flatbuf_Binary_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Binary_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Binary, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_LargeUtf8_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_LargeUtf8_ref_t;
static org_apache_arrow_flatbuf_LargeUtf8_ref_t org_apache_arrow_flatbuf_LargeUtf8_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_LargeUtf8_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_LargeUtf8, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_LargeBinary_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_LargeBinary_ref_t;
static org_apache_arrow_flatbuf_LargeBinary_ref_t org_apache_arrow_flatbuf_LargeBinary_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_LargeBinary_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_LargeBinary, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_FixedSizeBinary_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_FixedSizeBinary_ref_t;
static org_apache_arrow_flatbuf_FixedSizeBinary_ref_t org_apache_arrow_flatbuf_FixedSizeBinary_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_FixedSizeBinary_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_FixedSizeBinary, 1)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Bool_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Bool_ref_t;
static org_apache_arrow_flatbuf_Bool_ref_t org_apache_arrow_flatbuf_Bool_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Bool_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Bool, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_RunEndEncoded_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_RunEndEncoded_ref_t;
static org_apache_arrow_flatbuf_RunEndEncoded_ref_t org_apache_arrow_flatbuf_RunEndEncoded_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_RunEndEncoded_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_RunEndEncoded, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Decimal_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Decimal_ref_t;
static org_apache_arrow_flatbuf_Decimal_ref_t org_apache_arrow_flatbuf_Decimal_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Decimal_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Decimal, 3)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Date_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Date_ref_t;
static org_apache_arrow_flatbuf_Date_ref_t org_apache_arrow_flatbuf_Date_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Date_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Date, 1)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Time_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Time_ref_t;
static org_apache_arrow_flatbuf_Time_ref_t org_apache_arrow_flatbuf_Time_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Time_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Time, 2)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Timestamp_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Timestamp_ref_t;
static org_apache_arrow_flatbuf_Timestamp_ref_t org_apache_arrow_flatbuf_Timestamp_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Timestamp_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Timestamp, 2)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Interval_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Interval_ref_t;
static org_apache_arrow_flatbuf_Interval_ref_t org_apache_arrow_flatbuf_Interval_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Interval_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Interval, 1)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Duration_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Duration_ref_t;
static org_apache_arrow_flatbuf_Duration_ref_t org_apache_arrow_flatbuf_Duration_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Duration_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Duration, 1)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_KeyValue_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_KeyValue_ref_t;
static org_apache_arrow_flatbuf_KeyValue_ref_t org_apache_arrow_flatbuf_KeyValue_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_KeyValue_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_KeyValue, 2)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_DictionaryEncoding_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_DictionaryEncoding_ref_t;
static org_apache_arrow_flatbuf_DictionaryEncoding_ref_t org_apache_arrow_flatbuf_DictionaryEncoding_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_DictionaryEncoding_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_DictionaryEncoding, 4)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Field_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Field_ref_t;
static org_apache_arrow_flatbuf_Field_ref_t org_apache_arrow_flatbuf_Field_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Field_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Field, 7)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Schema_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Schema_ref_t;
static org_apache_arrow_flatbuf_Schema_ref_t org_apache_arrow_flatbuf_Schema_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Schema_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Schema, 4)

#define __org_apache_arrow_flatbuf_Null_formal_args
#define __org_apache_arrow_flatbuf_Null_call_args
static inline org_apache_arrow_flatbuf_Null_ref_t org_apache_arrow_flatbuf_Null_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Null_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Null, org_apache_arrow_flatbuf_Null_file_identifier, org_apache_arrow_flatbuf_Null_type_identifier)

#define __org_apache_arrow_flatbuf_Struct__formal_args
#define __org_apache_arrow_flatbuf_Struct__call_args
static inline org_apache_arrow_flatbuf_Struct__ref_t org_apache_arrow_flatbuf_Struct__create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Struct__formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Struct_, org_apache_arrow_flatbuf_Struct__file_identifier, org_apache_arrow_flatbuf_Struct__type_identifier)

#define __org_apache_arrow_flatbuf_List_formal_args
#define __org_apache_arrow_flatbuf_List_call_args
static inline org_apache_arrow_flatbuf_List_ref_t org_apache_arrow_flatbuf_List_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_List_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_List, org_apache_arrow_flatbuf_List_file_identifier, org_apache_arrow_flatbuf_List_type_identifier)

#define __org_apache_arrow_flatbuf_LargeList_formal_args
#define __org_apache_arrow_flatbuf_LargeList_call_args
static inline org_apache_arrow_flatbuf_LargeList_ref_t org_apache_arrow_flatbuf_LargeList_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_LargeList_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_LargeList, org_apache_arrow_flatbuf_LargeList_file_identifier, org_apache_arrow_flatbuf_LargeList_type_identifier)

#define __org_apache_arrow_flatbuf_FixedSizeList_formal_args , int32_t v0
#define __org_apache_arrow_flatbuf_FixedSizeList_call_args , v0
static inline org_apache_arrow_flatbuf_FixedSizeList_ref_t org_apache_arrow_flatbuf_FixedSizeList_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_FixedSizeList_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_FixedSizeList, org_apache_arrow_flatbuf_FixedSizeList_file_identifier, org_apache_arrow_flatbuf_FixedSizeList_type_identifier)

#define __org_apache_arrow_flatbuf_Map_formal_args , flatbuffers_bool_t v0
#define __org_apache_arrow_flatbuf_Map_call_args , v0
static inline org_apache_arrow_flatbuf_Map_ref_t org_apache_arrow_flatbuf_Map_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Map_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Map, org_apache_arrow_flatbuf_Map_file_identifier, org_apache_arrow_flatbuf_Map_type_identifier)

#define __org_apache_arrow_flatbuf_Union_formal_args , org_apache_arrow_flatbuf_UnionMode_enum_t v0, flatbuffers_int32_vec_ref_t v1
#define __org_apache_arrow_flatbuf_Union_call_args , v0, v1
static inline org_apache_arrow_flatbuf_Union_ref_t org_apache_arrow_flatbuf_Union_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Union_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Union, org_apache_arrow_flatbuf_Union_file_identifier, org_apache_arrow_flatbuf_Union_type_identifier)

#define __org_apache_arrow_flatbuf_Int_formal_args , int32_t v0, flatbuffers_bool_t v1
#define __org_apache_arrow_flatbuf_Int_call_args , v0, v1
static inline org_apache_arrow_flatbuf_Int_ref_t org_apache_arrow_flatbuf_Int_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Int_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Int, org_apache_arrow_flatbuf_Int_file_identifier, org_apache_arrow_flatbuf_Int_type_identifier)

#define __org_apache_arrow_flatbuf_FloatingPoint_formal_args , org_apache_arrow_flatbuf_Precision_enum_t v0
#define __org_apache_arrow_flatbuf_FloatingPoint_call_args , v0
static inline org_apache_arrow_flatbuf_FloatingPoint_ref_t org_apache_arrow_flatbuf_FloatingPoint_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_FloatingPoint_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_FloatingPoint, org_apache_arrow_flatbuf_FloatingPoint_file_identifier, org_apache_arrow_flatbuf_FloatingPoint_type_identifier)

#define __org_apache_arrow_flatbuf_Utf8_formal_args
#define __org_apache_arrow_flatbuf_Utf8_call_args
static inline org_apache_arrow_flatbuf_Utf8_ref_t org_apache_arrow_flatbuf_Utf8_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Utf8_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Utf8, org_apache_arrow_flatbuf_Utf8_file_identifier, org_apache_arrow_flatbuf_Utf8_type_identifier)

#define __org_apache_arrow_flatbuf_Binary_formal_args
#define __org_apache_arrow_flatbuf_Binary_call_args
static inline org_apache_arrow_flatbuf_Binary_ref_t org_apache_arrow_flatbuf_Binary_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Binary_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Binary, org_apache_arrow_flatbuf_Binary_file_identifier, org_apache_arrow_flatbuf_Binary_type_identifier)

#define __org_apache_arrow_flatbuf_LargeUtf8_formal_args
#define __org_apache_arrow_flatbuf_LargeUtf8_call_args
static inline org_apache_arrow_flatbuf_LargeUtf8_ref_t org_apache_arrow_flatbuf_LargeUtf8_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_LargeUtf8_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_LargeUtf8, org_apache_arrow_flatbuf_LargeUtf8_file_identifier, org_apache_arrow_flatbuf_LargeUtf8_type_identifier)

#define __org_apache_arrow_flatbuf_LargeBinary_formal_args
#define __org_apache_arrow_flatbuf_LargeBinary_call_args
static inline org_apache_arrow_flatbuf_LargeBinary_ref_t org_apache_arrow_flatbuf_LargeBinary_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_LargeBinary_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_LargeBinary, org_apache_arrow_flatbuf_LargeBinary_file_identifier, org_apache_arrow_flatbuf_LargeBinary_type_identifier)

#define __org_apache_arrow_flatbuf_FixedSizeBinary_formal_args , int32_t v0
#define __org_apache_arrow_flatbuf_FixedSizeBinary_call_args , v0
static inline org_apache_arrow_flatbuf_FixedSizeBinary_ref_t org_apache_arrow_flatbuf_FixedSizeBinary_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_FixedSizeBinary_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_FixedSizeBinary, org_apache_arrow_flatbuf_FixedSizeBinary_file_identifier, org_apache_arrow_flatbuf_FixedSizeBinary_type_identifier)

#define __org_apache_arrow_flatbuf_Bool_formal_args
#define __org_apache_arrow_flatbuf_Bool_call_args
static inline org_apache_arrow_flatbuf_Bool_ref_t org_apache_arrow_flatbuf_Bool_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Bool_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Bool, org_apache_arrow_flatbuf_Bool_file_identifier, org_apache_arrow_flatbuf_Bool_type_identifier)

#define __org_apache_arrow_flatbuf_RunEndEncoded_formal_args
#define __org_apache_arrow_flatbuf_RunEndEncoded_call_args
static inline org_apache_arrow_flatbuf_RunEndEncoded_ref_t org_apache_arrow_flatbuf_RunEndEncoded_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_RunEndEncoded_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_RunEndEncoded, org_apache_arrow_flatbuf_RunEndEncoded_file_identifier, org_apache_arrow_flatbuf_RunEndEncoded_type_identifier)

#define __org_apache_arrow_flatbuf_Decimal_formal_args , int32_t v0, int32_t v1, int32_t v2
#define __org_apache_arrow_flatbuf_Decimal_call_args , v0, v1, v2
static inline org_apache_arrow_flatbuf_Decimal_ref_t org_apache_arrow_flatbuf_Decimal_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Decimal_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Decimal, org_apache_arrow_flatbuf_Decimal_file_identifier, org_apache_arrow_flatbuf_Decimal_type_identifier)

#define __org_apache_arrow_flatbuf_Date_formal_args , org_apache_arrow_flatbuf_DateUnit_enum_t v0
#define __org_apache_arrow_flatbuf_Date_call_args , v0
static inline org_apache_arrow_flatbuf_Date_ref_t org_apache_arrow_flatbuf_Date_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Date_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Date, org_apache_arrow_flatbuf_Date_file_identifier, org_apache_arrow_flatbuf_Date_type_identifier)

#define __org_apache_arrow_flatbuf_Time_formal_args , org_apache_arrow_flatbuf_TimeUnit_enum_t v0, int32_t v1
#define __org_apache_arrow_flatbuf_Time_call_args , v0, v1
static inline org_apache_arrow_flatbuf_Time_ref_t org_apache_arrow_flatbuf_Time_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Time_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Time, org_apache_arrow_flatbuf_Time_file_identifier, org_apache_arrow_flatbuf_Time_type_identifier)

#define __org_apache_arrow_flatbuf_Timestamp_formal_args , org_apache_arrow_flatbuf_TimeUnit_enum_t v0, flatbuffers_string_ref_t v1
#define __org_apache_arrow_flatbuf_Timestamp_call_args , v0, v1
static inline org_apache_arrow_flatbuf_Timestamp_ref_t org_apache_arrow_flatbuf_Timestamp_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Timestamp_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Timestamp, org_apache_arrow_flatbuf_Timestamp_file_identifier, org_apache_arrow_flatbuf_Timestamp_type_identifier)

#define __org_apache_arrow_flatbuf_Interval_formal_args , org_apache_arrow_flatbuf_IntervalUnit_enum_t v0
#define __org_apache_arrow_flatbuf_Interval_call_args , v0
static inline org_apache_arrow_flatbuf_Interval_ref_t org_apache_arrow_flatbuf_Interval_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Interval_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Interval, org_apache_arrow_flatbuf_Interval_file_identifier, org_apache_arrow_flatbuf_Interval_type_identifier)

#define __org_apache_arrow_flatbuf_Duration_formal_args , org_apache_arrow_flatbuf_TimeUnit_enum_t v0
#define __org_apache_arrow_flatbuf_Duration_call_args , v0
static inline org_apache_arrow_flatbuf_Duration_ref_t org_apache_arrow_flatbuf_Duration_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Duration_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Duration, org_apache_arrow_flatbuf_Duration_file_identifier, org_apache_arrow_flatbuf_Duration_type_identifier)

#define __org_apache_arrow_flatbuf_KeyValue_formal_args , flatbuffers_string_ref_t v0, flatbuffers_string_ref_t v1
#define __org_apache_arrow_flatbuf_KeyValue_call_args , v0, v1
static inline org_apache_arrow_flatbuf_KeyValue_ref_t org_apache_arrow_flatbuf_KeyValue_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_KeyValue_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_KeyValue, org_apache_arrow_flatbuf_KeyValue_file_identifier, org_apache_arrow_flatbuf_KeyValue_type_identifier)

#define __org_apache_arrow_flatbuf_DictionaryEncoding_formal_args , int64_t v0, org_apache_arrow_flatbuf_Int_ref_t v1, flatbuffers_bool_t v2, org_apache_arrow_flatbuf_DictionaryKind_enum_t v3
#define __org_apache_arrow_flatbuf_DictionaryEncoding_call_args , v0, v1, v2, v3
static inline org_apache_arrow_flatbuf_DictionaryEncoding_ref_t org_apache_arrow_flatbuf_DictionaryEncoding_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_DictionaryEncoding_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_DictionaryEncoding, org_apache_arrow_flatbuf_DictionaryEncoding_file_identifier, org_apache_arrow_flatbuf_DictionaryEncoding_type_identifier)

#define __org_apache_arrow_flatbuf_Field_formal_args ,\
  flatbuffers_string_ref_t v0, flatbuffers_bool_t v1, org_apache_arrow_flatbuf_Type_union_ref_t v3, org_apache_arrow_flatbuf_DictionaryEncoding_ref_t v4, org_apache_arrow_flatbuf_Field_vec_ref_t v5, org_apache_arrow_flatbuf_KeyValue_vec_ref_t v6
#define __org_apache_arrow_flatbuf_Field_call_args ,\
  v0, v1, v3, v4, v5, v6
static inline org_apache_arrow_flatbuf_Field_ref_t org_apache_arrow_flatbuf_Field_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Field_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Field, org_apache_arrow_flatbuf_Field_file_identifier, org_apache_arrow_flatbuf_Field_type_identifier)

#define __org_apache_arrow_flatbuf_Schema_formal_args , org_apache_arrow_flatbuf_Endianness_enum_t v0, org_apache_arrow_flatbuf_Field_vec_ref_t v1, org_apache_arrow_flatbuf_KeyValue_vec_ref_t v2, org_apache_arrow_flatbuf_Feature_vec_ref_t v3
#define __org_apache_arrow_flatbuf_Schema_call_args , v0, v1, v2, v3
static inline org_apache_arrow_flatbuf_Schema_ref_t org_apache_arrow_flatbuf_Schema_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Schema_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Schema, org_apache_arrow_flatbuf_Schema_file_identifier, org_apache_arrow_flatbuf_Schema_type_identifier)

static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_NONE(void)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_NONE; uref.value = 0; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Null(org_apache_arrow_flatbuf_Null_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Null; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Int(org_apache_arrow_flatbuf_Int_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Int; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_FloatingPoint(org_apache_arrow_flatbuf_FloatingPoint_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_FloatingPoint; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Binary(org_apache_arrow_flatbuf_Binary_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Binary; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Utf8(org_apache_arrow_flatbuf_Utf8_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Utf8; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Bool(org_apache_arrow_flatbuf_Bool_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Bool; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Decimal(org_apache_arrow_flatbuf_Decimal_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Decimal; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Date(org_apache_arrow_flatbuf_Date_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Date; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Time(org_apache_arrow_flatbuf_Time_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Time; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Timestamp(org_apache_arrow_flatbuf_Timestamp_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Timestamp; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Interval(org_apache_arrow_flatbuf_Interval_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Interval; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_List(org_apache_arrow_flatbuf_List_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_List; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Struct_(org_apache_arrow_flatbuf_Struct__ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Struct_; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Union(org_apache_arrow_flatbuf_Union_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Union; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_FixedSizeBinary(org_apache_arrow_flatbuf_FixedSizeBinary_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_FixedSizeBinary; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_FixedSizeList(org_apache_arrow_flatbuf_FixedSizeList_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_FixedSizeList; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Map(org_apache_arrow_flatbuf_Map_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Map; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Duration(org_apache_arrow_flatbuf_Duration_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Duration; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_LargeBinary(org_apache_arrow_flatbuf_LargeBinary_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_LargeBinary; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_LargeUtf8(org_apache_arrow_flatbuf_LargeUtf8_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_LargeUtf8; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_LargeList(org_apache_arrow_flatbuf_LargeList_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_LargeList; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_RunEndEncoded(org_apache_arrow_flatbuf_RunEndEncoded_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_RunEndEncoded; uref.value = ref; return uref; }
__flatbuffers_build_union_vector(flatbuffers_, org_apache_arrow_flatbuf_Type)

static org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Type_union_t u)
{
    switch (u.type) {
    case 1: return org_apache_arrow_flatbuf_Type_as_Null(org_apache_arrow_flatbuf_Null_clone(B, (org_apache_arrow_flatbuf_Null_table_t)u.value));
    case 2: return org_apache_arrow_flatbuf_Type_as_Int(org_apache_arrow_flatbuf_Int_clone(B, (org_apache_arrow_flatbuf_Int_table_t)u.value));
    case 3: return org_apache_arrow_flatbuf_Type_as_FloatingPoint(org_apache_arrow_flatbuf_FloatingPoint_clone(B, (org_apache_arrow_flatbuf_FloatingPoint_table_t)u.value));
    case 4: return org_apache_arrow_flatbuf_Type_as_Binary(org_apache_arrow_flatbuf_Binary_clone(B, (org_apache_arrow_flatbuf_Binary_table_t)u.value));
    case 5: return org_apache_arrow_flatbuf_Type_as_Utf8(org_apache_arrow_flatbuf_Utf8_clone(B, (org_apache_arrow_flatbuf_Utf8_table_t)u.value));
    case 6: return org_apache_arrow_flatbuf_Type_as_Bool(org_apache_arrow_flatbuf_Bool_clone(B, (org_apache_arrow_flatbuf_Bool_table_t)u.value));
    case 7: return org_apache_arrow_flatbuf_Type_as_Decimal(org_apache_arrow_flatbuf_Decimal_clone(B, (org_apache_arrow_flatbuf_Decimal_table_t)u.value));
    case 8: return org_apache_arrow_flatbuf_Type_as_Date(org_apache_arrow_flatbuf_Date_clone(B, (org_apache_arrow_flatbuf_Date_table_t)u.value));
    case 9: return org_apache_arrow_flatbuf_Type_as_Time(org_apache_arrow_flatbuf_Time_clone(B, (org_apache_arrow_flatbuf_Time_table_t)u.value));
    case 10: return org_apache_arrow_flatbuf_Type_as_Timestamp(org_apache_arrow_flatbuf_Timestamp_clone(B, (org_apache_arrow_flatbuf_Timestamp_table_t)u.value));
    case 11: return org_apache_arrow_flatbuf_Type_as_Interval(org_apache_arrow_flatbuf_Interval_clone(B, (org_apache_arrow_flatbuf_Interval_table_t)u.value));
    case 12: return org_apache_arrow_flatbuf_Type_as_List(org_apache_arrow_flatbuf_List_clone(B, (org_apache_arrow_flatbuf_List_table_t)u.value));
    case 13: return org_apache_arrow_flatbuf_Type_as_Struct_(org_apache_arrow_flatbuf_Struct__clone(B, (org_apache_arrow_flatbuf_Struct__table_t)u.value));
    case 14: return org_apache_arrow_flatbuf_Type_as_Union(org_apache_arrow_flatbuf_Union_clone(B, (org_apache_arrow_flatbuf_Union_table_t)u.value));
    case 15: return org_apache_arrow_flatbuf_Type_as_FixedSizeBinary(org_apache_arrow_flatbuf_FixedSizeBinary_clone(B, (org_apache_arrow_flatbuf_FixedSizeBinary_table_t)u.value));
    case 16: return org_apache_arrow_flatbuf_Type_as_FixedSizeList(org_apache_arrow_flatbuf_FixedSizeList_clone(B, (org_apache_arrow_flatbuf_FixedSizeList_table_t)u.value));
    case 17: return org_apache_arrow_flatbuf_Type_as_Map(org_apache_arrow_flatbuf_Map_clone(B, (org_apache_arrow_flatbuf_Map_table_t)u.value));
    case 18: return org_apache_arrow_flatbuf_Type_as_Duration(org_apache_arrow_flatbuf_Duration_clone(B, (org_apache_arrow_flatbuf_Duration_table_t)u.value));
    case 19: return org_apache_arrow_flatbuf_Type_as_LargeBinary(org_apache_arrow_flatbuf_LargeBinary_clone(B, (org_apache_arrow_flatbuf_LargeBinary_table_t)u.value));
    case 20: return org_apache_arrow_flatbuf_Type_as_LargeUtf8(org_apache_arrow_flatbuf_LargeUtf8_clone(B, (org_apache_arrow_flatbuf_LargeUtf8_table_t)u.value));
    case 21: return org_apache_arrow_flatbuf_Type_as_LargeList(org_apache_arrow_flatbuf_LargeList_clone(B, (org_apache_arrow_flatbuf_LargeList_table_t)u.value));
    case 22: return org_apache_arrow_flatbuf_Type_as_RunEndEncoded(org_apache_arrow_flatbuf_RunEndEncoded_clone(B, (org_apache_arrow_flatbuf_RunEndEncoded_table_t)u.value));
    default: return org_apache_arrow_flatbuf_Type_as_NONE();
    }
}


static inline org_apache_arrow_flatbuf_Null_ref_t org_apache_arrow_flatbuf_Null_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Null_formal_args)
{
    if (org_apache_arrow_flatbuf_Null_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Null_end(B);
}

static org_apache_arrow_flatbuf_Null_ref_t org_apache_arrow_flatbuf_Null_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Null_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Null_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Null_end(B));
}


static inline org_apache_arrow_flatbuf_Struct__ref_t org_apache_arrow_flatbuf_Struct__create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Struct__formal_args)
{
    if (org_apache_arrow_flatbuf_Struct__start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Struct__end(B);
}

static org_apache_arrow_flatbuf_Struct__ref_t org_apache_arrow_flatbuf_Struct__clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Struct__table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Struct__start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Struct__end(B));
}


static inline org_apache_arrow_flatbuf_List_ref_t org_apache_arrow_flatbuf_List_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_List_formal_args)
{
    if (org_apache_arrow_flatbuf_List_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_List_end(B);
}

static org_apache_arrow_flatbuf_List_ref_t org_apache_arrow_flatbuf_List_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_List_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_List_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_List_end(B));
}


static inline org_apache_arrow_flatbuf_LargeList_ref_t org_apache_arrow_flatbuf_LargeList_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_LargeList_formal_args)
{
    if (org_apache_arrow_flatbuf_LargeList_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_LargeList_end(B);
}

static org_apache_arrow_flatbuf_LargeList_ref_t org_apache_arrow_flatbuf_LargeList_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_LargeList_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_LargeList_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_LargeList_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_FixedSizeList_listSize, flatbuffers_int32, int32_t, 4, 4, INT32_C(0), org_apache_arrow_flatbuf_FixedSizeList)

static inline org_apache_arrow_flatbuf_FixedSizeList_ref_t org_apache_arrow_flatbuf_FixedSizeList_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_FixedSizeList_formal_args)
{
    if (org_apache_arrow_flatbuf_FixedSizeList_start(B)
        || org_apache_arrow_flatbuf_FixedSizeList_listSize_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_FixedSizeList_end(B);
}

static org_apache_arrow_flatbuf_FixedSizeList_ref_t org_apache_arrow_flatbuf_FixedSizeList_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_FixedSizeList_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_FixedSizeList_start(B)
        || org_apache_arrow_flatbuf_FixedSizeList_listSize_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_FixedSizeList_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Map_keysSorted, flatbuffers_bool, flatbuffers_bool_t, 1, 1, UINT8_C(0), org_apache_arrow_flatbuf_Map)

static inline org_apache_arrow_flatbuf_Map_ref_t org_apache_arrow_flatbuf_Map_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Map_formal_args)
{
    if (org_apache_arrow_flatbuf_Map_start(B)
        || org_apache_arrow_flatbuf_Map_keysSorted_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Map_end(B);
}

static org_apache_arrow_flatbuf_Map_ref_t org_apache_arrow_flatbuf_Map_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Map_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Map_start(B)
        || org_apache_arrow_flatbuf_Map_keysSorted_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Map_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Union_mode, org_apache_arrow_flatbuf_UnionMode, org_apache_arrow_flatbuf_UnionMode_enum_t, 2, 2, INT16_C(0), org_apache_arrow_flatbuf_Union)
__flatbuffers_build_vector_field(1, flatbuffers_, org_apache_arrow_flatbuf_Union_typeIds, flatbuffers_int32, int32_t, org_apache_arrow_flatbuf_Union)

static inline org_apache_arrow_flatbuf_Union_ref_t org_apache_arrow_flatbuf_Union_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Union_formal_args)
{
    if (org_apache_arrow_flatbuf_Union_start(B)
        || org_apache_arrow_flatbuf_Union_typeIds_add(B, v1)
        || org_apache_arrow_flatbuf_Union_mode_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Union_end(B);
}

static org_apache_arrow_flatbuf_Union_ref_t org_apache_arrow_flatbuf_Union_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Union_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Union_start(B)
        || org_apache_arrow_flatbuf_Union_typeIds_pick(B, t)
        || org_apache_arrow_flatbuf_Union_mode_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Union_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Int_bitWidth, flatbuffers_int32, int32_t, 4, 4, INT32_C(0), org_apache_arrow_flatbuf_Int)
__flatbuffers_build_scalar_field(1, flatbuffers_, org_apache_arrow_flatbuf_Int_is_signed, flatbuffers_bool, flatbuffers_bool_t, 1, 1, UINT8_C(0), org_apache_arrow_flatbuf_Int)

static inline org_apache_arrow_flatbuf_Int_ref_t org_apache_arrow_flatbuf_Int_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Int_formal_args)
{
    if (org_apache_arrow_flatbuf_Int_start(B)
        || org_apache_arrow_flatbuf_Int_bitWidth_add(B, v0)
        || org_apache_arrow_flatbuf_Int_is_signed_add(B, v1)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Int_end(B);
}

static org_apache_arrow_flatbuf_Int_ref_t org_apache_arrow_flatbuf_Int_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Int_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Int_start(B)
        || org_apache_arrow_flatbuf_Int_bitWidth_pick(B, t)
        || org_apache_arrow_flatbuf_Int_is_signed_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Int_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_FloatingPoint_precision, org_apache_arrow_flatbuf_Precision, org_apache_arrow_flatbuf_Precision_enum_t, 2, 2, INT16_C(0), org_apache_arrow_flatbuf_FloatingPoint)

static inline org_apache_arrow_flatbuf_FloatingPoint_ref_t org_apache_arrow_flatbuf_FloatingPoint_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_FloatingPoint_formal_args)
{
    if (org_apache_arrow_flatbuf_FloatingPoint_start(B)
        || org_apache_arrow_flatbuf_FloatingPoint_precision_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_FloatingPoint_end(B);
}

static org_apache_arrow_flatbuf_FloatingPoint_ref_t org_apache_arrow_flatbuf_FloatingPoint_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_FloatingPoint_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_FloatingPoint_start(B)
        || org_apache_arrow_flatbuf_FloatingPoint_precision_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_FloatingPoint_end(B));
}


static inline org_apache_arrow_flatbuf_Utf8_ref_t org_apache_arrow_flatbuf_Utf8_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Utf8_formal_args)
{
    if (org_apache_arrow_flatbuf_Utf8_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Utf8_end(B);
}

static org_apache_arrow_flatbuf_Utf8_ref_t org_apache_arrow_flatbuf_Utf8_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Utf8_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Utf8_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Utf8_end(B));
}


static inline org_apache_arrow_flatbuf_Binary_ref_t org_apache_arrow_flatbuf_Binary_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Binary_formal_args)
{
    if (org_apache_arrow_flatbuf_Binary_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Binary_end(B);
}

static org_apache_arrow_flatbuf_Binary_ref_t org_apache_arrow_flatbuf_Binary_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Binary_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Binary_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Binary_end(B));
}


static inline org_apache_arrow_flatbuf_LargeUtf8_ref_t org_apache_arrow_flatbuf_LargeUtf8_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_LargeUtf8_formal_args)
{
    if (org_apache_arrow_flatbuf_LargeUtf8_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_LargeUtf8_end(B);
}

static org_apache_arrow_flatbuf_LargeUtf8_ref_t org_apache_arrow_flatbuf_LargeUtf8_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_LargeUtf8_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_LargeUtf8_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_LargeUtf8_end(B));
}


static inline org_apache_arrow_flatbuf_LargeBinary_ref_t org_apache_arrow_flatbuf_LargeBinary_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_LargeBinary_formal_args)
{
    if (org_apache_arrow_flatbuf_LargeBinary_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_LargeBinary_end(B);
}

static org_apache_arrow_flatbuf_LargeBinary_ref_t org_apache_arrow_flatbuf_LargeBinary_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_LargeBinary_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_LargeBinary_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_LargeBinary_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_FixedSizeBinary_byteWidth, flatbuffers_int32, int32_t, 4, 4, INT32_C(0), org_apache_arrow_flatbuf_FixedSizeBinary)

static inline org_apache_arrow_flatbuf_FixedSizeBinary_ref_t org_apache_arrow_flatbuf_FixedSizeBinary_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_FixedSizeBinary_formal_args)
{
    if (org_apache_arrow_flatbuf_FixedSizeBinary_start(B)
        || org_apache_arrow_flatbuf_FixedSizeBinary_byteWidth_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_FixedSizeBinary_end(B);
}

static org_apache_arrow_flatbuf_FixedSizeBinary_ref_t org_apache_arrow_flatbuf_FixedSizeBinary_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_FixedSizeBinary_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_FixedSizeBinary_start(B)
        || org_apache_arrow_flatbuf_FixedSizeBinary_byteWidth_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_FixedSizeBinary_end(B));
}


static inline org_apache_arrow_flatbuf_Bool_ref_t org_apache_arrow_flatbuf_Bool_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Bool_formal_args)
{
    if (org_apache_arrow_flatbuf_Bool_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Bool_end(B);
}

static org_apache_arrow_flatbuf_Bool_ref_t org_apache_arrow_flatbuf_Bool_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Bool_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Bool_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Bool_end(B));
}


static inline org_apache_arrow_flatbuf_RunEndEncoded_ref_t org_apache_arrow_flatbuf_RunEndEncoded_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_RunEndEncoded_formal_args)
{
    if (org_apache_arrow_flatbuf_RunEndEncoded_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_RunEndEncoded_end(B);
}

static org_apache_arrow_flatbuf_RunEndEncoded_ref_t org_apache_arrow_flatbuf_RunEndEncoded_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_RunEndEncoded_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_RunEndEncoded_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_RunEndEncoded_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Decimal_precision, flatbuffers_int32, int32_t, 4, 4, INT32_C(0), org_apache_arrow_flatbuf_Decimal)
__flatbuffers_build_scalar_field(1, flatbuffers_, org_apache_arrow_flatbuf_Decimal_scale, flatbuffers_int32, int32_t, 4, 4, INT32_C(0), org_apache_arrow_flatbuf_Decimal)
__flatbuffers_build_scalar_field(2, flatbuffers_, org_apache_arrow_flatbuf_Decimal_bitWidth, flatbuffers_int32, int32_t, 4, 4, INT32_C(128), org_apache_arrow_flatbuf_Decimal)

static inline org_apache_arrow_flatbuf_Decimal_ref_t org_apache_arrow_flatbuf_Decimal_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Decimal_formal_args)
{
    if (org_apache_arrow_flatbuf_Decimal_start(B)
        || org_apache_arrow_flatbuf_Decimal_precision_add(B, v0)
        || org_apache_arrow_flatbuf_Decimal_scale_add(B, v1)
        || org_apache_arrow_flatbuf_Decimal_bitWidth_add(B, v2)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Decimal_end(B);
}

static org_apache_arrow_flatbuf_Decimal_ref_t org_apache_arrow_flatbuf_Decimal_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Decimal_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Decimal_start(B)
        || org_apache_arrow_flatbuf_Decimal_precision_pick(B, t)
        || org_apache_arrow_flatbuf_Decimal_scale_pick(B, t)
        || org_apache_arrow_flatbuf_Decimal_bitWidth_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Decimal_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Date_unit, org_apache_arrow_flatbuf_DateUnit, org_apache_arrow_flatbuf_DateUnit_enum_t, 2, 2, INT16_C(1), org_apache_arrow_flatbuf_Date)

static inline org_apache_arrow_flatbuf_Date_ref_t org_apache_arrow_flatbuf_Date_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Date_formal_args)
{
    if (org_apache_arrow_flatbuf_Date_start(B)
        || org_apache_arrow_flatbuf_Date_unit_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Date_end(B);
}

static org_apache_arrow_flatbuf_Date_ref_t org_apache_arrow_flatbuf_Date_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Date_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Date_start(B)
        || org_apache_arrow_flatbuf_Date_unit_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Date_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Time_unit, org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t, 2, 2, INT16_C(1), org_apache_arrow_flatbuf_Time)
__flatbuffers_build_scalar_field(1, flatbuffers_, org_apache_arrow_flatbuf_Time_bitWidth, flatbuffers_int32, int32_t, 4, 4, INT32_C(32), org_apache_arrow_flatbuf_Time)

static inline org_apache_arrow_flatbuf_Time_ref_t org_apache_arrow_flatbuf_Time_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Time_formal_args)
{
    if (org_apache_arrow_flatbuf_Time_start(B)
        || org_apache_arrow_flatbuf_Time_bitWidth_add(B, v1)
        || org_apache_arrow_flatbuf_Time_unit_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Time_end(B);
}

static org_apache_arrow_flatbuf_Time_ref_t org_apache_arrow_flatbuf_Time_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Time_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Time_start(B)
        || org_apache_arrow_flatbuf_Time_bitWidth_pick(B, t)
        || org_apache_arrow_flatbuf_Time_unit_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Time_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Timestamp_unit, org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t, 2, 2, INT16_C(0), org_apache_arrow_flatbuf_Timestamp)
__flatbuffers_build_string_field(1, flatbuffers_, org_apache_arrow_flatbuf_Timestamp_timezone, org_apache_arrow_flatbuf_Timestamp)

static inline org_apache_arrow_flatbuf_Timestamp_ref_t org_apache_arrow_flatbuf_Timestamp_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Timestamp_formal_args)
{
    if (org_apache_arrow_flatbuf_Timestamp_start(B)
        || org_apache_arrow_flatbuf_Timestamp_timezone_add(B, v1)
        || org_apache_arrow_flatbuf_Timestamp_unit_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Timestamp_end(B);
}

static org_apache_arrow_flatbuf_Timestamp_ref_t org_apache_arrow_flatbuf_Timestamp_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Timestamp_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Timestamp_start(B)
        || org_apache_arrow_flatbuf_Timestamp_timezone_pick(B, t)
        || org_apache_arrow_flatbuf_Timestamp_unit_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Timestamp_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Interval_unit, org_apache_arrow_flatbuf_IntervalUnit, org_apache_arrow_flatbuf_IntervalUnit_enum_t, 2, 2, INT16_C(0), org_apache_arrow_flatbuf_Interval)

static inline org_apache_arrow_flatbuf_Interval_ref_t org_apache_arrow_flatbuf_Interval_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Interval_formal_args)
{
    if (org_apache_arrow_flatbuf_Interval_start(B)
        || org_apache_arrow_flatbuf_Interval_unit_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Interval_end(B);
}

static org_apache_arrow_flatbuf_Interval_ref_t org_apache_arrow_flatbuf_Interval_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Interval_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Interval_start(B)
        || org_apache_arrow_flatbuf_Interval_unit_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Interval_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Duration_unit, org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t, 2, 2, INT16_C(1), org_apache_arrow_flatbuf_Duration)

static inline org_apache_arrow_flatbuf_Duration_ref_t org_apache_arrow_flatbuf_Duration_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Duration_formal_args)
{
    if (org_apache_arrow_flatbuf_Duration_start(B)
        || org_apache_arrow_flatbuf_Duration_unit_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Duration_end(B);
}

static org_apache_arrow_flatbuf_Duration_ref_t org_apache_arrow_flatbuf_Duration_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Duration_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Duration_start(B)
        || org_apache_arrow_flatbuf_Duration_unit_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Duration_end(B));
}

__flatbuffers_build_string_field(0, flatbuffers_, org_apache_arrow_flatbuf_KeyValue_key, org_apache_arrow_flatbuf_KeyValue)
__flatbuffers_build_string_field(1, flatbuffers_, org_apache_arrow_flatbuf_KeyValue_value, org_apache_arrow_flatbuf_KeyValue)

static inline org_apache_arrow_flatbuf_KeyValue_ref_t org_apache_arrow_flatbuf_KeyValue_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_KeyValue_formal_args)
{
    if (org_apache_arrow_flatbuf_KeyValue_start(B)
        || org_apache_arrow_flatbuf_KeyValue_key_add(B, v0)
        || org_apache_arrow_flatbuf_KeyValue_value_add(B, v1)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_KeyValue_end(B);
}

static org_apache_arrow_flatbuf_KeyValue_ref_t org_apache_arrow_flatbuf_KeyValue_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_KeyValue_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_KeyValue_start(B)
        || org_apache_arrow_flatbuf_KeyValue_key_pick(B, t)
        || org_apache_arrow_flatbuf_KeyValue_value_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_KeyValue_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_DictionaryEncoding_id, flatbuffers_int64, int64_t, 8, 8, INT64_C(0), org_apache_arrow_flatbuf_DictionaryEncoding)
__flatbuffers_build_table_field(1, flatbuffers_, org_apache_arrow_flatbuf_DictionaryEncoding_indexType, org_apache_arrow_flatbuf_Int, org_apache_arrow_flatbuf_DictionaryEncoding)
__flatbuffers_build_scalar_field(2, flatbuffers_, org_apache_arrow_flatbuf_DictionaryEncoding_isOrdered, flatbuffers_bool, flatbuffers_bool_t, 1, 1, UINT8_C(0), org_apache_arrow_flatbuf_DictionaryEncoding)
__flatbuffers_build_scalar_field(3, flatbuffers_, org_apache_arrow_flatbuf_DictionaryEncoding_dictionaryKind, org_apache_arrow_flatbuf_DictionaryKind, org_apache_arrow_flatbuf_DictionaryKind_enum_t, 2, 2, INT16_C(0), org_apache_arrow_flatbuf_DictionaryEncoding)

static inline org_apache_arrow_flatbuf_DictionaryEncoding_ref_t org_apache_arrow_flatbuf_DictionaryEncoding_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_DictionaryEncoding_formal_args)
{
    if (org_apache_arrow_flatbuf_DictionaryEncoding_start(B)
        || org_apache_arrow_flatbuf_DictionaryEncoding_id_add(B, v0)
        || org_apache_arrow_flatbuf_DictionaryEncoding_indexType_add(B, v1)
        || org_apache_arrow_flatbuf_DictionaryEncoding_dictionaryKind_add(B, v3)
        || org_apache_arrow_flatbuf_DictionaryEncoding_isOrdered_add(B, v2)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_DictionaryEncoding_end(B);
}

static org_apache_arrow_flatbuf_DictionaryEncoding_ref_t org_apache_arrow_flatbuf_DictionaryEncoding_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_DictionaryEncoding_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_DictionaryEncoding_start(B)
        || org_apache_arrow_flatbuf_DictionaryEncoding_id_pick(B, t)
        || org_apache_arrow_flatbuf_DictionaryEncoding_indexType_pick(B, t)
        || org_apache_arrow_flatbuf_DictionaryEncoding_dictionaryKind_pick(B, t)
        || org_apache_arrow_flatbuf_DictionaryEncoding_isOrdered_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_DictionaryEncoding_end(B));
}

__flatbuffers_build_string_field(0, flatbuffers_, org_apache_arrow_flatbuf_Field_name, org_apache_arrow_flatbuf_Field)
__flatbuffers_build_scalar_field(1, flatbuffers_, org_apache_arrow_flatbuf_Field_nullable, flatbuffers_bool, flatbuffers_bool_t, 1, 1, UINT8_C(0), org_apache_arrow_flatbuf_Field)
__flatbuffers_build_union_field(3, flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, org_apache_arrow_flatbuf_Field)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Null, org_apache_arrow_flatbuf_Null)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Int, org_apache_arrow_flatbuf_Int)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, FloatingPoint, org_apache_arrow_flatbuf_FloatingPoint)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Binary, org_apache_arrow_flatbuf_Binary)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Utf8, org_apache_arrow_flatbuf_Utf8)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Bool, org_apache_arrow_flatbuf_Bool)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Decimal, org_apache_arrow_flatbuf_Decimal)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Date, org_apache_arrow_flatbuf_Date)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Time, org_apache_arrow_flatbuf_Time)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Timestamp, org_apache_arrow_flatbuf_Timestamp)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Interval, org_apache_arrow_flatbuf_Interval)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, List, org_apache_arrow_flatbuf_List)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Struct_, org_apache_arrow_flatbuf_Struct_)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Union, org_apache_arrow_flatbuf_Union)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, FixedSizeBinary, org_apache_arrow_flatbuf_FixedSizeBinary)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, FixedSizeList, org_apache_arrow_flatbuf_FixedSizeList)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Map, org_apache_arrow_flatbuf_Map)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Duration, org_apache_arrow_flatbuf_Duration)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, LargeBinary, org_apache_arrow_flatbuf_LargeBinary)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, LargeUtf8, org_apache_arrow_flatbuf_LargeUtf8)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, LargeList, org_apache_arrow_flatbuf_LargeList)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, RunEndEncoded, org_apache_arrow_flatbuf_RunEndEncoded)
__flatbuffers_build_table_field(4, flatbuffers_, org_apache_arrow_flatbuf_Field_dictionary, org_apache_arrow_flatbuf_DictionaryEncoding, org_apache_arrow_flatbuf_Field)
__flatbuffers_build_table_vector_field(5, flatbuffers_, org_apache_arrow_flatbuf_Field_children, org_apache_arrow_flatbuf_Field, org_apache_arrow_flatbuf_Field)
__flatbuffers_build_table_vector_field(6, flatbuffers_, org_apache_arrow_flatbuf_Field_custom_metadata, org_apache_arrow_flatbuf_KeyValue, org_apache_arrow_flatbuf_Field)

static inline org_apache_arrow_flatbuf_Field_ref_t org_apache_arrow_flatbuf_Field_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Field_formal_args)
{
    if (org_apache_arrow_flatbuf_Field_start(B)
        || org_apache_arrow_flatbuf_Field_name_add(B, v0)
        || org_apache_arrow_flatbuf_Field_type_add_value(B, v3)
        || org_apache_arrow_flatbuf_Field_dictionary_add(B, v4)
        || org_apache_arrow_flatbuf_Field_children_add(B, v5)
        || org_apache_arrow_flatbuf_Field_custom_metadata_add(B, v6)
        || org_apache_arrow_flatbuf_Field_nullable_add(B, v1)
        || org_apache_arrow_flatbuf_Field_type_add_type(B, v3.type)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Field_end(B);
}

static org_apache_arrow_flatbuf_Field_ref_t org_apache_arrow_flatbuf_Field_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Field_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Field_start(B)
        || org_apache_arrow_flatbuf_Field_name_pick(B, t)
        || org_apache_arrow_flatbuf_Field_type_pick(B, t)
        || org_apache_arrow_flatbuf_Field_dictionary_pick(B, t)
        || org_apache_arrow_flatbuf_Field_children_pick(B, t)
        || org_apache_arrow_flatbuf_Field_custom_metadata_pick(B, t)
        || org_apache_arrow_flatbuf_Field_nullable_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Field_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Schema_endianness, org_apache_arrow_flatbuf_Endianness, org_apache_arrow_flatbuf_Endianness_enum_t, 2, 2, INT16_C(0), org_apache_arrow_flatbuf_Schema)
__flatbuffers_build_table_vector_field(1, flatbuffers_, org_apache_arrow_flatbuf_Schema_fields, org_apache_arrow_flatbuf_Field, org_apache_arrow_flatbuf_Schema)
__flatbuffers_build_table_vector_field(2, flatbuffers_, org_apache_arrow_flatbuf_Schema_custom_metadata, org_apache_arrow_flatbuf_KeyValue, org_apache_arrow_flatbuf_Schema)
__flatbuffers_build_vector_field(3, flatbuffers_, org_apache_arrow_flatbuf_Schema_features, org_apache_arrow_flatbuf_Feature, org_apache_arrow_flatbuf_Feature_enum_t, org_apache_arrow_flatbuf_Schema)

static inline org_apache_arrow_flatbuf_Schema_ref_t org_apache_arrow_flatbuf_Schema_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Schema_formal_args)
{
    if (org_apache_arrow_flatbuf_Schema_start(B)
        || org_apache_arrow_flatbuf_Schema_fields_add(B, v1)
        || org_apache_arrow_flatbuf_Schema_custom_metadata_add(B, v2)
        || org_apache_arrow_flatbuf_Schema_features_add(B, v3)
        || org_apache_arrow_flatbuf_Schema_endianness_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Schema_end(B);
}

static org_apache_arrow_flatbuf_Schema_ref_t org_apache_arrow_flatbuf_Schema_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Schema_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Schema_start(B)
        || org_apache_arrow_flatbuf_Schema_fields_pick(B, t)
        || org_apache_arrow_flatbuf_Schema_custom_metadata_pick(B, t)
        || org_apache_arrow_flatbuf_Schema_features_pick(B, t)
        || org_apache_arrow_flatbuf_Schema_endianness_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Schema_end(B));
}

#include "flatcc/flatcc_epilogue.h"
#endif /* SCHEMA_BUILDER_H */
#ifndef SCHEMA_VERIFIER_H
#define SCHEMA_VERIFIER_H

/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

#ifndef SCHEMA_READER_H
#include "Schema_reader.h"
#endif
#include "flatcc/flatcc_verifier.h"
#include "flatcc/flatcc_prologue.h"

static int org_apache_arrow_flatbuf_Null_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Struct__verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_List_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_LargeList_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_FixedSizeList_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Map_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Union_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Int_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_FloatingPoint_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Utf8_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Binary_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_LargeUtf8_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_LargeBinary_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_FixedSizeBinary_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Bool_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_RunEndEncoded_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Decimal_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Date_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Time_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Timestamp_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Interval_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Duration_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_KeyValue_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_DictionaryEncoding_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Field_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Schema_verify_table(flatcc_table_verifier_descriptor_t *td);

static int org_apache_arrow_flatbuf_Type_union_verifier(flatcc_union_verifier_descriptor_t *ud)
{
    switch (ud->type) {
    case 1: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Null_verify_table); /* Null */
    case 2: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Int_verify_table); /* Int */
    case 3: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_FloatingPoint_verify_table); /* FloatingPoint */
    case 4: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Binary_verify_table); /* Binary */
    case 5: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Utf8_verify_table); /* Utf8 */
    case 6: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Bool_verify_table); /* Bool */
    case 7: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Decimal_verify_table); /* Decimal */
    case 8: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Date_verify_table); /* Date */
    case 9: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Time_verify_table); /* Time */
    case 10: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Timestamp_verify_table); /* Timestamp */
    case 11: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Interval_verify_table); /* Interval */
    case 12: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_List_verify_table); /* List */
    case 13: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Struct__verify_table); /* Struct_ */
    case 14: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Union_verify_table); /* Union */
    case 15: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_FixedSizeBinary_verify_table); /* FixedSizeBinary */
    case 16: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_FixedSizeList_verify_table); /* FixedSizeList */
    case 17: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Map_verify_table); /* Map */
    case 18: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Duration_verify_table); /* Duration */
    case 19: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_LargeBinary_verify_table); /* LargeBinary */
    case 20: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_LargeUtf8_verify_table); /* LargeUtf8 */
    case 21: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_LargeList_verify_table); /* LargeList */
    case 22: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_RunEndEncoded_verify_table); /* RunEndEncoded */
    default: return flatcc_verify_ok;
    }
}

static inline int org_apache_arrow_flatbuf_Buffer_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_struct_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Buffer_identifier, 16, 8);
}

static inline int org_apache_arrow_flatbuf_Buffer_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_struct_as_typed_root(buf, bufsiz, org_apache_arrow_flatbuf_Buffer_type_hash, 16, 8);
}

static inline int org_apache_arrow_flatbuf_Buffer_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_struct_as_typed_root(buf, bufsiz, thash, 16, 8);
}

static inline int org_apache_arrow_flatbuf_Buffer_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_struct_as_root(buf, bufsiz, fid, 16, 8);
}

static int org_apache_arrow_flatbuf_Null_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Null_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Null_identifier, &org_apache_arrow_flatbuf_Null_verify_table);
}

static inline int org_apache_arrow_flatbuf_Null_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Null_type_identifier, &org_apache_arrow_flatbuf_Null_verify_table);
}

static inline int org_apache_arrow_flatbuf_Null_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Null_verify_table);
}

static inline int org_apache_arrow_flatbuf_Null_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Null_verify_table);
}

static int org_apache_arrow_flatbuf_Struct__verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Struct__verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Struct__identifier, &org_apache_arrow_flatbuf_Struct__verify_table);
}

static inline int org_apache_arrow_flatbuf_Struct__verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Struct__type_identifier, &org_apache_arrow_flatbuf_Struct__verify_table);
}

static inline int org_apache_arrow_flatbuf_Struct__verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Struct__verify_table);
}

static inline int org_apache_arrow_flatbuf_Struct__verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Struct__verify_table);
}

static int org_apache_arrow_flatbuf_List_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_List_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_List_identifier, &org_apache_arrow_flatbuf_List_verify_table);
}

static inline int org_apache_arrow_flatbuf_List_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_List_type_identifier, &org_apache_arrow_flatbuf_List_verify_table);
}

static inline int org_apache_arrow_flatbuf_List_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_List_verify_table);
}

static inline int org_apache_arrow_flatbuf_List_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_List_verify_table);
}

static int org_apache_arrow_flatbuf_LargeList_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_LargeList_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_LargeList_identifier, &org_apache_arrow_flatbuf_LargeList_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeList_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_LargeList_type_identifier, &org_apache_arrow_flatbuf_LargeList_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeList_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_LargeList_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeList_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_LargeList_verify_table);
}

static int org_apache_arrow_flatbuf_FixedSizeList_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 4, 4) /* listSize */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_FixedSizeList_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_FixedSizeList_identifier, &org_apache_arrow_flatbuf_FixedSizeList_verify_table);
}

static inline int org_apache_arrow_flatbuf_FixedSizeList_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_FixedSizeList_type_identifier, &org_apache_arrow_flatbuf_FixedSizeList_verify_table);
}

static inline int org_apache_arrow_flatbuf_FixedSizeList_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_FixedSizeList_verify_table);
}

static inline int org_apache_arrow_flatbuf_FixedSizeList_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_FixedSizeList_verify_table);
}

static int org_apache_arrow_flatbuf_Map_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 1, 1) /* keysSorted */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Map_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Map_identifier, &org_apache_arrow_flatbuf_Map_verify_table);
}

static inline int org_apache_arrow_flatbuf_Map_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Map_type_identifier, &org_apache_arrow_flatbuf_Map_verify_table);
}

static inline int org_apache_arrow_flatbuf_Map_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Map_verify_table);
}

static inline int org_apache_arrow_flatbuf_Map_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Map_verify_table);
}

static int org_apache_arrow_flatbuf_Union_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* mode */)) return ret;
    if ((ret = flatcc_verify_vector_field(td, 1, 0, 4, 4, INT64_C(1073741823)) /* typeIds */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Union_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Union_identifier, &org_apache_arrow_flatbuf_Union_verify_table);
}

static inline int org_apache_arrow_flatbuf_Union_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Union_type_identifier, &org_apache_arrow_flatbuf_Union_verify_table);
}

static inline int org_apache_arrow_flatbuf_Union_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Union_verify_table);
}

static inline int org_apache_arrow_flatbuf_Union_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Union_verify_table);
}

static int org_apache_arrow_flatbuf_Int_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 4, 4) /* bitWidth */)) return ret;
    if ((ret = flatcc_verify_field(td, 1, 1, 1) /* is_signed */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Int_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Int_identifier, &org_apache_arrow_flatbuf_Int_verify_table);
}

static inline int org_apache_arrow_flatbuf_Int_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Int_type_identifier, &org_apache_arrow_flatbuf_Int_verify_table);
}

static inline int org_apache_arrow_flatbuf_Int_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Int_verify_table);
}

static inline int org_apache_arrow_flatbuf_Int_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Int_verify_table);
}

static int org_apache_arrow_flatbuf_FloatingPoint_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* precision */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_FloatingPoint_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_FloatingPoint_identifier, &org_apache_arrow_flatbuf_FloatingPoint_verify_table);
}

static inline int org_apache_arrow_flatbuf_FloatingPoint_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_FloatingPoint_type_identifier, &org_apache_arrow_flatbuf_FloatingPoint_verify_table);
}

static inline int org_apache_arrow_flatbuf_FloatingPoint_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_FloatingPoint_verify_table);
}

static inline int org_apache_arrow_flatbuf_FloatingPoint_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_FloatingPoint_verify_table);
}

static int org_apache_arrow_flatbuf_Utf8_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Utf8_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Utf8_identifier, &org_apache_arrow_flatbuf_Utf8_verify_table);
}

static inline int org_apache_arrow_flatbuf_Utf8_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Utf8_type_identifier, &org_apache_arrow_flatbuf_Utf8_verify_table);
}

static inline int org_apache_arrow_flatbuf_Utf8_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Utf8_verify_table);
}

static inline int org_apache_arrow_flatbuf_Utf8_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Utf8_verify_table);
}

static int org_apache_arrow_flatbuf_Binary_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Binary_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Binary_identifier, &org_apache_arrow_flatbuf_Binary_verify_table);
}

static inline int org_apache_arrow_flatbuf_Binary_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Binary_type_identifier, &org_apache_arrow_flatbuf_Binary_verify_table);
}

static inline int org_apache_arrow_flatbuf_Binary_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Binary_verify_table);
}

static inline int org_apache_arrow_flatbuf_Binary_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Binary_verify_table);
}

static int org_apache_arrow_flatbuf_LargeUtf8_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_LargeUtf8_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_LargeUtf8_identifier, &org_apache_arrow_flatbuf_LargeUtf8_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeUtf8_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_LargeUtf8_type_identifier, &org_apache_arrow_flatbuf_LargeUtf8_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeUtf8_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_LargeUtf8_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeUtf8_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_LargeUtf8_verify_table);
}

static int org_apache_arrow_flatbuf_LargeBinary_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_LargeBinary_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_LargeBinary_identifier, &org_apache_arrow_flatbuf_LargeBinary_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeBinary_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_LargeBinary_type_identifier, &org_apache_arrow_flatbuf_LargeBinary_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeBinary_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_LargeBinary_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeBinary_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_LargeBinary_verify_table);
}

static int org_apache_arrow_flatbuf_FixedSizeBinary_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 4, 4) /* byteWidth */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_FixedSizeBinary_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_FixedSizeBinary_identifier, &org_apache_arrow_flatbuf_FixedSizeBinary_verify_table);
}

static inline int org_apache_arrow_flatbuf_FixedSizeBinary_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_FixedSizeBinary_type_identifier, &org_apache_arrow_flatbuf_FixedSizeBinary_verify_table);
}

static inline int org_apache_arrow_flatbuf_FixedSizeBinary_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_FixedSizeBinary_verify_table);
}

static inline int org_apache_arrow_flatbuf_FixedSizeBinary_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_FixedSizeBinary_verify_table);
}

static int org_apache_arrow_flatbuf_Bool_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Bool_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Bool_identifier, &org_apache_arrow_flatbuf_Bool_verify_table);
}

static inline int org_apache_arrow_flatbuf_Bool_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Bool_type_identifier, &org_apache_arrow_flatbuf_Bool_verify_table);
}

static inline int org_apache_arrow_flatbuf_Bool_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Bool_verify_table);
}

static inline int org_apache_arrow_flatbuf_Bool_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Bool_verify_table);
}

static int org_apache_arrow_flatbuf_RunEndEncoded_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_RunEndEncoded_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_RunEndEncoded_identifier, &org_apache_arrow_flatbuf_RunEndEncoded_verify_table);
}

static inline int org_apache_arrow_flatbuf_RunEndEncoded_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_RunEndEncoded_type_identifier, &org_apache_arrow_flatbuf_RunEndEncoded_verify_table);
}

static inline int org_apache_arrow_flatbuf_RunEndEncoded_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_RunEndEncoded_verify_table);
}

static inline int org_apache_arrow_flatbuf_RunEndEncoded_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_RunEndEncoded_verify_table);
}

static int org_apache_arrow_flatbuf_Decimal_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 4, 4) /* precision */)) return ret;
    if ((ret = flatcc_verify_field(td, 1, 4, 4) /* scale */)) return ret;
    if ((ret = flatcc_verify_field(td, 2, 4, 4) /* bitWidth */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Decimal_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Decimal_identifier, &org_apache_arrow_flatbuf_Decimal_verify_table);
}

static inline int org_apache_arrow_flatbuf_Decimal_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Decimal_type_identifier, &org_apache_arrow_flatbuf_Decimal_verify_table);
}

static inline int org_apache_arrow_flatbuf_Decimal_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Decimal_verify_table);
}

static inline int org_apache_arrow_flatbuf_Decimal_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Decimal_verify_table);
}

static int org_apache_arrow_flatbuf_Date_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* unit */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Date_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Date_identifier, &org_apache_arrow_flatbuf_Date_verify_table);
}

static inline int org_apache_arrow_flatbuf_Date_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Date_type_identifier, &org_apache_arrow_flatbuf_Date_verify_table);
}

static inline int org_apache_arrow_flatbuf_Date_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Date_verify_table);
}

static inline int org_apache_arrow_flatbuf_Date_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Date_verify_table);
}

static int org_apache_arrow_flatbuf_Time_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* unit */)) return ret;
    if ((ret = flatcc_verify_field(td, 1, 4, 4) /* bitWidth */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Time_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Time_identifier, &org_apache_arrow_flatbuf_Time_verify_table);
}

static inline int org_apache_arrow_flatbuf_Time_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Time_type_identifier, &org_apache_arrow_flatbuf_Time_verify_table);
}

static inline int org_apache_arrow_flatbuf_Time_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Time_verify_table);
}

static inline int org_apache_arrow_flatbuf_Time_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Time_verify_table);
}

static int org_apache_arrow_flatbuf_Timestamp_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* unit */)) return ret;
    if ((ret = flatcc_verify_string_field(td, 1, 0) /* timezone */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Timestamp_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Timestamp_identifier, &org_apache_arrow_flatbuf_Timestamp_verify_table);
}

static inline int org_apache_arrow_flatbuf_Timestamp_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Timestamp_type_identifier, &org_apache_arrow_flatbuf_Timestamp_verify_table);
}

static inline int org_apache_arrow_flatbuf_Timestamp_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Timestamp_verify_table);
}

static inline int org_apache_arrow_flatbuf_Timestamp_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Timestamp_verify_table);
}

static int org_apache_arrow_flatbuf_Interval_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* unit */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Interval_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Interval_identifier, &org_apache_arrow_flatbuf_Interval_verify_table);
}

static inline int org_apache_arrow_flatbuf_Interval_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Interval_type_identifier, &org_apache_arrow_flatbuf_Interval_verify_table);
}

static inline int org_apache_arrow_flatbuf_Interval_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Interval_verify_table);
}

static inline int org_apache_arrow_flatbuf_Interval_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Interval_verify_table);
}

static int org_apache_arrow_flatbuf_Duration_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* unit */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Duration_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Duration_identifier, &org_apache_arrow_flatbuf_Duration_verify_table);
}

static inline int org_apache_arrow_flatbuf_Duration_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Duration_type_identifier, &org_apache_arrow_flatbuf_Duration_verify_table);
}

static inline int org_apache_arrow_flatbuf_Duration_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Duration_verify_table);
}

static inline int org_apache_arrow_flatbuf_Duration_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Duration_verify_table);
}

static int org_apache_arrow_flatbuf_KeyValue_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_string_field(td, 0, 0) /* key */)) return ret;
    if ((ret = flatcc_verify_string_field(td, 1, 0) /* value */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_KeyValue_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_KeyValue_identifier, &org_apache_arrow_flatbuf_KeyValue_verify_table);
}

static inline int org_apache_arrow_flatbuf_KeyValue_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_KeyValue_type_identifier, &org_apache_arrow_flatbuf_KeyValue_verify_table);
}

static inline int org_apache_arrow_flatbuf_KeyValue_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_KeyValue_verify_table);
}

static inline int org_apache_arrow_flatbuf_KeyValue_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_KeyValue_verify_table);
}

static int org_apache_arrow_flatbuf_DictionaryEncoding_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 8, 8) /* id */)) return ret;
    if ((ret = flatcc_verify_table_field(td, 1, 0, &org_apache_arrow_flatbuf_Int_verify_table) /* indexType */)) return ret;
    if ((ret = flatcc_verify_field(td, 2, 1, 1) /* isOrdered */)) return ret;
    if ((ret = flatcc_verify_field(td, 3, 2, 2) /* dictionaryKind */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_DictionaryEncoding_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_DictionaryEncoding_identifier, &org_apache_arrow_flatbuf_DictionaryEncoding_verify_table);
}

static inline int org_apache_arrow_flatbuf_DictionaryEncoding_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_DictionaryEncoding_type_identifier, &org_apache_arrow_flatbuf_DictionaryEncoding_verify_table);
}

static inline int org_apache_arrow_flatbuf_DictionaryEncoding_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_DictionaryEncoding_verify_table);
}

static inline int org_apache_arrow_flatbuf_DictionaryEncoding_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_DictionaryEncoding_verify_table);
}

static int org_apache_arrow_flatbuf_Field_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_string_field(td, 0, 0) /* name */)) return ret;
    if ((ret = flatcc_verify_field(td, 1, 1, 1) /* nullable */)) return ret;
    if ((ret = flatcc_verify_union_field(td, 3, 0, &org_apache_arrow_flatbuf_Type_union_verifier) /* type */)) return ret;
    if ((ret = flatcc_verify_table_field(td, 4, 0, &org_apache_arrow_flatbuf_DictionaryEncoding_verify_table) /* dictionary */)) return ret;
    if ((ret = flatcc_verify_table_vector_field(td, 5, 0, &org_apache_arrow_flatbuf_Field_verify_table) /* children */)) return ret;
    if ((ret = flatcc_verify_table_vector_field(td, 6, 0, &org_apache_arrow_flatbuf_KeyValue_verify_table) /* custom_metadata */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Field_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Field_identifier, &org_apache_arrow_flatbuf_Field_verify_table);
}

static inline int org_apache_arrow_flatbuf_Field_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Field_type_identifier, &org_apache_arrow_flatbuf_Field_verify_table);
}

static inline int org_apache_arrow_flatbuf_Field_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Field_verify_table);
}

static inline int org_apache_arrow_flatbuf_Field_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Field_verify_table);
}

static int org_apache_arrow_flatbuf_Schema_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* endianness */)) return ret;
    if ((ret = flatcc_verify_table_vector_field(td, 1, 0, &org_apache_arrow_flatbuf_Field_verify_table) /* fields */)) return ret;
    if ((ret = flatcc_verify_table_vector_field(td, 2, 0, &org_apache_arrow_flatbuf_KeyValue_verify_table) /* custom_metadata */)) return ret;
    if ((ret = flatcc_verify_vector_field(td, 3, 0, 8, 8, INT64_C(536870911)) /* features */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Schema_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Schema_identifier, &org_apache_arrow_flatbuf_Schema_verify_table);
}

static inline int org_apache_arrow_flatbuf_Schema_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Schema_type_identifier, &org_apache_arrow_flatbuf_Schema_verify_table);
}

static inline int org_apache_arrow_flatbuf_Schema_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Schema_verify_table);
}

static inline int org_apache_arrow_flatbuf_Schema_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Schema_verify_table);
}

#include "flatcc/flatcc_epilogue.h"
#endif /* SCHEMA_VERIFIER_H */
#ifndef SCHEMA_READER_H
#define SCHEMA_READER_H

/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

#ifndef FLATBUFFERS_COMMON_READER_H
#include "flatbuffers_common_reader.h"
#endif
#include "flatcc/flatcc_flatbuffers.h"
#ifndef __alignas_is_defined
#include <stdalign.h>
#endif
#include "flatcc/flatcc_prologue.h"
#ifndef flatbuffers_identifier
#define flatbuffers_identifier 0
#endif
#ifndef flatbuffers_extension
#define flatbuffers_extension "bin"
#endif

typedef struct org_apache_arrow_flatbuf_Buffer org_apache_arrow_flatbuf_Buffer_t;
typedef const org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_struct_t;
typedef org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_mutable_struct_t;
typedef const org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_vec_t;
typedef org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_mutable_vec_t;

typedef const struct org_apache_arrow_flatbuf_Null_table *org_apache_arrow_flatbuf_Null_table_t;
typedef struct org_apache_arrow_flatbuf_Null_table *org_apache_arrow_flatbuf_Null_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Null_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Null_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Struct__table *org_apache_arrow_flatbuf_Struct__table_t;
typedef struct org_apache_arrow_flatbuf_Struct__table *org_apache_arrow_flatbuf_Struct__mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Struct__vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Struct__mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_List_table *org_apache_arrow_flatbuf_List_table_t;
typedef struct org_apache_arrow_flatbuf_List_table *org_apache_arrow_flatbuf_List_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_List_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_List_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_LargeList_table *org_apache_arrow_flatbuf_LargeList_table_t;
typedef struct org_apache_arrow_flatbuf_LargeList_table *org_apache_arrow_flatbuf_LargeList_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_LargeList_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_LargeList_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_FixedSizeList_table *org_apache_arrow_flatbuf_FixedSizeList_table_t;
typedef struct org_apache_arrow_flatbuf_FixedSizeList_table *org_apache_arrow_flatbuf_FixedSizeList_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_FixedSizeList_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_FixedSizeList_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Map_table *org_apache_arrow_flatbuf_Map_table_t;
typedef struct org_apache_arrow_flatbuf_Map_table *org_apache_arrow_flatbuf_Map_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Map_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Map_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Union_table *org_apache_arrow_flatbuf_Union_table_t;
typedef struct org_apache_arrow_flatbuf_Union_table *org_apache_arrow_flatbuf_Union_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Union_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Union_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Int_table *org_apache_arrow_flatbuf_Int_table_t;
typedef struct org_apache_arrow_flatbuf_Int_table *org_apache_arrow_flatbuf_Int_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Int_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Int_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_FloatingPoint_table *org_apache_arrow_flatbuf_FloatingPoint_table_t;
typedef struct org_apache_arrow_flatbuf_FloatingPoint_table *org_apache_arrow_flatbuf_FloatingPoint_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_FloatingPoint_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_FloatingPoint_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Utf8_table *org_apache_arrow_flatbuf_Utf8_table_t;
typedef struct org_apache_arrow_flatbuf_Utf8_table *org_apache_arrow_flatbuf_Utf8_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Utf8_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Utf8_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Binary_table *org_apache_arrow_flatbuf_Binary_table_t;
typedef struct org_apache_arrow_flatbuf_Binary_table *org_apache_arrow_flatbuf_Binary_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Binary_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Binary_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_LargeUtf8_table *org_apache_arrow_flatbuf_LargeUtf8_table_t;
typedef struct org_apache_arrow_flatbuf_LargeUtf8_table *org_apache_arrow_flatbuf_LargeUtf8_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_LargeUtf8_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_LargeUtf8_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_LargeBinary_table *org_apache_arrow_flatbuf_LargeBinary_table_t;
typedef struct org_apache_arrow_flatbuf_LargeBinary_table *org_apache_arrow_flatbuf_LargeBinary_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_LargeBinary_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_LargeBinary_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_FixedSizeBinary_table *org_apache_arrow_flatbuf_FixedSizeBinary_table_t;
typedef struct org_apache_arrow_flatbuf_FixedSizeBinary_table *org_apache_arrow_flatbuf_FixedSizeBinary_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_FixedSizeBinary_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_FixedSizeBinary_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Bool_table *org_apache_arrow_flatbuf_Bool_table_t;
typedef struct org_apache_arrow_flatbuf_Bool_table *org_apache_arrow_flatbuf_Bool_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Bool_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Bool_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_RunEndEncoded_table *org_apache_arrow_flatbuf_RunEndEncoded_table_t;
typedef struct org_apache_arrow_flatbuf_RunEndEncoded_table *org_apache_arrow_flatbuf_RunEndEncoded_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_RunEndEncoded_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_RunEndEncoded_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Decimal_table *org_apache_arrow_flatbuf_Decimal_table_t;
typedef struct org_apache_arrow_flatbuf_Decimal_table *org_apache_arrow_flatbuf_Decimal_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Decimal_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Decimal_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Date_table *org_apache_arrow_flatbuf_Date_table_t;
typedef struct org_apache_arrow_flatbuf_Date_table *org_apache_arrow_flatbuf_Date_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Date_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Date_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Time_table *org_apache_arrow_flatbuf_Time_table_t;
typedef struct org_apache_arrow_flatbuf_Time_table *org_apache_arrow_flatbuf_Time_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Time_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Time_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Timestamp_table *org_apache_arrow_flatbuf_Timestamp_table_t;
typedef struct org_apache_arrow_flatbuf_Timestamp_table *org_apache_arrow_flatbuf_Timestamp_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Timestamp_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Timestamp_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Interval_table *org_apache_arrow_flatbuf_Interval_table_t;
typedef struct org_apache_arrow_flatbuf_Interval_table *org_apache_arrow_flatbuf_Interval_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Interval_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Interval_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Duration_table *org_apache_arrow_flatbuf_Duration_table_t;
typedef struct org_apache_arrow_flatbuf_Duration_table *org_apache_arrow_flatbuf_Duration_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Duration_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Duration_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_KeyValue_table *org_apache_arrow_flatbuf_KeyValue_table_t;
typedef struct org_apache_arrow_flatbuf_KeyValue_table *org_apache_arrow_flatbuf_KeyValue_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_KeyValue_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_KeyValue_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_DictionaryEncoding_table *org_apache_arrow_flatbuf_DictionaryEncoding_table_t;
typedef struct org_apache_arrow_flatbuf_DictionaryEncoding_table *org_apache_arrow_flatbuf_DictionaryEncoding_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_DictionaryEncoding_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_DictionaryEncoding_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Field_table *org_apache_arrow_flatbuf_Field_table_t;
typedef struct org_apache_arrow_flatbuf_Field_table *org_apache_arrow_flatbuf_Field_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Field_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Field_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Schema_table *org_apache_arrow_flatbuf_Schema_table_t;
typedef struct org_apache_arrow_flatbuf_Schema_table *org_apache_arrow_flatbuf_Schema_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Schema_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Schema_mutable_vec_t;
#ifndef org_apache_arrow_flatbuf_Null_file_identifier
#define org_apache_arrow_flatbuf_Null_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Null_file_identifier */
#ifndef org_apache_arrow_flatbuf_Null_identifier
#define org_apache_arrow_flatbuf_Null_identifier 0
#endif
#define org_apache_arrow_flatbuf_Null_type_hash ((flatbuffers_thash_t)0x7b36a4dd)
#define org_apache_arrow_flatbuf_Null_type_identifier "\xdd\xa4\x36\x7b"
#ifndef org_apache_arrow_flatbuf_Null_file_extension
#define org_apache_arrow_flatbuf_Null_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Struct__file_identifier
#define org_apache_arrow_flatbuf_Struct__file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Struct__file_identifier */
#ifndef org_apache_arrow_flatbuf_Struct__identifier
#define org_apache_arrow_flatbuf_Struct__identifier 0
#endif
#define org_apache_arrow_flatbuf_Struct__type_hash ((flatbuffers_thash_t)0x6310f362)
#define org_apache_arrow_flatbuf_Struct__type_identifier "\x62\xf3\x10\x63"
#ifndef org_apache_arrow_flatbuf_Struct__file_extension
#define org_apache_arrow_flatbuf_Struct__file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_List_file_identifier
#define org_apache_arrow_flatbuf_List_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_List_file_identifier */
#ifndef org_apache_arrow_flatbuf_List_identifier
#define org_apache_arrow_flatbuf_List_identifier 0
#endif
#define org_apache_arrow_flatbuf_List_type_hash ((flatbuffers_thash_t)0xd4ce5878)
#define org_apache_arrow_flatbuf_List_type_identifier "\x78\x58\xce\xd4"
#ifndef org_apache_arrow_flatbuf_List_file_extension
#define org_apache_arrow_flatbuf_List_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_LargeList_file_identifier
#define org_apache_arrow_flatbuf_LargeList_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_LargeList_file_identifier */
#ifndef org_apache_arrow_flatbuf_LargeList_identifier
#define org_apache_arrow_flatbuf_LargeList_identifier 0
#endif
#define org_apache_arrow_flatbuf_LargeList_type_hash ((flatbuffers_thash_t)0x38aa7e27)
#define org_apache_arrow_flatbuf_LargeList_type_identifier "\x27\x7e\xaa\x38"
#ifndef org_apache_arrow_flatbuf_LargeList_file_extension
#define org_apache_arrow_flatbuf_LargeList_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_FixedSizeList_file_identifier
#define org_apache_arrow_flatbuf_FixedSizeList_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_FixedSizeList_file_identifier */
#ifndef org_apache_arrow_flatbuf_FixedSizeList_identifier
#define org_apache_arrow_flatbuf_FixedSizeList_identifier 0
#endif
#define org_apache_arrow_flatbuf_FixedSizeList_type_hash ((flatbuffers_thash_t)0xcef245bb)
#define org_apache_arrow_flatbuf_FixedSizeList_type_identifier "\xbb\x45\xf2\xce"
#ifndef org_apache_arrow_flatbuf_FixedSizeList_file_extension
#define org_apache_arrow_flatbuf_FixedSizeList_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Map_file_identifier
#define org_apache_arrow_flatbuf_Map_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Map_file_identifier */
#ifndef org_apache_arrow_flatbuf_Map_identifier
#define org_apache_arrow_flatbuf_Map_identifier 0
#endif
#define org_apache_arrow_flatbuf_Map_type_hash ((flatbuffers_thash_t)0xcebef8e6)
#define org_apache_arrow_flatbuf_Map_type_identifier "\xe6\xf8\xbe\xce"
#ifndef org_apache_arrow_flatbuf_Map_file_extension
#define org_apache_arrow_flatbuf_Map_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Union_file_identifier
#define org_apache_arrow_flatbuf_Union_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Union_file_identifier */
#ifndef org_apache_arrow_flatbuf_Union_identifier
#define org_apache_arrow_flatbuf_Union_identifier 0
#endif
#define org_apache_arrow_flatbuf_Union_type_hash ((flatbuffers_thash_t)0x896bda57)
#define org_apache_arrow_flatbuf_Union_type_identifier "\x57\xda\x6b\x89"
#ifndef org_apache_arrow_flatbuf_Union_file_extension
#define org_apache_arrow_flatbuf_Union_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Int_file_identifier
#define org_apache_arrow_flatbuf_Int_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Int_file_identifier */
#ifndef org_apache_arrow_flatbuf_Int_identifier
#define org_apache_arrow_flatbuf_Int_identifier 0
#endif
#define org_apache_arrow_flatbuf_Int_type_hash ((flatbuffers_thash_t)0x30789001)
#define org_apache_arrow_flatbuf_Int_type_identifier "\x01\x90\x78\x30"
#ifndef org_apache_arrow_flatbuf_Int_file_extension
#define org_apache_arrow_flatbuf_Int_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_FloatingPoint_file_identifier
#define org_apache_arrow_flatbuf_FloatingPoint_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_FloatingPoint_file_identifier */
#ifndef org_apache_arrow_flatbuf_FloatingPoint_identifier
#define org_apache_arrow_flatbuf_FloatingPoint_identifier 0
#endif
#define org_apache_arrow_flatbuf_FloatingPoint_type_hash ((flatbuffers_thash_t)0xf7d06268)
#define org_apache_arrow_flatbuf_FloatingPoint_type_identifier "\x68\x62\xd0\xf7"
#ifndef org_apache_arrow_flatbuf_FloatingPoint_file_extension
#define org_apache_arrow_flatbuf_FloatingPoint_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Utf8_file_identifier
#define org_apache_arrow_flatbuf_Utf8_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Utf8_file_identifier */
#ifndef org_apache_arrow_flatbuf_Utf8_identifier
#define org_apache_arrow_flatbuf_Utf8_identifier 0
#endif
#define org_apache_arrow_flatbuf_Utf8_type_hash ((flatbuffers_thash_t)0x8fe60d37)
#define org_apache_arrow_flatbuf_Utf8_type_identifier "\x37\x0d\xe6\x8f"
#ifndef org_apache_arrow_flatbuf_Utf8_file_extension
#define org_apache_arrow_flatbuf_Utf8_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Binary_file_identifier
#define org_apache_arrow_flatbuf_Binary_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Binary_file_identifier */
#ifndef org_apache_arrow_flatbuf_Binary_identifier
#define org_apache_arrow_flatbuf_Binary_identifier 0
#endif
#define org_apache_arrow_flatbuf_Binary_type_hash ((flatbuffers_thash_t)0x8e21a795)
#define org_apache_arrow_flatbuf_Binary_type_identifier "\x95\xa7\x21\x8e"
#ifndef org_apache_arrow_flatbuf_Binary_file_extension
#define org_apache_arrow_flatbuf_Binary_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_LargeUtf8_file_identifier
#define org_apache_arrow_flatbuf_LargeUtf8_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_LargeUtf8_file_identifier */
#ifndef org_apache_arrow_flatbuf_LargeUtf8_identifier
#define org_apache_arrow_flatbuf_LargeUtf8_identifier 0
#endif
#define org_apache_arrow_flatbuf_LargeUtf8_type_hash ((flatbuffers_thash_t)0x24ed2fb0)
#define org_apache_arrow_flatbuf_LargeUtf8_type_identifier "\xb0\x2f\xed\x24"
#ifndef org_apache_arrow_flatbuf_LargeUtf8_file_extension
#define org_apache_arrow_flatbuf_LargeUtf8_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_LargeBinary_file_identifier
#define org_apache_arrow_flatbuf_LargeBinary_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_LargeBinary_file_identifier */
#ifndef org_apache_arrow_flatbuf_LargeBinary_identifier
#define org_apache_arrow_flatbuf_LargeBinary_identifier 0
#endif
#define org_apache_arrow_flatbuf_LargeBinary_type_hash ((flatbuffers_thash_t)0xbd437872)
#define org_apache_arrow_flatbuf_LargeBinary_type_identifier "\x72\x78\x43\xbd"
#ifndef org_apache_arrow_flatbuf_LargeBinary_file_extension
#define org_apache_arrow_flatbuf_LargeBinary_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_FixedSizeBinary_file_identifier
#define org_apache_arrow_flatbuf_FixedSizeBinary_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_FixedSizeBinary_file_identifier */
#ifndef org_apache_arrow_flatbuf_FixedSizeBinary_identifier
#define org_apache_arrow_flatbuf_FixedSizeBinary_identifier 0
#endif
#define org_apache_arrow_flatbuf_FixedSizeBinary_type_hash ((flatbuffers_thash_t)0x80d0f4ce)
#define org_apache_arrow_flatbuf_FixedSizeBinary_type_identifier "\xce\xf4\xd0\x80"
#ifndef org_apache_arrow_flatbuf_FixedSizeBinary_file_extension
#define org_apache_arrow_flatbuf_FixedSizeBinary_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Bool_file_identifier
#define org_apache_arrow_flatbuf_Bool_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Bool_file_identifier */
#ifndef org_apache_arrow_flatbuf_Bool_identifier
#define org_apache_arrow_flatbuf_Bool_identifier 0
#endif
#define org_apache_arrow_flatbuf_Bool_type_hash ((flatbuffers_thash_t)0x96bf83f0)
#define org_apache_arrow_flatbuf_Bool_type_identifier "\xf0\x83\xbf\x96"
#ifndef org_apache_arrow_flatbuf_Bool_file_extension
#define org_apache_arrow_flatbuf_Bool_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_RunEndEncoded_file_identifier
#define org_apache_arrow_flatbuf_RunEndEncoded_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_RunEndEncoded_file_identifier */
#ifndef org_apache_arrow_flatbuf_RunEndEncoded_identifier
#define org_apache_arrow_flatbuf_RunEndEncoded_identifier 0
#endif
#define org_apache_arrow_flatbuf_RunEndEncoded_type_hash ((flatbuffers_thash_t)0x5a98bcc)
#define org_apache_arrow_flatbuf_RunEndEncoded_type_identifier "\xcc\x8b\xa9\x05"
#ifndef org_apache_arrow_flatbuf_RunEndEncoded_file_extension
#define org_apache_arrow_flatbuf_RunEndEncoded_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Decimal_file_identifier
#define org_apache_arrow_flatbuf_Decimal_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Decimal_file_identifier */
#ifndef org_apache_arrow_flatbuf_Decimal_identifier
#define org_apache_arrow_flatbuf_Decimal_identifier 0
#endif
#define org_apache_arrow_flatbuf_Decimal_type_hash ((flatbuffers_thash_t)0x91d1beb7)
#define org_apache_arrow_flatbuf_Decimal_type_identifier "\xb7\xbe\xd1\x91"
#ifndef org_apache_arrow_flatbuf_Decimal_file_extension
#define org_apache_arrow_flatbuf_Decimal_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Date_file_identifier
#define org_apache_arrow_flatbuf_Date_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Date_file_identifier */
#ifndef org_apache_arrow_flatbuf_Date_identifier
#define org_apache_arrow_flatbuf_Date_identifier 0
#endif
#define org_apache_arrow_flatbuf_Date_type_hash ((flatbuffers_thash_t)0xe0ccf624)
#define org_apache_arrow_flatbuf_Date_type_identifier "\x24\xf6\xcc\xe0"
#ifndef org_apache_arrow_flatbuf_Date_file_extension
#define org_apache_arrow_flatbuf_Date_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Time_file_identifier
#define org_apache_arrow_flatbuf_Time_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Time_file_identifier */
#ifndef org_apache_arrow_flatbuf_Time_identifier
#define org_apache_arrow_flatbuf_Time_identifier 0
#endif
#define org_apache_arrow_flatbuf_Time_type_hash ((flatbuffers_thash_t)0x2442a489)
#define org_apache_arrow_flatbuf_Time_type_identifier "\x89\xa4\x42\x24"
#ifndef org_apache_arrow_flatbuf_Time_file_extension
#define org_apache_arrow_flatbuf_Time_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Timestamp_file_identifier
#define org_apache_arrow_flatbuf_Timestamp_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Timestamp_file_identifier */
#ifndef org_apache_arrow_flatbuf_Timestamp_identifier
#define org_apache_arrow_flatbuf_Timestamp_identifier 0
#endif
#define org_apache_arrow_flatbuf_Timestamp_type_hash ((flatbuffers_thash_t)0x1fddf080)
#define org_apache_arrow_flatbuf_Timestamp_type_identifier "\x80\xf0\xdd\x1f"
#ifndef org_apache_arrow_flatbuf_Timestamp_file_extension
#define org_apache_arrow_flatbuf_Timestamp_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Interval_file_identifier
#define org_apache_arrow_flatbuf_Interval_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Interval_file_identifier */
#ifndef org_apache_arrow_flatbuf_Interval_identifier
#define org_apache_arrow_flatbuf_Interval_identifier 0
#endif
#define org_apache_arrow_flatbuf_Interval_type_hash ((flatbuffers_thash_t)0x1e2d6809)
#define org_apache_arrow_flatbuf_Interval_type_identifier "\x09\x68\x2d\x1e"
#ifndef org_apache_arrow_flatbuf_Interval_file_extension
#define org_apache_arrow_flatbuf_Interval_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Duration_file_identifier
#define org_apache_arrow_flatbuf_Duration_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Duration_file_identifier */
#ifndef org_apache_arrow_flatbuf_Duration_identifier
#define org_apache_arrow_flatbuf_Duration_identifier 0
#endif
#define org_apache_arrow_flatbuf_Duration_type_hash ((flatbuffers_thash_t)0x1ecea6b0)
#define org_apache_arrow_flatbuf_Duration_type_identifier "\xb0\xa6\xce\x1e"
#ifndef org_apache_arrow_flatbuf_Duration_file_extension
#define org_apache_arrow_flatbuf_Duration_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_KeyValue_file_identifier
#define org_apache_arrow_flatbuf_KeyValue_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_KeyValue_file_identifier */
#ifndef org_apache_arrow_flatbuf_KeyValue_identifier
#define org_apache_arrow_flatbuf_KeyValue_identifier 0
#endif
#define org_apache_arrow_flatbuf_KeyValue_type_hash ((flatbuffers_thash_t)0x3b264744)
#define org_apache_arrow_flatbuf_KeyValue_type_identifier "\x44\x47\x26\x3b"
#ifndef org_apache_arrow_flatbuf_KeyValue_file_extension
#define org_apache_arrow_flatbuf_KeyValue_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_DictionaryEncoding_file_identifier
#define org_apache_arrow_flatbuf_DictionaryEncoding_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_DictionaryEncoding_file_identifier */
#ifndef org_apache_arrow_flatbuf_DictionaryEncoding_identifier
#define org_apache_arrow_flatbuf_DictionaryEncoding_identifier 0
#endif
#define org_apache_arrow_flatbuf_DictionaryEncoding_type_hash ((flatbuffers_thash_t)0x8c703261)
#define org_apache_arrow_flatbuf_DictionaryEncoding_type_identifier "\x61\x32\x70\x8c"
#ifndef org_apache_arrow_flatbuf_DictionaryEncoding_file_extension
#define org_apache_arrow_flatbuf_DictionaryEncoding_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Field_file_identifier
#define org_apache_arrow_flatbuf_Field_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Field_file_identifier */
#ifndef org_apache_arrow_flatbuf_Field_identifier
#define org_apache_arrow_flatbuf_Field_identifier 0
#endif
#define org_apache_arrow_flatbuf_Field_type_hash ((flatbuffers_thash_t)0xd981525c)
#define org_apache_arrow_flatbuf_Field_type_identifier "\x5c\x52\x81\xd9"
#ifndef org_apache_arrow_flatbuf_Field_file_extension
#define org_apache_arrow_flatbuf_Field_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Buffer_file_identifier
#define org_apache_arrow_flatbuf_Buffer_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Buffer_file_identifier */
#ifndef org_apache_arrow_flatbuf_Buffer_identifier
#define org_apache_arrow_flatbuf_Buffer_identifier 0
#endif
#define org_apache_arrow_flatbuf_Buffer_type_hash ((flatbuffers_thash_t)0x519d7fea)
#define org_apache_arrow_flatbuf_Buffer_type_identifier "\xea\x7f\x9d\x51"
#ifndef org_apache_arrow_flatbuf_Buffer_file_extension
#define org_apache_arrow_flatbuf_Buffer_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Schema_file_identifier
#define org_apache_arrow_flatbuf_Schema_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Schema_file_identifier */
#ifndef org_apache_arrow_flatbuf_Schema_identifier
#define org_apache_arrow_flatbuf_Schema_identifier 0
#endif
#define org_apache_arrow_flatbuf_Schema_type_hash ((flatbuffers_thash_t)0x406570b)
#define org_apache_arrow_flatbuf_Schema_type_identifier "\x0b\x57\x06\x04"
#ifndef org_apache_arrow_flatbuf_Schema_file_extension
#define org_apache_arrow_flatbuf_Schema_file_extension "bin"
#endif

typedef int16_t org_apache_arrow_flatbuf_MetadataVersion_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_MetadataVersion, org_apache_arrow_flatbuf_MetadataVersion_enum_t, 16)
/**  0.1.0 (October 2016). */
#define org_apache_arrow_flatbuf_MetadataVersion_V1 ((org_apache_arrow_flatbuf_MetadataVersion_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_MetadataVersion_V2 ((org_apache_arrow_flatbuf_MetadataVersion_enum_t)INT16_C(1))
#define org_apache_arrow_flatbuf_MetadataVersion_V3 ((org_apache_arrow_flatbuf_MetadataVersion_enum_t)INT16_C(2))
#define org_apache_arrow_flatbuf_MetadataVersion_V4 ((org_apache_arrow_flatbuf_MetadataVersion_enum_t)INT16_C(3))
#define org_apache_arrow_flatbuf_MetadataVersion_V5 ((org_apache_arrow_flatbuf_MetadataVersion_enum_t)INT16_C(4))

static inline const char *org_apache_arrow_flatbuf_MetadataVersion_name(org_apache_arrow_flatbuf_MetadataVersion_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_MetadataVersion_V1: return "V1";
    case org_apache_arrow_flatbuf_MetadataVersion_V2: return "V2";
    case org_apache_arrow_flatbuf_MetadataVersion_V3: return "V3";
    case org_apache_arrow_flatbuf_MetadataVersion_V4: return "V4";
    case org_apache_arrow_flatbuf_MetadataVersion_V5: return "V5";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_MetadataVersion_is_known_value(org_apache_arrow_flatbuf_MetadataVersion_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_MetadataVersion_V1: return 1;
    case org_apache_arrow_flatbuf_MetadataVersion_V2: return 1;
    case org_apache_arrow_flatbuf_MetadataVersion_V3: return 1;
    case org_apache_arrow_flatbuf_MetadataVersion_V4: return 1;
    case org_apache_arrow_flatbuf_MetadataVersion_V5: return 1;
    default: return 0;
    }
}

/**  Represents Arrow Features that might not have full support
 *  within implementations. This is intended to be used in
 *  two scenarios:
 *   1.  A mechanism for readers of Arrow Streams
 *       and files to understand that the stream or file makes
 *       use of a feature that isn't supported or unknown to
 *       the implementation (and therefore can meet the Arrow
 *       forward compatibility guarantees).
 *   2.  A means of negotiating between a client and server
 *       what features a stream is allowed to use. The enums
 *       values here are intented to represent higher level
 *       features, additional details maybe negotiated
 *       with key-value pairs specific to the protocol.
 *
 *  Enums added to this list should be assigned power-of-two values
 *  to facilitate exchanging and comparing bitmaps for supported
 *  features. */
typedef int64_t org_apache_arrow_flatbuf_Feature_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_Feature, org_apache_arrow_flatbuf_Feature_enum_t, 64)
/**  Needed to make flatbuffers happy. */
#define org_apache_arrow_flatbuf_Feature_UNUSED ((org_apache_arrow_flatbuf_Feature_enum_t)INT64_C(0))
#define org_apache_arrow_flatbuf_Feature_DICTIONARY_REPLACEMENT ((org_apache_arrow_flatbuf_Feature_enum_t)INT64_C(1))
#define org_apache_arrow_flatbuf_Feature_COMPRESSED_BODY ((org_apache_arrow_flatbuf_Feature_enum_t)INT64_C(2))

static inline const char *org_apache_arrow_flatbuf_Feature_name(org_apache_arrow_flatbuf_Feature_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_Feature_UNUSED: return "UNUSED";
    case org_apache_arrow_flatbuf_Feature_DICTIONARY_REPLACEMENT: return "DICTIONARY_REPLACEMENT";
    case org_apache_arrow_flatbuf_Feature_COMPRESSED_BODY: return "COMPRESSED_BODY";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_Feature_is_known_value(org_apache_arrow_flatbuf_Feature_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_Feature_UNUSED: return 1;
    case org_apache_arrow_flatbuf_Feature_DICTIONARY_REPLACEMENT: return 1;
    case org_apache_arrow_flatbuf_Feature_COMPRESSED_BODY: return 1;
    default: return 0;
    }
}

typedef int16_t org_apache_arrow_flatbuf_UnionMode_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_UnionMode, org_apache_arrow_flatbuf_UnionMode_enum_t, 16)
#define org_apache_arrow_flatbuf_UnionMode_Sparse ((org_apache_arrow_flatbuf_UnionMode_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_UnionMode_Dense ((org_apache_arrow_flatbuf_UnionMode_enum_t)INT16_C(1))

static inline const char *org_apache_arrow_flatbuf_UnionMode_name(org_apache_arrow_flatbuf_UnionMode_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_UnionMode_Sparse: return "Sparse";
    case org_apache_arrow_flatbuf_UnionMode_Dense: return "Dense";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_UnionMode_is_known_value(org_apache_arrow_flatbuf_UnionMode_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_UnionMode_Sparse: return 1;
    case org_apache_arrow_flatbuf_UnionMode_Dense: return 1;
    default: return 0;
    }
}

typedef int16_t org_apache_arrow_flatbuf_Precision_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_Precision, org_apache_arrow_flatbuf_Precision_enum_t, 16)
#define org_apache_arrow_flatbuf_Precision_HALF ((org_apache_arrow_flatbuf_Precision_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_Precision_SINGLE ((org_apache_arrow_flatbuf_Precision_enum_t)INT16_C(1))
#define org_apache_arrow_flatbuf_Precision_DOUBLE ((org_apache_arrow_flatbuf_Precision_enum_t)INT16_C(2))

static inline const char *org_apache_arrow_flatbuf_Precision_name(org_apache_arrow_flatbuf_Precision_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_Precision_HALF: return "HALF";
    case org_apache_arrow_flatbuf_Precision_SINGLE: return "SINGLE";
    case org_apache_arrow_flatbuf_Precision_DOUBLE: return "DOUBLE";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_Precision_is_known_value(org_apache_arrow_flatbuf_Precision_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_Precision_HALF: return 1;
    case org_apache_arrow_flatbuf_Precision_SINGLE: return 1;
    case org_apache_arrow_flatbuf_Precision_DOUBLE: return 1;
    default: return 0;
    }
}

typedef int16_t org_apache_arrow_flatbuf_DateUnit_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_DateUnit, org_apache_arrow_flatbuf_DateUnit_enum_t, 16)
#define org_apache_arrow_flatbuf_DateUnit_DAY ((org_apache_arrow_flatbuf_DateUnit_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_DateUnit_MILLISECOND ((org_apache_arrow_flatbuf_DateUnit_enum_t)INT16_C(1))

static inline const char *org_apache_arrow_flatbuf_DateUnit_name(org_apache_arrow_flatbuf_DateUnit_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_DateUnit_DAY: return "DAY";
    case org_apache_arrow_flatbuf_DateUnit_MILLISECOND: return "MILLISECOND";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_DateUnit_is_known_value(org_apache_arrow_flatbuf_DateUnit_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_DateUnit_DAY: return 1;
    case org_apache_arrow_flatbuf_DateUnit_MILLISECOND: return 1;
    default: return 0;
    }
}

typedef int16_t org_apache_arrow_flatbuf_TimeUnit_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t, 16)
#define org_apache_arrow_flatbuf_TimeUnit_SECOND ((org_apache_arrow_flatbuf_TimeUnit_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_TimeUnit_MILLISECOND ((org_apache_arrow_flatbuf_TimeUnit_enum_t)INT16_C(1))
#define org_apache_arrow_flatbuf_TimeUnit_MICROSECOND ((org_apache_arrow_flatbuf_TimeUnit_enum_t)INT16_C(2))
#define org_apache_arrow_flatbuf_TimeUnit_NANOSECOND ((org_apache_arrow_flatbuf_TimeUnit_enum_t)INT16_C(3))

static inline const char *org_apache_arrow_flatbuf_TimeUnit_name(org_apache_arrow_flatbuf_TimeUnit_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_TimeUnit_SECOND: return "SECOND";
    case org_apache_arrow_flatbuf_TimeUnit_MILLISECOND: return "MILLISECOND";
    case org_apache_arrow_flatbuf_TimeUnit_MICROSECOND: return "MICROSECOND";
    case org_apache_arrow_flatbuf_TimeUnit_NANOSECOND: return "NANOSECOND";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_TimeUnit_is_known_value(org_apache_arrow_flatbuf_TimeUnit_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_TimeUnit_SECOND: return 1;
    case org_apache_arrow_flatbuf_TimeUnit_MILLISECOND: return 1;
    case org_apache_arrow_flatbuf_TimeUnit_MICROSECOND: return 1;
    case org_apache_arrow_flatbuf_TimeUnit_NANOSECOND: return 1;
    default: return 0;
    }
}

typedef int16_t org_apache_arrow_flatbuf_IntervalUnit_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_IntervalUnit, org_apache_arrow_flatbuf_IntervalUnit_enum_t, 16)
#define org_apache_arrow_flatbuf_IntervalUnit_YEAR_MONTH ((org_apache_arrow_flatbuf_IntervalUnit_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_IntervalUnit_DAY_TIME ((org_apache_arrow_flatbuf_IntervalUnit_enum_t)INT16_C(1))
#define org_apache_arrow_flatbuf_IntervalUnit_MONTH_DAY_NANO ((org_apache_arrow_flatbuf_IntervalUnit_enum_t)INT16_C(2))

static inline const char *org_apache_arrow_flatbuf_IntervalUnit_name(org_apache_arrow_flatbuf_IntervalUnit_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_IntervalUnit_YEAR_MONTH: return "YEAR_MONTH";
    case org_apache_arrow_flatbuf_IntervalUnit_DAY_TIME: return "DAY_TIME";
    case org_apache_arrow_flatbuf_IntervalUnit_MONTH_DAY_NANO: return "MONTH_DAY_NANO";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_IntervalUnit_is_known_value(org_apache_arrow_flatbuf_IntervalUnit_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_IntervalUnit_YEAR_MONTH: return 1;
    case org_apache_arrow_flatbuf_IntervalUnit_DAY_TIME: return 1;
    case org_apache_arrow_flatbuf_IntervalUnit_MONTH_DAY_NANO: return 1;
    default: return 0;
    }
}

/**  ----------------------------------------------------------------------
 *  Dictionary encoding metadata
 *  Maintained for forwards compatibility, in the future
 *  Dictionaries might be explicit maps between integers and values
 *  allowing for non-contiguous index values */
typedef int16_t org_apache_arrow_flatbuf_DictionaryKind_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_DictionaryKind, org_apache_arrow_flatbuf_DictionaryKind_enum_t, 16)
#define org_apache_arrow_flatbuf_DictionaryKind_DenseArray ((org_apache_arrow_flatbuf_DictionaryKind_enum_t)INT16_C(0))

static inline const char *org_apache_arrow_flatbuf_DictionaryKind_name(org_apache_arrow_flatbuf_DictionaryKind_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_DictionaryKind_DenseArray: return "DenseArray";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_DictionaryKind_is_known_value(org_apache_arrow_flatbuf_DictionaryKind_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_DictionaryKind_DenseArray: return 1;
    default: return 0;
    }
}

/**  ----------------------------------------------------------------------
 *  Endianness of the platform producing the data */
typedef int16_t org_apache_arrow_flatbuf_Endianness_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_Endianness, org_apache_arrow_flatbuf_Endianness_enum_t, 16)
#define org_apache_arrow_flatbuf_Endianness_Little ((org_apache_arrow_flatbuf_Endianness_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_Endianness_Big ((org_apache_arrow_flatbuf_Endianness_enum_t)INT16_C(1))

static inline const char *org_apache_arrow_flatbuf_Endianness_name(org_apache_arrow_flatbuf_Endianness_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_Endianness_Little: return "Little";
    case org_apache_arrow_flatbuf_Endianness_Big: return "Big";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_Endianness_is_known_value(org_apache_arrow_flatbuf_Endianness_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_Endianness_Little: return 1;
    case org_apache_arrow_flatbuf_Endianness_Big: return 1;
    default: return 0;
    }
}


/**  ----------------------------------------------------------------------
 *  A Buffer represents a single contiguous memory segment */
struct org_apache_arrow_flatbuf_Buffer {
    /**  The relative offset into the shared memory page where the bytes for this
     *  buffer starts */
    alignas(8) int64_t offset;
    /**  The absolute length (in bytes) of the memory buffer. The memory is found
     *  from offset (inclusive) to offset + length (non-inclusive). When building
     *  messages using the encapsulated IPC message, padding bytes may be written
     *  after a buffer, but such padding bytes do not need to be accounted for in
     *  the size here. */
    alignas(8) int64_t length;
};
static_assert(sizeof(org_apache_arrow_flatbuf_Buffer_t) == 16, "struct size mismatch");

static inline const org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer__const_ptr_add(const org_apache_arrow_flatbuf_Buffer_t *p, size_t i) { return p + i; }
static inline org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer__ptr_add(org_apache_arrow_flatbuf_Buffer_t *p, size_t i) { return p + i; }
static inline org_apache_arrow_flatbuf_Buffer_struct_t org_apache_arrow_flatbuf_Buffer_vec_at(org_apache_arrow_flatbuf_Buffer_vec_t vec, size_t i)
__flatbuffers_struct_vec_at(vec, i)
static inline size_t org_apache_arrow_flatbuf_Buffer__size(void) { return 16; }
static inline size_t org_apache_arrow_flatbuf_Buffer_vec_len(org_apache_arrow_flatbuf_Buffer_vec_t vec)
__flatbuffers_vec_len(vec)
__flatbuffers_struct_as_root(org_apache_arrow_flatbuf_Buffer)

__flatbuffers_define_struct_scalar_field(org_apache_arrow_flatbuf_Buffer, offset, flatbuffers_int64, int64_t)
__flatbuffers_define_struct_scalar_field(org_apache_arrow_flatbuf_Buffer, length, flatbuffers_int64, int64_t)


/**  These are stored in the flatbuffer in the Type union below */
struct org_apache_arrow_flatbuf_Null_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Null_vec_len(org_apache_arrow_flatbuf_Null_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Null_table_t org_apache_arrow_flatbuf_Null_vec_at(org_apache_arrow_flatbuf_Null_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Null_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Null)


/**  A Struct_ in the flatbuffer metadata is the same as an Arrow Struct
 *  (according to the physical memory layout). We used Struct_ here as
 *  Struct is a reserved word in Flatbuffers */
struct org_apache_arrow_flatbuf_Struct__table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Struct__vec_len(org_apache_arrow_flatbuf_Struct__vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Struct__table_t org_apache_arrow_flatbuf_Struct__vec_at(org_apache_arrow_flatbuf_Struct__vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Struct__table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Struct_)


struct org_apache_arrow_flatbuf_List_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_List_vec_len(org_apache_arrow_flatbuf_List_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_List_table_t org_apache_arrow_flatbuf_List_vec_at(org_apache_arrow_flatbuf_List_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_List_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_List)


/**  Same as List, but with 64-bit offsets, allowing to represent
 *  extremely large data values. */
struct org_apache_arrow_flatbuf_LargeList_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_LargeList_vec_len(org_apache_arrow_flatbuf_LargeList_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_LargeList_table_t org_apache_arrow_flatbuf_LargeList_vec_at(org_apache_arrow_flatbuf_LargeList_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_LargeList_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_LargeList)


struct org_apache_arrow_flatbuf_FixedSizeList_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_FixedSizeList_vec_len(org_apache_arrow_flatbuf_FixedSizeList_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_FixedSizeList_table_t org_apache_arrow_flatbuf_FixedSizeList_vec_at(org_apache_arrow_flatbuf_FixedSizeList_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_FixedSizeList_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_FixedSizeList)

/**  Number of list items per value */
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_FixedSizeList, listSize, flatbuffers_int32, int32_t, INT32_C(0))

/**  A Map is a logical nested type that is represented as
 *
 *  List<entries: Struct<key: K, value: V>>
 *
 *  In this layout, the keys and values are each respectively contiguous. We do
 *  not constrain the key and value types, so the application is responsible
 *  for ensuring that the keys are hashable and unique. Whether the keys are sorted
 *  may be set in the metadata for this field.
 *
 *  In a field with Map type, the field has a child Struct field, which then
 *  has two children: key type and the second the value type. The names of the
 *  child fields may be respectively "entries", "key", and "value", but this is
 *  not enforced.
 *
 *  Map
 *  ```text
 *    - child[0] entries: Struct
 *      - child[0] key: K
 *      - child[1] value: V
 *  ```
 *  Neither the "entries" field nor the "key" field may be nullable.
 *
 *  The metadata is structured so that Arrow systems without special handling
 *  for Map can make Map an alias for List. The "layout" attribute for the Map
 *  field must have the same contents as a List. */
struct org_apache_arrow_flatbuf_Map_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Map_vec_len(org_apache_arrow_flatbuf_Map_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Map_table_t org_apache_arrow_flatbuf_Map_vec_at(org_apache_arrow_flatbuf_Map_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Map_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Map)

/**  Set to true if the keys within each value are sorted */
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Map, keysSorted, flatbuffers_bool, flatbuffers_bool_t, UINT8_C(0))

/**  A union is a complex type with children in Field
 *  By default ids in the type vector refer to the offsets in the children
 *  optionally typeIds provides an indirection between the child offset and the type id
 *  for each child `typeIds[offset]` is the id used in the type vector */
struct org_apache_arrow_flatbuf_Union_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Union_vec_len(org_apache_arrow_flatbuf_Union_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Union_table_t org_apache_arrow_flatbuf_Union_vec_at(org_apache_arrow_flatbuf_Union_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Union_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Union)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Union, mode, org_apache_arrow_flatbuf_UnionMode, org_apache_arrow_flatbuf_UnionMode_enum_t, INT16_C(0))
__flatbuffers_define_vector_field(1, org_apache_arrow_flatbuf_Union, typeIds, flatbuffers_int32_vec_t, 0)

struct org_apache_arrow_flatbuf_Int_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Int_vec_len(org_apache_arrow_flatbuf_Int_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Int_table_t org_apache_arrow_flatbuf_Int_vec_at(org_apache_arrow_flatbuf_Int_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Int_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Int)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Int, bitWidth, flatbuffers_int32, int32_t, INT32_C(0))
__flatbuffers_define_scalar_field(1, org_apache_arrow_flatbuf_Int, is_signed, flatbuffers_bool, flatbuffers_bool_t, UINT8_C(0))

struct org_apache_arrow_flatbuf_FloatingPoint_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_FloatingPoint_vec_len(org_apache_arrow_flatbuf_FloatingPoint_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_FloatingPoint_table_t org_apache_arrow_flatbuf_FloatingPoint_vec_at(org_apache_arrow_flatbuf_FloatingPoint_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_FloatingPoint_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_FloatingPoint)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_FloatingPoint, precision, org_apache_arrow_flatbuf_Precision, org_apache_arrow_flatbuf_Precision_enum_t, INT16_C(0))

/**  Unicode with UTF-8 encoding */
struct org_apache_arrow_flatbuf_Utf8_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Utf8_vec_len(org_apache_arrow_flatbuf_Utf8_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Utf8_table_t org_apache_arrow_flatbuf_Utf8_vec_at(org_apache_arrow_flatbuf_Utf8_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Utf8_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Utf8)


/**  Opaque binary data */
struct org_apache_arrow_flatbuf_Binary_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Binary_vec_len(org_apache_arrow_flatbuf_Binary_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Binary_table_t org_apache_arrow_flatbuf_Binary_vec_at(org_apache_arrow_flatbuf_Binary_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Binary_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Binary)


/**  Same as Utf8, but with 64-bit offsets, allowing to represent
 *  extremely large data values. */
struct org_apache_arrow_flatbuf_LargeUtf8_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_LargeUtf8_vec_len(org_apache_arrow_flatbuf_LargeUtf8_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_LargeUtf8_table_t org_apache_arrow_flatbuf_LargeUtf8_vec_at(org_apache_arrow_flatbuf_LargeUtf8_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_LargeUtf8_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_LargeUtf8)


/**  Same as Binary, but with 64-bit offsets, allowing to represent
 *  extremely large data values. */
struct org_apache_arrow_flatbuf_LargeBinary_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_LargeBinary_vec_len(org_apache_arrow_flatbuf_LargeBinary_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_LargeBinary_table_t org_apache_arrow_flatbuf_LargeBinary_vec_at(org_apache_arrow_flatbuf_LargeBinary_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_LargeBinary_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_LargeBinary)


struct org_apache_arrow_flatbuf_FixedSizeBinary_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_FixedSizeBinary_vec_len(org_apache_arrow_flatbuf_FixedSizeBinary_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_FixedSizeBinary_table_t org_apache_arrow_flatbuf_FixedSizeBinary_vec_at(org_apache_arrow_flatbuf_FixedSizeBinary_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_FixedSizeBinary_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_FixedSizeBinary)

/**  Number of bytes per value */
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_FixedSizeBinary, byteWidth, flatbuffers_int32, int32_t, INT32_C(0))

struct org_apache_arrow_flatbuf_Bool_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Bool_vec_len(org_apache_arrow_flatbuf_Bool_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Bool_table_t org_apache_arrow_flatbuf_Bool_vec_at(org_apache_arrow_flatbuf_Bool_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Bool_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Bool)


/**  Contains two child arrays, run_ends and values.
 *  The run_ends child array must be a 16/32/64-bit integer array
 *  which encodes the indices at which the run with the value in
 *  each corresponding index in the values child array ends.
 *  Like list/struct types, the value array can be of any type. */
struct org_apache_arrow_flatbuf_RunEndEncoded_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_RunEndEncoded_vec_len(org_apache_arrow_flatbuf_RunEndEncoded_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_RunEndEncoded_table_t org_apache_arrow_flatbuf_RunEndEncoded_vec_at(org_apache_arrow_flatbuf_RunEndEncoded_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_RunEndEncoded_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_RunEndEncoded)


/**  Exact decimal value represented as an integer value in two's
 *  complement. Currently only 128-bit (16-byte) and 256-bit (32-byte) integers
 *  are used. The representation uses the endianness indicated
 *  in the Schema. */
struct org_apache_arrow_flatbuf_Decimal_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Decimal_vec_len(org_apache_arrow_flatbuf_Decimal_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Decimal_table_t org_apache_arrow_flatbuf_Decimal_vec_at(org_apache_arrow_flatbuf_Decimal_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Decimal_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Decimal)

/**  Total number of decimal digits */
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Decimal, precision, flatbuffers_int32, int32_t, INT32_C(0))
/**  Number of digits after the decimal point "." */
__flatbuffers_define_scalar_field(1, org_apache_arrow_flatbuf_Decimal, scale, flatbuffers_int32, int32_t, INT32_C(0))
/**  Number of bits per value. The only accepted widths are 128 and 256.
 *  We use bitWidth for consistency with Int::bitWidth. */
__flatbuffers_define_scalar_field(2, org_apache_arrow_flatbuf_Decimal, bitWidth, flatbuffers_int32, int32_t, INT32_C(128))

/**  Date is either a 32-bit or 64-bit signed integer type representing an
 *  elapsed time since UNIX epoch (1970-01-01), stored in either of two units:
 *
 *  * Milliseconds (64 bits) indicating UNIX time elapsed since the epoch (no
 *    leap seconds), where the values are evenly divisible by 86400000
 *  * Days (32 bits) since the UNIX epoch */
struct org_apache_arrow_flatbuf_Date_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Date_vec_len(org_apache_arrow_flatbuf_Date_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Date_table_t org_apache_arrow_flatbuf_Date_vec_at(org_apache_arrow_flatbuf_Date_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Date_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Date)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Date, unit, org_apache_arrow_flatbuf_DateUnit, org_apache_arrow_flatbuf_DateUnit_enum_t, INT16_C(1))

/**  Time is either a 32-bit or 64-bit signed integer type representing an
 *  elapsed time since midnight, stored in either of four units: seconds,
 *  milliseconds, microseconds or nanoseconds.
 *
 *  The integer `bitWidth` depends on the `unit` and must be one of the following:
 *  * SECOND and MILLISECOND: 32 bits
 *  * MICROSECOND and NANOSECOND: 64 bits
 *
 *  The allowed values are between 0 (inclusive) and 86400 (=24*60*60) seconds
 *  (exclusive), adjusted for the time unit (for example, up to 86400000
 *  exclusive for the MILLISECOND unit).
 *  This definition doesn't allow for leap seconds. Time values from
 *  measurements with leap seconds will need to be corrected when ingesting
 *  into Arrow (for example by replacing the value 86400 with 86399). */
struct org_apache_arrow_flatbuf_Time_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Time_vec_len(org_apache_arrow_flatbuf_Time_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Time_table_t org_apache_arrow_flatbuf_Time_vec_at(org_apache_arrow_flatbuf_Time_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Time_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Time)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Time, unit, org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t, INT16_C(1))
__flatbuffers_define_scalar_field(1, org_apache_arrow_flatbuf_Time, bitWidth, flatbuffers_int32, int32_t, INT32_C(32))

/**  Timestamp is a 64-bit signed integer representing an elapsed time since a
 *  fixed epoch, stored in either of four units: seconds, milliseconds,
 *  microseconds or nanoseconds, and is optionally annotated with a timezone.
 *
 *  Timestamp values do not include any leap seconds (in other words, all
 *  days are considered 86400 seconds long).
 *
 *  Timestamps with a non-empty timezone
 *  ------------------------------------
 *
 *  If a Timestamp column has a non-empty timezone value, its epoch is
 *  1970-01-01 00:00:00 (January 1st 1970, midnight) in the *UTC* timezone
 *  (the Unix epoch), regardless of the Timestamp's own timezone.
 *
 *  Therefore, timestamp values with a non-empty timezone correspond to
 *  physical points in time together with some additional information about
 *  how the data was obtained and/or how to display it (the timezone).
 *
 *    For example, the timestamp value 0 with the timezone string "Europe/Paris"
 *    corresponds to "January 1st 1970, 00h00" in the UTC timezone, but the
 *    application may prefer to display it as "January 1st 1970, 01h00" in
 *    the Europe/Paris timezone (which is the same physical point in time).
 *
 *  One consequence is that timestamp values with a non-empty timezone
 *  can be compared and ordered directly, since they all share the same
 *  well-known point of reference (the Unix epoch).
 *
 *  Timestamps with an unset / empty timezone
 *  -----------------------------------------
 *
 *  If a Timestamp column has no timezone value, its epoch is
 *  1970-01-01 00:00:00 (January 1st 1970, midnight) in an *unknown* timezone.
 *
 *  Therefore, timestamp values without a timezone cannot be meaningfully
 *  interpreted as physical points in time, but only as calendar / clock
 *  indications ("wall clock time") in an unspecified timezone.
 *
 *    For example, the timestamp value 0 with an empty timezone string
 *    corresponds to "January 1st 1970, 00h00" in an unknown timezone: there
 *    is not enough information to interpret it as a well-defined physical
 *    point in time.
 *
 *  One consequence is that timestamp values without a timezone cannot
 *  be reliably compared or ordered, since they may have different points of
 *  reference.  In particular, it is *not* possible to interpret an unset
 *  or empty timezone as the same as "UTC".
 *
 *  Conversion between timezones
 *  ----------------------------
 *
 *  If a Timestamp column has a non-empty timezone, changing the timezone
 *  to a different non-empty value is a metadata-only operation:
 *  the timestamp values need not change as their point of reference remains
 *  the same (the Unix epoch).
 *
 *  However, if a Timestamp column has no timezone value, changing it to a
 *  non-empty value requires to think about the desired semantics.
 *  One possibility is to assume that the original timestamp values are
 *  relative to the epoch of the timezone being set; timestamp values should
 *  then adjusted to the Unix epoch (for example, changing the timezone from
 *  empty to "Europe/Paris" would require converting the timestamp values
 *  from "Europe/Paris" to "UTC", which seems counter-intuitive but is
 *  nevertheless correct).
 *
 *  Guidelines for encoding data from external libraries
 *  ----------------------------------------------------
 *
 *  Date & time libraries often have multiple different data types for temporal
 *  data. In order to ease interoperability between different implementations the
 *  Arrow project has some recommendations for encoding these types into a Timestamp
 *  column.
 *
 *  An "instant" represents a physical point in time that has no relevant timezone
 *  (for example, astronomical data). To encode an instant, use a Timestamp with
 *  the timezone string set to "UTC", and make sure the Timestamp values
 *  are relative to the UTC epoch (January 1st 1970, midnight).
 *
 *  A "zoned date-time" represents a physical point in time annotated with an
 *  informative timezone (for example, the timezone in which the data was
 *  recorded).  To encode a zoned date-time, use a Timestamp with the timezone
 *  string set to the name of the timezone, and make sure the Timestamp values
 *  are relative to the UTC epoch (January 1st 1970, midnight).
 *
 *   (There is some ambiguity between an instant and a zoned date-time with the
 *    UTC timezone.  Both of these are stored the same in Arrow.  Typically,
 *    this distinction does not matter.  If it does, then an application should
 *    use custom metadata or an extension type to distinguish between the two cases.)
 *
 *  An "offset date-time" represents a physical point in time combined with an
 *  explicit offset from UTC.  To encode an offset date-time, use a Timestamp
 *  with the timezone string set to the numeric timezone offset string
 *  (e.g. "+03:00"), and make sure the Timestamp values are relative to
 *  the UTC epoch (January 1st 1970, midnight).
 *
 *  A "naive date-time" (also called "local date-time" in some libraries)
 *  represents a wall clock time combined with a calendar date, but with
 *  no indication of how to map this information to a physical point in time.
 *  Naive date-times must be handled with care because of this missing
 *  information, and also because daylight saving time (DST) may make
 *  some values ambiguous or non-existent. A naive date-time may be
 *  stored as a struct with Date and Time fields. However, it may also be
 *  encoded into a Timestamp column with an empty timezone. The timestamp
 *  values should be computed "as if" the timezone of the date-time values
 *  was UTC; for example, the naive date-time "January 1st 1970, 00h00" would
 *  be encoded as timestamp value 0. */
struct org_apache_arrow_flatbuf_Timestamp_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Timestamp_vec_len(org_apache_arrow_flatbuf_Timestamp_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Timestamp_table_t org_apache_arrow_flatbuf_Timestamp_vec_at(org_apache_arrow_flatbuf_Timestamp_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Timestamp_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Timestamp)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Timestamp, unit, org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t, INT16_C(0))
/**  The timezone is an optional string indicating the name of a timezone,
 *  one of:
 *
 *  * As used in the Olson timezone database (the "tz database" or
 *    "tzdata"), such as "America/New_York".
 *  * An absolute timezone offset of the form "+XX:XX" or "-XX:XX",
 *    such as "+07:30".
 *
 *  Whether a timezone string is present indicates different semantics about
 *  the data (see above). */
__flatbuffers_define_string_field(1, org_apache_arrow_flatbuf_Timestamp, timezone, 0)

struct org_apache_arrow_flatbuf_Interval_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Interval_vec_len(org_apache_arrow_flatbuf_Interval_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Interval_table_t org_apache_arrow_flatbuf_Interval_vec_at(org_apache_arrow_flatbuf_Interval_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Interval_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Interval)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Interval, unit, org_apache_arrow_flatbuf_IntervalUnit, org_apache_arrow_flatbuf_IntervalUnit_enum_t, INT16_C(0))

struct org_apache_arrow_flatbuf_Duration_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Duration_vec_len(org_apache_arrow_flatbuf_Duration_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Duration_table_t org_apache_arrow_flatbuf_Duration_vec_at(org_apache_arrow_flatbuf_Duration_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Duration_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Duration)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Duration, unit, org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t, INT16_C(1))
/**  ----------------------------------------------------------------------
 *  Top-level Type value, enabling extensible type-specific metadata. We can
 *  add new logical types to Type without breaking backwards compatibility */
typedef uint8_t org_apache_arrow_flatbuf_Type_union_type_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_Type, org_apache_arrow_flatbuf_Type_union_type_t, 8)
__flatbuffers_define_union(flatbuffers_, org_apache_arrow_flatbuf_Type)
/**  ----------------------------------------------------------------------
 *  user defined key value pairs to add custom metadata to arrow
 *  key namespacing is the responsibility of the user */
#define org_apache_arrow_flatbuf_Type_NONE ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(0))
#define org_apache_arrow_flatbuf_Type_Null ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(1))
#define org_apache_arrow_flatbuf_Type_Int ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(2))
#define org_apache_arrow_flatbuf_Type_FloatingPoint ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(3))
#define org_apache_arrow_flatbuf_Type_Binary ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(4))
#define org_apache_arrow_flatbuf_Type_Utf8 ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(5))
#define org_apache_arrow_flatbuf_Type_Bool ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(6))
#define org_apache_arrow_flatbuf_Type_Decimal ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(7))
#define org_apache_arrow_flatbuf_Type_Date ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(8))
#define org_apache_arrow_flatbuf_Type_Time ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(9))
#define org_apache_arrow_flatbuf_Type_Timestamp ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(10))
#define org_apache_arrow_flatbuf_Type_Interval ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(11))
#define org_apache_arrow_flatbuf_Type_List ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(12))
#define org_apache_arrow_flatbuf_Type_Struct_ ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(13))
#define org_apache_arrow_flatbuf_Type_Union ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(14))
#define org_apache_arrow_flatbuf_Type_FixedSizeBinary ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(15))
#define org_apache_arrow_flatbuf_Type_FixedSizeList ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(16))
#define org_apache_arrow_flatbuf_Type_Map ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(17))
#define org_apache_arrow_flatbuf_Type_Duration ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(18))
#define org_apache_arrow_flatbuf_Type_LargeBinary ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(19))
#define org_apache_arrow_flatbuf_Type_LargeUtf8 ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(20))
#define org_apache_arrow_flatbuf_Type_LargeList ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(21))
#define org_apache_arrow_flatbuf_Type_RunEndEncoded ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(22))

static inline const char *org_apache_arrow_flatbuf_Type_type_name(org_apache_arrow_flatbuf_Type_union_type_t type)
{
    switch (type) {
    case org_apache_arrow_flatbuf_Type_NONE: return "NONE";
    case org_apache_arrow_flatbuf_Type_Null: return "Null";
    case org_apache_arrow_flatbuf_Type_Int: return "Int";
    case org_apache_arrow_flatbuf_Type_FloatingPoint: return "FloatingPoint";
    case org_apache_arrow_flatbuf_Type_Binary: return "Binary";
    case org_apache_arrow_flatbuf_Type_Utf8: return "Utf8";
    case org_apache_arrow_flatbuf_Type_Bool: return "Bool";
    case org_apache_arrow_flatbuf_Type_Decimal: return "Decimal";
    case org_apache_arrow_flatbuf_Type_Date: return "Date";
    case org_apache_arrow_flatbuf_Type_Time: return "Time";
    case org_apache_arrow_flatbuf_Type_Timestamp: return "Timestamp";
    case org_apache_arrow_flatbuf_Type_Interval: return "Interval";
    case org_apache_arrow_flatbuf_Type_List: return "List";
    case org_apache_arrow_flatbuf_Type_Struct_: return "Struct_";
    case org_apache_arrow_flatbuf_Type_Union: return "Union";
    case org_apache_arrow_flatbuf_Type_FixedSizeBinary: return "FixedSizeBinary";
    case org_apache_arrow_flatbuf_Type_FixedSizeList: return "FixedSizeList";
    case org_apache_arrow_flatbuf_Type_Map: return "Map";
    case org_apache_arrow_flatbuf_Type_Duration: return "Duration";
    case org_apache_arrow_flatbuf_Type_LargeBinary: return "LargeBinary";
    case org_apache_arrow_flatbuf_Type_LargeUtf8: return "LargeUtf8";
    case org_apache_arrow_flatbuf_Type_LargeList: return "LargeList";
    case org_apache_arrow_flatbuf_Type_RunEndEncoded: return "RunEndEncoded";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_Type_is_known_type(org_apache_arrow_flatbuf_Type_union_type_t type)
{
    switch (type) {
    case org_apache_arrow_flatbuf_Type_NONE: return 1;
    case org_apache_arrow_flatbuf_Type_Null: return 1;
    case org_apache_arrow_flatbuf_Type_Int: return 1;
    case org_apache_arrow_flatbuf_Type_FloatingPoint: return 1;
    case org_apache_arrow_flatbuf_Type_Binary: return 1;
    case org_apache_arrow_flatbuf_Type_Utf8: return 1;
    case org_apache_arrow_flatbuf_Type_Bool: return 1;
    case org_apache_arrow_flatbuf_Type_Decimal: return 1;
    case org_apache_arrow_flatbuf_Type_Date: return 1;
    case org_apache_arrow_flatbuf_Type_Time: return 1;
    case org_apache_arrow_flatbuf_Type_Timestamp: return 1;
    case org_apache_arrow_flatbuf_Type_Interval: return 1;
    case org_apache_arrow_flatbuf_Type_List: return 1;
    case org_apache_arrow_flatbuf_Type_Struct_: return 1;
    case org_apache_arrow_flatbuf_Type_Union: return 1;
    case org_apache_arrow_flatbuf_Type_FixedSizeBinary: return 1;
    case org_apache_arrow_flatbuf_Type_FixedSizeList: return 1;
    case org_apache_arrow_flatbuf_Type_Map: return 1;
    case org_apache_arrow_flatbuf_Type_Duration: return 1;
    case org_apache_arrow_flatbuf_Type_LargeBinary: return 1;
    case org_apache_arrow_flatbuf_Type_LargeUtf8: return 1;
    case org_apache_arrow_flatbuf_Type_LargeList: return 1;
    case org_apache_arrow_flatbuf_Type_RunEndEncoded: return 1;
    default: return 0;
    }
}


struct org_apache_arrow_flatbuf_KeyValue_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_KeyValue_vec_len(org_apache_arrow_flatbuf_KeyValue_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_KeyValue_table_t org_apache_arrow_flatbuf_KeyValue_vec_at(org_apache_arrow_flatbuf_KeyValue_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_KeyValue_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_KeyValue)

__flatbuffers_define_string_field(0, org_apache_arrow_flatbuf_KeyValue, key, 0)
__flatbuffers_define_string_field(1, org_apache_arrow_flatbuf_KeyValue, value, 0)

struct org_apache_arrow_flatbuf_DictionaryEncoding_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_DictionaryEncoding_vec_len(org_apache_arrow_flatbuf_DictionaryEncoding_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_DictionaryEncoding_table_t org_apache_arrow_flatbuf_DictionaryEncoding_vec_at(org_apache_arrow_flatbuf_DictionaryEncoding_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_DictionaryEncoding_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_DictionaryEncoding)

/**  The known dictionary id in the application where this data is used. In
 *  the file or streaming formats, the dictionary ids are found in the
 *  DictionaryBatch messages */
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_DictionaryEncoding, id, flatbuffers_int64, int64_t, INT64_C(0))
/**  The dictionary indices are constrained to be non-negative integers. If
 *  this field is null, the indices must be signed int32. To maximize
 *  cross-language compatibility and performance, implementations are
 *  recommended to prefer signed integer types over unsigned integer types
 *  and to avoid uint64 indices unless they are required by an application. */
__flatbuffers_define_table_field(1, org_apache_arrow_flatbuf_DictionaryEncoding, indexType, org_apache_arrow_flatbuf_Int_table_t, 0)
/**  By default, dictionaries are not ordered, or the order does not have
 *  semantic meaning. In some statistical, applications, dictionary-encoding
 *  is used to represent ordered categorical data, and we provide a way to
 *  preserve that metadata here */
__flatbuffers_define_scalar_field(2, org_apache_arrow_flatbuf_DictionaryEncoding, isOrdered, flatbuffers_bool, flatbuffers_bool_t, UINT8_C(0))
__flatbuffers_define_scalar_field(3, org_apache_arrow_flatbuf_DictionaryEncoding, dictionaryKind, org_apache_arrow_flatbuf_DictionaryKind, org_apache_arrow_flatbuf_DictionaryKind_enum_t, INT16_C(0))

/**  ----------------------------------------------------------------------
 *  A field represents a named column in a record / row batch or child of a
 *  nested type. */
struct org_apache_arrow_flatbuf_Field_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Field_vec_len(org_apache_arrow_flatbuf_Field_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Field_table_t org_apache_arrow_flatbuf_Field_vec_at(org_apache_arrow_flatbuf_Field_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Field_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Field)

/**  Name is not required, in i.e. a List */
__flatbuffers_define_string_field(0, org_apache_arrow_flatbuf_Field, name, 0)
/**  Whether or not this field can contain nulls. Should be true in general. */
__flatbuffers_define_scalar_field(1, org_apache_arrow_flatbuf_Field, nullable, flatbuffers_bool, flatbuffers_bool_t, UINT8_C(0))
/**  This is the type of the decoded value if the field is dictionary encoded. */
__flatbuffers_define_union_field(flatbuffers_, 3, org_apache_arrow_flatbuf_Field, type, org_apache_arrow_flatbuf_Type, 0)
/**  Present only if the field is dictionary encoded. */
__flatbuffers_define_table_field(4, org_apache_arrow_flatbuf_Field, dictionary, org_apache_arrow_flatbuf_DictionaryEncoding_table_t, 0)
/**  children apply only to nested data types like Struct, List and Union. For
 *  primitive types children will have length 0. */
__flatbuffers_define_vector_field(5, org_apache_arrow_flatbuf_Field, children, org_apache_arrow_flatbuf_Field_vec_t, 0)
/**  User-defined metadata */
__flatbuffers_define_vector_field(6, org_apache_arrow_flatbuf_Field, custom_metadata, org_apache_arrow_flatbuf_KeyValue_vec_t, 0)

/**  ----------------------------------------------------------------------
 *  A Schema describes the columns in a row batch */
struct org_apache_arrow_flatbuf_Schema_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Schema_vec_len(org_apache_arrow_flatbuf_Schema_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Schema_table_t org_apache_arrow_flatbuf_Schema_vec_at(org_apache_arrow_flatbuf_Schema_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Schema_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Schema)

/**  endianness of the buffer
 *  it is Little Endian by default
 *  if endianness doesn't match the underlying system then the vectors need to be converted */
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Schema, endianness, org_apache_arrow_flatbuf_Endianness, org_apache_arrow_flatbuf_Endianness_enum_t, INT16_C(0))
__flatbuffers_define_vector_field(1, org_apache_arrow_flatbuf_Schema, fields, org_apache_arrow_flatbuf_Field_vec_t, 0)
__flatbuffers_define_vector_field(2, org_apache_arrow_flatbuf_Schema, custom_metadata, org_apache_arrow_flatbuf_KeyValue_vec_t, 0)
/**  Features used in the stream/file. */
__flatbuffers_define_vector_field(3, org_apache_arrow_flatbuf_Schema, features, org_apache_arrow_flatbuf_Feature_vec_t, 0)


#include "flatcc/flatcc_epilogue.h"
#endif /* SCHEMA_READER_H */
#ifndef SCHEMA_BUILDER_H
#define SCHEMA_BUILDER_H

/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

#ifndef SCHEMA_READER_H
#include "Schema_reader.h"
#endif
#ifndef FLATBUFFERS_COMMON_BUILDER_H
#include "flatbuffers_common_builder.h"
#endif
#include "flatcc/flatcc_prologue.h"
#ifndef flatbuffers_identifier
#define flatbuffers_identifier 0
#endif
#ifndef flatbuffers_extension
#define flatbuffers_extension "bin"
#endif

#define __org_apache_arrow_flatbuf_MetadataVersion_formal_args , org_apache_arrow_flatbuf_MetadataVersion_enum_t v0
#define __org_apache_arrow_flatbuf_MetadataVersion_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_MetadataVersion, org_apache_arrow_flatbuf_MetadataVersion_enum_t)
#define __org_apache_arrow_flatbuf_Feature_formal_args , org_apache_arrow_flatbuf_Feature_enum_t v0
#define __org_apache_arrow_flatbuf_Feature_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_Feature, org_apache_arrow_flatbuf_Feature_enum_t)
#define __org_apache_arrow_flatbuf_UnionMode_formal_args , org_apache_arrow_flatbuf_UnionMode_enum_t v0
#define __org_apache_arrow_flatbuf_UnionMode_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_UnionMode, org_apache_arrow_flatbuf_UnionMode_enum_t)
#define __org_apache_arrow_flatbuf_Precision_formal_args , org_apache_arrow_flatbuf_Precision_enum_t v0
#define __org_apache_arrow_flatbuf_Precision_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_Precision, org_apache_arrow_flatbuf_Precision_enum_t)
#define __org_apache_arrow_flatbuf_DateUnit_formal_args , org_apache_arrow_flatbuf_DateUnit_enum_t v0
#define __org_apache_arrow_flatbuf_DateUnit_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_DateUnit, org_apache_arrow_flatbuf_DateUnit_enum_t)
#define __org_apache_arrow_flatbuf_TimeUnit_formal_args , org_apache_arrow_flatbuf_TimeUnit_enum_t v0
#define __org_apache_arrow_flatbuf_TimeUnit_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t)
#define __org_apache_arrow_flatbuf_IntervalUnit_formal_args , org_apache_arrow_flatbuf_IntervalUnit_enum_t v0
#define __org_apache_arrow_flatbuf_IntervalUnit_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_IntervalUnit, org_apache_arrow_flatbuf_IntervalUnit_enum_t)
#define __org_apache_arrow_flatbuf_DictionaryKind_formal_args , org_apache_arrow_flatbuf_DictionaryKind_enum_t v0
#define __org_apache_arrow_flatbuf_DictionaryKind_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_DictionaryKind, org_apache_arrow_flatbuf_DictionaryKind_enum_t)
#define __org_apache_arrow_flatbuf_Endianness_formal_args , org_apache_arrow_flatbuf_Endianness_enum_t v0
#define __org_apache_arrow_flatbuf_Endianness_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_Endianness, org_apache_arrow_flatbuf_Endianness_enum_t)

#define __org_apache_arrow_flatbuf_Buffer_formal_args , int64_t v0, int64_t v1
#define __org_apache_arrow_flatbuf_Buffer_call_args , v0, v1
static inline org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_assign(org_apache_arrow_flatbuf_Buffer_t *p, int64_t v0, int64_t v1)
{ p->offset = v0; p->length = v1;
  return p; }
static inline org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_copy(org_apache_arrow_flatbuf_Buffer_t *p, const org_apache_arrow_flatbuf_Buffer_t *p2)
{ p->offset = p2->offset; p->length = p2->length;
  return p; }
static inline org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_assign_to_pe(org_apache_arrow_flatbuf_Buffer_t *p, int64_t v0, int64_t v1)
{ flatbuffers_int64_assign_to_pe(&p->offset, v0); flatbuffers_int64_assign_to_pe(&p->length, v1);
  return p; }
static inline org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_copy_to_pe(org_apache_arrow_flatbuf_Buffer_t *p, const org_apache_arrow_flatbuf_Buffer_t *p2)
{ flatbuffers_int64_copy_to_pe(&p->offset, &p2->offset); flatbuffers_int64_copy_to_pe(&p->length, &p2->length);
  return p; }
static inline org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_assign_from_pe(org_apache_arrow_flatbuf_Buffer_t *p, int64_t v0, int64_t v1)
{ flatbuffers_int64_assign_from_pe(&p->offset, v0); flatbuffers_int64_assign_from_pe(&p->length, v1);
  return p; }
static inline org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_copy_from_pe(org_apache_arrow_flatbuf_Buffer_t *p, const org_apache_arrow_flatbuf_Buffer_t *p2)
{ flatbuffers_int64_copy_from_pe(&p->offset, &p2->offset); flatbuffers_int64_copy_from_pe(&p->length, &p2->length);
  return p; }
__flatbuffers_build_struct(flatbuffers_, org_apache_arrow_flatbuf_Buffer, 16, 8, org_apache_arrow_flatbuf_Buffer_file_identifier, org_apache_arrow_flatbuf_Buffer_type_identifier)
__flatbuffers_define_fixed_array_primitives(flatbuffers_, org_apache_arrow_flatbuf_Buffer, org_apache_arrow_flatbuf_Buffer_t)

typedef flatbuffers_union_ref_t org_apache_arrow_flatbuf_Type_union_ref_t;
typedef flatbuffers_union_vec_ref_t org_apache_arrow_flatbuf_Type_union_vec_ref_t;
static org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Type_union_t t);

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Null_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Null_ref_t;
static org_apache_arrow_flatbuf_Null_ref_t org_apache_arrow_flatbuf_Null_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Null_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Null, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Struct__required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Struct__ref_t;
static org_apache_arrow_flatbuf_Struct__ref_t org_apache_arrow_flatbuf_Struct__clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Struct__table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Struct_, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_List_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_List_ref_t;
static org_apache_arrow_flatbuf_List_ref_t org_apache_arrow_flatbuf_List_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_List_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_List, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_LargeList_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_LargeList_ref_t;
static org_apache_arrow_flatbuf_LargeList_ref_t org_apache_arrow_flatbuf_LargeList_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_LargeList_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_LargeList, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_FixedSizeList_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_FixedSizeList_ref_t;
static org_apache_arrow_flatbuf_FixedSizeList_ref_t org_apache_arrow_flatbuf_FixedSizeList_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_FixedSizeList_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_FixedSizeList, 1)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Map_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Map_ref_t;
static org_apache_arrow_flatbuf_Map_ref_t org_apache_arrow_flatbuf_Map_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Map_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Map, 1)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Union_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Union_ref_t;
static org_apache_arrow_flatbuf_Union_ref_t org_apache_arrow_flatbuf_Union_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Union_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Union, 2)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Int_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Int_ref_t;
static org_apache_arrow_flatbuf_Int_ref_t org_apache_arrow_flatbuf_Int_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Int_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Int, 2)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_FloatingPoint_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_FloatingPoint_ref_t;
static org_apache_arrow_flatbuf_FloatingPoint_ref_t org_apache_arrow_flatbuf_FloatingPoint_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_FloatingPoint_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_FloatingPoint, 1)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Utf8_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Utf8_ref_t;
static org_apache_arrow_flatbuf_Utf8_ref_t org_apache_arrow_flatbuf_Utf8_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Utf8_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Utf8, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Binary_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Binary_ref_t;
static org_apache_arrow_flatbuf_Binary_ref_t org_apache_arrow_flatbuf_Binary_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Binary_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Binary, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_LargeUtf8_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_LargeUtf8_ref_t;
static org_apache_arrow_flatbuf_LargeUtf8_ref_t org_apache_arrow_flatbuf_LargeUtf8_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_LargeUtf8_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_LargeUtf8, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_LargeBinary_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_LargeBinary_ref_t;
static org_apache_arrow_flatbuf_LargeBinary_ref_t org_apache_arrow_flatbuf_LargeBinary_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_LargeBinary_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_LargeBinary, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_FixedSizeBinary_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_FixedSizeBinary_ref_t;
static org_apache_arrow_flatbuf_FixedSizeBinary_ref_t org_apache_arrow_flatbuf_FixedSizeBinary_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_FixedSizeBinary_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_FixedSizeBinary, 1)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Bool_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Bool_ref_t;
static org_apache_arrow_flatbuf_Bool_ref_t org_apache_arrow_flatbuf_Bool_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Bool_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Bool, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_RunEndEncoded_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_RunEndEncoded_ref_t;
static org_apache_arrow_flatbuf_RunEndEncoded_ref_t org_apache_arrow_flatbuf_RunEndEncoded_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_RunEndEncoded_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_RunEndEncoded, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Decimal_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Decimal_ref_t;
static org_apache_arrow_flatbuf_Decimal_ref_t org_apache_arrow_flatbuf_Decimal_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Decimal_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Decimal, 3)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Date_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Date_ref_t;
static org_apache_arrow_flatbuf_Date_ref_t org_apache_arrow_flatbuf_Date_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Date_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Date, 1)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Time_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Time_ref_t;
static org_apache_arrow_flatbuf_Time_ref_t org_apache_arrow_flatbuf_Time_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Time_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Time, 2)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Timestamp_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Timestamp_ref_t;
static org_apache_arrow_flatbuf_Timestamp_ref_t org_apache_arrow_flatbuf_Timestamp_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Timestamp_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Timestamp, 2)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Interval_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Interval_ref_t;
static org_apache_arrow_flatbuf_Interval_ref_t org_apache_arrow_flatbuf_Interval_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Interval_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Interval, 1)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Duration_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Duration_ref_t;
static org_apache_arrow_flatbuf_Duration_ref_t org_apache_arrow_flatbuf_Duration_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Duration_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Duration, 1)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_KeyValue_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_KeyValue_ref_t;
static org_apache_arrow_flatbuf_KeyValue_ref_t org_apache_arrow_flatbuf_KeyValue_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_KeyValue_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_KeyValue, 2)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_DictionaryEncoding_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_DictionaryEncoding_ref_t;
static org_apache_arrow_flatbuf_DictionaryEncoding_ref_t org_apache_arrow_flatbuf_DictionaryEncoding_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_DictionaryEncoding_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_DictionaryEncoding, 4)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Field_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Field_ref_t;
static org_apache_arrow_flatbuf_Field_ref_t org_apache_arrow_flatbuf_Field_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Field_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Field, 7)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Schema_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Schema_ref_t;
static org_apache_arrow_flatbuf_Schema_ref_t org_apache_arrow_flatbuf_Schema_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Schema_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Schema, 4)

#define __org_apache_arrow_flatbuf_Null_formal_args
#define __org_apache_arrow_flatbuf_Null_call_args
static inline org_apache_arrow_flatbuf_Null_ref_t org_apache_arrow_flatbuf_Null_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Null_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Null, org_apache_arrow_flatbuf_Null_file_identifier, org_apache_arrow_flatbuf_Null_type_identifier)

#define __org_apache_arrow_flatbuf_Struct__formal_args
#define __org_apache_arrow_flatbuf_Struct__call_args
static inline org_apache_arrow_flatbuf_Struct__ref_t org_apache_arrow_flatbuf_Struct__create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Struct__formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Struct_, org_apache_arrow_flatbuf_Struct__file_identifier, org_apache_arrow_flatbuf_Struct__type_identifier)

#define __org_apache_arrow_flatbuf_List_formal_args
#define __org_apache_arrow_flatbuf_List_call_args
static inline org_apache_arrow_flatbuf_List_ref_t org_apache_arrow_flatbuf_List_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_List_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_List, org_apache_arrow_flatbuf_List_file_identifier, org_apache_arrow_flatbuf_List_type_identifier)

#define __org_apache_arrow_flatbuf_LargeList_formal_args
#define __org_apache_arrow_flatbuf_LargeList_call_args
static inline org_apache_arrow_flatbuf_LargeList_ref_t org_apache_arrow_flatbuf_LargeList_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_LargeList_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_LargeList, org_apache_arrow_flatbuf_LargeList_file_identifier, org_apache_arrow_flatbuf_LargeList_type_identifier)

#define __org_apache_arrow_flatbuf_FixedSizeList_formal_args , int32_t v0
#define __org_apache_arrow_flatbuf_FixedSizeList_call_args , v0
static inline org_apache_arrow_flatbuf_FixedSizeList_ref_t org_apache_arrow_flatbuf_FixedSizeList_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_FixedSizeList_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_FixedSizeList, org_apache_arrow_flatbuf_FixedSizeList_file_identifier, org_apache_arrow_flatbuf_FixedSizeList_type_identifier)

#define __org_apache_arrow_flatbuf_Map_formal_args , flatbuffers_bool_t v0
#define __org_apache_arrow_flatbuf_Map_call_args , v0
static inline org_apache_arrow_flatbuf_Map_ref_t org_apache_arrow_flatbuf_Map_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Map_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Map, org_apache_arrow_flatbuf_Map_file_identifier, org_apache_arrow_flatbuf_Map_type_identifier)

#define __org_apache_arrow_flatbuf_Union_formal_args , org_apache_arrow_flatbuf_UnionMode_enum_t v0, flatbuffers_int32_vec_ref_t v1
#define __org_apache_arrow_flatbuf_Union_call_args , v0, v1
static inline org_apache_arrow_flatbuf_Union_ref_t org_apache_arrow_flatbuf_Union_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Union_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Union, org_apache_arrow_flatbuf_Union_file_identifier, org_apache_arrow_flatbuf_Union_type_identifier)

#define __org_apache_arrow_flatbuf_Int_formal_args , int32_t v0, flatbuffers_bool_t v1
#define __org_apache_arrow_flatbuf_Int_call_args , v0, v1
static inline org_apache_arrow_flatbuf_Int_ref_t org_apache_arrow_flatbuf_Int_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Int_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Int, org_apache_arrow_flatbuf_Int_file_identifier, org_apache_arrow_flatbuf_Int_type_identifier)

#define __org_apache_arrow_flatbuf_FloatingPoint_formal_args , org_apache_arrow_flatbuf_Precision_enum_t v0
#define __org_apache_arrow_flatbuf_FloatingPoint_call_args , v0
static inline org_apache_arrow_flatbuf_FloatingPoint_ref_t org_apache_arrow_flatbuf_FloatingPoint_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_FloatingPoint_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_FloatingPoint, org_apache_arrow_flatbuf_FloatingPoint_file_identifier, org_apache_arrow_flatbuf_FloatingPoint_type_identifier)

#define __org_apache_arrow_flatbuf_Utf8_formal_args
#define __org_apache_arrow_flatbuf_Utf8_call_args
static inline org_apache_arrow_flatbuf_Utf8_ref_t org_apache_arrow_flatbuf_Utf8_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Utf8_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Utf8, org_apache_arrow_flatbuf_Utf8_file_identifier, org_apache_arrow_flatbuf_Utf8_type_identifier)

#define __org_apache_arrow_flatbuf_Binary_formal_args
#define __org_apache_arrow_flatbuf_Binary_call_args
static inline org_apache_arrow_flatbuf_Binary_ref_t org_apache_arrow_flatbuf_Binary_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Binary_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Binary, org_apache_arrow_flatbuf_Binary_file_identifier, org_apache_arrow_flatbuf_Binary_type_identifier)

#define __org_apache_arrow_flatbuf_LargeUtf8_formal_args
#define __org_apache_arrow_flatbuf_LargeUtf8_call_args
static inline org_apache_arrow_flatbuf_LargeUtf8_ref_t org_apache_arrow_flatbuf_LargeUtf8_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_LargeUtf8_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_LargeUtf8, org_apache_arrow_flatbuf_LargeUtf8_file_identifier, org_apache_arrow_flatbuf_LargeUtf8_type_identifier)

#define __org_apache_arrow_flatbuf_LargeBinary_formal_args
#define __org_apache_arrow_flatbuf_LargeBinary_call_args
static inline org_apache_arrow_flatbuf_LargeBinary_ref_t org_apache_arrow_flatbuf_LargeBinary_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_LargeBinary_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_LargeBinary, org_apache_arrow_flatbuf_LargeBinary_file_identifier, org_apache_arrow_flatbuf_LargeBinary_type_identifier)

#define __org_apache_arrow_flatbuf_FixedSizeBinary_formal_args , int32_t v0
#define __org_apache_arrow_flatbuf_FixedSizeBinary_call_args , v0
static inline org_apache_arrow_flatbuf_FixedSizeBinary_ref_t org_apache_arrow_flatbuf_FixedSizeBinary_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_FixedSizeBinary_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_FixedSizeBinary, org_apache_arrow_flatbuf_FixedSizeBinary_file_identifier, org_apache_arrow_flatbuf_FixedSizeBinary_type_identifier)

#define __org_apache_arrow_flatbuf_Bool_formal_args
#define __org_apache_arrow_flatbuf_Bool_call_args
static inline org_apache_arrow_flatbuf_Bool_ref_t org_apache_arrow_flatbuf_Bool_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Bool_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Bool, org_apache_arrow_flatbuf_Bool_file_identifier, org_apache_arrow_flatbuf_Bool_type_identifier)

#define __org_apache_arrow_flatbuf_RunEndEncoded_formal_args
#define __org_apache_arrow_flatbuf_RunEndEncoded_call_args
static inline org_apache_arrow_flatbuf_RunEndEncoded_ref_t org_apache_arrow_flatbuf_RunEndEncoded_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_RunEndEncoded_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_RunEndEncoded, org_apache_arrow_flatbuf_RunEndEncoded_file_identifier, org_apache_arrow_flatbuf_RunEndEncoded_type_identifier)

#define __org_apache_arrow_flatbuf_Decimal_formal_args , int32_t v0, int32_t v1, int32_t v2
#define __org_apache_arrow_flatbuf_Decimal_call_args , v0, v1, v2
static inline org_apache_arrow_flatbuf_Decimal_ref_t org_apache_arrow_flatbuf_Decimal_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Decimal_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Decimal, org_apache_arrow_flatbuf_Decimal_file_identifier, org_apache_arrow_flatbuf_Decimal_type_identifier)

#define __org_apache_arrow_flatbuf_Date_formal_args , org_apache_arrow_flatbuf_DateUnit_enum_t v0
#define __org_apache_arrow_flatbuf_Date_call_args , v0
static inline org_apache_arrow_flatbuf_Date_ref_t org_apache_arrow_flatbuf_Date_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Date_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Date, org_apache_arrow_flatbuf_Date_file_identifier, org_apache_arrow_flatbuf_Date_type_identifier)

#define __org_apache_arrow_flatbuf_Time_formal_args , org_apache_arrow_flatbuf_TimeUnit_enum_t v0, int32_t v1
#define __org_apache_arrow_flatbuf_Time_call_args , v0, v1
static inline org_apache_arrow_flatbuf_Time_ref_t org_apache_arrow_flatbuf_Time_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Time_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Time, org_apache_arrow_flatbuf_Time_file_identifier, org_apache_arrow_flatbuf_Time_type_identifier)

#define __org_apache_arrow_flatbuf_Timestamp_formal_args , org_apache_arrow_flatbuf_TimeUnit_enum_t v0, flatbuffers_string_ref_t v1
#define __org_apache_arrow_flatbuf_Timestamp_call_args , v0, v1
static inline org_apache_arrow_flatbuf_Timestamp_ref_t org_apache_arrow_flatbuf_Timestamp_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Timestamp_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Timestamp, org_apache_arrow_flatbuf_Timestamp_file_identifier, org_apache_arrow_flatbuf_Timestamp_type_identifier)

#define __org_apache_arrow_flatbuf_Interval_formal_args , org_apache_arrow_flatbuf_IntervalUnit_enum_t v0
#define __org_apache_arrow_flatbuf_Interval_call_args , v0
static inline org_apache_arrow_flatbuf_Interval_ref_t org_apache_arrow_flatbuf_Interval_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Interval_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Interval, org_apache_arrow_flatbuf_Interval_file_identifier, org_apache_arrow_flatbuf_Interval_type_identifier)

#define __org_apache_arrow_flatbuf_Duration_formal_args , org_apache_arrow_flatbuf_TimeUnit_enum_t v0
#define __org_apache_arrow_flatbuf_Duration_call_args , v0
static inline org_apache_arrow_flatbuf_Duration_ref_t org_apache_arrow_flatbuf_Duration_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Duration_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Duration, org_apache_arrow_flatbuf_Duration_file_identifier, org_apache_arrow_flatbuf_Duration_type_identifier)

#define __org_apache_arrow_flatbuf_KeyValue_formal_args , flatbuffers_string_ref_t v0, flatbuffers_string_ref_t v1
#define __org_apache_arrow_flatbuf_KeyValue_call_args , v0, v1
static inline org_apache_arrow_flatbuf_KeyValue_ref_t org_apache_arrow_flatbuf_KeyValue_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_KeyValue_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_KeyValue, org_apache_arrow_flatbuf_KeyValue_file_identifier, org_apache_arrow_flatbuf_KeyValue_type_identifier)

#define __org_apache_arrow_flatbuf_DictionaryEncoding_formal_args , int64_t v0, org_apache_arrow_flatbuf_Int_ref_t v1, flatbuffers_bool_t v2, org_apache_arrow_flatbuf_DictionaryKind_enum_t v3
#define __org_apache_arrow_flatbuf_DictionaryEncoding_call_args , v0, v1, v2, v3
static inline org_apache_arrow_flatbuf_DictionaryEncoding_ref_t org_apache_arrow_flatbuf_DictionaryEncoding_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_DictionaryEncoding_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_DictionaryEncoding, org_apache_arrow_flatbuf_DictionaryEncoding_file_identifier, org_apache_arrow_flatbuf_DictionaryEncoding_type_identifier)

#define __org_apache_arrow_flatbuf_Field_formal_args ,\
  flatbuffers_string_ref_t v0, flatbuffers_bool_t v1, org_apache_arrow_flatbuf_Type_union_ref_t v3, org_apache_arrow_flatbuf_DictionaryEncoding_ref_t v4, org_apache_arrow_flatbuf_Field_vec_ref_t v5, org_apache_arrow_flatbuf_KeyValue_vec_ref_t v6
#define __org_apache_arrow_flatbuf_Field_call_args ,\
  v0, v1, v3, v4, v5, v6
static inline org_apache_arrow_flatbuf_Field_ref_t org_apache_arrow_flatbuf_Field_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Field_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Field, org_apache_arrow_flatbuf_Field_file_identifier, org_apache_arrow_flatbuf_Field_type_identifier)

#define __org_apache_arrow_flatbuf_Schema_formal_args , org_apache_arrow_flatbuf_Endianness_enum_t v0, org_apache_arrow_flatbuf_Field_vec_ref_t v1, org_apache_arrow_flatbuf_KeyValue_vec_ref_t v2, org_apache_arrow_flatbuf_Feature_vec_ref_t v3
#define __org_apache_arrow_flatbuf_Schema_call_args , v0, v1, v2, v3
static inline org_apache_arrow_flatbuf_Schema_ref_t org_apache_arrow_flatbuf_Schema_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Schema_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Schema, org_apache_arrow_flatbuf_Schema_file_identifier, org_apache_arrow_flatbuf_Schema_type_identifier)

static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_NONE(void)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_NONE; uref.value = 0; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Null(org_apache_arrow_flatbuf_Null_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Null; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Int(org_apache_arrow_flatbuf_Int_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Int; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_FloatingPoint(org_apache_arrow_flatbuf_FloatingPoint_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_FloatingPoint; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Binary(org_apache_arrow_flatbuf_Binary_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Binary; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Utf8(org_apache_arrow_flatbuf_Utf8_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Utf8; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Bool(org_apache_arrow_flatbuf_Bool_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Bool; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Decimal(org_apache_arrow_flatbuf_Decimal_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Decimal; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Date(org_apache_arrow_flatbuf_Date_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Date; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Time(org_apache_arrow_flatbuf_Time_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Time; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Timestamp(org_apache_arrow_flatbuf_Timestamp_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Timestamp; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Interval(org_apache_arrow_flatbuf_Interval_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Interval; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_List(org_apache_arrow_flatbuf_List_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_List; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Struct_(org_apache_arrow_flatbuf_Struct__ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Struct_; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Union(org_apache_arrow_flatbuf_Union_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Union; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_FixedSizeBinary(org_apache_arrow_flatbuf_FixedSizeBinary_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_FixedSizeBinary; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_FixedSizeList(org_apache_arrow_flatbuf_FixedSizeList_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_FixedSizeList; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Map(org_apache_arrow_flatbuf_Map_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Map; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Duration(org_apache_arrow_flatbuf_Duration_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Duration; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_LargeBinary(org_apache_arrow_flatbuf_LargeBinary_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_LargeBinary; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_LargeUtf8(org_apache_arrow_flatbuf_LargeUtf8_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_LargeUtf8; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_LargeList(org_apache_arrow_flatbuf_LargeList_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_LargeList; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_RunEndEncoded(org_apache_arrow_flatbuf_RunEndEncoded_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_RunEndEncoded; uref.value = ref; return uref; }
__flatbuffers_build_union_vector(flatbuffers_, org_apache_arrow_flatbuf_Type)

static org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Type_union_t u)
{
    switch (u.type) {
    case 1: return org_apache_arrow_flatbuf_Type_as_Null(org_apache_arrow_flatbuf_Null_clone(B, (org_apache_arrow_flatbuf_Null_table_t)u.value));
    case 2: return org_apache_arrow_flatbuf_Type_as_Int(org_apache_arrow_flatbuf_Int_clone(B, (org_apache_arrow_flatbuf_Int_table_t)u.value));
    case 3: return org_apache_arrow_flatbuf_Type_as_FloatingPoint(org_apache_arrow_flatbuf_FloatingPoint_clone(B, (org_apache_arrow_flatbuf_FloatingPoint_table_t)u.value));
    case 4: return org_apache_arrow_flatbuf_Type_as_Binary(org_apache_arrow_flatbuf_Binary_clone(B, (org_apache_arrow_flatbuf_Binary_table_t)u.value));
    case 5: return org_apache_arrow_flatbuf_Type_as_Utf8(org_apache_arrow_flatbuf_Utf8_clone(B, (org_apache_arrow_flatbuf_Utf8_table_t)u.value));
    case 6: return org_apache_arrow_flatbuf_Type_as_Bool(org_apache_arrow_flatbuf_Bool_clone(B, (org_apache_arrow_flatbuf_Bool_table_t)u.value));
    case 7: return org_apache_arrow_flatbuf_Type_as_Decimal(org_apache_arrow_flatbuf_Decimal_clone(B, (org_apache_arrow_flatbuf_Decimal_table_t)u.value));
    case 8: return org_apache_arrow_flatbuf_Type_as_Date(org_apache_arrow_flatbuf_Date_clone(B, (org_apache_arrow_flatbuf_Date_table_t)u.value));
    case 9: return org_apache_arrow_flatbuf_Type_as_Time(org_apache_arrow_flatbuf_Time_clone(B, (org_apache_arrow_flatbuf_Time_table_t)u.value));
    case 10: return org_apache_arrow_flatbuf_Type_as_Timestamp(org_apache_arrow_flatbuf_Timestamp_clone(B, (org_apache_arrow_flatbuf_Timestamp_table_t)u.value));
    case 11: return org_apache_arrow_flatbuf_Type_as_Interval(org_apache_arrow_flatbuf_Interval_clone(B, (org_apache_arrow_flatbuf_Interval_table_t)u.value));
    case 12: return org_apache_arrow_flatbuf_Type_as_List(org_apache_arrow_flatbuf_List_clone(B, (org_apache_arrow_flatbuf_List_table_t)u.value));
    case 13: return org_apache_arrow_flatbuf_Type_as_Struct_(org_apache_arrow_flatbuf_Struct__clone(B, (org_apache_arrow_flatbuf_Struct__table_t)u.value));
    case 14: return org_apache_arrow_flatbuf_Type_as_Union(org_apache_arrow_flatbuf_Union_clone(B, (org_apache_arrow_flatbuf_Union_table_t)u.value));
    case 15: return org_apache_arrow_flatbuf_Type_as_FixedSizeBinary(org_apache_arrow_flatbuf_FixedSizeBinary_clone(B, (org_apache_arrow_flatbuf_FixedSizeBinary_table_t)u.value));
    case 16: return org_apache_arrow_flatbuf_Type_as_FixedSizeList(org_apache_arrow_flatbuf_FixedSizeList_clone(B, (org_apache_arrow_flatbuf_FixedSizeList_table_t)u.value));
    case 17: return org_apache_arrow_flatbuf_Type_as_Map(org_apache_arrow_flatbuf_Map_clone(B, (org_apache_arrow_flatbuf_Map_table_t)u.value));
    case 18: return org_apache_arrow_flatbuf_Type_as_Duration(org_apache_arrow_flatbuf_Duration_clone(B, (org_apache_arrow_flatbuf_Duration_table_t)u.value));
    case 19: return org_apache_arrow_flatbuf_Type_as_LargeBinary(org_apache_arrow_flatbuf_LargeBinary_clone(B, (org_apache_arrow_flatbuf_LargeBinary_table_t)u.value));
    case 20: return org_apache_arrow_flatbuf_Type_as_LargeUtf8(org_apache_arrow_flatbuf_LargeUtf8_clone(B, (org_apache_arrow_flatbuf_LargeUtf8_table_t)u.value));
    case 21: return org_apache_arrow_flatbuf_Type_as_LargeList(org_apache_arrow_flatbuf_LargeList_clone(B, (org_apache_arrow_flatbuf_LargeList_table_t)u.value));
    case 22: return org_apache_arrow_flatbuf_Type_as_RunEndEncoded(org_apache_arrow_flatbuf_RunEndEncoded_clone(B, (org_apache_arrow_flatbuf_RunEndEncoded_table_t)u.value));
    default: return org_apache_arrow_flatbuf_Type_as_NONE();
    }
}


static inline org_apache_arrow_flatbuf_Null_ref_t org_apache_arrow_flatbuf_Null_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Null_formal_args)
{
    if (org_apache_arrow_flatbuf_Null_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Null_end(B);
}

static org_apache_arrow_flatbuf_Null_ref_t org_apache_arrow_flatbuf_Null_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Null_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Null_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Null_end(B));
}


static inline org_apache_arrow_flatbuf_Struct__ref_t org_apache_arrow_flatbuf_Struct__create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Struct__formal_args)
{
    if (org_apache_arrow_flatbuf_Struct__start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Struct__end(B);
}

static org_apache_arrow_flatbuf_Struct__ref_t org_apache_arrow_flatbuf_Struct__clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Struct__table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Struct__start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Struct__end(B));
}


static inline org_apache_arrow_flatbuf_List_ref_t org_apache_arrow_flatbuf_List_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_List_formal_args)
{
    if (org_apache_arrow_flatbuf_List_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_List_end(B);
}

static org_apache_arrow_flatbuf_List_ref_t org_apache_arrow_flatbuf_List_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_List_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_List_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_List_end(B));
}


static inline org_apache_arrow_flatbuf_LargeList_ref_t org_apache_arrow_flatbuf_LargeList_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_LargeList_formal_args)
{
    if (org_apache_arrow_flatbuf_LargeList_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_LargeList_end(B);
}

static org_apache_arrow_flatbuf_LargeList_ref_t org_apache_arrow_flatbuf_LargeList_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_LargeList_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_LargeList_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_LargeList_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_FixedSizeList_listSize, flatbuffers_int32, int32_t, 4, 4, INT32_C(0), org_apache_arrow_flatbuf_FixedSizeList)

static inline org_apache_arrow_flatbuf_FixedSizeList_ref_t org_apache_arrow_flatbuf_FixedSizeList_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_FixedSizeList_formal_args)
{
    if (org_apache_arrow_flatbuf_FixedSizeList_start(B)
        || org_apache_arrow_flatbuf_FixedSizeList_listSize_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_FixedSizeList_end(B);
}

static org_apache_arrow_flatbuf_FixedSizeList_ref_t org_apache_arrow_flatbuf_FixedSizeList_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_FixedSizeList_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_FixedSizeList_start(B)
        || org_apache_arrow_flatbuf_FixedSizeList_listSize_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_FixedSizeList_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Map_keysSorted, flatbuffers_bool, flatbuffers_bool_t, 1, 1, UINT8_C(0), org_apache_arrow_flatbuf_Map)

static inline org_apache_arrow_flatbuf_Map_ref_t org_apache_arrow_flatbuf_Map_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Map_formal_args)
{
    if (org_apache_arrow_flatbuf_Map_start(B)
        || org_apache_arrow_flatbuf_Map_keysSorted_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Map_end(B);
}

static org_apache_arrow_flatbuf_Map_ref_t org_apache_arrow_flatbuf_Map_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Map_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Map_start(B)
        || org_apache_arrow_flatbuf_Map_keysSorted_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Map_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Union_mode, org_apache_arrow_flatbuf_UnionMode, org_apache_arrow_flatbuf_UnionMode_enum_t, 2, 2, INT16_C(0), org_apache_arrow_flatbuf_Union)
__flatbuffers_build_vector_field(1, flatbuffers_, org_apache_arrow_flatbuf_Union_typeIds, flatbuffers_int32, int32_t, org_apache_arrow_flatbuf_Union)

static inline org_apache_arrow_flatbuf_Union_ref_t org_apache_arrow_flatbuf_Union_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Union_formal_args)
{
    if (org_apache_arrow_flatbuf_Union_start(B)
        || org_apache_arrow_flatbuf_Union_typeIds_add(B, v1)
        || org_apache_arrow_flatbuf_Union_mode_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Union_end(B);
}

static org_apache_arrow_flatbuf_Union_ref_t org_apache_arrow_flatbuf_Union_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Union_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Union_start(B)
        || org_apache_arrow_flatbuf_Union_typeIds_pick(B, t)
        || org_apache_arrow_flatbuf_Union_mode_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Union_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Int_bitWidth, flatbuffers_int32, int32_t, 4, 4, INT32_C(0), org_apache_arrow_flatbuf_Int)
__flatbuffers_build_scalar_field(1, flatbuffers_, org_apache_arrow_flatbuf_Int_is_signed, flatbuffers_bool, flatbuffers_bool_t, 1, 1, UINT8_C(0), org_apache_arrow_flatbuf_Int)

static inline org_apache_arrow_flatbuf_Int_ref_t org_apache_arrow_flatbuf_Int_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Int_formal_args)
{
    if (org_apache_arrow_flatbuf_Int_start(B)
        || org_apache_arrow_flatbuf_Int_bitWidth_add(B, v0)
        || org_apache_arrow_flatbuf_Int_is_signed_add(B, v1)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Int_end(B);
}

static org_apache_arrow_flatbuf_Int_ref_t org_apache_arrow_flatbuf_Int_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Int_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Int_start(B)
        || org_apache_arrow_flatbuf_Int_bitWidth_pick(B, t)
        || org_apache_arrow_flatbuf_Int_is_signed_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Int_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_FloatingPoint_precision, org_apache_arrow_flatbuf_Precision, org_apache_arrow_flatbuf_Precision_enum_t, 2, 2, INT16_C(0), org_apache_arrow_flatbuf_FloatingPoint)

static inline org_apache_arrow_flatbuf_FloatingPoint_ref_t org_apache_arrow_flatbuf_FloatingPoint_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_FloatingPoint_formal_args)
{
    if (org_apache_arrow_flatbuf_FloatingPoint_start(B)
        || org_apache_arrow_flatbuf_FloatingPoint_precision_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_FloatingPoint_end(B);
}

static org_apache_arrow_flatbuf_FloatingPoint_ref_t org_apache_arrow_flatbuf_FloatingPoint_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_FloatingPoint_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_FloatingPoint_start(B)
        || org_apache_arrow_flatbuf_FloatingPoint_precision_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_FloatingPoint_end(B));
}


static inline org_apache_arrow_flatbuf_Utf8_ref_t org_apache_arrow_flatbuf_Utf8_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Utf8_formal_args)
{
    if (org_apache_arrow_flatbuf_Utf8_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Utf8_end(B);
}

static org_apache_arrow_flatbuf_Utf8_ref_t org_apache_arrow_flatbuf_Utf8_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Utf8_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Utf8_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Utf8_end(B));
}


static inline org_apache_arrow_flatbuf_Binary_ref_t org_apache_arrow_flatbuf_Binary_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Binary_formal_args)
{
    if (org_apache_arrow_flatbuf_Binary_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Binary_end(B);
}

static org_apache_arrow_flatbuf_Binary_ref_t org_apache_arrow_flatbuf_Binary_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Binary_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Binary_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Binary_end(B));
}


static inline org_apache_arrow_flatbuf_LargeUtf8_ref_t org_apache_arrow_flatbuf_LargeUtf8_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_LargeUtf8_formal_args)
{
    if (org_apache_arrow_flatbuf_LargeUtf8_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_LargeUtf8_end(B);
}

static org_apache_arrow_flatbuf_LargeUtf8_ref_t org_apache_arrow_flatbuf_LargeUtf8_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_LargeUtf8_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_LargeUtf8_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_LargeUtf8_end(B));
}


static inline org_apache_arrow_flatbuf_LargeBinary_ref_t org_apache_arrow_flatbuf_LargeBinary_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_LargeBinary_formal_args)
{
    if (org_apache_arrow_flatbuf_LargeBinary_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_LargeBinary_end(B);
}

static org_apache_arrow_flatbuf_LargeBinary_ref_t org_apache_arrow_flatbuf_LargeBinary_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_LargeBinary_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_LargeBinary_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_LargeBinary_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_FixedSizeBinary_byteWidth, flatbuffers_int32, int32_t, 4, 4, INT32_C(0), org_apache_arrow_flatbuf_FixedSizeBinary)

static inline org_apache_arrow_flatbuf_FixedSizeBinary_ref_t org_apache_arrow_flatbuf_FixedSizeBinary_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_FixedSizeBinary_formal_args)
{
    if (org_apache_arrow_flatbuf_FixedSizeBinary_start(B)
        || org_apache_arrow_flatbuf_FixedSizeBinary_byteWidth_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_FixedSizeBinary_end(B);
}

static org_apache_arrow_flatbuf_FixedSizeBinary_ref_t org_apache_arrow_flatbuf_FixedSizeBinary_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_FixedSizeBinary_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_FixedSizeBinary_start(B)
        || org_apache_arrow_flatbuf_FixedSizeBinary_byteWidth_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_FixedSizeBinary_end(B));
}


static inline org_apache_arrow_flatbuf_Bool_ref_t org_apache_arrow_flatbuf_Bool_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Bool_formal_args)
{
    if (org_apache_arrow_flatbuf_Bool_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Bool_end(B);
}

static org_apache_arrow_flatbuf_Bool_ref_t org_apache_arrow_flatbuf_Bool_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Bool_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Bool_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Bool_end(B));
}


static inline org_apache_arrow_flatbuf_RunEndEncoded_ref_t org_apache_arrow_flatbuf_RunEndEncoded_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_RunEndEncoded_formal_args)
{
    if (org_apache_arrow_flatbuf_RunEndEncoded_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_RunEndEncoded_end(B);
}

static org_apache_arrow_flatbuf_RunEndEncoded_ref_t org_apache_arrow_flatbuf_RunEndEncoded_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_RunEndEncoded_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_RunEndEncoded_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_RunEndEncoded_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Decimal_precision, flatbuffers_int32, int32_t, 4, 4, INT32_C(0), org_apache_arrow_flatbuf_Decimal)
__flatbuffers_build_scalar_field(1, flatbuffers_, org_apache_arrow_flatbuf_Decimal_scale, flatbuffers_int32, int32_t, 4, 4, INT32_C(0), org_apache_arrow_flatbuf_Decimal)
__flatbuffers_build_scalar_field(2, flatbuffers_, org_apache_arrow_flatbuf_Decimal_bitWidth, flatbuffers_int32, int32_t, 4, 4, INT32_C(128), org_apache_arrow_flatbuf_Decimal)

static inline org_apache_arrow_flatbuf_Decimal_ref_t org_apache_arrow_flatbuf_Decimal_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Decimal_formal_args)
{
    if (org_apache_arrow_flatbuf_Decimal_start(B)
        || org_apache_arrow_flatbuf_Decimal_precision_add(B, v0)
        || org_apache_arrow_flatbuf_Decimal_scale_add(B, v1)
        || org_apache_arrow_flatbuf_Decimal_bitWidth_add(B, v2)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Decimal_end(B);
}

static org_apache_arrow_flatbuf_Decimal_ref_t org_apache_arrow_flatbuf_Decimal_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Decimal_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Decimal_start(B)
        || org_apache_arrow_flatbuf_Decimal_precision_pick(B, t)
        || org_apache_arrow_flatbuf_Decimal_scale_pick(B, t)
        || org_apache_arrow_flatbuf_Decimal_bitWidth_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Decimal_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Date_unit, org_apache_arrow_flatbuf_DateUnit, org_apache_arrow_flatbuf_DateUnit_enum_t, 2, 2, INT16_C(1), org_apache_arrow_flatbuf_Date)

static inline org_apache_arrow_flatbuf_Date_ref_t org_apache_arrow_flatbuf_Date_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Date_formal_args)
{
    if (org_apache_arrow_flatbuf_Date_start(B)
        || org_apache_arrow_flatbuf_Date_unit_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Date_end(B);
}

static org_apache_arrow_flatbuf_Date_ref_t org_apache_arrow_flatbuf_Date_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Date_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Date_start(B)
        || org_apache_arrow_flatbuf_Date_unit_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Date_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Time_unit, org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t, 2, 2, INT16_C(1), org_apache_arrow_flatbuf_Time)
__flatbuffers_build_scalar_field(1, flatbuffers_, org_apache_arrow_flatbuf_Time_bitWidth, flatbuffers_int32, int32_t, 4, 4, INT32_C(32), org_apache_arrow_flatbuf_Time)

static inline org_apache_arrow_flatbuf_Time_ref_t org_apache_arrow_flatbuf_Time_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Time_formal_args)
{
    if (org_apache_arrow_flatbuf_Time_start(B)
        || org_apache_arrow_flatbuf_Time_bitWidth_add(B, v1)
        || org_apache_arrow_flatbuf_Time_unit_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Time_end(B);
}

static org_apache_arrow_flatbuf_Time_ref_t org_apache_arrow_flatbuf_Time_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Time_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Time_start(B)
        || org_apache_arrow_flatbuf_Time_bitWidth_pick(B, t)
        || org_apache_arrow_flatbuf_Time_unit_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Time_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Timestamp_unit, org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t, 2, 2, INT16_C(0), org_apache_arrow_flatbuf_Timestamp)
__flatbuffers_build_string_field(1, flatbuffers_, org_apache_arrow_flatbuf_Timestamp_timezone, org_apache_arrow_flatbuf_Timestamp)

static inline org_apache_arrow_flatbuf_Timestamp_ref_t org_apache_arrow_flatbuf_Timestamp_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Timestamp_formal_args)
{
    if (org_apache_arrow_flatbuf_Timestamp_start(B)
        || org_apache_arrow_flatbuf_Timestamp_timezone_add(B, v1)
        || org_apache_arrow_flatbuf_Timestamp_unit_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Timestamp_end(B);
}

static org_apache_arrow_flatbuf_Timestamp_ref_t org_apache_arrow_flatbuf_Timestamp_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Timestamp_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Timestamp_start(B)
        || org_apache_arrow_flatbuf_Timestamp_timezone_pick(B, t)
        || org_apache_arrow_flatbuf_Timestamp_unit_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Timestamp_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Interval_unit, org_apache_arrow_flatbuf_IntervalUnit, org_apache_arrow_flatbuf_IntervalUnit_enum_t, 2, 2, INT16_C(0), org_apache_arrow_flatbuf_Interval)

static inline org_apache_arrow_flatbuf_Interval_ref_t org_apache_arrow_flatbuf_Interval_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Interval_formal_args)
{
    if (org_apache_arrow_flatbuf_Interval_start(B)
        || org_apache_arrow_flatbuf_Interval_unit_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Interval_end(B);
}

static org_apache_arrow_flatbuf_Interval_ref_t org_apache_arrow_flatbuf_Interval_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Interval_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Interval_start(B)
        || org_apache_arrow_flatbuf_Interval_unit_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Interval_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Duration_unit, org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t, 2, 2, INT16_C(1), org_apache_arrow_flatbuf_Duration)

static inline org_apache_arrow_flatbuf_Duration_ref_t org_apache_arrow_flatbuf_Duration_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Duration_formal_args)
{
    if (org_apache_arrow_flatbuf_Duration_start(B)
        || org_apache_arrow_flatbuf_Duration_unit_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Duration_end(B);
}

static org_apache_arrow_flatbuf_Duration_ref_t org_apache_arrow_flatbuf_Duration_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Duration_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Duration_start(B)
        || org_apache_arrow_flatbuf_Duration_unit_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Duration_end(B));
}

__flatbuffers_build_string_field(0, flatbuffers_, org_apache_arrow_flatbuf_KeyValue_key, org_apache_arrow_flatbuf_KeyValue)
__flatbuffers_build_string_field(1, flatbuffers_, org_apache_arrow_flatbuf_KeyValue_value, org_apache_arrow_flatbuf_KeyValue)

static inline org_apache_arrow_flatbuf_KeyValue_ref_t org_apache_arrow_flatbuf_KeyValue_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_KeyValue_formal_args)
{
    if (org_apache_arrow_flatbuf_KeyValue_start(B)
        || org_apache_arrow_flatbuf_KeyValue_key_add(B, v0)
        || org_apache_arrow_flatbuf_KeyValue_value_add(B, v1)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_KeyValue_end(B);
}

static org_apache_arrow_flatbuf_KeyValue_ref_t org_apache_arrow_flatbuf_KeyValue_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_KeyValue_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_KeyValue_start(B)
        || org_apache_arrow_flatbuf_KeyValue_key_pick(B, t)
        || org_apache_arrow_flatbuf_KeyValue_value_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_KeyValue_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_DictionaryEncoding_id, flatbuffers_int64, int64_t, 8, 8, INT64_C(0), org_apache_arrow_flatbuf_DictionaryEncoding)
__flatbuffers_build_table_field(1, flatbuffers_, org_apache_arrow_flatbuf_DictionaryEncoding_indexType, org_apache_arrow_flatbuf_Int, org_apache_arrow_flatbuf_DictionaryEncoding)
__flatbuffers_build_scalar_field(2, flatbuffers_, org_apache_arrow_flatbuf_DictionaryEncoding_isOrdered, flatbuffers_bool, flatbuffers_bool_t, 1, 1, UINT8_C(0), org_apache_arrow_flatbuf_DictionaryEncoding)
__flatbuffers_build_scalar_field(3, flatbuffers_, org_apache_arrow_flatbuf_DictionaryEncoding_dictionaryKind, org_apache_arrow_flatbuf_DictionaryKind, org_apache_arrow_flatbuf_DictionaryKind_enum_t, 2, 2, INT16_C(0), org_apache_arrow_flatbuf_DictionaryEncoding)

static inline org_apache_arrow_flatbuf_DictionaryEncoding_ref_t org_apache_arrow_flatbuf_DictionaryEncoding_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_DictionaryEncoding_formal_args)
{
    if (org_apache_arrow_flatbuf_DictionaryEncoding_start(B)
        || org_apache_arrow_flatbuf_DictionaryEncoding_id_add(B, v0)
        || org_apache_arrow_flatbuf_DictionaryEncoding_indexType_add(B, v1)
        || org_apache_arrow_flatbuf_DictionaryEncoding_dictionaryKind_add(B, v3)
        || org_apache_arrow_flatbuf_DictionaryEncoding_isOrdered_add(B, v2)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_DictionaryEncoding_end(B);
}

static org_apache_arrow_flatbuf_DictionaryEncoding_ref_t org_apache_arrow_flatbuf_DictionaryEncoding_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_DictionaryEncoding_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_DictionaryEncoding_start(B)
        || org_apache_arrow_flatbuf_DictionaryEncoding_id_pick(B, t)
        || org_apache_arrow_flatbuf_DictionaryEncoding_indexType_pick(B, t)
        || org_apache_arrow_flatbuf_DictionaryEncoding_dictionaryKind_pick(B, t)
        || org_apache_arrow_flatbuf_DictionaryEncoding_isOrdered_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_DictionaryEncoding_end(B));
}

__flatbuffers_build_string_field(0, flatbuffers_, org_apache_arrow_flatbuf_Field_name, org_apache_arrow_flatbuf_Field)
__flatbuffers_build_scalar_field(1, flatbuffers_, org_apache_arrow_flatbuf_Field_nullable, flatbuffers_bool, flatbuffers_bool_t, 1, 1, UINT8_C(0), org_apache_arrow_flatbuf_Field)
__flatbuffers_build_union_field(3, flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, org_apache_arrow_flatbuf_Field)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Null, org_apache_arrow_flatbuf_Null)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Int, org_apache_arrow_flatbuf_Int)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, FloatingPoint, org_apache_arrow_flatbuf_FloatingPoint)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Binary, org_apache_arrow_flatbuf_Binary)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Utf8, org_apache_arrow_flatbuf_Utf8)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Bool, org_apache_arrow_flatbuf_Bool)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Decimal, org_apache_arrow_flatbuf_Decimal)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Date, org_apache_arrow_flatbuf_Date)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Time, org_apache_arrow_flatbuf_Time)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Timestamp, org_apache_arrow_flatbuf_Timestamp)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Interval, org_apache_arrow_flatbuf_Interval)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, List, org_apache_arrow_flatbuf_List)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Struct_, org_apache_arrow_flatbuf_Struct_)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Union, org_apache_arrow_flatbuf_Union)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, FixedSizeBinary, org_apache_arrow_flatbuf_FixedSizeBinary)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, FixedSizeList, org_apache_arrow_flatbuf_FixedSizeList)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Map, org_apache_arrow_flatbuf_Map)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Duration, org_apache_arrow_flatbuf_Duration)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, LargeBinary, org_apache_arrow_flatbuf_LargeBinary)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, LargeUtf8, org_apache_arrow_flatbuf_LargeUtf8)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, LargeList, org_apache_arrow_flatbuf_LargeList)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, RunEndEncoded, org_apache_arrow_flatbuf_RunEndEncoded)
__flatbuffers_build_table_field(4, flatbuffers_, org_apache_arrow_flatbuf_Field_dictionary, org_apache_arrow_flatbuf_DictionaryEncoding, org_apache_arrow_flatbuf_Field)
__flatbuffers_build_table_vector_field(5, flatbuffers_, org_apache_arrow_flatbuf_Field_children, org_apache_arrow_flatbuf_Field, org_apache_arrow_flatbuf_Field)
__flatbuffers_build_table_vector_field(6, flatbuffers_, org_apache_arrow_flatbuf_Field_custom_metadata, org_apache_arrow_flatbuf_KeyValue, org_apache_arrow_flatbuf_Field)

static inline org_apache_arrow_flatbuf_Field_ref_t org_apache_arrow_flatbuf_Field_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Field_formal_args)
{
    if (org_apache_arrow_flatbuf_Field_start(B)
        || org_apache_arrow_flatbuf_Field_name_add(B, v0)
        || org_apache_arrow_flatbuf_Field_type_add_value(B, v3)
        || org_apache_arrow_flatbuf_Field_dictionary_add(B, v4)
        || org_apache_arrow_flatbuf_Field_children_add(B, v5)
        || org_apache_arrow_flatbuf_Field_custom_metadata_add(B, v6)
        || org_apache_arrow_flatbuf_Field_nullable_add(B, v1)
        || org_apache_arrow_flatbuf_Field_type_add_type(B, v3.type)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Field_end(B);
}

static org_apache_arrow_flatbuf_Field_ref_t org_apache_arrow_flatbuf_Field_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Field_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Field_start(B)
        || org_apache_arrow_flatbuf_Field_name_pick(B, t)
        || org_apache_arrow_flatbuf_Field_type_pick(B, t)
        || org_apache_arrow_flatbuf_Field_dictionary_pick(B, t)
        || org_apache_arrow_flatbuf_Field_children_pick(B, t)
        || org_apache_arrow_flatbuf_Field_custom_metadata_pick(B, t)
        || org_apache_arrow_flatbuf_Field_nullable_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Field_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Schema_endianness, org_apache_arrow_flatbuf_Endianness, org_apache_arrow_flatbuf_Endianness_enum_t, 2, 2, INT16_C(0), org_apache_arrow_flatbuf_Schema)
__flatbuffers_build_table_vector_field(1, flatbuffers_, org_apache_arrow_flatbuf_Schema_fields, org_apache_arrow_flatbuf_Field, org_apache_arrow_flatbuf_Schema)
__flatbuffers_build_table_vector_field(2, flatbuffers_, org_apache_arrow_flatbuf_Schema_custom_metadata, org_apache_arrow_flatbuf_KeyValue, org_apache_arrow_flatbuf_Schema)
__flatbuffers_build_vector_field(3, flatbuffers_, org_apache_arrow_flatbuf_Schema_features, org_apache_arrow_flatbuf_Feature, org_apache_arrow_flatbuf_Feature_enum_t, org_apache_arrow_flatbuf_Schema)

static inline org_apache_arrow_flatbuf_Schema_ref_t org_apache_arrow_flatbuf_Schema_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Schema_formal_args)
{
    if (org_apache_arrow_flatbuf_Schema_start(B)
        || org_apache_arrow_flatbuf_Schema_fields_add(B, v1)
        || org_apache_arrow_flatbuf_Schema_custom_metadata_add(B, v2)
        || org_apache_arrow_flatbuf_Schema_features_add(B, v3)
        || org_apache_arrow_flatbuf_Schema_endianness_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Schema_end(B);
}

static org_apache_arrow_flatbuf_Schema_ref_t org_apache_arrow_flatbuf_Schema_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Schema_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Schema_start(B)
        || org_apache_arrow_flatbuf_Schema_fields_pick(B, t)
        || org_apache_arrow_flatbuf_Schema_custom_metadata_pick(B, t)
        || org_apache_arrow_flatbuf_Schema_features_pick(B, t)
        || org_apache_arrow_flatbuf_Schema_endianness_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Schema_end(B));
}

#include "flatcc/flatcc_epilogue.h"
#endif /* SCHEMA_BUILDER_H */
#ifndef SCHEMA_VERIFIER_H
#define SCHEMA_VERIFIER_H

/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

#ifndef SCHEMA_READER_H
#include "Schema_reader.h"
#endif
#include "flatcc/flatcc_verifier.h"
#include "flatcc/flatcc_prologue.h"

static int org_apache_arrow_flatbuf_Null_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Struct__verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_List_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_LargeList_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_FixedSizeList_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Map_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Union_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Int_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_FloatingPoint_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Utf8_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Binary_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_LargeUtf8_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_LargeBinary_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_FixedSizeBinary_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Bool_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_RunEndEncoded_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Decimal_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Date_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Time_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Timestamp_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Interval_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Duration_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_KeyValue_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_DictionaryEncoding_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Field_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Schema_verify_table(flatcc_table_verifier_descriptor_t *td);

static int org_apache_arrow_flatbuf_Type_union_verifier(flatcc_union_verifier_descriptor_t *ud)
{
    switch (ud->type) {
    case 1: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Null_verify_table); /* Null */
    case 2: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Int_verify_table); /* Int */
    case 3: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_FloatingPoint_verify_table); /* FloatingPoint */
    case 4: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Binary_verify_table); /* Binary */
    case 5: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Utf8_verify_table); /* Utf8 */
    case 6: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Bool_verify_table); /* Bool */
    case 7: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Decimal_verify_table); /* Decimal */
    case 8: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Date_verify_table); /* Date */
    case 9: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Time_verify_table); /* Time */
    case 10: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Timestamp_verify_table); /* Timestamp */
    case 11: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Interval_verify_table); /* Interval */
    case 12: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_List_verify_table); /* List */
    case 13: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Struct__verify_table); /* Struct_ */
    case 14: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Union_verify_table); /* Union */
    case 15: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_FixedSizeBinary_verify_table); /* FixedSizeBinary */
    case 16: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_FixedSizeList_verify_table); /* FixedSizeList */
    case 17: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Map_verify_table); /* Map */
    case 18: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Duration_verify_table); /* Duration */
    case 19: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_LargeBinary_verify_table); /* LargeBinary */
    case 20: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_LargeUtf8_verify_table); /* LargeUtf8 */
    case 21: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_LargeList_verify_table); /* LargeList */
    case 22: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_RunEndEncoded_verify_table); /* RunEndEncoded */
    default: return flatcc_verify_ok;
    }
}

static inline int org_apache_arrow_flatbuf_Buffer_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_struct_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Buffer_identifier, 16, 8);
}

static inline int org_apache_arrow_flatbuf_Buffer_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_struct_as_typed_root(buf, bufsiz, org_apache_arrow_flatbuf_Buffer_type_hash, 16, 8);
}

static inline int org_apache_arrow_flatbuf_Buffer_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_struct_as_typed_root(buf, bufsiz, thash, 16, 8);
}

static inline int org_apache_arrow_flatbuf_Buffer_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_struct_as_root(buf, bufsiz, fid, 16, 8);
}

static int org_apache_arrow_flatbuf_Null_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Null_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Null_identifier, &org_apache_arrow_flatbuf_Null_verify_table);
}

static inline int org_apache_arrow_flatbuf_Null_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Null_type_identifier, &org_apache_arrow_flatbuf_Null_verify_table);
}

static inline int org_apache_arrow_flatbuf_Null_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Null_verify_table);
}

static inline int org_apache_arrow_flatbuf_Null_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Null_verify_table);
}

static int org_apache_arrow_flatbuf_Struct__verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Struct__verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Struct__identifier, &org_apache_arrow_flatbuf_Struct__verify_table);
}

static inline int org_apache_arrow_flatbuf_Struct__verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Struct__type_identifier, &org_apache_arrow_flatbuf_Struct__verify_table);
}

static inline int org_apache_arrow_flatbuf_Struct__verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Struct__verify_table);
}

static inline int org_apache_arrow_flatbuf_Struct__verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Struct__verify_table);
}

static int org_apache_arrow_flatbuf_List_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_List_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_List_identifier, &org_apache_arrow_flatbuf_List_verify_table);
}

static inline int org_apache_arrow_flatbuf_List_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_List_type_identifier, &org_apache_arrow_flatbuf_List_verify_table);
}

static inline int org_apache_arrow_flatbuf_List_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_List_verify_table);
}

static inline int org_apache_arrow_flatbuf_List_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_List_verify_table);
}

static int org_apache_arrow_flatbuf_LargeList_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_LargeList_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_LargeList_identifier, &org_apache_arrow_flatbuf_LargeList_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeList_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_LargeList_type_identifier, &org_apache_arrow_flatbuf_LargeList_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeList_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_LargeList_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeList_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_LargeList_verify_table);
}

static int org_apache_arrow_flatbuf_FixedSizeList_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 4, 4) /* listSize */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_FixedSizeList_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_FixedSizeList_identifier, &org_apache_arrow_flatbuf_FixedSizeList_verify_table);
}

static inline int org_apache_arrow_flatbuf_FixedSizeList_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_FixedSizeList_type_identifier, &org_apache_arrow_flatbuf_FixedSizeList_verify_table);
}

static inline int org_apache_arrow_flatbuf_FixedSizeList_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_FixedSizeList_verify_table);
}

static inline int org_apache_arrow_flatbuf_FixedSizeList_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_FixedSizeList_verify_table);
}

static int org_apache_arrow_flatbuf_Map_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 1, 1) /* keysSorted */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Map_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Map_identifier, &org_apache_arrow_flatbuf_Map_verify_table);
}

static inline int org_apache_arrow_flatbuf_Map_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Map_type_identifier, &org_apache_arrow_flatbuf_Map_verify_table);
}

static inline int org_apache_arrow_flatbuf_Map_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Map_verify_table);
}

static inline int org_apache_arrow_flatbuf_Map_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Map_verify_table);
}

static int org_apache_arrow_flatbuf_Union_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* mode */)) return ret;
    if ((ret = flatcc_verify_vector_field(td, 1, 0, 4, 4, INT64_C(1073741823)) /* typeIds */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Union_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Union_identifier, &org_apache_arrow_flatbuf_Union_verify_table);
}

static inline int org_apache_arrow_flatbuf_Union_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Union_type_identifier, &org_apache_arrow_flatbuf_Union_verify_table);
}

static inline int org_apache_arrow_flatbuf_Union_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Union_verify_table);
}

static inline int org_apache_arrow_flatbuf_Union_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Union_verify_table);
}

static int org_apache_arrow_flatbuf_Int_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 4, 4) /* bitWidth */)) return ret;
    if ((ret = flatcc_verify_field(td, 1, 1, 1) /* is_signed */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Int_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Int_identifier, &org_apache_arrow_flatbuf_Int_verify_table);
}

static inline int org_apache_arrow_flatbuf_Int_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Int_type_identifier, &org_apache_arrow_flatbuf_Int_verify_table);
}

static inline int org_apache_arrow_flatbuf_Int_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Int_verify_table);
}

static inline int org_apache_arrow_flatbuf_Int_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Int_verify_table);
}

static int org_apache_arrow_flatbuf_FloatingPoint_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* precision */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_FloatingPoint_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_FloatingPoint_identifier, &org_apache_arrow_flatbuf_FloatingPoint_verify_table);
}

static inline int org_apache_arrow_flatbuf_FloatingPoint_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_FloatingPoint_type_identifier, &org_apache_arrow_flatbuf_FloatingPoint_verify_table);
}

static inline int org_apache_arrow_flatbuf_FloatingPoint_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_FloatingPoint_verify_table);
}

static inline int org_apache_arrow_flatbuf_FloatingPoint_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_FloatingPoint_verify_table);
}

static int org_apache_arrow_flatbuf_Utf8_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Utf8_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Utf8_identifier, &org_apache_arrow_flatbuf_Utf8_verify_table);
}

static inline int org_apache_arrow_flatbuf_Utf8_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Utf8_type_identifier, &org_apache_arrow_flatbuf_Utf8_verify_table);
}

static inline int org_apache_arrow_flatbuf_Utf8_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Utf8_verify_table);
}

static inline int org_apache_arrow_flatbuf_Utf8_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Utf8_verify_table);
}

static int org_apache_arrow_flatbuf_Binary_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Binary_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Binary_identifier, &org_apache_arrow_flatbuf_Binary_verify_table);
}

static inline int org_apache_arrow_flatbuf_Binary_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Binary_type_identifier, &org_apache_arrow_flatbuf_Binary_verify_table);
}

static inline int org_apache_arrow_flatbuf_Binary_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Binary_verify_table);
}

static inline int org_apache_arrow_flatbuf_Binary_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Binary_verify_table);
}

static int org_apache_arrow_flatbuf_LargeUtf8_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_LargeUtf8_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_LargeUtf8_identifier, &org_apache_arrow_flatbuf_LargeUtf8_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeUtf8_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_LargeUtf8_type_identifier, &org_apache_arrow_flatbuf_LargeUtf8_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeUtf8_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_LargeUtf8_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeUtf8_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_LargeUtf8_verify_table);
}

static int org_apache_arrow_flatbuf_LargeBinary_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_LargeBinary_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_LargeBinary_identifier, &org_apache_arrow_flatbuf_LargeBinary_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeBinary_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_LargeBinary_type_identifier, &org_apache_arrow_flatbuf_LargeBinary_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeBinary_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_LargeBinary_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeBinary_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_LargeBinary_verify_table);
}

static int org_apache_arrow_flatbuf_FixedSizeBinary_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 4, 4) /* byteWidth */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_FixedSizeBinary_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_FixedSizeBinary_identifier, &org_apache_arrow_flatbuf_FixedSizeBinary_verify_table);
}

static inline int org_apache_arrow_flatbuf_FixedSizeBinary_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_FixedSizeBinary_type_identifier, &org_apache_arrow_flatbuf_FixedSizeBinary_verify_table);
}

static inline int org_apache_arrow_flatbuf_FixedSizeBinary_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_FixedSizeBinary_verify_table);
}

static inline int org_apache_arrow_flatbuf_FixedSizeBinary_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_FixedSizeBinary_verify_table);
}

static int org_apache_arrow_flatbuf_Bool_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Bool_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Bool_identifier, &org_apache_arrow_flatbuf_Bool_verify_table);
}

static inline int org_apache_arrow_flatbuf_Bool_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Bool_type_identifier, &org_apache_arrow_flatbuf_Bool_verify_table);
}

static inline int org_apache_arrow_flatbuf_Bool_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Bool_verify_table);
}

static inline int org_apache_arrow_flatbuf_Bool_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Bool_verify_table);
}

static int org_apache_arrow_flatbuf_RunEndEncoded_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_RunEndEncoded_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_RunEndEncoded_identifier, &org_apache_arrow_flatbuf_RunEndEncoded_verify_table);
}

static inline int org_apache_arrow_flatbuf_RunEndEncoded_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_RunEndEncoded_type_identifier, &org_apache_arrow_flatbuf_RunEndEncoded_verify_table);
}

static inline int org_apache_arrow_flatbuf_RunEndEncoded_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_RunEndEncoded_verify_table);
}

static inline int org_apache_arrow_flatbuf_RunEndEncoded_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_RunEndEncoded_verify_table);
}

static int org_apache_arrow_flatbuf_Decimal_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 4, 4) /* precision */)) return ret;
    if ((ret = flatcc_verify_field(td, 1, 4, 4) /* scale */)) return ret;
    if ((ret = flatcc_verify_field(td, 2, 4, 4) /* bitWidth */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Decimal_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Decimal_identifier, &org_apache_arrow_flatbuf_Decimal_verify_table);
}

static inline int org_apache_arrow_flatbuf_Decimal_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Decimal_type_identifier, &org_apache_arrow_flatbuf_Decimal_verify_table);
}

static inline int org_apache_arrow_flatbuf_Decimal_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Decimal_verify_table);
}

static inline int org_apache_arrow_flatbuf_Decimal_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Decimal_verify_table);
}

static int org_apache_arrow_flatbuf_Date_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* unit */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Date_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Date_identifier, &org_apache_arrow_flatbuf_Date_verify_table);
}

static inline int org_apache_arrow_flatbuf_Date_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Date_type_identifier, &org_apache_arrow_flatbuf_Date_verify_table);
}

static inline int org_apache_arrow_flatbuf_Date_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Date_verify_table);
}

static inline int org_apache_arrow_flatbuf_Date_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Date_verify_table);
}

static int org_apache_arrow_flatbuf_Time_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* unit */)) return ret;
    if ((ret = flatcc_verify_field(td, 1, 4, 4) /* bitWidth */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Time_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Time_identifier, &org_apache_arrow_flatbuf_Time_verify_table);
}

static inline int org_apache_arrow_flatbuf_Time_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Time_type_identifier, &org_apache_arrow_flatbuf_Time_verify_table);
}

static inline int org_apache_arrow_flatbuf_Time_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Time_verify_table);
}

static inline int org_apache_arrow_flatbuf_Time_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Time_verify_table);
}

static int org_apache_arrow_flatbuf_Timestamp_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* unit */)) return ret;
    if ((ret = flatcc_verify_string_field(td, 1, 0) /* timezone */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Timestamp_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Timestamp_identifier, &org_apache_arrow_flatbuf_Timestamp_verify_table);
}

static inline int org_apache_arrow_flatbuf_Timestamp_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Timestamp_type_identifier, &org_apache_arrow_flatbuf_Timestamp_verify_table);
}

static inline int org_apache_arrow_flatbuf_Timestamp_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Timestamp_verify_table);
}

static inline int org_apache_arrow_flatbuf_Timestamp_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Timestamp_verify_table);
}

static int org_apache_arrow_flatbuf_Interval_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* unit */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Interval_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Interval_identifier, &org_apache_arrow_flatbuf_Interval_verify_table);
}

static inline int org_apache_arrow_flatbuf_Interval_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Interval_type_identifier, &org_apache_arrow_flatbuf_Interval_verify_table);
}

static inline int org_apache_arrow_flatbuf_Interval_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Interval_verify_table);
}

static inline int org_apache_arrow_flatbuf_Interval_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Interval_verify_table);
}

static int org_apache_arrow_flatbuf_Duration_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* unit */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Duration_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Duration_identifier, &org_apache_arrow_flatbuf_Duration_verify_table);
}

static inline int org_apache_arrow_flatbuf_Duration_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Duration_type_identifier, &org_apache_arrow_flatbuf_Duration_verify_table);
}

static inline int org_apache_arrow_flatbuf_Duration_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Duration_verify_table);
}

static inline int org_apache_arrow_flatbuf_Duration_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Duration_verify_table);
}

static int org_apache_arrow_flatbuf_KeyValue_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_string_field(td, 0, 0) /* key */)) return ret;
    if ((ret = flatcc_verify_string_field(td, 1, 0) /* value */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_KeyValue_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_KeyValue_identifier, &org_apache_arrow_flatbuf_KeyValue_verify_table);
}

static inline int org_apache_arrow_flatbuf_KeyValue_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_KeyValue_type_identifier, &org_apache_arrow_flatbuf_KeyValue_verify_table);
}

static inline int org_apache_arrow_flatbuf_KeyValue_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_KeyValue_verify_table);
}

static inline int org_apache_arrow_flatbuf_KeyValue_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_KeyValue_verify_table);
}

static int org_apache_arrow_flatbuf_DictionaryEncoding_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 8, 8) /* id */)) return ret;
    if ((ret = flatcc_verify_table_field(td, 1, 0, &org_apache_arrow_flatbuf_Int_verify_table) /* indexType */)) return ret;
    if ((ret = flatcc_verify_field(td, 2, 1, 1) /* isOrdered */)) return ret;
    if ((ret = flatcc_verify_field(td, 3, 2, 2) /* dictionaryKind */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_DictionaryEncoding_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_DictionaryEncoding_identifier, &org_apache_arrow_flatbuf_DictionaryEncoding_verify_table);
}

static inline int org_apache_arrow_flatbuf_DictionaryEncoding_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_DictionaryEncoding_type_identifier, &org_apache_arrow_flatbuf_DictionaryEncoding_verify_table);
}

static inline int org_apache_arrow_flatbuf_DictionaryEncoding_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_DictionaryEncoding_verify_table);
}

static inline int org_apache_arrow_flatbuf_DictionaryEncoding_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_DictionaryEncoding_verify_table);
}

static int org_apache_arrow_flatbuf_Field_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_string_field(td, 0, 0) /* name */)) return ret;
    if ((ret = flatcc_verify_field(td, 1, 1, 1) /* nullable */)) return ret;
    if ((ret = flatcc_verify_union_field(td, 3, 0, &org_apache_arrow_flatbuf_Type_union_verifier) /* type */)) return ret;
    if ((ret = flatcc_verify_table_field(td, 4, 0, &org_apache_arrow_flatbuf_DictionaryEncoding_verify_table) /* dictionary */)) return ret;
    if ((ret = flatcc_verify_table_vector_field(td, 5, 0, &org_apache_arrow_flatbuf_Field_verify_table) /* children */)) return ret;
    if ((ret = flatcc_verify_table_vector_field(td, 6, 0, &org_apache_arrow_flatbuf_KeyValue_verify_table) /* custom_metadata */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Field_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Field_identifier, &org_apache_arrow_flatbuf_Field_verify_table);
}

static inline int org_apache_arrow_flatbuf_Field_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Field_type_identifier, &org_apache_arrow_flatbuf_Field_verify_table);
}

static inline int org_apache_arrow_flatbuf_Field_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Field_verify_table);
}

static inline int org_apache_arrow_flatbuf_Field_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Field_verify_table);
}

static int org_apache_arrow_flatbuf_Schema_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* endianness */)) return ret;
    if ((ret = flatcc_verify_table_vector_field(td, 1, 0, &org_apache_arrow_flatbuf_Field_verify_table) /* fields */)) return ret;
    if ((ret = flatcc_verify_table_vector_field(td, 2, 0, &org_apache_arrow_flatbuf_KeyValue_verify_table) /* custom_metadata */)) return ret;
    if ((ret = flatcc_verify_vector_field(td, 3, 0, 8, 8, INT64_C(536870911)) /* features */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Schema_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Schema_identifier, &org_apache_arrow_flatbuf_Schema_verify_table);
}

static inline int org_apache_arrow_flatbuf_Schema_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Schema_type_identifier, &org_apache_arrow_flatbuf_Schema_verify_table);
}

static inline int org_apache_arrow_flatbuf_Schema_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Schema_verify_table);
}

static inline int org_apache_arrow_flatbuf_Schema_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Schema_verify_table);
}

#include "flatcc/flatcc_epilogue.h"
#endif /* SCHEMA_VERIFIER_H */
#ifndef TENSOR_READER_H
#define TENSOR_READER_H

/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

#ifndef FLATBUFFERS_COMMON_READER_H
#include "flatbuffers_common_reader.h"
#endif
#ifndef SCHEMA_READER_H
#include "Schema_reader.h"
#endif
#include "flatcc/flatcc_flatbuffers.h"
#ifndef __alignas_is_defined
#include <stdalign.h>
#endif
#include "flatcc/flatcc_prologue.h"
#ifndef flatbuffers_identifier
#define flatbuffers_identifier 0
#endif
#ifndef flatbuffers_extension
#define flatbuffers_extension "bin"
#endif


typedef const struct org_apache_arrow_flatbuf_TensorDim_table *org_apache_arrow_flatbuf_TensorDim_table_t;
typedef struct org_apache_arrow_flatbuf_TensorDim_table *org_apache_arrow_flatbuf_TensorDim_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_TensorDim_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_TensorDim_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Tensor_table *org_apache_arrow_flatbuf_Tensor_table_t;
typedef struct org_apache_arrow_flatbuf_Tensor_table *org_apache_arrow_flatbuf_Tensor_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Tensor_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Tensor_mutable_vec_t;
#ifndef org_apache_arrow_flatbuf_TensorDim_file_identifier
#define org_apache_arrow_flatbuf_TensorDim_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_TensorDim_file_identifier */
#ifndef org_apache_arrow_flatbuf_TensorDim_identifier
#define org_apache_arrow_flatbuf_TensorDim_identifier 0
#endif
#define org_apache_arrow_flatbuf_TensorDim_type_hash ((flatbuffers_thash_t)0xbc6d7b25)
#define org_apache_arrow_flatbuf_TensorDim_type_identifier "\x25\x7b\x6d\xbc"
#ifndef org_apache_arrow_flatbuf_TensorDim_file_extension
#define org_apache_arrow_flatbuf_TensorDim_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Tensor_file_identifier
#define org_apache_arrow_flatbuf_Tensor_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Tensor_file_identifier */
#ifndef org_apache_arrow_flatbuf_Tensor_identifier
#define org_apache_arrow_flatbuf_Tensor_identifier 0
#endif
#define org_apache_arrow_flatbuf_Tensor_type_hash ((flatbuffers_thash_t)0x1764df19)
#define org_apache_arrow_flatbuf_Tensor_type_identifier "\x19\xdf\x64\x17"
#ifndef org_apache_arrow_flatbuf_Tensor_file_extension
#define org_apache_arrow_flatbuf_Tensor_file_extension "bin"
#endif



/**  ----------------------------------------------------------------------
 *  Data structures for dense tensors
 *  Shape data for a single axis in a tensor */
struct org_apache_arrow_flatbuf_TensorDim_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_TensorDim_vec_len(org_apache_arrow_flatbuf_TensorDim_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_TensorDim_table_t org_apache_arrow_flatbuf_TensorDim_vec_at(org_apache_arrow_flatbuf_TensorDim_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_TensorDim_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_TensorDim)

/**  Length of dimension */
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_TensorDim, size, flatbuffers_int64, int64_t, INT64_C(0))
/**  Name of the dimension, optional */
__flatbuffers_define_string_field(1, org_apache_arrow_flatbuf_TensorDim, name, 0)

struct org_apache_arrow_flatbuf_Tensor_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Tensor_vec_len(org_apache_arrow_flatbuf_Tensor_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Tensor_table_t org_apache_arrow_flatbuf_Tensor_vec_at(org_apache_arrow_flatbuf_Tensor_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Tensor_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Tensor)

/**  The type of data contained in a value cell. Currently only fixed-width
 *  value types are supported, no strings or nested types */
__flatbuffers_define_union_field(flatbuffers_, 1, org_apache_arrow_flatbuf_Tensor, type, org_apache_arrow_flatbuf_Type, 1)
/**  The dimensions of the tensor, optionally named */
__flatbuffers_define_vector_field(2, org_apache_arrow_flatbuf_Tensor, shape, org_apache_arrow_flatbuf_TensorDim_vec_t, 1)
/**  Non-negative byte offsets to advance one value cell along each dimension
 *  If omitted, default to row-major order (C-like). */
__flatbuffers_define_vector_field(3, org_apache_arrow_flatbuf_Tensor, strides, flatbuffers_int64_vec_t, 0)
/**  The location and size of the tensor's data */
__flatbuffers_define_struct_field(4, org_apache_arrow_flatbuf_Tensor, data, org_apache_arrow_flatbuf_Buffer_struct_t, 1)


#include "flatcc/flatcc_epilogue.h"
#endif /* TENSOR_READER_H */
#ifndef TENSOR_BUILDER_H
#define TENSOR_BUILDER_H

/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

#ifndef TENSOR_READER_H
#include "Tensor_reader.h"
#endif
#ifndef FLATBUFFERS_COMMON_BUILDER_H
#include "flatbuffers_common_builder.h"
#endif
#ifndef SCHEMA_BUILDER_H
#include "Schema_builder.h"
#endif
#include "flatcc/flatcc_prologue.h"
#ifndef flatbuffers_identifier
#define flatbuffers_identifier 0
#endif
#ifndef flatbuffers_extension
#define flatbuffers_extension "bin"
#endif

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_TensorDim_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_TensorDim_ref_t;
static org_apache_arrow_flatbuf_TensorDim_ref_t org_apache_arrow_flatbuf_TensorDim_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_TensorDim_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_TensorDim, 2)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Tensor_required[] = { 1, 2, 4, 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Tensor_ref_t;
static org_apache_arrow_flatbuf_Tensor_ref_t org_apache_arrow_flatbuf_Tensor_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Tensor_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Tensor, 5)

#define __org_apache_arrow_flatbuf_TensorDim_formal_args , int64_t v0, flatbuffers_string_ref_t v1
#define __org_apache_arrow_flatbuf_TensorDim_call_args , v0, v1
static inline org_apache_arrow_flatbuf_TensorDim_ref_t org_apache_arrow_flatbuf_TensorDim_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_TensorDim_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_TensorDim, org_apache_arrow_flatbuf_TensorDim_file_identifier, org_apache_arrow_flatbuf_TensorDim_type_identifier)

#define __org_apache_arrow_flatbuf_Tensor_formal_args , org_apache_arrow_flatbuf_Type_union_ref_t v1, org_apache_arrow_flatbuf_TensorDim_vec_ref_t v2, flatbuffers_int64_vec_ref_t v3, org_apache_arrow_flatbuf_Buffer_t *v4
#define __org_apache_arrow_flatbuf_Tensor_call_args , v1, v2, v3, v4
static inline org_apache_arrow_flatbuf_Tensor_ref_t org_apache_arrow_flatbuf_Tensor_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Tensor_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Tensor, org_apache_arrow_flatbuf_Tensor_file_identifier, org_apache_arrow_flatbuf_Tensor_type_identifier)

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_TensorDim_size, flatbuffers_int64, int64_t, 8, 8, INT64_C(0), org_apache_arrow_flatbuf_TensorDim)
__flatbuffers_build_string_field(1, flatbuffers_, org_apache_arrow_flatbuf_TensorDim_name, org_apache_arrow_flatbuf_TensorDim)

static inline org_apache_arrow_flatbuf_TensorDim_ref_t org_apache_arrow_flatbuf_TensorDim_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_TensorDim_formal_args)
{
    if (org_apache_arrow_flatbuf_TensorDim_start(B)
        || org_apache_arrow_flatbuf_TensorDim_size_add(B, v0)
        || org_apache_arrow_flatbuf_TensorDim_name_add(B, v1)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_TensorDim_end(B);
}

static org_apache_arrow_flatbuf_TensorDim_ref_t org_apache_arrow_flatbuf_TensorDim_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_TensorDim_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_TensorDim_start(B)
        || org_apache_arrow_flatbuf_TensorDim_size_pick(B, t)
        || org_apache_arrow_flatbuf_TensorDim_name_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_TensorDim_end(B));
}

__flatbuffers_build_union_field(1, flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, org_apache_arrow_flatbuf_Tensor)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, Null, org_apache_arrow_flatbuf_Null)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, Int, org_apache_arrow_flatbuf_Int)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, FloatingPoint, org_apache_arrow_flatbuf_FloatingPoint)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, Binary, org_apache_arrow_flatbuf_Binary)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, Utf8, org_apache_arrow_flatbuf_Utf8)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, Bool, org_apache_arrow_flatbuf_Bool)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, Decimal, org_apache_arrow_flatbuf_Decimal)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, Date, org_apache_arrow_flatbuf_Date)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, Time, org_apache_arrow_flatbuf_Time)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, Timestamp, org_apache_arrow_flatbuf_Timestamp)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, Interval, org_apache_arrow_flatbuf_Interval)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, List, org_apache_arrow_flatbuf_List)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, Struct_, org_apache_arrow_flatbuf_Struct_)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, Union, org_apache_arrow_flatbuf_Union)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, FixedSizeBinary, org_apache_arrow_flatbuf_FixedSizeBinary)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, FixedSizeList, org_apache_arrow_flatbuf_FixedSizeList)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, Map, org_apache_arrow_flatbuf_Map)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, Duration, org_apache_arrow_flatbuf_Duration)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, LargeBinary, org_apache_arrow_flatbuf_LargeBinary)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, LargeUtf8, org_apache_arrow_flatbuf_LargeUtf8)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, LargeList, org_apache_arrow_flatbuf_LargeList)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, RunEndEncoded, org_apache_arrow_flatbuf_RunEndEncoded)
__flatbuffers_build_table_vector_field(2, flatbuffers_, org_apache_arrow_flatbuf_Tensor_shape, org_apache_arrow_flatbuf_TensorDim, org_apache_arrow_flatbuf_Tensor)
__flatbuffers_build_vector_field(3, flatbuffers_, org_apache_arrow_flatbuf_Tensor_strides, flatbuffers_int64, int64_t, org_apache_arrow_flatbuf_Tensor)
__flatbuffers_build_struct_field(4, flatbuffers_, org_apache_arrow_flatbuf_Tensor_data, org_apache_arrow_flatbuf_Buffer, 16, 8, org_apache_arrow_flatbuf_Tensor)

static inline org_apache_arrow_flatbuf_Tensor_ref_t org_apache_arrow_flatbuf_Tensor_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Tensor_formal_args)
{
    if (org_apache_arrow_flatbuf_Tensor_start(B)
        || org_apache_arrow_flatbuf_Tensor_data_add(B, v4)
        || org_apache_arrow_flatbuf_Tensor_type_add_value(B, v1)
        || org_apache_arrow_flatbuf_Tensor_shape_add(B, v2)
        || org_apache_arrow_flatbuf_Tensor_strides_add(B, v3)
        || org_apache_arrow_flatbuf_Tensor_type_add_type(B, v1.type)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Tensor_end(B);
}

static org_apache_arrow_flatbuf_Tensor_ref_t org_apache_arrow_flatbuf_Tensor_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Tensor_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Tensor_start(B)
        || org_apache_arrow_flatbuf_Tensor_data_pick(B, t)
        || org_apache_arrow_flatbuf_Tensor_type_pick(B, t)
        || org_apache_arrow_flatbuf_Tensor_shape_pick(B, t)
        || org_apache_arrow_flatbuf_Tensor_strides_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Tensor_end(B));
}

#include "flatcc/flatcc_epilogue.h"
#endif /* TENSOR_BUILDER_H */
#ifndef TENSOR_VERIFIER_H
#define TENSOR_VERIFIER_H

/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

#ifndef TENSOR_READER_H
#include "Tensor_reader.h"
#endif
#include "flatcc/flatcc_verifier.h"
#ifndef SCHEMA_VERIFIER_H
#include "Schema_verifier.h"
#endif
#include "flatcc/flatcc_prologue.h"

static int org_apache_arrow_flatbuf_TensorDim_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Tensor_verify_table(flatcc_table_verifier_descriptor_t *td);

static int org_apache_arrow_flatbuf_TensorDim_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 8, 8) /* size */)) return ret;
    if ((ret = flatcc_verify_string_field(td, 1, 0) /* name */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_TensorDim_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_TensorDim_identifier, &org_apache_arrow_flatbuf_TensorDim_verify_table);
}

static inline int org_apache_arrow_flatbuf_TensorDim_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_TensorDim_type_identifier, &org_apache_arrow_flatbuf_TensorDim_verify_table);
}

static inline int org_apache_arrow_flatbuf_TensorDim_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_TensorDim_verify_table);
}

static inline int org_apache_arrow_flatbuf_TensorDim_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_TensorDim_verify_table);
}

static int org_apache_arrow_flatbuf_Tensor_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_union_field(td, 1, 1, &org_apache_arrow_flatbuf_Type_union_verifier) /* type */)) return ret;
    if ((ret = flatcc_verify_table_vector_field(td, 2, 1, &org_apache_arrow_flatbuf_TensorDim_verify_table) /* shape */)) return ret;
    if ((ret = flatcc_verify_vector_field(td, 3, 0, 8, 8, INT64_C(536870911)) /* strides */)) return ret;
    if ((ret = flatcc_verify_field(td, 4, 16, 8) /* data */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Tensor_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Tensor_identifier, &org_apache_arrow_flatbuf_Tensor_verify_table);
}

static inline int org_apache_arrow_flatbuf_Tensor_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Tensor_type_identifier, &org_apache_arrow_flatbuf_Tensor_verify_table);
}

static inline int org_apache_arrow_flatbuf_Tensor_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Tensor_verify_table);
}

static inline int org_apache_arrow_flatbuf_Tensor_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Tensor_verify_table);
}

#include "flatcc/flatcc_epilogue.h"
#endif /* TENSOR_VERIFIER_H */
#ifndef SPARSETENSOR_READER_H
#define SPARSETENSOR_READER_H

/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

#ifndef FLATBUFFERS_COMMON_READER_H
#include "flatbuffers_common_reader.h"
#endif
#ifndef TENSOR_READER_H
#include "Tensor_reader.h"
#endif
#include "flatcc/flatcc_flatbuffers.h"
#ifndef __alignas_is_defined
#include <stdalign.h>
#endif
#include "flatcc/flatcc_prologue.h"
#ifndef flatbuffers_identifier
#define flatbuffers_identifier 0
#endif
#ifndef flatbuffers_extension
#define flatbuffers_extension "bin"
#endif


typedef const struct org_apache_arrow_flatbuf_SparseTensorIndexCOO_table *org_apache_arrow_flatbuf_SparseTensorIndexCOO_table_t;
typedef struct org_apache_arrow_flatbuf_SparseTensorIndexCOO_table *org_apache_arrow_flatbuf_SparseTensorIndexCOO_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_SparseTensorIndexCOO_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_SparseTensorIndexCOO_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_SparseMatrixIndexCSX_table *org_apache_arrow_flatbuf_SparseMatrixIndexCSX_table_t;
typedef struct org_apache_arrow_flatbuf_SparseMatrixIndexCSX_table *org_apache_arrow_flatbuf_SparseMatrixIndexCSX_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_SparseMatrixIndexCSX_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_SparseMatrixIndexCSX_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_SparseTensorIndexCSF_table *org_apache_arrow_flatbuf_SparseTensorIndexCSF_table_t;
typedef struct org_apache_arrow_flatbuf_SparseTensorIndexCSF_table *org_apache_arrow_flatbuf_SparseTensorIndexCSF_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_SparseTensorIndexCSF_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_SparseTensorIndexCSF_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_SparseTensor_table *org_apache_arrow_flatbuf_SparseTensor_table_t;
typedef struct org_apache_arrow_flatbuf_SparseTensor_table *org_apache_arrow_flatbuf_SparseTensor_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_SparseTensor_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_SparseTensor_mutable_vec_t;
#ifndef org_apache_arrow_flatbuf_SparseTensorIndexCOO_file_identifier
#define org_apache_arrow_flatbuf_SparseTensorIndexCOO_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_SparseTensorIndexCOO_file_identifier */
#ifndef org_apache_arrow_flatbuf_SparseTensorIndexCOO_identifier
#define org_apache_arrow_flatbuf_SparseTensorIndexCOO_identifier 0
#endif
#define org_apache_arrow_flatbuf_SparseTensorIndexCOO_type_hash ((flatbuffers_thash_t)0x3b31385a)
#define org_apache_arrow_flatbuf_SparseTensorIndexCOO_type_identifier "\x5a\x38\x31\x3b"
#ifndef org_apache_arrow_flatbuf_SparseTensorIndexCOO_file_extension
#define org_apache_arrow_flatbuf_SparseTensorIndexCOO_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_SparseMatrixIndexCSX_file_identifier
#define org_apache_arrow_flatbuf_SparseMatrixIndexCSX_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_SparseMatrixIndexCSX_file_identifier */
#ifndef org_apache_arrow_flatbuf_SparseMatrixIndexCSX_identifier
#define org_apache_arrow_flatbuf_SparseMatrixIndexCSX_identifier 0
#endif
#define org_apache_arrow_flatbuf_SparseMatrixIndexCSX_type_hash ((flatbuffers_thash_t)0xec57ea87)
#define org_apache_arrow_flatbuf_SparseMatrixIndexCSX_type_identifier "\x87\xea\x57\xec"
#ifndef org_apache_arrow_flatbuf_SparseMatrixIndexCSX_file_extension
#define org_apache_arrow_flatbuf_SparseMatrixIndexCSX_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_SparseTensorIndexCSF_file_identifier
#define org_apache_arrow_flatbuf_SparseTensorIndexCSF_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_SparseTensorIndexCSF_file_identifier */
#ifndef org_apache_arrow_flatbuf_SparseTensorIndexCSF_identifier
#define org_apache_arrow_flatbuf_SparseTensorIndexCSF_identifier 0
#endif
#define org_apache_arrow_flatbuf_SparseTensorIndexCSF_type_hash ((flatbuffers_thash_t)0xf44edda9)
#define org_apache_arrow_flatbuf_SparseTensorIndexCSF_type_identifier "\xa9\xdd\x4e\xf4"
#ifndef org_apache_arrow_flatbuf_SparseTensorIndexCSF_file_extension
#define org_apache_arrow_flatbuf_SparseTensorIndexCSF_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_SparseTensor_file_identifier
#define org_apache_arrow_flatbuf_SparseTensor_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_SparseTensor_file_identifier */
#ifndef org_apache_arrow_flatbuf_SparseTensor_identifier
#define org_apache_arrow_flatbuf_SparseTensor_identifier 0
#endif
#define org_apache_arrow_flatbuf_SparseTensor_type_hash ((flatbuffers_thash_t)0xae6f7239)
#define org_apache_arrow_flatbuf_SparseTensor_type_identifier "\x39\x72\x6f\xae"
#ifndef org_apache_arrow_flatbuf_SparseTensor_file_extension
#define org_apache_arrow_flatbuf_SparseTensor_file_extension "bin"
#endif

typedef int16_t org_apache_arrow_flatbuf_SparseMatrixCompressedAxis_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_SparseMatrixCompressedAxis, org_apache_arrow_flatbuf_SparseMatrixCompressedAxis_enum_t, 16)
#define org_apache_arrow_flatbuf_SparseMatrixCompressedAxis_Row ((org_apache_arrow_flatbuf_SparseMatrixCompressedAxis_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_SparseMatrixCompressedAxis_Column ((org_apache_arrow_flatbuf_SparseMatrixCompressedAxis_enum_t)INT16_C(1))

static inline const char *org_apache_arrow_flatbuf_SparseMatrixCompressedAxis_name(org_apache_arrow_flatbuf_SparseMatrixCompressedAxis_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_SparseMatrixCompressedAxis_Row: return "Row";
    case org_apache_arrow_flatbuf_SparseMatrixCompressedAxis_Column: return "Column";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_SparseMatrixCompressedAxis_is_known_value(org_apache_arrow_flatbuf_SparseMatrixCompressedAxis_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_SparseMatrixCompressedAxis_Row: return 1;
    case org_apache_arrow_flatbuf_SparseMatrixCompressedAxis_Column: return 1;
    default: return 0;
    }
}



/**  ----------------------------------------------------------------------
 *  EXPERIMENTAL: Data structures for sparse tensors
 *  Coordinate (COO) format of sparse tensor index.
 *
 *  COO's index list are represented as a NxM matrix,
 *  where N is the number of non-zero values,
 *  and M is the number of dimensions of a sparse tensor.
 *
 *  indicesBuffer stores the location and size of the data of this indices
 *  matrix.  The value type and the stride of the indices matrix is
 *  specified in indicesType and indicesStrides fields.
 *
 *  For example, let X be a 2x3x4x5 tensor, and it has the following
 *  6 non-zero values:
 *  ```text
 *    X[0, 1, 2, 0] := 1
 *    X[1, 1, 2, 3] := 2
 *    X[0, 2, 1, 0] := 3
 *    X[0, 1, 3, 0] := 4
 *    X[0, 1, 2, 1] := 5
 *    X[1, 2, 0, 4] := 6
 *  ```
 *  In COO format, the index matrix of X is the following 4x6 matrix:
 *  ```text
 *    [[0, 0, 0, 0, 1, 1],
 *     [1, 1, 1, 2, 1, 2],
 *     [2, 2, 3, 1, 2, 0],
 *     [0, 1, 0, 0, 3, 4]]
 *  ```
 *  When isCanonical is true, the indices is sorted in lexicographical order
 *  (row-major order), and it does not have duplicated entries.  Otherwise,
 *  the indices may not be sorted, or may have duplicated entries. */
struct org_apache_arrow_flatbuf_SparseTensorIndexCOO_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_SparseTensorIndexCOO_vec_len(org_apache_arrow_flatbuf_SparseTensorIndexCOO_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_SparseTensorIndexCOO_table_t org_apache_arrow_flatbuf_SparseTensorIndexCOO_vec_at(org_apache_arrow_flatbuf_SparseTensorIndexCOO_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_SparseTensorIndexCOO_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_SparseTensorIndexCOO)

/**  The type of values in indicesBuffer */
__flatbuffers_define_table_field(0, org_apache_arrow_flatbuf_SparseTensorIndexCOO, indicesType, org_apache_arrow_flatbuf_Int_table_t, 1)
/**  Non-negative byte offsets to advance one value cell along each dimension
 *  If omitted, default to row-major order (C-like). */
__flatbuffers_define_vector_field(1, org_apache_arrow_flatbuf_SparseTensorIndexCOO, indicesStrides, flatbuffers_int64_vec_t, 0)
/**  The location and size of the indices matrix's data */
__flatbuffers_define_struct_field(2, org_apache_arrow_flatbuf_SparseTensorIndexCOO, indicesBuffer, org_apache_arrow_flatbuf_Buffer_struct_t, 1)
/**  This flag is true if and only if the indices matrix is sorted in
 *  row-major order, and does not have duplicated entries.
 *  This sort order is the same as of Tensorflow's SparseTensor,
 *  but it is inverse order of SciPy's canonical coo_matrix
 *  (SciPy employs column-major order for its coo_matrix). */
__flatbuffers_define_scalar_field(3, org_apache_arrow_flatbuf_SparseTensorIndexCOO, isCanonical, flatbuffers_bool, flatbuffers_bool_t, UINT8_C(0))

/**  Compressed Sparse format, that is matrix-specific. */
struct org_apache_arrow_flatbuf_SparseMatrixIndexCSX_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_SparseMatrixIndexCSX_vec_len(org_apache_arrow_flatbuf_SparseMatrixIndexCSX_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_SparseMatrixIndexCSX_table_t org_apache_arrow_flatbuf_SparseMatrixIndexCSX_vec_at(org_apache_arrow_flatbuf_SparseMatrixIndexCSX_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_SparseMatrixIndexCSX_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_SparseMatrixIndexCSX)

/**  Which axis, row or column, is compressed */
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_SparseMatrixIndexCSX, compressedAxis, org_apache_arrow_flatbuf_SparseMatrixCompressedAxis, org_apache_arrow_flatbuf_SparseMatrixCompressedAxis_enum_t, INT16_C(0))
/**  The type of values in indptrBuffer */
__flatbuffers_define_table_field(1, org_apache_arrow_flatbuf_SparseMatrixIndexCSX, indptrType, org_apache_arrow_flatbuf_Int_table_t, 1)
/**  indptrBuffer stores the location and size of indptr array that
 *  represents the range of the rows.
 *  The i-th row spans from `indptr[i]` to `indptr[i+1]` in the data.
 *  The length of this array is 1 + (the number of rows), and the type
 *  of index value is long.
 *
 *  For example, let X be the following 6x4 matrix:
 *  ```text
 *    X := [[0, 1, 2, 0],
 *          [0, 0, 3, 0],
 *          [0, 4, 0, 5],
 *          [0, 0, 0, 0],
 *          [6, 0, 7, 8],
 *          [0, 9, 0, 0]].
 *  ```
 *  The array of non-zero values in X is:
 *  ```text
 *    values(X) = [1, 2, 3, 4, 5, 6, 7, 8, 9].
 *  ```
 *  And the indptr of X is:
 *  ```text
 *    indptr(X) = [0, 2, 3, 5, 5, 8, 10].
 *  ``` */
__flatbuffers_define_struct_field(2, org_apache_arrow_flatbuf_SparseMatrixIndexCSX, indptrBuffer, org_apache_arrow_flatbuf_Buffer_struct_t, 1)
/**  The type of values in indicesBuffer */
__flatbuffers_define_table_field(3, org_apache_arrow_flatbuf_SparseMatrixIndexCSX, indicesType, org_apache_arrow_flatbuf_Int_table_t, 1)
/**  indicesBuffer stores the location and size of the array that
 *  contains the column indices of the corresponding non-zero values.
 *  The type of index value is long.
 *
 *  For example, the indices of the above X is:
 *  ```text
 *    indices(X) = [1, 2, 2, 1, 3, 0, 2, 3, 1].
 *  ```
 *  Note that the indices are sorted in lexicographical order for each row. */
__flatbuffers_define_struct_field(4, org_apache_arrow_flatbuf_SparseMatrixIndexCSX, indicesBuffer, org_apache_arrow_flatbuf_Buffer_struct_t, 1)

/**  Compressed Sparse Fiber (CSF) sparse tensor index. */
struct org_apache_arrow_flatbuf_SparseTensorIndexCSF_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_SparseTensorIndexCSF_vec_len(org_apache_arrow_flatbuf_SparseTensorIndexCSF_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_SparseTensorIndexCSF_table_t org_apache_arrow_flatbuf_SparseTensorIndexCSF_vec_at(org_apache_arrow_flatbuf_SparseTensorIndexCSF_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_SparseTensorIndexCSF_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_SparseTensorIndexCSF)

/**  CSF is a generalization of compressed sparse row (CSR) index.
 *  See [smith2017knl](http://shaden.io/pub-files/smith2017knl.pdf)
 *
 *  CSF index recursively compresses each dimension of a tensor into a set
 *  of prefix trees. Each path from a root to leaf forms one tensor
 *  non-zero index. CSF is implemented with two arrays of buffers and one
 *  arrays of integers.
 *
 *  For example, let X be a 2x3x4x5 tensor and let it have the following
 *  8 non-zero values:
 *  ```text
 *    X[0, 0, 0, 1] := 1
 *    X[0, 0, 0, 2] := 2
 *    X[0, 1, 0, 0] := 3
 *    X[0, 1, 0, 2] := 4
 *    X[0, 1, 1, 0] := 5
 *    X[1, 1, 1, 0] := 6
 *    X[1, 1, 1, 1] := 7
 *    X[1, 1, 1, 2] := 8
 *  ```
 *  As a prefix tree this would be represented as:
 *  ```text
 *          0          1
 *         / \         |
 *        0   1        1
 *       /   / \       |
 *      0   0   1      1
 *     /|  /|   |    /| |
 *    1 2 0 2   0   0 1 2
 *  ```
 *  The type of values in indptrBuffers */
__flatbuffers_define_table_field(0, org_apache_arrow_flatbuf_SparseTensorIndexCSF, indptrType, org_apache_arrow_flatbuf_Int_table_t, 1)
/**  indptrBuffers stores the sparsity structure.
 *  Each two consecutive dimensions in a tensor correspond to a buffer in
 *  indptrBuffers. A pair of consecutive values at `indptrBuffers[dim][i]`
 *  and `indptrBuffers[dim][i + 1]` signify a range of nodes in
 *  `indicesBuffers[dim + 1]` who are children of `indicesBuffers[dim][i]` node.
 *
 *  For example, the indptrBuffers for the above X is:
 *  ```text
 *    indptrBuffer(X) = [
 *                        [0, 2, 3],
 *                        [0, 1, 3, 4],
 *                        [0, 2, 4, 5, 8]
 *                      ].
 *  ``` */
__flatbuffers_define_vector_field(1, org_apache_arrow_flatbuf_SparseTensorIndexCSF, indptrBuffers, org_apache_arrow_flatbuf_Buffer_vec_t, 1)
/**  The type of values in indicesBuffers */
__flatbuffers_define_table_field(2, org_apache_arrow_flatbuf_SparseTensorIndexCSF, indicesType, org_apache_arrow_flatbuf_Int_table_t, 1)
/**  indicesBuffers stores values of nodes.
 *  Each tensor dimension corresponds to a buffer in indicesBuffers.
 *  For example, the indicesBuffers for the above X is:
 *  ```text
 *    indicesBuffer(X) = [
 *                         [0, 1],
 *                         [0, 1, 1],
 *                         [0, 0, 1, 1],
 *                         [1, 2, 0, 2, 0, 0, 1, 2]
 *                       ].
 *  ``` */
__flatbuffers_define_vector_field(3, org_apache_arrow_flatbuf_SparseTensorIndexCSF, indicesBuffers, org_apache_arrow_flatbuf_Buffer_vec_t, 1)
/**  axisOrder stores the sequence in which dimensions were traversed to
 *  produce the prefix tree.
 *  For example, the axisOrder for the above X is:
 *  ```text
 *    axisOrder(X) = [0, 1, 2, 3].
 *  ``` */
__flatbuffers_define_vector_field(4, org_apache_arrow_flatbuf_SparseTensorIndexCSF, axisOrder, flatbuffers_int32_vec_t, 1)
typedef uint8_t org_apache_arrow_flatbuf_SparseTensorIndex_union_type_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_SparseTensorIndex, org_apache_arrow_flatbuf_SparseTensorIndex_union_type_t, 8)
__flatbuffers_define_union(flatbuffers_, org_apache_arrow_flatbuf_SparseTensorIndex)
#define org_apache_arrow_flatbuf_SparseTensorIndex_NONE ((org_apache_arrow_flatbuf_SparseTensorIndex_union_type_t)UINT8_C(0))
#define org_apache_arrow_flatbuf_SparseTensorIndex_SparseTensorIndexCOO ((org_apache_arrow_flatbuf_SparseTensorIndex_union_type_t)UINT8_C(1))
#define org_apache_arrow_flatbuf_SparseTensorIndex_SparseMatrixIndexCSX ((org_apache_arrow_flatbuf_SparseTensorIndex_union_type_t)UINT8_C(2))
#define org_apache_arrow_flatbuf_SparseTensorIndex_SparseTensorIndexCSF ((org_apache_arrow_flatbuf_SparseTensorIndex_union_type_t)UINT8_C(3))

static inline const char *org_apache_arrow_flatbuf_SparseTensorIndex_type_name(org_apache_arrow_flatbuf_SparseTensorIndex_union_type_t type)
{
    switch (type) {
    case org_apache_arrow_flatbuf_SparseTensorIndex_NONE: return "NONE";
    case org_apache_arrow_flatbuf_SparseTensorIndex_SparseTensorIndexCOO: return "SparseTensorIndexCOO";
    case org_apache_arrow_flatbuf_SparseTensorIndex_SparseMatrixIndexCSX: return "SparseMatrixIndexCSX";
    case org_apache_arrow_flatbuf_SparseTensorIndex_SparseTensorIndexCSF: return "SparseTensorIndexCSF";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_SparseTensorIndex_is_known_type(org_apache_arrow_flatbuf_SparseTensorIndex_union_type_t type)
{
    switch (type) {
    case org_apache_arrow_flatbuf_SparseTensorIndex_NONE: return 1;
    case org_apache_arrow_flatbuf_SparseTensorIndex_SparseTensorIndexCOO: return 1;
    case org_apache_arrow_flatbuf_SparseTensorIndex_SparseMatrixIndexCSX: return 1;
    case org_apache_arrow_flatbuf_SparseTensorIndex_SparseTensorIndexCSF: return 1;
    default: return 0;
    }
}


struct org_apache_arrow_flatbuf_SparseTensor_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_SparseTensor_vec_len(org_apache_arrow_flatbuf_SparseTensor_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_SparseTensor_table_t org_apache_arrow_flatbuf_SparseTensor_vec_at(org_apache_arrow_flatbuf_SparseTensor_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_SparseTensor_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_SparseTensor)

/**  The type of data contained in a value cell.
 *  Currently only fixed-width value types are supported,
 *  no strings or nested types. */
__flatbuffers_define_union_field(flatbuffers_, 1, org_apache_arrow_flatbuf_SparseTensor, type, org_apache_arrow_flatbuf_Type, 1)
/**  The dimensions of the tensor, optionally named. */
__flatbuffers_define_vector_field(2, org_apache_arrow_flatbuf_SparseTensor, shape, org_apache_arrow_flatbuf_TensorDim_vec_t, 1)
/**  The number of non-zero values in a sparse tensor. */
__flatbuffers_define_scalar_field(3, org_apache_arrow_flatbuf_SparseTensor, non_zero_length, flatbuffers_int64, int64_t, INT64_C(0))
/**  Sparse tensor index */
__flatbuffers_define_union_field(flatbuffers_, 5, org_apache_arrow_flatbuf_SparseTensor, sparseIndex, org_apache_arrow_flatbuf_SparseTensorIndex, 1)
/**  The location and size of the tensor's data */
__flatbuffers_define_struct_field(6, org_apache_arrow_flatbuf_SparseTensor, data, org_apache_arrow_flatbuf_Buffer_struct_t, 1)


#include "flatcc/flatcc_epilogue.h"
#endif /* SPARSETENSOR_READER_H */
#ifndef SPARSETENSOR_BUILDER_H
#define SPARSETENSOR_BUILDER_H

/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

#ifndef SPARSETENSOR_READER_H
#include "SparseTensor_reader.h"
#endif
#ifndef FLATBUFFERS_COMMON_BUILDER_H
#include "flatbuffers_common_builder.h"
#endif
#ifndef TENSOR_BUILDER_H
#include "Tensor_builder.h"
#endif
#include "flatcc/flatcc_prologue.h"
#ifndef flatbuffers_identifier
#define flatbuffers_identifier 0
#endif
#ifndef flatbuffers_extension
#define flatbuffers_extension "bin"
#endif

#define __org_apache_arrow_flatbuf_SparseMatrixCompressedAxis_formal_args , org_apache_arrow_flatbuf_SparseMatrixCompressedAxis_enum_t v0
#define __org_apache_arrow_flatbuf_SparseMatrixCompressedAxis_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_SparseMatrixCompressedAxis, org_apache_arrow_flatbuf_SparseMatrixCompressedAxis_enum_t)

typedef flatbuffers_union_ref_t org_apache_arrow_flatbuf_SparseTensorIndex_union_ref_t;
typedef flatbuffers_union_vec_ref_t org_apache_arrow_flatbuf_SparseTensorIndex_union_vec_ref_t;
static org_apache_arrow_flatbuf_SparseTensorIndex_union_ref_t org_apache_arrow_flatbuf_SparseTensorIndex_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_SparseTensorIndex_union_t t);

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_SparseTensorIndexCOO_required[] = { 0, 2, 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_SparseTensorIndexCOO_ref_t;
static org_apache_arrow_flatbuf_SparseTensorIndexCOO_ref_t org_apache_arrow_flatbuf_SparseTensorIndexCOO_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_SparseTensorIndexCOO_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_SparseTensorIndexCOO, 4)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_SparseMatrixIndexCSX_required[] = { 1, 2, 3, 4, 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_SparseMatrixIndexCSX_ref_t;
static org_apache_arrow_flatbuf_SparseMatrixIndexCSX_ref_t org_apache_arrow_flatbuf_SparseMatrixIndexCSX_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_SparseMatrixIndexCSX_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_SparseMatrixIndexCSX, 5)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_SparseTensorIndexCSF_required[] = { 0, 1, 2, 3, 4, 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_SparseTensorIndexCSF_ref_t;
static org_apache_arrow_flatbuf_SparseTensorIndexCSF_ref_t org_apache_arrow_flatbuf_SparseTensorIndexCSF_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_SparseTensorIndexCSF_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_SparseTensorIndexCSF, 5)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_SparseTensor_required[] = { 1, 2, 5, 6, 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_SparseTensor_ref_t;
static org_apache_arrow_flatbuf_SparseTensor_ref_t org_apache_arrow_flatbuf_SparseTensor_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_SparseTensor_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor, 7)

#define __org_apache_arrow_flatbuf_SparseTensorIndexCOO_formal_args , org_apache_arrow_flatbuf_Int_ref_t v0, flatbuffers_int64_vec_ref_t v1, org_apache_arrow_flatbuf_Buffer_t *v2, flatbuffers_bool_t v3
#define __org_apache_arrow_flatbuf_SparseTensorIndexCOO_call_args , v0, v1, v2, v3
static inline org_apache_arrow_flatbuf_SparseTensorIndexCOO_ref_t org_apache_arrow_flatbuf_SparseTensorIndexCOO_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_SparseTensorIndexCOO_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_SparseTensorIndexCOO, org_apache_arrow_flatbuf_SparseTensorIndexCOO_file_identifier, org_apache_arrow_flatbuf_SparseTensorIndexCOO_type_identifier)

#define __org_apache_arrow_flatbuf_SparseMatrixIndexCSX_formal_args ,\
  org_apache_arrow_flatbuf_SparseMatrixCompressedAxis_enum_t v0, org_apache_arrow_flatbuf_Int_ref_t v1, org_apache_arrow_flatbuf_Buffer_t *v2, org_apache_arrow_flatbuf_Int_ref_t v3, org_apache_arrow_flatbuf_Buffer_t *v4
#define __org_apache_arrow_flatbuf_SparseMatrixIndexCSX_call_args ,\
  v0, v1, v2, v3, v4
static inline org_apache_arrow_flatbuf_SparseMatrixIndexCSX_ref_t org_apache_arrow_flatbuf_SparseMatrixIndexCSX_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_SparseMatrixIndexCSX_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_SparseMatrixIndexCSX, org_apache_arrow_flatbuf_SparseMatrixIndexCSX_file_identifier, org_apache_arrow_flatbuf_SparseMatrixIndexCSX_type_identifier)

#define __org_apache_arrow_flatbuf_SparseTensorIndexCSF_formal_args ,\
  org_apache_arrow_flatbuf_Int_ref_t v0, org_apache_arrow_flatbuf_Buffer_vec_ref_t v1, org_apache_arrow_flatbuf_Int_ref_t v2, org_apache_arrow_flatbuf_Buffer_vec_ref_t v3, flatbuffers_int32_vec_ref_t v4
#define __org_apache_arrow_flatbuf_SparseTensorIndexCSF_call_args ,\
  v0, v1, v2, v3, v4
static inline org_apache_arrow_flatbuf_SparseTensorIndexCSF_ref_t org_apache_arrow_flatbuf_SparseTensorIndexCSF_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_SparseTensorIndexCSF_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_SparseTensorIndexCSF, org_apache_arrow_flatbuf_SparseTensorIndexCSF_file_identifier, org_apache_arrow_flatbuf_SparseTensorIndexCSF_type_identifier)

#define __org_apache_arrow_flatbuf_SparseTensor_formal_args ,\
  org_apache_arrow_flatbuf_Type_union_ref_t v1, org_apache_arrow_flatbuf_TensorDim_vec_ref_t v2, int64_t v3, org_apache_arrow_flatbuf_SparseTensorIndex_union_ref_t v5, org_apache_arrow_flatbuf_Buffer_t *v6
#define __org_apache_arrow_flatbuf_SparseTensor_call_args ,\
  v1, v2, v3, v5, v6
static inline org_apache_arrow_flatbuf_SparseTensor_ref_t org_apache_arrow_flatbuf_SparseTensor_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_SparseTensor_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor, org_apache_arrow_flatbuf_SparseTensor_file_identifier, org_apache_arrow_flatbuf_SparseTensor_type_identifier)

static inline org_apache_arrow_flatbuf_SparseTensorIndex_union_ref_t org_apache_arrow_flatbuf_SparseTensorIndex_as_NONE(void)
{ org_apache_arrow_flatbuf_SparseTensorIndex_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_SparseTensorIndex_NONE; uref.value = 0; return uref; }
static inline org_apache_arrow_flatbuf_SparseTensorIndex_union_ref_t org_apache_arrow_flatbuf_SparseTensorIndex_as_SparseTensorIndexCOO(org_apache_arrow_flatbuf_SparseTensorIndexCOO_ref_t ref)
{ org_apache_arrow_flatbuf_SparseTensorIndex_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_SparseTensorIndex_SparseTensorIndexCOO; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_SparseTensorIndex_union_ref_t org_apache_arrow_flatbuf_SparseTensorIndex_as_SparseMatrixIndexCSX(org_apache_arrow_flatbuf_SparseMatrixIndexCSX_ref_t ref)
{ org_apache_arrow_flatbuf_SparseTensorIndex_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_SparseTensorIndex_SparseMatrixIndexCSX; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_SparseTensorIndex_union_ref_t org_apache_arrow_flatbuf_SparseTensorIndex_as_SparseTensorIndexCSF(org_apache_arrow_flatbuf_SparseTensorIndexCSF_ref_t ref)
{ org_apache_arrow_flatbuf_SparseTensorIndex_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_SparseTensorIndex_SparseTensorIndexCSF; uref.value = ref; return uref; }
__flatbuffers_build_union_vector(flatbuffers_, org_apache_arrow_flatbuf_SparseTensorIndex)

static org_apache_arrow_flatbuf_SparseTensorIndex_union_ref_t org_apache_arrow_flatbuf_SparseTensorIndex_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_SparseTensorIndex_union_t u)
{
    switch (u.type) {
    case 1: return org_apache_arrow_flatbuf_SparseTensorIndex_as_SparseTensorIndexCOO(org_apache_arrow_flatbuf_SparseTensorIndexCOO_clone(B, (org_apache_arrow_flatbuf_SparseTensorIndexCOO_table_t)u.value));
    case 2: return org_apache_arrow_flatbuf_SparseTensorIndex_as_SparseMatrixIndexCSX(org_apache_arrow_flatbuf_SparseMatrixIndexCSX_clone(B, (org_apache_arrow_flatbuf_SparseMatrixIndexCSX_table_t)u.value));
    case 3: return org_apache_arrow_flatbuf_SparseTensorIndex_as_SparseTensorIndexCSF(org_apache_arrow_flatbuf_SparseTensorIndexCSF_clone(B, (org_apache_arrow_flatbuf_SparseTensorIndexCSF_table_t)u.value));
    default: return org_apache_arrow_flatbuf_SparseTensorIndex_as_NONE();
    }
}

__flatbuffers_build_table_field(0, flatbuffers_, org_apache_arrow_flatbuf_SparseTensorIndexCOO_indicesType, org_apache_arrow_flatbuf_Int, org_apache_arrow_flatbuf_SparseTensorIndexCOO)
__flatbuffers_build_vector_field(1, flatbuffers_, org_apache_arrow_flatbuf_SparseTensorIndexCOO_indicesStrides, flatbuffers_int64, int64_t, org_apache_arrow_flatbuf_SparseTensorIndexCOO)
__flatbuffers_build_struct_field(2, flatbuffers_, org_apache_arrow_flatbuf_SparseTensorIndexCOO_indicesBuffer, org_apache_arrow_flatbuf_Buffer, 16, 8, org_apache_arrow_flatbuf_SparseTensorIndexCOO)
__flatbuffers_build_scalar_field(3, flatbuffers_, org_apache_arrow_flatbuf_SparseTensorIndexCOO_isCanonical, flatbuffers_bool, flatbuffers_bool_t, 1, 1, UINT8_C(0), org_apache_arrow_flatbuf_SparseTensorIndexCOO)

static inline org_apache_arrow_flatbuf_SparseTensorIndexCOO_ref_t org_apache_arrow_flatbuf_SparseTensorIndexCOO_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_SparseTensorIndexCOO_formal_args)
{
    if (org_apache_arrow_flatbuf_SparseTensorIndexCOO_start(B)
        || org_apache_arrow_flatbuf_SparseTensorIndexCOO_indicesBuffer_add(B, v2)
        || org_apache_arrow_flatbuf_SparseTensorIndexCOO_indicesType_add(B, v0)
        || org_apache_arrow_flatbuf_SparseTensorIndexCOO_indicesStrides_add(B, v1)
        || org_apache_arrow_flatbuf_SparseTensorIndexCOO_isCanonical_add(B, v3)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_SparseTensorIndexCOO_end(B);
}

static org_apache_arrow_flatbuf_SparseTensorIndexCOO_ref_t org_apache_arrow_flatbuf_SparseTensorIndexCOO_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_SparseTensorIndexCOO_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_SparseTensorIndexCOO_start(B)
        || org_apache_arrow_flatbuf_SparseTensorIndexCOO_indicesBuffer_pick(B, t)
        || org_apache_arrow_flatbuf_SparseTensorIndexCOO_indicesType_pick(B, t)
        || org_apache_arrow_flatbuf_SparseTensorIndexCOO_indicesStrides_pick(B, t)
        || org_apache_arrow_flatbuf_SparseTensorIndexCOO_isCanonical_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_SparseTensorIndexCOO_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_SparseMatrixIndexCSX_compressedAxis, org_apache_arrow_flatbuf_SparseMatrixCompressedAxis, org_apache_arrow_flatbuf_SparseMatrixCompressedAxis_enum_t, 2, 2, INT16_C(0), org_apache_arrow_flatbuf_SparseMatrixIndexCSX)
__flatbuffers_build_table_field(1, flatbuffers_, org_apache_arrow_flatbuf_SparseMatrixIndexCSX_indptrType, org_apache_arrow_flatbuf_Int, org_apache_arrow_flatbuf_SparseMatrixIndexCSX)
__flatbuffers_build_struct_field(2, flatbuffers_, org_apache_arrow_flatbuf_SparseMatrixIndexCSX_indptrBuffer, org_apache_arrow_flatbuf_Buffer, 16, 8, org_apache_arrow_flatbuf_SparseMatrixIndexCSX)
__flatbuffers_build_table_field(3, flatbuffers_, org_apache_arrow_flatbuf_SparseMatrixIndexCSX_indicesType, org_apache_arrow_flatbuf_Int, org_apache_arrow_flatbuf_SparseMatrixIndexCSX)
__flatbuffers_build_struct_field(4, flatbuffers_, org_apache_arrow_flatbuf_SparseMatrixIndexCSX_indicesBuffer, org_apache_arrow_flatbuf_Buffer, 16, 8, org_apache_arrow_flatbuf_SparseMatrixIndexCSX)

static inline org_apache_arrow_flatbuf_SparseMatrixIndexCSX_ref_t org_apache_arrow_flatbuf_SparseMatrixIndexCSX_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_SparseMatrixIndexCSX_formal_args)
{
    if (org_apache_arrow_flatbuf_SparseMatrixIndexCSX_start(B)
        || org_apache_arrow_flatbuf_SparseMatrixIndexCSX_indptrBuffer_add(B, v2)
        || org_apache_arrow_flatbuf_SparseMatrixIndexCSX_indicesBuffer_add(B, v4)
        || org_apache_arrow_flatbuf_SparseMatrixIndexCSX_indptrType_add(B, v1)
        || org_apache_arrow_flatbuf_SparseMatrixIndexCSX_indicesType_add(B, v3)
        || org_apache_arrow_flatbuf_SparseMatrixIndexCSX_compressedAxis_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_SparseMatrixIndexCSX_end(B);
}

static org_apache_arrow_flatbuf_SparseMatrixIndexCSX_ref_t org_apache_arrow_flatbuf_SparseMatrixIndexCSX_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_SparseMatrixIndexCSX_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_SparseMatrixIndexCSX_start(B)
        || org_apache_arrow_flatbuf_SparseMatrixIndexCSX_indptrBuffer_pick(B, t)
        || org_apache_arrow_flatbuf_SparseMatrixIndexCSX_indicesBuffer_pick(B, t)
        || org_apache_arrow_flatbuf_SparseMatrixIndexCSX_indptrType_pick(B, t)
        || org_apache_arrow_flatbuf_SparseMatrixIndexCSX_indicesType_pick(B, t)
        || org_apache_arrow_flatbuf_SparseMatrixIndexCSX_compressedAxis_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_SparseMatrixIndexCSX_end(B));
}

__flatbuffers_build_table_field(0, flatbuffers_, org_apache_arrow_flatbuf_SparseTensorIndexCSF_indptrType, org_apache_arrow_flatbuf_Int, org_apache_arrow_flatbuf_SparseTensorIndexCSF)
__flatbuffers_build_vector_field(1, flatbuffers_, org_apache_arrow_flatbuf_SparseTensorIndexCSF_indptrBuffers, org_apache_arrow_flatbuf_Buffer, org_apache_arrow_flatbuf_Buffer_t, org_apache_arrow_flatbuf_SparseTensorIndexCSF)
__flatbuffers_build_table_field(2, flatbuffers_, org_apache_arrow_flatbuf_SparseTensorIndexCSF_indicesType, org_apache_arrow_flatbuf_Int, org_apache_arrow_flatbuf_SparseTensorIndexCSF)
__flatbuffers_build_vector_field(3, flatbuffers_, org_apache_arrow_flatbuf_SparseTensorIndexCSF_indicesBuffers, org_apache_arrow_flatbuf_Buffer, org_apache_arrow_flatbuf_Buffer_t, org_apache_arrow_flatbuf_SparseTensorIndexCSF)
__flatbuffers_build_vector_field(4, flatbuffers_, org_apache_arrow_flatbuf_SparseTensorIndexCSF_axisOrder, flatbuffers_int32, int32_t, org_apache_arrow_flatbuf_SparseTensorIndexCSF)

static inline org_apache_arrow_flatbuf_SparseTensorIndexCSF_ref_t org_apache_arrow_flatbuf_SparseTensorIndexCSF_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_SparseTensorIndexCSF_formal_args)
{
    if (org_apache_arrow_flatbuf_SparseTensorIndexCSF_start(B)
        || org_apache_arrow_flatbuf_SparseTensorIndexCSF_indptrType_add(B, v0)
        || org_apache_arrow_flatbuf_SparseTensorIndexCSF_indptrBuffers_add(B, v1)
        || org_apache_arrow_flatbuf_SparseTensorIndexCSF_indicesType_add(B, v2)
        || org_apache_arrow_flatbuf_SparseTensorIndexCSF_indicesBuffers_add(B, v3)
        || org_apache_arrow_flatbuf_SparseTensorIndexCSF_axisOrder_add(B, v4)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_SparseTensorIndexCSF_end(B);
}

static org_apache_arrow_flatbuf_SparseTensorIndexCSF_ref_t org_apache_arrow_flatbuf_SparseTensorIndexCSF_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_SparseTensorIndexCSF_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_SparseTensorIndexCSF_start(B)
        || org_apache_arrow_flatbuf_SparseTensorIndexCSF_indptrType_pick(B, t)
        || org_apache_arrow_flatbuf_SparseTensorIndexCSF_indptrBuffers_pick(B, t)
        || org_apache_arrow_flatbuf_SparseTensorIndexCSF_indicesType_pick(B, t)
        || org_apache_arrow_flatbuf_SparseTensorIndexCSF_indicesBuffers_pick(B, t)
        || org_apache_arrow_flatbuf_SparseTensorIndexCSF_axisOrder_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_SparseTensorIndexCSF_end(B));
}

__flatbuffers_build_union_field(1, flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, org_apache_arrow_flatbuf_SparseTensor)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, Null, org_apache_arrow_flatbuf_Null)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, Int, org_apache_arrow_flatbuf_Int)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, FloatingPoint, org_apache_arrow_flatbuf_FloatingPoint)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, Binary, org_apache_arrow_flatbuf_Binary)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, Utf8, org_apache_arrow_flatbuf_Utf8)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, Bool, org_apache_arrow_flatbuf_Bool)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, Decimal, org_apache_arrow_flatbuf_Decimal)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, Date, org_apache_arrow_flatbuf_Date)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, Time, org_apache_arrow_flatbuf_Time)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, Timestamp, org_apache_arrow_flatbuf_Timestamp)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, Interval, org_apache_arrow_flatbuf_Interval)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, List, org_apache_arrow_flatbuf_List)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, Struct_, org_apache_arrow_flatbuf_Struct_)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, Union, org_apache_arrow_flatbuf_Union)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, FixedSizeBinary, org_apache_arrow_flatbuf_FixedSizeBinary)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, FixedSizeList, org_apache_arrow_flatbuf_FixedSizeList)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, Map, org_apache_arrow_flatbuf_Map)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, Duration, org_apache_arrow_flatbuf_Duration)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, LargeBinary, org_apache_arrow_flatbuf_LargeBinary)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, LargeUtf8, org_apache_arrow_flatbuf_LargeUtf8)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, LargeList, org_apache_arrow_flatbuf_LargeList)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_type, org_apache_arrow_flatbuf_Type, RunEndEncoded, org_apache_arrow_flatbuf_RunEndEncoded)
__flatbuffers_build_table_vector_field(2, flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_shape, org_apache_arrow_flatbuf_TensorDim, org_apache_arrow_flatbuf_SparseTensor)
__flatbuffers_build_scalar_field(3, flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_non_zero_length, flatbuffers_int64, int64_t, 8, 8, INT64_C(0), org_apache_arrow_flatbuf_SparseTensor)
__flatbuffers_build_union_field(5, flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_sparseIndex, org_apache_arrow_flatbuf_SparseTensorIndex, org_apache_arrow_flatbuf_SparseTensor)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_sparseIndex, org_apache_arrow_flatbuf_SparseTensorIndex, SparseTensorIndexCOO, org_apache_arrow_flatbuf_SparseTensorIndexCOO)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_sparseIndex, org_apache_arrow_flatbuf_SparseTensorIndex, SparseMatrixIndexCSX, org_apache_arrow_flatbuf_SparseMatrixIndexCSX)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_sparseIndex, org_apache_arrow_flatbuf_SparseTensorIndex, SparseTensorIndexCSF, org_apache_arrow_flatbuf_SparseTensorIndexCSF)
__flatbuffers_build_struct_field(6, flatbuffers_, org_apache_arrow_flatbuf_SparseTensor_data, org_apache_arrow_flatbuf_Buffer, 16, 8, org_apache_arrow_flatbuf_SparseTensor)

static inline org_apache_arrow_flatbuf_SparseTensor_ref_t org_apache_arrow_flatbuf_SparseTensor_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_SparseTensor_formal_args)
{
    if (org_apache_arrow_flatbuf_SparseTensor_start(B)
        || org_apache_arrow_flatbuf_SparseTensor_non_zero_length_add(B, v3)
        || org_apache_arrow_flatbuf_SparseTensor_data_add(B, v6)
        || org_apache_arrow_flatbuf_SparseTensor_type_add_value(B, v1)
        || org_apache_arrow_flatbuf_SparseTensor_shape_add(B, v2)
        || org_apache_arrow_flatbuf_SparseTensor_sparseIndex_add_value(B, v5)
        || org_apache_arrow_flatbuf_SparseTensor_type_add_type(B, v1.type)
        || org_apache_arrow_flatbuf_SparseTensor_sparseIndex_add_type(B, v5.type)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_SparseTensor_end(B);
}

static org_apache_arrow_flatbuf_SparseTensor_ref_t org_apache_arrow_flatbuf_SparseTensor_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_SparseTensor_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_SparseTensor_start(B)
        || org_apache_arrow_flatbuf_SparseTensor_non_zero_length_pick(B, t)
        || org_apache_arrow_flatbuf_SparseTensor_data_pick(B, t)
        || org_apache_arrow_flatbuf_SparseTensor_type_pick(B, t)
        || org_apache_arrow_flatbuf_SparseTensor_shape_pick(B, t)
        || org_apache_arrow_flatbuf_SparseTensor_sparseIndex_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_SparseTensor_end(B));
}

#include "flatcc/flatcc_epilogue.h"
#endif /* SPARSETENSOR_BUILDER_H */
#ifndef SPARSETENSOR_VERIFIER_H
#define SPARSETENSOR_VERIFIER_H

/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

#ifndef SPARSETENSOR_READER_H
#include "SparseTensor_reader.h"
#endif
#include "flatcc/flatcc_verifier.h"
#ifndef TENSOR_VERIFIER_H
#include "Tensor_verifier.h"
#endif
#include "flatcc/flatcc_prologue.h"

static int org_apache_arrow_flatbuf_SparseTensorIndexCOO_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_SparseMatrixIndexCSX_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_SparseTensorIndexCSF_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_SparseTensor_verify_table(flatcc_table_verifier_descriptor_t *td);

static int org_apache_arrow_flatbuf_SparseTensorIndex_union_verifier(flatcc_union_verifier_descriptor_t *ud)
{
    switch (ud->type) {
    case 1: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_SparseTensorIndexCOO_verify_table); /* SparseTensorIndexCOO */
    case 2: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_SparseMatrixIndexCSX_verify_table); /* SparseMatrixIndexCSX */
    case 3: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_SparseTensorIndexCSF_verify_table); /* SparseTensorIndexCSF */
    default: return flatcc_verify_ok;
    }
}

static int org_apache_arrow_flatbuf_SparseTensorIndexCOO_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_table_field(td, 0, 1, &org_apache_arrow_flatbuf_Int_verify_table) /* indicesType */)) return ret;
    if ((ret = flatcc_verify_vector_field(td, 1, 0, 8, 8, INT64_C(536870911)) /* indicesStrides */)) return ret;
    if ((ret = flatcc_verify_field(td, 2, 16, 8) /* indicesBuffer */)) return ret;
    if ((ret = flatcc_verify_field(td, 3, 1, 1) /* isCanonical */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_SparseTensorIndexCOO_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_SparseTensorIndexCOO_identifier, &org_apache_arrow_flatbuf_SparseTensorIndexCOO_verify_table);
}

static inline int org_apache_arrow_flatbuf_SparseTensorIndexCOO_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_SparseTensorIndexCOO_type_identifier, &org_apache_arrow_flatbuf_SparseTensorIndexCOO_verify_table);
}

static inline int org_apache_arrow_flatbuf_SparseTensorIndexCOO_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_SparseTensorIndexCOO_verify_table);
}

static inline int org_apache_arrow_flatbuf_SparseTensorIndexCOO_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_SparseTensorIndexCOO_verify_table);
}

static int org_apache_arrow_flatbuf_SparseMatrixIndexCSX_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* compressedAxis */)) return ret;
    if ((ret = flatcc_verify_table_field(td, 1, 1, &org_apache_arrow_flatbuf_Int_verify_table) /* indptrType */)) return ret;
    if ((ret = flatcc_verify_field(td, 2, 16, 8) /* indptrBuffer */)) return ret;
    if ((ret = flatcc_verify_table_field(td, 3, 1, &org_apache_arrow_flatbuf_Int_verify_table) /* indicesType */)) return ret;
    if ((ret = flatcc_verify_field(td, 4, 16, 8) /* indicesBuffer */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_SparseMatrixIndexCSX_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_SparseMatrixIndexCSX_identifier, &org_apache_arrow_flatbuf_SparseMatrixIndexCSX_verify_table);
}

static inline int org_apache_arrow_flatbuf_SparseMatrixIndexCSX_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_SparseMatrixIndexCSX_type_identifier, &org_apache_arrow_flatbuf_SparseMatrixIndexCSX_verify_table);
}

static inline int org_apache_arrow_flatbuf_SparseMatrixIndexCSX_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_SparseMatrixIndexCSX_verify_table);
}

static inline int org_apache_arrow_flatbuf_SparseMatrixIndexCSX_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_SparseMatrixIndexCSX_verify_table);
}

static int org_apache_arrow_flatbuf_SparseTensorIndexCSF_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_table_field(td, 0, 1, &org_apache_arrow_flatbuf_Int_verify_table) /* indptrType */)) return ret;
    if ((ret = flatcc_verify_vector_field(td, 1, 1, 16, 8, INT64_C(268435455)) /* indptrBuffers */)) return ret;
    if ((ret = flatcc_verify_table_field(td, 2, 1, &org_apache_arrow_flatbuf_Int_verify_table) /* indicesType */)) return ret;
    if ((ret = flatcc_verify_vector_field(td, 3, 1, 16, 8, INT64_C(268435455)) /* indicesBuffers */)) return ret;
    if ((ret = flatcc_verify_vector_field(td, 4, 1, 4, 4, INT64_C(1073741823)) /* axisOrder */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_SparseTensorIndexCSF_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_SparseTensorIndexCSF_identifier, &org_apache_arrow_flatbuf_SparseTensorIndexCSF_verify_table);
}

static inline int org_apache_arrow_flatbuf_SparseTensorIndexCSF_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_SparseTensorIndexCSF_type_identifier, &org_apache_arrow_flatbuf_SparseTensorIndexCSF_verify_table);
}

static inline int org_apache_arrow_flatbuf_SparseTensorIndexCSF_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_SparseTensorIndexCSF_verify_table);
}

static inline int org_apache_arrow_flatbuf_SparseTensorIndexCSF_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_SparseTensorIndexCSF_verify_table);
}

static int org_apache_arrow_flatbuf_SparseTensor_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_union_field(td, 1, 1, &org_apache_arrow_flatbuf_Type_union_verifier) /* type */)) return ret;
    if ((ret = flatcc_verify_table_vector_field(td, 2, 1, &org_apache_arrow_flatbuf_TensorDim_verify_table) /* shape */)) return ret;
    if ((ret = flatcc_verify_field(td, 3, 8, 8) /* non_zero_length */)) return ret;
    if ((ret = flatcc_verify_union_field(td, 5, 1, &org_apache_arrow_flatbuf_SparseTensorIndex_union_verifier) /* sparseIndex */)) return ret;
    if ((ret = flatcc_verify_field(td, 6, 16, 8) /* data */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_SparseTensor_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_SparseTensor_identifier, &org_apache_arrow_flatbuf_SparseTensor_verify_table);
}

static inline int org_apache_arrow_flatbuf_SparseTensor_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_SparseTensor_type_identifier, &org_apache_arrow_flatbuf_SparseTensor_verify_table);
}

static inline int org_apache_arrow_flatbuf_SparseTensor_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_SparseTensor_verify_table);
}

static inline int org_apache_arrow_flatbuf_SparseTensor_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_SparseTensor_verify_table);
}

#include "flatcc/flatcc_epilogue.h"
#endif /* SPARSETENSOR_VERIFIER_H */
#ifndef SCHEMA_READER_H
#define SCHEMA_READER_H

/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

#ifndef FLATBUFFERS_COMMON_READER_H
#include "flatbuffers_common_reader.h"
#endif
#include "flatcc/flatcc_flatbuffers.h"
#ifndef __alignas_is_defined
#include <stdalign.h>
#endif
#include "flatcc/flatcc_prologue.h"
#ifndef flatbuffers_identifier
#define flatbuffers_identifier 0
#endif
#ifndef flatbuffers_extension
#define flatbuffers_extension "bin"
#endif

typedef struct org_apache_arrow_flatbuf_Buffer org_apache_arrow_flatbuf_Buffer_t;
typedef const org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_struct_t;
typedef org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_mutable_struct_t;
typedef const org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_vec_t;
typedef org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_mutable_vec_t;

typedef const struct org_apache_arrow_flatbuf_Null_table *org_apache_arrow_flatbuf_Null_table_t;
typedef struct org_apache_arrow_flatbuf_Null_table *org_apache_arrow_flatbuf_Null_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Null_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Null_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Struct__table *org_apache_arrow_flatbuf_Struct__table_t;
typedef struct org_apache_arrow_flatbuf_Struct__table *org_apache_arrow_flatbuf_Struct__mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Struct__vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Struct__mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_List_table *org_apache_arrow_flatbuf_List_table_t;
typedef struct org_apache_arrow_flatbuf_List_table *org_apache_arrow_flatbuf_List_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_List_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_List_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_LargeList_table *org_apache_arrow_flatbuf_LargeList_table_t;
typedef struct org_apache_arrow_flatbuf_LargeList_table *org_apache_arrow_flatbuf_LargeList_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_LargeList_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_LargeList_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_FixedSizeList_table *org_apache_arrow_flatbuf_FixedSizeList_table_t;
typedef struct org_apache_arrow_flatbuf_FixedSizeList_table *org_apache_arrow_flatbuf_FixedSizeList_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_FixedSizeList_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_FixedSizeList_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Map_table *org_apache_arrow_flatbuf_Map_table_t;
typedef struct org_apache_arrow_flatbuf_Map_table *org_apache_arrow_flatbuf_Map_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Map_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Map_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Union_table *org_apache_arrow_flatbuf_Union_table_t;
typedef struct org_apache_arrow_flatbuf_Union_table *org_apache_arrow_flatbuf_Union_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Union_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Union_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Int_table *org_apache_arrow_flatbuf_Int_table_t;
typedef struct org_apache_arrow_flatbuf_Int_table *org_apache_arrow_flatbuf_Int_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Int_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Int_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_FloatingPoint_table *org_apache_arrow_flatbuf_FloatingPoint_table_t;
typedef struct org_apache_arrow_flatbuf_FloatingPoint_table *org_apache_arrow_flatbuf_FloatingPoint_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_FloatingPoint_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_FloatingPoint_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Utf8_table *org_apache_arrow_flatbuf_Utf8_table_t;
typedef struct org_apache_arrow_flatbuf_Utf8_table *org_apache_arrow_flatbuf_Utf8_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Utf8_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Utf8_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Binary_table *org_apache_arrow_flatbuf_Binary_table_t;
typedef struct org_apache_arrow_flatbuf_Binary_table *org_apache_arrow_flatbuf_Binary_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Binary_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Binary_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_LargeUtf8_table *org_apache_arrow_flatbuf_LargeUtf8_table_t;
typedef struct org_apache_arrow_flatbuf_LargeUtf8_table *org_apache_arrow_flatbuf_LargeUtf8_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_LargeUtf8_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_LargeUtf8_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_LargeBinary_table *org_apache_arrow_flatbuf_LargeBinary_table_t;
typedef struct org_apache_arrow_flatbuf_LargeBinary_table *org_apache_arrow_flatbuf_LargeBinary_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_LargeBinary_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_LargeBinary_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_FixedSizeBinary_table *org_apache_arrow_flatbuf_FixedSizeBinary_table_t;
typedef struct org_apache_arrow_flatbuf_FixedSizeBinary_table *org_apache_arrow_flatbuf_FixedSizeBinary_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_FixedSizeBinary_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_FixedSizeBinary_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Bool_table *org_apache_arrow_flatbuf_Bool_table_t;
typedef struct org_apache_arrow_flatbuf_Bool_table *org_apache_arrow_flatbuf_Bool_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Bool_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Bool_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_RunEndEncoded_table *org_apache_arrow_flatbuf_RunEndEncoded_table_t;
typedef struct org_apache_arrow_flatbuf_RunEndEncoded_table *org_apache_arrow_flatbuf_RunEndEncoded_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_RunEndEncoded_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_RunEndEncoded_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Decimal_table *org_apache_arrow_flatbuf_Decimal_table_t;
typedef struct org_apache_arrow_flatbuf_Decimal_table *org_apache_arrow_flatbuf_Decimal_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Decimal_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Decimal_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Date_table *org_apache_arrow_flatbuf_Date_table_t;
typedef struct org_apache_arrow_flatbuf_Date_table *org_apache_arrow_flatbuf_Date_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Date_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Date_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Time_table *org_apache_arrow_flatbuf_Time_table_t;
typedef struct org_apache_arrow_flatbuf_Time_table *org_apache_arrow_flatbuf_Time_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Time_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Time_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Timestamp_table *org_apache_arrow_flatbuf_Timestamp_table_t;
typedef struct org_apache_arrow_flatbuf_Timestamp_table *org_apache_arrow_flatbuf_Timestamp_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Timestamp_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Timestamp_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Interval_table *org_apache_arrow_flatbuf_Interval_table_t;
typedef struct org_apache_arrow_flatbuf_Interval_table *org_apache_arrow_flatbuf_Interval_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Interval_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Interval_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Duration_table *org_apache_arrow_flatbuf_Duration_table_t;
typedef struct org_apache_arrow_flatbuf_Duration_table *org_apache_arrow_flatbuf_Duration_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Duration_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Duration_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_KeyValue_table *org_apache_arrow_flatbuf_KeyValue_table_t;
typedef struct org_apache_arrow_flatbuf_KeyValue_table *org_apache_arrow_flatbuf_KeyValue_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_KeyValue_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_KeyValue_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_DictionaryEncoding_table *org_apache_arrow_flatbuf_DictionaryEncoding_table_t;
typedef struct org_apache_arrow_flatbuf_DictionaryEncoding_table *org_apache_arrow_flatbuf_DictionaryEncoding_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_DictionaryEncoding_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_DictionaryEncoding_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Field_table *org_apache_arrow_flatbuf_Field_table_t;
typedef struct org_apache_arrow_flatbuf_Field_table *org_apache_arrow_flatbuf_Field_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Field_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Field_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Schema_table *org_apache_arrow_flatbuf_Schema_table_t;
typedef struct org_apache_arrow_flatbuf_Schema_table *org_apache_arrow_flatbuf_Schema_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Schema_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Schema_mutable_vec_t;
#ifndef org_apache_arrow_flatbuf_Null_file_identifier
#define org_apache_arrow_flatbuf_Null_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Null_file_identifier */
#ifndef org_apache_arrow_flatbuf_Null_identifier
#define org_apache_arrow_flatbuf_Null_identifier 0
#endif
#define org_apache_arrow_flatbuf_Null_type_hash ((flatbuffers_thash_t)0x7b36a4dd)
#define org_apache_arrow_flatbuf_Null_type_identifier "\xdd\xa4\x36\x7b"
#ifndef org_apache_arrow_flatbuf_Null_file_extension
#define org_apache_arrow_flatbuf_Null_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Struct__file_identifier
#define org_apache_arrow_flatbuf_Struct__file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Struct__file_identifier */
#ifndef org_apache_arrow_flatbuf_Struct__identifier
#define org_apache_arrow_flatbuf_Struct__identifier 0
#endif
#define org_apache_arrow_flatbuf_Struct__type_hash ((flatbuffers_thash_t)0x6310f362)
#define org_apache_arrow_flatbuf_Struct__type_identifier "\x62\xf3\x10\x63"
#ifndef org_apache_arrow_flatbuf_Struct__file_extension
#define org_apache_arrow_flatbuf_Struct__file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_List_file_identifier
#define org_apache_arrow_flatbuf_List_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_List_file_identifier */
#ifndef org_apache_arrow_flatbuf_List_identifier
#define org_apache_arrow_flatbuf_List_identifier 0
#endif
#define org_apache_arrow_flatbuf_List_type_hash ((flatbuffers_thash_t)0xd4ce5878)
#define org_apache_arrow_flatbuf_List_type_identifier "\x78\x58\xce\xd4"
#ifndef org_apache_arrow_flatbuf_List_file_extension
#define org_apache_arrow_flatbuf_List_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_LargeList_file_identifier
#define org_apache_arrow_flatbuf_LargeList_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_LargeList_file_identifier */
#ifndef org_apache_arrow_flatbuf_LargeList_identifier
#define org_apache_arrow_flatbuf_LargeList_identifier 0
#endif
#define org_apache_arrow_flatbuf_LargeList_type_hash ((flatbuffers_thash_t)0x38aa7e27)
#define org_apache_arrow_flatbuf_LargeList_type_identifier "\x27\x7e\xaa\x38"
#ifndef org_apache_arrow_flatbuf_LargeList_file_extension
#define org_apache_arrow_flatbuf_LargeList_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_FixedSizeList_file_identifier
#define org_apache_arrow_flatbuf_FixedSizeList_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_FixedSizeList_file_identifier */
#ifndef org_apache_arrow_flatbuf_FixedSizeList_identifier
#define org_apache_arrow_flatbuf_FixedSizeList_identifier 0
#endif
#define org_apache_arrow_flatbuf_FixedSizeList_type_hash ((flatbuffers_thash_t)0xcef245bb)
#define org_apache_arrow_flatbuf_FixedSizeList_type_identifier "\xbb\x45\xf2\xce"
#ifndef org_apache_arrow_flatbuf_FixedSizeList_file_extension
#define org_apache_arrow_flatbuf_FixedSizeList_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Map_file_identifier
#define org_apache_arrow_flatbuf_Map_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Map_file_identifier */
#ifndef org_apache_arrow_flatbuf_Map_identifier
#define org_apache_arrow_flatbuf_Map_identifier 0
#endif
#define org_apache_arrow_flatbuf_Map_type_hash ((flatbuffers_thash_t)0xcebef8e6)
#define org_apache_arrow_flatbuf_Map_type_identifier "\xe6\xf8\xbe\xce"
#ifndef org_apache_arrow_flatbuf_Map_file_extension
#define org_apache_arrow_flatbuf_Map_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Union_file_identifier
#define org_apache_arrow_flatbuf_Union_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Union_file_identifier */
#ifndef org_apache_arrow_flatbuf_Union_identifier
#define org_apache_arrow_flatbuf_Union_identifier 0
#endif
#define org_apache_arrow_flatbuf_Union_type_hash ((flatbuffers_thash_t)0x896bda57)
#define org_apache_arrow_flatbuf_Union_type_identifier "\x57\xda\x6b\x89"
#ifndef org_apache_arrow_flatbuf_Union_file_extension
#define org_apache_arrow_flatbuf_Union_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Int_file_identifier
#define org_apache_arrow_flatbuf_Int_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Int_file_identifier */
#ifndef org_apache_arrow_flatbuf_Int_identifier
#define org_apache_arrow_flatbuf_Int_identifier 0
#endif
#define org_apache_arrow_flatbuf_Int_type_hash ((flatbuffers_thash_t)0x30789001)
#define org_apache_arrow_flatbuf_Int_type_identifier "\x01\x90\x78\x30"
#ifndef org_apache_arrow_flatbuf_Int_file_extension
#define org_apache_arrow_flatbuf_Int_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_FloatingPoint_file_identifier
#define org_apache_arrow_flatbuf_FloatingPoint_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_FloatingPoint_file_identifier */
#ifndef org_apache_arrow_flatbuf_FloatingPoint_identifier
#define org_apache_arrow_flatbuf_FloatingPoint_identifier 0
#endif
#define org_apache_arrow_flatbuf_FloatingPoint_type_hash ((flatbuffers_thash_t)0xf7d06268)
#define org_apache_arrow_flatbuf_FloatingPoint_type_identifier "\x68\x62\xd0\xf7"
#ifndef org_apache_arrow_flatbuf_FloatingPoint_file_extension
#define org_apache_arrow_flatbuf_FloatingPoint_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Utf8_file_identifier
#define org_apache_arrow_flatbuf_Utf8_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Utf8_file_identifier */
#ifndef org_apache_arrow_flatbuf_Utf8_identifier
#define org_apache_arrow_flatbuf_Utf8_identifier 0
#endif
#define org_apache_arrow_flatbuf_Utf8_type_hash ((flatbuffers_thash_t)0x8fe60d37)
#define org_apache_arrow_flatbuf_Utf8_type_identifier "\x37\x0d\xe6\x8f"
#ifndef org_apache_arrow_flatbuf_Utf8_file_extension
#define org_apache_arrow_flatbuf_Utf8_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Binary_file_identifier
#define org_apache_arrow_flatbuf_Binary_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Binary_file_identifier */
#ifndef org_apache_arrow_flatbuf_Binary_identifier
#define org_apache_arrow_flatbuf_Binary_identifier 0
#endif
#define org_apache_arrow_flatbuf_Binary_type_hash ((flatbuffers_thash_t)0x8e21a795)
#define org_apache_arrow_flatbuf_Binary_type_identifier "\x95\xa7\x21\x8e"
#ifndef org_apache_arrow_flatbuf_Binary_file_extension
#define org_apache_arrow_flatbuf_Binary_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_LargeUtf8_file_identifier
#define org_apache_arrow_flatbuf_LargeUtf8_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_LargeUtf8_file_identifier */
#ifndef org_apache_arrow_flatbuf_LargeUtf8_identifier
#define org_apache_arrow_flatbuf_LargeUtf8_identifier 0
#endif
#define org_apache_arrow_flatbuf_LargeUtf8_type_hash ((flatbuffers_thash_t)0x24ed2fb0)
#define org_apache_arrow_flatbuf_LargeUtf8_type_identifier "\xb0\x2f\xed\x24"
#ifndef org_apache_arrow_flatbuf_LargeUtf8_file_extension
#define org_apache_arrow_flatbuf_LargeUtf8_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_LargeBinary_file_identifier
#define org_apache_arrow_flatbuf_LargeBinary_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_LargeBinary_file_identifier */
#ifndef org_apache_arrow_flatbuf_LargeBinary_identifier
#define org_apache_arrow_flatbuf_LargeBinary_identifier 0
#endif
#define org_apache_arrow_flatbuf_LargeBinary_type_hash ((flatbuffers_thash_t)0xbd437872)
#define org_apache_arrow_flatbuf_LargeBinary_type_identifier "\x72\x78\x43\xbd"
#ifndef org_apache_arrow_flatbuf_LargeBinary_file_extension
#define org_apache_arrow_flatbuf_LargeBinary_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_FixedSizeBinary_file_identifier
#define org_apache_arrow_flatbuf_FixedSizeBinary_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_FixedSizeBinary_file_identifier */
#ifndef org_apache_arrow_flatbuf_FixedSizeBinary_identifier
#define org_apache_arrow_flatbuf_FixedSizeBinary_identifier 0
#endif
#define org_apache_arrow_flatbuf_FixedSizeBinary_type_hash ((flatbuffers_thash_t)0x80d0f4ce)
#define org_apache_arrow_flatbuf_FixedSizeBinary_type_identifier "\xce\xf4\xd0\x80"
#ifndef org_apache_arrow_flatbuf_FixedSizeBinary_file_extension
#define org_apache_arrow_flatbuf_FixedSizeBinary_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Bool_file_identifier
#define org_apache_arrow_flatbuf_Bool_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Bool_file_identifier */
#ifndef org_apache_arrow_flatbuf_Bool_identifier
#define org_apache_arrow_flatbuf_Bool_identifier 0
#endif
#define org_apache_arrow_flatbuf_Bool_type_hash ((flatbuffers_thash_t)0x96bf83f0)
#define org_apache_arrow_flatbuf_Bool_type_identifier "\xf0\x83\xbf\x96"
#ifndef org_apache_arrow_flatbuf_Bool_file_extension
#define org_apache_arrow_flatbuf_Bool_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_RunEndEncoded_file_identifier
#define org_apache_arrow_flatbuf_RunEndEncoded_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_RunEndEncoded_file_identifier */
#ifndef org_apache_arrow_flatbuf_RunEndEncoded_identifier
#define org_apache_arrow_flatbuf_RunEndEncoded_identifier 0
#endif
#define org_apache_arrow_flatbuf_RunEndEncoded_type_hash ((flatbuffers_thash_t)0x5a98bcc)
#define org_apache_arrow_flatbuf_RunEndEncoded_type_identifier "\xcc\x8b\xa9\x05"
#ifndef org_apache_arrow_flatbuf_RunEndEncoded_file_extension
#define org_apache_arrow_flatbuf_RunEndEncoded_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Decimal_file_identifier
#define org_apache_arrow_flatbuf_Decimal_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Decimal_file_identifier */
#ifndef org_apache_arrow_flatbuf_Decimal_identifier
#define org_apache_arrow_flatbuf_Decimal_identifier 0
#endif
#define org_apache_arrow_flatbuf_Decimal_type_hash ((flatbuffers_thash_t)0x91d1beb7)
#define org_apache_arrow_flatbuf_Decimal_type_identifier "\xb7\xbe\xd1\x91"
#ifndef org_apache_arrow_flatbuf_Decimal_file_extension
#define org_apache_arrow_flatbuf_Decimal_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Date_file_identifier
#define org_apache_arrow_flatbuf_Date_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Date_file_identifier */
#ifndef org_apache_arrow_flatbuf_Date_identifier
#define org_apache_arrow_flatbuf_Date_identifier 0
#endif
#define org_apache_arrow_flatbuf_Date_type_hash ((flatbuffers_thash_t)0xe0ccf624)
#define org_apache_arrow_flatbuf_Date_type_identifier "\x24\xf6\xcc\xe0"
#ifndef org_apache_arrow_flatbuf_Date_file_extension
#define org_apache_arrow_flatbuf_Date_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Time_file_identifier
#define org_apache_arrow_flatbuf_Time_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Time_file_identifier */
#ifndef org_apache_arrow_flatbuf_Time_identifier
#define org_apache_arrow_flatbuf_Time_identifier 0
#endif
#define org_apache_arrow_flatbuf_Time_type_hash ((flatbuffers_thash_t)0x2442a489)
#define org_apache_arrow_flatbuf_Time_type_identifier "\x89\xa4\x42\x24"
#ifndef org_apache_arrow_flatbuf_Time_file_extension
#define org_apache_arrow_flatbuf_Time_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Timestamp_file_identifier
#define org_apache_arrow_flatbuf_Timestamp_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Timestamp_file_identifier */
#ifndef org_apache_arrow_flatbuf_Timestamp_identifier
#define org_apache_arrow_flatbuf_Timestamp_identifier 0
#endif
#define org_apache_arrow_flatbuf_Timestamp_type_hash ((flatbuffers_thash_t)0x1fddf080)
#define org_apache_arrow_flatbuf_Timestamp_type_identifier "\x80\xf0\xdd\x1f"
#ifndef org_apache_arrow_flatbuf_Timestamp_file_extension
#define org_apache_arrow_flatbuf_Timestamp_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Interval_file_identifier
#define org_apache_arrow_flatbuf_Interval_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Interval_file_identifier */
#ifndef org_apache_arrow_flatbuf_Interval_identifier
#define org_apache_arrow_flatbuf_Interval_identifier 0
#endif
#define org_apache_arrow_flatbuf_Interval_type_hash ((flatbuffers_thash_t)0x1e2d6809)
#define org_apache_arrow_flatbuf_Interval_type_identifier "\x09\x68\x2d\x1e"
#ifndef org_apache_arrow_flatbuf_Interval_file_extension
#define org_apache_arrow_flatbuf_Interval_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Duration_file_identifier
#define org_apache_arrow_flatbuf_Duration_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Duration_file_identifier */
#ifndef org_apache_arrow_flatbuf_Duration_identifier
#define org_apache_arrow_flatbuf_Duration_identifier 0
#endif
#define org_apache_arrow_flatbuf_Duration_type_hash ((flatbuffers_thash_t)0x1ecea6b0)
#define org_apache_arrow_flatbuf_Duration_type_identifier "\xb0\xa6\xce\x1e"
#ifndef org_apache_arrow_flatbuf_Duration_file_extension
#define org_apache_arrow_flatbuf_Duration_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_KeyValue_file_identifier
#define org_apache_arrow_flatbuf_KeyValue_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_KeyValue_file_identifier */
#ifndef org_apache_arrow_flatbuf_KeyValue_identifier
#define org_apache_arrow_flatbuf_KeyValue_identifier 0
#endif
#define org_apache_arrow_flatbuf_KeyValue_type_hash ((flatbuffers_thash_t)0x3b264744)
#define org_apache_arrow_flatbuf_KeyValue_type_identifier "\x44\x47\x26\x3b"
#ifndef org_apache_arrow_flatbuf_KeyValue_file_extension
#define org_apache_arrow_flatbuf_KeyValue_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_DictionaryEncoding_file_identifier
#define org_apache_arrow_flatbuf_DictionaryEncoding_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_DictionaryEncoding_file_identifier */
#ifndef org_apache_arrow_flatbuf_DictionaryEncoding_identifier
#define org_apache_arrow_flatbuf_DictionaryEncoding_identifier 0
#endif
#define org_apache_arrow_flatbuf_DictionaryEncoding_type_hash ((flatbuffers_thash_t)0x8c703261)
#define org_apache_arrow_flatbuf_DictionaryEncoding_type_identifier "\x61\x32\x70\x8c"
#ifndef org_apache_arrow_flatbuf_DictionaryEncoding_file_extension
#define org_apache_arrow_flatbuf_DictionaryEncoding_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Field_file_identifier
#define org_apache_arrow_flatbuf_Field_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Field_file_identifier */
#ifndef org_apache_arrow_flatbuf_Field_identifier
#define org_apache_arrow_flatbuf_Field_identifier 0
#endif
#define org_apache_arrow_flatbuf_Field_type_hash ((flatbuffers_thash_t)0xd981525c)
#define org_apache_arrow_flatbuf_Field_type_identifier "\x5c\x52\x81\xd9"
#ifndef org_apache_arrow_flatbuf_Field_file_extension
#define org_apache_arrow_flatbuf_Field_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Buffer_file_identifier
#define org_apache_arrow_flatbuf_Buffer_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Buffer_file_identifier */
#ifndef org_apache_arrow_flatbuf_Buffer_identifier
#define org_apache_arrow_flatbuf_Buffer_identifier 0
#endif
#define org_apache_arrow_flatbuf_Buffer_type_hash ((flatbuffers_thash_t)0x519d7fea)
#define org_apache_arrow_flatbuf_Buffer_type_identifier "\xea\x7f\x9d\x51"
#ifndef org_apache_arrow_flatbuf_Buffer_file_extension
#define org_apache_arrow_flatbuf_Buffer_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Schema_file_identifier
#define org_apache_arrow_flatbuf_Schema_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Schema_file_identifier */
#ifndef org_apache_arrow_flatbuf_Schema_identifier
#define org_apache_arrow_flatbuf_Schema_identifier 0
#endif
#define org_apache_arrow_flatbuf_Schema_type_hash ((flatbuffers_thash_t)0x406570b)
#define org_apache_arrow_flatbuf_Schema_type_identifier "\x0b\x57\x06\x04"
#ifndef org_apache_arrow_flatbuf_Schema_file_extension
#define org_apache_arrow_flatbuf_Schema_file_extension "bin"
#endif

typedef int16_t org_apache_arrow_flatbuf_MetadataVersion_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_MetadataVersion, org_apache_arrow_flatbuf_MetadataVersion_enum_t, 16)
/**  0.1.0 (October 2016). */
#define org_apache_arrow_flatbuf_MetadataVersion_V1 ((org_apache_arrow_flatbuf_MetadataVersion_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_MetadataVersion_V2 ((org_apache_arrow_flatbuf_MetadataVersion_enum_t)INT16_C(1))
#define org_apache_arrow_flatbuf_MetadataVersion_V3 ((org_apache_arrow_flatbuf_MetadataVersion_enum_t)INT16_C(2))
#define org_apache_arrow_flatbuf_MetadataVersion_V4 ((org_apache_arrow_flatbuf_MetadataVersion_enum_t)INT16_C(3))
#define org_apache_arrow_flatbuf_MetadataVersion_V5 ((org_apache_arrow_flatbuf_MetadataVersion_enum_t)INT16_C(4))

static inline const char *org_apache_arrow_flatbuf_MetadataVersion_name(org_apache_arrow_flatbuf_MetadataVersion_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_MetadataVersion_V1: return "V1";
    case org_apache_arrow_flatbuf_MetadataVersion_V2: return "V2";
    case org_apache_arrow_flatbuf_MetadataVersion_V3: return "V3";
    case org_apache_arrow_flatbuf_MetadataVersion_V4: return "V4";
    case org_apache_arrow_flatbuf_MetadataVersion_V5: return "V5";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_MetadataVersion_is_known_value(org_apache_arrow_flatbuf_MetadataVersion_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_MetadataVersion_V1: return 1;
    case org_apache_arrow_flatbuf_MetadataVersion_V2: return 1;
    case org_apache_arrow_flatbuf_MetadataVersion_V3: return 1;
    case org_apache_arrow_flatbuf_MetadataVersion_V4: return 1;
    case org_apache_arrow_flatbuf_MetadataVersion_V5: return 1;
    default: return 0;
    }
}

/**  Represents Arrow Features that might not have full support
 *  within implementations. This is intended to be used in
 *  two scenarios:
 *   1.  A mechanism for readers of Arrow Streams
 *       and files to understand that the stream or file makes
 *       use of a feature that isn't supported or unknown to
 *       the implementation (and therefore can meet the Arrow
 *       forward compatibility guarantees).
 *   2.  A means of negotiating between a client and server
 *       what features a stream is allowed to use. The enums
 *       values here are intented to represent higher level
 *       features, additional details maybe negotiated
 *       with key-value pairs specific to the protocol.
 *
 *  Enums added to this list should be assigned power-of-two values
 *  to facilitate exchanging and comparing bitmaps for supported
 *  features. */
typedef int64_t org_apache_arrow_flatbuf_Feature_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_Feature, org_apache_arrow_flatbuf_Feature_enum_t, 64)
/**  Needed to make flatbuffers happy. */
#define org_apache_arrow_flatbuf_Feature_UNUSED ((org_apache_arrow_flatbuf_Feature_enum_t)INT64_C(0))
#define org_apache_arrow_flatbuf_Feature_DICTIONARY_REPLACEMENT ((org_apache_arrow_flatbuf_Feature_enum_t)INT64_C(1))
#define org_apache_arrow_flatbuf_Feature_COMPRESSED_BODY ((org_apache_arrow_flatbuf_Feature_enum_t)INT64_C(2))

static inline const char *org_apache_arrow_flatbuf_Feature_name(org_apache_arrow_flatbuf_Feature_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_Feature_UNUSED: return "UNUSED";
    case org_apache_arrow_flatbuf_Feature_DICTIONARY_REPLACEMENT: return "DICTIONARY_REPLACEMENT";
    case org_apache_arrow_flatbuf_Feature_COMPRESSED_BODY: return "COMPRESSED_BODY";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_Feature_is_known_value(org_apache_arrow_flatbuf_Feature_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_Feature_UNUSED: return 1;
    case org_apache_arrow_flatbuf_Feature_DICTIONARY_REPLACEMENT: return 1;
    case org_apache_arrow_flatbuf_Feature_COMPRESSED_BODY: return 1;
    default: return 0;
    }
}

typedef int16_t org_apache_arrow_flatbuf_UnionMode_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_UnionMode, org_apache_arrow_flatbuf_UnionMode_enum_t, 16)
#define org_apache_arrow_flatbuf_UnionMode_Sparse ((org_apache_arrow_flatbuf_UnionMode_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_UnionMode_Dense ((org_apache_arrow_flatbuf_UnionMode_enum_t)INT16_C(1))

static inline const char *org_apache_arrow_flatbuf_UnionMode_name(org_apache_arrow_flatbuf_UnionMode_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_UnionMode_Sparse: return "Sparse";
    case org_apache_arrow_flatbuf_UnionMode_Dense: return "Dense";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_UnionMode_is_known_value(org_apache_arrow_flatbuf_UnionMode_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_UnionMode_Sparse: return 1;
    case org_apache_arrow_flatbuf_UnionMode_Dense: return 1;
    default: return 0;
    }
}

typedef int16_t org_apache_arrow_flatbuf_Precision_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_Precision, org_apache_arrow_flatbuf_Precision_enum_t, 16)
#define org_apache_arrow_flatbuf_Precision_HALF ((org_apache_arrow_flatbuf_Precision_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_Precision_SINGLE ((org_apache_arrow_flatbuf_Precision_enum_t)INT16_C(1))
#define org_apache_arrow_flatbuf_Precision_DOUBLE ((org_apache_arrow_flatbuf_Precision_enum_t)INT16_C(2))

static inline const char *org_apache_arrow_flatbuf_Precision_name(org_apache_arrow_flatbuf_Precision_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_Precision_HALF: return "HALF";
    case org_apache_arrow_flatbuf_Precision_SINGLE: return "SINGLE";
    case org_apache_arrow_flatbuf_Precision_DOUBLE: return "DOUBLE";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_Precision_is_known_value(org_apache_arrow_flatbuf_Precision_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_Precision_HALF: return 1;
    case org_apache_arrow_flatbuf_Precision_SINGLE: return 1;
    case org_apache_arrow_flatbuf_Precision_DOUBLE: return 1;
    default: return 0;
    }
}

typedef int16_t org_apache_arrow_flatbuf_DateUnit_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_DateUnit, org_apache_arrow_flatbuf_DateUnit_enum_t, 16)
#define org_apache_arrow_flatbuf_DateUnit_DAY ((org_apache_arrow_flatbuf_DateUnit_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_DateUnit_MILLISECOND ((org_apache_arrow_flatbuf_DateUnit_enum_t)INT16_C(1))

static inline const char *org_apache_arrow_flatbuf_DateUnit_name(org_apache_arrow_flatbuf_DateUnit_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_DateUnit_DAY: return "DAY";
    case org_apache_arrow_flatbuf_DateUnit_MILLISECOND: return "MILLISECOND";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_DateUnit_is_known_value(org_apache_arrow_flatbuf_DateUnit_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_DateUnit_DAY: return 1;
    case org_apache_arrow_flatbuf_DateUnit_MILLISECOND: return 1;
    default: return 0;
    }
}

typedef int16_t org_apache_arrow_flatbuf_TimeUnit_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t, 16)
#define org_apache_arrow_flatbuf_TimeUnit_SECOND ((org_apache_arrow_flatbuf_TimeUnit_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_TimeUnit_MILLISECOND ((org_apache_arrow_flatbuf_TimeUnit_enum_t)INT16_C(1))
#define org_apache_arrow_flatbuf_TimeUnit_MICROSECOND ((org_apache_arrow_flatbuf_TimeUnit_enum_t)INT16_C(2))
#define org_apache_arrow_flatbuf_TimeUnit_NANOSECOND ((org_apache_arrow_flatbuf_TimeUnit_enum_t)INT16_C(3))

static inline const char *org_apache_arrow_flatbuf_TimeUnit_name(org_apache_arrow_flatbuf_TimeUnit_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_TimeUnit_SECOND: return "SECOND";
    case org_apache_arrow_flatbuf_TimeUnit_MILLISECOND: return "MILLISECOND";
    case org_apache_arrow_flatbuf_TimeUnit_MICROSECOND: return "MICROSECOND";
    case org_apache_arrow_flatbuf_TimeUnit_NANOSECOND: return "NANOSECOND";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_TimeUnit_is_known_value(org_apache_arrow_flatbuf_TimeUnit_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_TimeUnit_SECOND: return 1;
    case org_apache_arrow_flatbuf_TimeUnit_MILLISECOND: return 1;
    case org_apache_arrow_flatbuf_TimeUnit_MICROSECOND: return 1;
    case org_apache_arrow_flatbuf_TimeUnit_NANOSECOND: return 1;
    default: return 0;
    }
}

typedef int16_t org_apache_arrow_flatbuf_IntervalUnit_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_IntervalUnit, org_apache_arrow_flatbuf_IntervalUnit_enum_t, 16)
#define org_apache_arrow_flatbuf_IntervalUnit_YEAR_MONTH ((org_apache_arrow_flatbuf_IntervalUnit_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_IntervalUnit_DAY_TIME ((org_apache_arrow_flatbuf_IntervalUnit_enum_t)INT16_C(1))
#define org_apache_arrow_flatbuf_IntervalUnit_MONTH_DAY_NANO ((org_apache_arrow_flatbuf_IntervalUnit_enum_t)INT16_C(2))

static inline const char *org_apache_arrow_flatbuf_IntervalUnit_name(org_apache_arrow_flatbuf_IntervalUnit_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_IntervalUnit_YEAR_MONTH: return "YEAR_MONTH";
    case org_apache_arrow_flatbuf_IntervalUnit_DAY_TIME: return "DAY_TIME";
    case org_apache_arrow_flatbuf_IntervalUnit_MONTH_DAY_NANO: return "MONTH_DAY_NANO";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_IntervalUnit_is_known_value(org_apache_arrow_flatbuf_IntervalUnit_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_IntervalUnit_YEAR_MONTH: return 1;
    case org_apache_arrow_flatbuf_IntervalUnit_DAY_TIME: return 1;
    case org_apache_arrow_flatbuf_IntervalUnit_MONTH_DAY_NANO: return 1;
    default: return 0;
    }
}

/**  ----------------------------------------------------------------------
 *  Dictionary encoding metadata
 *  Maintained for forwards compatibility, in the future
 *  Dictionaries might be explicit maps between integers and values
 *  allowing for non-contiguous index values */
typedef int16_t org_apache_arrow_flatbuf_DictionaryKind_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_DictionaryKind, org_apache_arrow_flatbuf_DictionaryKind_enum_t, 16)
#define org_apache_arrow_flatbuf_DictionaryKind_DenseArray ((org_apache_arrow_flatbuf_DictionaryKind_enum_t)INT16_C(0))

static inline const char *org_apache_arrow_flatbuf_DictionaryKind_name(org_apache_arrow_flatbuf_DictionaryKind_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_DictionaryKind_DenseArray: return "DenseArray";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_DictionaryKind_is_known_value(org_apache_arrow_flatbuf_DictionaryKind_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_DictionaryKind_DenseArray: return 1;
    default: return 0;
    }
}

/**  ----------------------------------------------------------------------
 *  Endianness of the platform producing the data */
typedef int16_t org_apache_arrow_flatbuf_Endianness_enum_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_Endianness, org_apache_arrow_flatbuf_Endianness_enum_t, 16)
#define org_apache_arrow_flatbuf_Endianness_Little ((org_apache_arrow_flatbuf_Endianness_enum_t)INT16_C(0))
#define org_apache_arrow_flatbuf_Endianness_Big ((org_apache_arrow_flatbuf_Endianness_enum_t)INT16_C(1))

static inline const char *org_apache_arrow_flatbuf_Endianness_name(org_apache_arrow_flatbuf_Endianness_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_Endianness_Little: return "Little";
    case org_apache_arrow_flatbuf_Endianness_Big: return "Big";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_Endianness_is_known_value(org_apache_arrow_flatbuf_Endianness_enum_t value)
{
    switch (value) {
    case org_apache_arrow_flatbuf_Endianness_Little: return 1;
    case org_apache_arrow_flatbuf_Endianness_Big: return 1;
    default: return 0;
    }
}


/**  ----------------------------------------------------------------------
 *  A Buffer represents a single contiguous memory segment */
struct org_apache_arrow_flatbuf_Buffer {
    /**  The relative offset into the shared memory page where the bytes for this
     *  buffer starts */
    alignas(8) int64_t offset;
    /**  The absolute length (in bytes) of the memory buffer. The memory is found
     *  from offset (inclusive) to offset + length (non-inclusive). When building
     *  messages using the encapsulated IPC message, padding bytes may be written
     *  after a buffer, but such padding bytes do not need to be accounted for in
     *  the size here. */
    alignas(8) int64_t length;
};
static_assert(sizeof(org_apache_arrow_flatbuf_Buffer_t) == 16, "struct size mismatch");

static inline const org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer__const_ptr_add(const org_apache_arrow_flatbuf_Buffer_t *p, size_t i) { return p + i; }
static inline org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer__ptr_add(org_apache_arrow_flatbuf_Buffer_t *p, size_t i) { return p + i; }
static inline org_apache_arrow_flatbuf_Buffer_struct_t org_apache_arrow_flatbuf_Buffer_vec_at(org_apache_arrow_flatbuf_Buffer_vec_t vec, size_t i)
__flatbuffers_struct_vec_at(vec, i)
static inline size_t org_apache_arrow_flatbuf_Buffer__size(void) { return 16; }
static inline size_t org_apache_arrow_flatbuf_Buffer_vec_len(org_apache_arrow_flatbuf_Buffer_vec_t vec)
__flatbuffers_vec_len(vec)
__flatbuffers_struct_as_root(org_apache_arrow_flatbuf_Buffer)

__flatbuffers_define_struct_scalar_field(org_apache_arrow_flatbuf_Buffer, offset, flatbuffers_int64, int64_t)
__flatbuffers_define_struct_scalar_field(org_apache_arrow_flatbuf_Buffer, length, flatbuffers_int64, int64_t)


/**  These are stored in the flatbuffer in the Type union below */
struct org_apache_arrow_flatbuf_Null_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Null_vec_len(org_apache_arrow_flatbuf_Null_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Null_table_t org_apache_arrow_flatbuf_Null_vec_at(org_apache_arrow_flatbuf_Null_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Null_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Null)


/**  A Struct_ in the flatbuffer metadata is the same as an Arrow Struct
 *  (according to the physical memory layout). We used Struct_ here as
 *  Struct is a reserved word in Flatbuffers */
struct org_apache_arrow_flatbuf_Struct__table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Struct__vec_len(org_apache_arrow_flatbuf_Struct__vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Struct__table_t org_apache_arrow_flatbuf_Struct__vec_at(org_apache_arrow_flatbuf_Struct__vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Struct__table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Struct_)


struct org_apache_arrow_flatbuf_List_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_List_vec_len(org_apache_arrow_flatbuf_List_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_List_table_t org_apache_arrow_flatbuf_List_vec_at(org_apache_arrow_flatbuf_List_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_List_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_List)


/**  Same as List, but with 64-bit offsets, allowing to represent
 *  extremely large data values. */
struct org_apache_arrow_flatbuf_LargeList_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_LargeList_vec_len(org_apache_arrow_flatbuf_LargeList_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_LargeList_table_t org_apache_arrow_flatbuf_LargeList_vec_at(org_apache_arrow_flatbuf_LargeList_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_LargeList_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_LargeList)


struct org_apache_arrow_flatbuf_FixedSizeList_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_FixedSizeList_vec_len(org_apache_arrow_flatbuf_FixedSizeList_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_FixedSizeList_table_t org_apache_arrow_flatbuf_FixedSizeList_vec_at(org_apache_arrow_flatbuf_FixedSizeList_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_FixedSizeList_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_FixedSizeList)

/**  Number of list items per value */
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_FixedSizeList, listSize, flatbuffers_int32, int32_t, INT32_C(0))

/**  A Map is a logical nested type that is represented as
 *
 *  List<entries: Struct<key: K, value: V>>
 *
 *  In this layout, the keys and values are each respectively contiguous. We do
 *  not constrain the key and value types, so the application is responsible
 *  for ensuring that the keys are hashable and unique. Whether the keys are sorted
 *  may be set in the metadata for this field.
 *
 *  In a field with Map type, the field has a child Struct field, which then
 *  has two children: key type and the second the value type. The names of the
 *  child fields may be respectively "entries", "key", and "value", but this is
 *  not enforced.
 *
 *  Map
 *  ```text
 *    - child[0] entries: Struct
 *      - child[0] key: K
 *      - child[1] value: V
 *  ```
 *  Neither the "entries" field nor the "key" field may be nullable.
 *
 *  The metadata is structured so that Arrow systems without special handling
 *  for Map can make Map an alias for List. The "layout" attribute for the Map
 *  field must have the same contents as a List. */
struct org_apache_arrow_flatbuf_Map_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Map_vec_len(org_apache_arrow_flatbuf_Map_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Map_table_t org_apache_arrow_flatbuf_Map_vec_at(org_apache_arrow_flatbuf_Map_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Map_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Map)

/**  Set to true if the keys within each value are sorted */
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Map, keysSorted, flatbuffers_bool, flatbuffers_bool_t, UINT8_C(0))

/**  A union is a complex type with children in Field
 *  By default ids in the type vector refer to the offsets in the children
 *  optionally typeIds provides an indirection between the child offset and the type id
 *  for each child `typeIds[offset]` is the id used in the type vector */
struct org_apache_arrow_flatbuf_Union_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Union_vec_len(org_apache_arrow_flatbuf_Union_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Union_table_t org_apache_arrow_flatbuf_Union_vec_at(org_apache_arrow_flatbuf_Union_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Union_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Union)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Union, mode, org_apache_arrow_flatbuf_UnionMode, org_apache_arrow_flatbuf_UnionMode_enum_t, INT16_C(0))
__flatbuffers_define_vector_field(1, org_apache_arrow_flatbuf_Union, typeIds, flatbuffers_int32_vec_t, 0)

struct org_apache_arrow_flatbuf_Int_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Int_vec_len(org_apache_arrow_flatbuf_Int_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Int_table_t org_apache_arrow_flatbuf_Int_vec_at(org_apache_arrow_flatbuf_Int_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Int_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Int)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Int, bitWidth, flatbuffers_int32, int32_t, INT32_C(0))
__flatbuffers_define_scalar_field(1, org_apache_arrow_flatbuf_Int, is_signed, flatbuffers_bool, flatbuffers_bool_t, UINT8_C(0))

struct org_apache_arrow_flatbuf_FloatingPoint_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_FloatingPoint_vec_len(org_apache_arrow_flatbuf_FloatingPoint_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_FloatingPoint_table_t org_apache_arrow_flatbuf_FloatingPoint_vec_at(org_apache_arrow_flatbuf_FloatingPoint_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_FloatingPoint_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_FloatingPoint)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_FloatingPoint, precision, org_apache_arrow_flatbuf_Precision, org_apache_arrow_flatbuf_Precision_enum_t, INT16_C(0))

/**  Unicode with UTF-8 encoding */
struct org_apache_arrow_flatbuf_Utf8_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Utf8_vec_len(org_apache_arrow_flatbuf_Utf8_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Utf8_table_t org_apache_arrow_flatbuf_Utf8_vec_at(org_apache_arrow_flatbuf_Utf8_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Utf8_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Utf8)


/**  Opaque binary data */
struct org_apache_arrow_flatbuf_Binary_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Binary_vec_len(org_apache_arrow_flatbuf_Binary_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Binary_table_t org_apache_arrow_flatbuf_Binary_vec_at(org_apache_arrow_flatbuf_Binary_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Binary_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Binary)


/**  Same as Utf8, but with 64-bit offsets, allowing to represent
 *  extremely large data values. */
struct org_apache_arrow_flatbuf_LargeUtf8_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_LargeUtf8_vec_len(org_apache_arrow_flatbuf_LargeUtf8_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_LargeUtf8_table_t org_apache_arrow_flatbuf_LargeUtf8_vec_at(org_apache_arrow_flatbuf_LargeUtf8_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_LargeUtf8_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_LargeUtf8)


/**  Same as Binary, but with 64-bit offsets, allowing to represent
 *  extremely large data values. */
struct org_apache_arrow_flatbuf_LargeBinary_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_LargeBinary_vec_len(org_apache_arrow_flatbuf_LargeBinary_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_LargeBinary_table_t org_apache_arrow_flatbuf_LargeBinary_vec_at(org_apache_arrow_flatbuf_LargeBinary_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_LargeBinary_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_LargeBinary)


struct org_apache_arrow_flatbuf_FixedSizeBinary_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_FixedSizeBinary_vec_len(org_apache_arrow_flatbuf_FixedSizeBinary_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_FixedSizeBinary_table_t org_apache_arrow_flatbuf_FixedSizeBinary_vec_at(org_apache_arrow_flatbuf_FixedSizeBinary_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_FixedSizeBinary_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_FixedSizeBinary)

/**  Number of bytes per value */
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_FixedSizeBinary, byteWidth, flatbuffers_int32, int32_t, INT32_C(0))

struct org_apache_arrow_flatbuf_Bool_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Bool_vec_len(org_apache_arrow_flatbuf_Bool_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Bool_table_t org_apache_arrow_flatbuf_Bool_vec_at(org_apache_arrow_flatbuf_Bool_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Bool_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Bool)


/**  Contains two child arrays, run_ends and values.
 *  The run_ends child array must be a 16/32/64-bit integer array
 *  which encodes the indices at which the run with the value in
 *  each corresponding index in the values child array ends.
 *  Like list/struct types, the value array can be of any type. */
struct org_apache_arrow_flatbuf_RunEndEncoded_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_RunEndEncoded_vec_len(org_apache_arrow_flatbuf_RunEndEncoded_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_RunEndEncoded_table_t org_apache_arrow_flatbuf_RunEndEncoded_vec_at(org_apache_arrow_flatbuf_RunEndEncoded_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_RunEndEncoded_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_RunEndEncoded)


/**  Exact decimal value represented as an integer value in two's
 *  complement. Currently only 128-bit (16-byte) and 256-bit (32-byte) integers
 *  are used. The representation uses the endianness indicated
 *  in the Schema. */
struct org_apache_arrow_flatbuf_Decimal_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Decimal_vec_len(org_apache_arrow_flatbuf_Decimal_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Decimal_table_t org_apache_arrow_flatbuf_Decimal_vec_at(org_apache_arrow_flatbuf_Decimal_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Decimal_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Decimal)

/**  Total number of decimal digits */
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Decimal, precision, flatbuffers_int32, int32_t, INT32_C(0))
/**  Number of digits after the decimal point "." */
__flatbuffers_define_scalar_field(1, org_apache_arrow_flatbuf_Decimal, scale, flatbuffers_int32, int32_t, INT32_C(0))
/**  Number of bits per value. The only accepted widths are 128 and 256.
 *  We use bitWidth for consistency with Int::bitWidth. */
__flatbuffers_define_scalar_field(2, org_apache_arrow_flatbuf_Decimal, bitWidth, flatbuffers_int32, int32_t, INT32_C(128))

/**  Date is either a 32-bit or 64-bit signed integer type representing an
 *  elapsed time since UNIX epoch (1970-01-01), stored in either of two units:
 *
 *  * Milliseconds (64 bits) indicating UNIX time elapsed since the epoch (no
 *    leap seconds), where the values are evenly divisible by 86400000
 *  * Days (32 bits) since the UNIX epoch */
struct org_apache_arrow_flatbuf_Date_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Date_vec_len(org_apache_arrow_flatbuf_Date_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Date_table_t org_apache_arrow_flatbuf_Date_vec_at(org_apache_arrow_flatbuf_Date_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Date_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Date)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Date, unit, org_apache_arrow_flatbuf_DateUnit, org_apache_arrow_flatbuf_DateUnit_enum_t, INT16_C(1))

/**  Time is either a 32-bit or 64-bit signed integer type representing an
 *  elapsed time since midnight, stored in either of four units: seconds,
 *  milliseconds, microseconds or nanoseconds.
 *
 *  The integer `bitWidth` depends on the `unit` and must be one of the following:
 *  * SECOND and MILLISECOND: 32 bits
 *  * MICROSECOND and NANOSECOND: 64 bits
 *
 *  The allowed values are between 0 (inclusive) and 86400 (=24*60*60) seconds
 *  (exclusive), adjusted for the time unit (for example, up to 86400000
 *  exclusive for the MILLISECOND unit).
 *  This definition doesn't allow for leap seconds. Time values from
 *  measurements with leap seconds will need to be corrected when ingesting
 *  into Arrow (for example by replacing the value 86400 with 86399). */
struct org_apache_arrow_flatbuf_Time_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Time_vec_len(org_apache_arrow_flatbuf_Time_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Time_table_t org_apache_arrow_flatbuf_Time_vec_at(org_apache_arrow_flatbuf_Time_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Time_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Time)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Time, unit, org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t, INT16_C(1))
__flatbuffers_define_scalar_field(1, org_apache_arrow_flatbuf_Time, bitWidth, flatbuffers_int32, int32_t, INT32_C(32))

/**  Timestamp is a 64-bit signed integer representing an elapsed time since a
 *  fixed epoch, stored in either of four units: seconds, milliseconds,
 *  microseconds or nanoseconds, and is optionally annotated with a timezone.
 *
 *  Timestamp values do not include any leap seconds (in other words, all
 *  days are considered 86400 seconds long).
 *
 *  Timestamps with a non-empty timezone
 *  ------------------------------------
 *
 *  If a Timestamp column has a non-empty timezone value, its epoch is
 *  1970-01-01 00:00:00 (January 1st 1970, midnight) in the *UTC* timezone
 *  (the Unix epoch), regardless of the Timestamp's own timezone.
 *
 *  Therefore, timestamp values with a non-empty timezone correspond to
 *  physical points in time together with some additional information about
 *  how the data was obtained and/or how to display it (the timezone).
 *
 *    For example, the timestamp value 0 with the timezone string "Europe/Paris"
 *    corresponds to "January 1st 1970, 00h00" in the UTC timezone, but the
 *    application may prefer to display it as "January 1st 1970, 01h00" in
 *    the Europe/Paris timezone (which is the same physical point in time).
 *
 *  One consequence is that timestamp values with a non-empty timezone
 *  can be compared and ordered directly, since they all share the same
 *  well-known point of reference (the Unix epoch).
 *
 *  Timestamps with an unset / empty timezone
 *  -----------------------------------------
 *
 *  If a Timestamp column has no timezone value, its epoch is
 *  1970-01-01 00:00:00 (January 1st 1970, midnight) in an *unknown* timezone.
 *
 *  Therefore, timestamp values without a timezone cannot be meaningfully
 *  interpreted as physical points in time, but only as calendar / clock
 *  indications ("wall clock time") in an unspecified timezone.
 *
 *    For example, the timestamp value 0 with an empty timezone string
 *    corresponds to "January 1st 1970, 00h00" in an unknown timezone: there
 *    is not enough information to interpret it as a well-defined physical
 *    point in time.
 *
 *  One consequence is that timestamp values without a timezone cannot
 *  be reliably compared or ordered, since they may have different points of
 *  reference.  In particular, it is *not* possible to interpret an unset
 *  or empty timezone as the same as "UTC".
 *
 *  Conversion between timezones
 *  ----------------------------
 *
 *  If a Timestamp column has a non-empty timezone, changing the timezone
 *  to a different non-empty value is a metadata-only operation:
 *  the timestamp values need not change as their point of reference remains
 *  the same (the Unix epoch).
 *
 *  However, if a Timestamp column has no timezone value, changing it to a
 *  non-empty value requires to think about the desired semantics.
 *  One possibility is to assume that the original timestamp values are
 *  relative to the epoch of the timezone being set; timestamp values should
 *  then adjusted to the Unix epoch (for example, changing the timezone from
 *  empty to "Europe/Paris" would require converting the timestamp values
 *  from "Europe/Paris" to "UTC", which seems counter-intuitive but is
 *  nevertheless correct).
 *
 *  Guidelines for encoding data from external libraries
 *  ----------------------------------------------------
 *
 *  Date & time libraries often have multiple different data types for temporal
 *  data. In order to ease interoperability between different implementations the
 *  Arrow project has some recommendations for encoding these types into a Timestamp
 *  column.
 *
 *  An "instant" represents a physical point in time that has no relevant timezone
 *  (for example, astronomical data). To encode an instant, use a Timestamp with
 *  the timezone string set to "UTC", and make sure the Timestamp values
 *  are relative to the UTC epoch (January 1st 1970, midnight).
 *
 *  A "zoned date-time" represents a physical point in time annotated with an
 *  informative timezone (for example, the timezone in which the data was
 *  recorded).  To encode a zoned date-time, use a Timestamp with the timezone
 *  string set to the name of the timezone, and make sure the Timestamp values
 *  are relative to the UTC epoch (January 1st 1970, midnight).
 *
 *   (There is some ambiguity between an instant and a zoned date-time with the
 *    UTC timezone.  Both of these are stored the same in Arrow.  Typically,
 *    this distinction does not matter.  If it does, then an application should
 *    use custom metadata or an extension type to distinguish between the two cases.)
 *
 *  An "offset date-time" represents a physical point in time combined with an
 *  explicit offset from UTC.  To encode an offset date-time, use a Timestamp
 *  with the timezone string set to the numeric timezone offset string
 *  (e.g. "+03:00"), and make sure the Timestamp values are relative to
 *  the UTC epoch (January 1st 1970, midnight).
 *
 *  A "naive date-time" (also called "local date-time" in some libraries)
 *  represents a wall clock time combined with a calendar date, but with
 *  no indication of how to map this information to a physical point in time.
 *  Naive date-times must be handled with care because of this missing
 *  information, and also because daylight saving time (DST) may make
 *  some values ambiguous or non-existent. A naive date-time may be
 *  stored as a struct with Date and Time fields. However, it may also be
 *  encoded into a Timestamp column with an empty timezone. The timestamp
 *  values should be computed "as if" the timezone of the date-time values
 *  was UTC; for example, the naive date-time "January 1st 1970, 00h00" would
 *  be encoded as timestamp value 0. */
struct org_apache_arrow_flatbuf_Timestamp_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Timestamp_vec_len(org_apache_arrow_flatbuf_Timestamp_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Timestamp_table_t org_apache_arrow_flatbuf_Timestamp_vec_at(org_apache_arrow_flatbuf_Timestamp_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Timestamp_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Timestamp)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Timestamp, unit, org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t, INT16_C(0))
/**  The timezone is an optional string indicating the name of a timezone,
 *  one of:
 *
 *  * As used in the Olson timezone database (the "tz database" or
 *    "tzdata"), such as "America/New_York".
 *  * An absolute timezone offset of the form "+XX:XX" or "-XX:XX",
 *    such as "+07:30".
 *
 *  Whether a timezone string is present indicates different semantics about
 *  the data (see above). */
__flatbuffers_define_string_field(1, org_apache_arrow_flatbuf_Timestamp, timezone, 0)

struct org_apache_arrow_flatbuf_Interval_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Interval_vec_len(org_apache_arrow_flatbuf_Interval_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Interval_table_t org_apache_arrow_flatbuf_Interval_vec_at(org_apache_arrow_flatbuf_Interval_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Interval_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Interval)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Interval, unit, org_apache_arrow_flatbuf_IntervalUnit, org_apache_arrow_flatbuf_IntervalUnit_enum_t, INT16_C(0))

struct org_apache_arrow_flatbuf_Duration_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Duration_vec_len(org_apache_arrow_flatbuf_Duration_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Duration_table_t org_apache_arrow_flatbuf_Duration_vec_at(org_apache_arrow_flatbuf_Duration_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Duration_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Duration)

__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Duration, unit, org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t, INT16_C(1))
/**  ----------------------------------------------------------------------
 *  Top-level Type value, enabling extensible type-specific metadata. We can
 *  add new logical types to Type without breaking backwards compatibility */
typedef uint8_t org_apache_arrow_flatbuf_Type_union_type_t;
__flatbuffers_define_integer_type(org_apache_arrow_flatbuf_Type, org_apache_arrow_flatbuf_Type_union_type_t, 8)
__flatbuffers_define_union(flatbuffers_, org_apache_arrow_flatbuf_Type)
/**  ----------------------------------------------------------------------
 *  user defined key value pairs to add custom metadata to arrow
 *  key namespacing is the responsibility of the user */
#define org_apache_arrow_flatbuf_Type_NONE ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(0))
#define org_apache_arrow_flatbuf_Type_Null ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(1))
#define org_apache_arrow_flatbuf_Type_Int ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(2))
#define org_apache_arrow_flatbuf_Type_FloatingPoint ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(3))
#define org_apache_arrow_flatbuf_Type_Binary ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(4))
#define org_apache_arrow_flatbuf_Type_Utf8 ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(5))
#define org_apache_arrow_flatbuf_Type_Bool ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(6))
#define org_apache_arrow_flatbuf_Type_Decimal ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(7))
#define org_apache_arrow_flatbuf_Type_Date ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(8))
#define org_apache_arrow_flatbuf_Type_Time ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(9))
#define org_apache_arrow_flatbuf_Type_Timestamp ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(10))
#define org_apache_arrow_flatbuf_Type_Interval ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(11))
#define org_apache_arrow_flatbuf_Type_List ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(12))
#define org_apache_arrow_flatbuf_Type_Struct_ ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(13))
#define org_apache_arrow_flatbuf_Type_Union ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(14))
#define org_apache_arrow_flatbuf_Type_FixedSizeBinary ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(15))
#define org_apache_arrow_flatbuf_Type_FixedSizeList ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(16))
#define org_apache_arrow_flatbuf_Type_Map ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(17))
#define org_apache_arrow_flatbuf_Type_Duration ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(18))
#define org_apache_arrow_flatbuf_Type_LargeBinary ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(19))
#define org_apache_arrow_flatbuf_Type_LargeUtf8 ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(20))
#define org_apache_arrow_flatbuf_Type_LargeList ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(21))
#define org_apache_arrow_flatbuf_Type_RunEndEncoded ((org_apache_arrow_flatbuf_Type_union_type_t)UINT8_C(22))

static inline const char *org_apache_arrow_flatbuf_Type_type_name(org_apache_arrow_flatbuf_Type_union_type_t type)
{
    switch (type) {
    case org_apache_arrow_flatbuf_Type_NONE: return "NONE";
    case org_apache_arrow_flatbuf_Type_Null: return "Null";
    case org_apache_arrow_flatbuf_Type_Int: return "Int";
    case org_apache_arrow_flatbuf_Type_FloatingPoint: return "FloatingPoint";
    case org_apache_arrow_flatbuf_Type_Binary: return "Binary";
    case org_apache_arrow_flatbuf_Type_Utf8: return "Utf8";
    case org_apache_arrow_flatbuf_Type_Bool: return "Bool";
    case org_apache_arrow_flatbuf_Type_Decimal: return "Decimal";
    case org_apache_arrow_flatbuf_Type_Date: return "Date";
    case org_apache_arrow_flatbuf_Type_Time: return "Time";
    case org_apache_arrow_flatbuf_Type_Timestamp: return "Timestamp";
    case org_apache_arrow_flatbuf_Type_Interval: return "Interval";
    case org_apache_arrow_flatbuf_Type_List: return "List";
    case org_apache_arrow_flatbuf_Type_Struct_: return "Struct_";
    case org_apache_arrow_flatbuf_Type_Union: return "Union";
    case org_apache_arrow_flatbuf_Type_FixedSizeBinary: return "FixedSizeBinary";
    case org_apache_arrow_flatbuf_Type_FixedSizeList: return "FixedSizeList";
    case org_apache_arrow_flatbuf_Type_Map: return "Map";
    case org_apache_arrow_flatbuf_Type_Duration: return "Duration";
    case org_apache_arrow_flatbuf_Type_LargeBinary: return "LargeBinary";
    case org_apache_arrow_flatbuf_Type_LargeUtf8: return "LargeUtf8";
    case org_apache_arrow_flatbuf_Type_LargeList: return "LargeList";
    case org_apache_arrow_flatbuf_Type_RunEndEncoded: return "RunEndEncoded";
    default: return "";
    }
}

static inline int org_apache_arrow_flatbuf_Type_is_known_type(org_apache_arrow_flatbuf_Type_union_type_t type)
{
    switch (type) {
    case org_apache_arrow_flatbuf_Type_NONE: return 1;
    case org_apache_arrow_flatbuf_Type_Null: return 1;
    case org_apache_arrow_flatbuf_Type_Int: return 1;
    case org_apache_arrow_flatbuf_Type_FloatingPoint: return 1;
    case org_apache_arrow_flatbuf_Type_Binary: return 1;
    case org_apache_arrow_flatbuf_Type_Utf8: return 1;
    case org_apache_arrow_flatbuf_Type_Bool: return 1;
    case org_apache_arrow_flatbuf_Type_Decimal: return 1;
    case org_apache_arrow_flatbuf_Type_Date: return 1;
    case org_apache_arrow_flatbuf_Type_Time: return 1;
    case org_apache_arrow_flatbuf_Type_Timestamp: return 1;
    case org_apache_arrow_flatbuf_Type_Interval: return 1;
    case org_apache_arrow_flatbuf_Type_List: return 1;
    case org_apache_arrow_flatbuf_Type_Struct_: return 1;
    case org_apache_arrow_flatbuf_Type_Union: return 1;
    case org_apache_arrow_flatbuf_Type_FixedSizeBinary: return 1;
    case org_apache_arrow_flatbuf_Type_FixedSizeList: return 1;
    case org_apache_arrow_flatbuf_Type_Map: return 1;
    case org_apache_arrow_flatbuf_Type_Duration: return 1;
    case org_apache_arrow_flatbuf_Type_LargeBinary: return 1;
    case org_apache_arrow_flatbuf_Type_LargeUtf8: return 1;
    case org_apache_arrow_flatbuf_Type_LargeList: return 1;
    case org_apache_arrow_flatbuf_Type_RunEndEncoded: return 1;
    default: return 0;
    }
}


struct org_apache_arrow_flatbuf_KeyValue_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_KeyValue_vec_len(org_apache_arrow_flatbuf_KeyValue_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_KeyValue_table_t org_apache_arrow_flatbuf_KeyValue_vec_at(org_apache_arrow_flatbuf_KeyValue_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_KeyValue_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_KeyValue)

__flatbuffers_define_string_field(0, org_apache_arrow_flatbuf_KeyValue, key, 0)
__flatbuffers_define_string_field(1, org_apache_arrow_flatbuf_KeyValue, value, 0)

struct org_apache_arrow_flatbuf_DictionaryEncoding_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_DictionaryEncoding_vec_len(org_apache_arrow_flatbuf_DictionaryEncoding_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_DictionaryEncoding_table_t org_apache_arrow_flatbuf_DictionaryEncoding_vec_at(org_apache_arrow_flatbuf_DictionaryEncoding_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_DictionaryEncoding_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_DictionaryEncoding)

/**  The known dictionary id in the application where this data is used. In
 *  the file or streaming formats, the dictionary ids are found in the
 *  DictionaryBatch messages */
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_DictionaryEncoding, id, flatbuffers_int64, int64_t, INT64_C(0))
/**  The dictionary indices are constrained to be non-negative integers. If
 *  this field is null, the indices must be signed int32. To maximize
 *  cross-language compatibility and performance, implementations are
 *  recommended to prefer signed integer types over unsigned integer types
 *  and to avoid uint64 indices unless they are required by an application. */
__flatbuffers_define_table_field(1, org_apache_arrow_flatbuf_DictionaryEncoding, indexType, org_apache_arrow_flatbuf_Int_table_t, 0)
/**  By default, dictionaries are not ordered, or the order does not have
 *  semantic meaning. In some statistical, applications, dictionary-encoding
 *  is used to represent ordered categorical data, and we provide a way to
 *  preserve that metadata here */
__flatbuffers_define_scalar_field(2, org_apache_arrow_flatbuf_DictionaryEncoding, isOrdered, flatbuffers_bool, flatbuffers_bool_t, UINT8_C(0))
__flatbuffers_define_scalar_field(3, org_apache_arrow_flatbuf_DictionaryEncoding, dictionaryKind, org_apache_arrow_flatbuf_DictionaryKind, org_apache_arrow_flatbuf_DictionaryKind_enum_t, INT16_C(0))

/**  ----------------------------------------------------------------------
 *  A field represents a named column in a record / row batch or child of a
 *  nested type. */
struct org_apache_arrow_flatbuf_Field_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Field_vec_len(org_apache_arrow_flatbuf_Field_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Field_table_t org_apache_arrow_flatbuf_Field_vec_at(org_apache_arrow_flatbuf_Field_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Field_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Field)

/**  Name is not required, in i.e. a List */
__flatbuffers_define_string_field(0, org_apache_arrow_flatbuf_Field, name, 0)
/**  Whether or not this field can contain nulls. Should be true in general. */
__flatbuffers_define_scalar_field(1, org_apache_arrow_flatbuf_Field, nullable, flatbuffers_bool, flatbuffers_bool_t, UINT8_C(0))
/**  This is the type of the decoded value if the field is dictionary encoded. */
__flatbuffers_define_union_field(flatbuffers_, 3, org_apache_arrow_flatbuf_Field, type, org_apache_arrow_flatbuf_Type, 0)
/**  Present only if the field is dictionary encoded. */
__flatbuffers_define_table_field(4, org_apache_arrow_flatbuf_Field, dictionary, org_apache_arrow_flatbuf_DictionaryEncoding_table_t, 0)
/**  children apply only to nested data types like Struct, List and Union. For
 *  primitive types children will have length 0. */
__flatbuffers_define_vector_field(5, org_apache_arrow_flatbuf_Field, children, org_apache_arrow_flatbuf_Field_vec_t, 0)
/**  User-defined metadata */
__flatbuffers_define_vector_field(6, org_apache_arrow_flatbuf_Field, custom_metadata, org_apache_arrow_flatbuf_KeyValue_vec_t, 0)

/**  ----------------------------------------------------------------------
 *  A Schema describes the columns in a row batch */
struct org_apache_arrow_flatbuf_Schema_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Schema_vec_len(org_apache_arrow_flatbuf_Schema_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Schema_table_t org_apache_arrow_flatbuf_Schema_vec_at(org_apache_arrow_flatbuf_Schema_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Schema_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Schema)

/**  endianness of the buffer
 *  it is Little Endian by default
 *  if endianness doesn't match the underlying system then the vectors need to be converted */
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_Schema, endianness, org_apache_arrow_flatbuf_Endianness, org_apache_arrow_flatbuf_Endianness_enum_t, INT16_C(0))
__flatbuffers_define_vector_field(1, org_apache_arrow_flatbuf_Schema, fields, org_apache_arrow_flatbuf_Field_vec_t, 0)
__flatbuffers_define_vector_field(2, org_apache_arrow_flatbuf_Schema, custom_metadata, org_apache_arrow_flatbuf_KeyValue_vec_t, 0)
/**  Features used in the stream/file. */
__flatbuffers_define_vector_field(3, org_apache_arrow_flatbuf_Schema, features, org_apache_arrow_flatbuf_Feature_vec_t, 0)


#include "flatcc/flatcc_epilogue.h"
#endif /* SCHEMA_READER_H */
#ifndef SCHEMA_BUILDER_H
#define SCHEMA_BUILDER_H

/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

#ifndef SCHEMA_READER_H
#include "Schema_reader.h"
#endif
#ifndef FLATBUFFERS_COMMON_BUILDER_H
#include "flatbuffers_common_builder.h"
#endif
#include "flatcc/flatcc_prologue.h"
#ifndef flatbuffers_identifier
#define flatbuffers_identifier 0
#endif
#ifndef flatbuffers_extension
#define flatbuffers_extension "bin"
#endif

#define __org_apache_arrow_flatbuf_MetadataVersion_formal_args , org_apache_arrow_flatbuf_MetadataVersion_enum_t v0
#define __org_apache_arrow_flatbuf_MetadataVersion_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_MetadataVersion, org_apache_arrow_flatbuf_MetadataVersion_enum_t)
#define __org_apache_arrow_flatbuf_Feature_formal_args , org_apache_arrow_flatbuf_Feature_enum_t v0
#define __org_apache_arrow_flatbuf_Feature_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_Feature, org_apache_arrow_flatbuf_Feature_enum_t)
#define __org_apache_arrow_flatbuf_UnionMode_formal_args , org_apache_arrow_flatbuf_UnionMode_enum_t v0
#define __org_apache_arrow_flatbuf_UnionMode_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_UnionMode, org_apache_arrow_flatbuf_UnionMode_enum_t)
#define __org_apache_arrow_flatbuf_Precision_formal_args , org_apache_arrow_flatbuf_Precision_enum_t v0
#define __org_apache_arrow_flatbuf_Precision_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_Precision, org_apache_arrow_flatbuf_Precision_enum_t)
#define __org_apache_arrow_flatbuf_DateUnit_formal_args , org_apache_arrow_flatbuf_DateUnit_enum_t v0
#define __org_apache_arrow_flatbuf_DateUnit_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_DateUnit, org_apache_arrow_flatbuf_DateUnit_enum_t)
#define __org_apache_arrow_flatbuf_TimeUnit_formal_args , org_apache_arrow_flatbuf_TimeUnit_enum_t v0
#define __org_apache_arrow_flatbuf_TimeUnit_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t)
#define __org_apache_arrow_flatbuf_IntervalUnit_formal_args , org_apache_arrow_flatbuf_IntervalUnit_enum_t v0
#define __org_apache_arrow_flatbuf_IntervalUnit_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_IntervalUnit, org_apache_arrow_flatbuf_IntervalUnit_enum_t)
#define __org_apache_arrow_flatbuf_DictionaryKind_formal_args , org_apache_arrow_flatbuf_DictionaryKind_enum_t v0
#define __org_apache_arrow_flatbuf_DictionaryKind_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_DictionaryKind, org_apache_arrow_flatbuf_DictionaryKind_enum_t)
#define __org_apache_arrow_flatbuf_Endianness_formal_args , org_apache_arrow_flatbuf_Endianness_enum_t v0
#define __org_apache_arrow_flatbuf_Endianness_call_args , v0
__flatbuffers_build_scalar(flatbuffers_, org_apache_arrow_flatbuf_Endianness, org_apache_arrow_flatbuf_Endianness_enum_t)

#define __org_apache_arrow_flatbuf_Buffer_formal_args , int64_t v0, int64_t v1
#define __org_apache_arrow_flatbuf_Buffer_call_args , v0, v1
static inline org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_assign(org_apache_arrow_flatbuf_Buffer_t *p, int64_t v0, int64_t v1)
{ p->offset = v0; p->length = v1;
  return p; }
static inline org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_copy(org_apache_arrow_flatbuf_Buffer_t *p, const org_apache_arrow_flatbuf_Buffer_t *p2)
{ p->offset = p2->offset; p->length = p2->length;
  return p; }
static inline org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_assign_to_pe(org_apache_arrow_flatbuf_Buffer_t *p, int64_t v0, int64_t v1)
{ flatbuffers_int64_assign_to_pe(&p->offset, v0); flatbuffers_int64_assign_to_pe(&p->length, v1);
  return p; }
static inline org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_copy_to_pe(org_apache_arrow_flatbuf_Buffer_t *p, const org_apache_arrow_flatbuf_Buffer_t *p2)
{ flatbuffers_int64_copy_to_pe(&p->offset, &p2->offset); flatbuffers_int64_copy_to_pe(&p->length, &p2->length);
  return p; }
static inline org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_assign_from_pe(org_apache_arrow_flatbuf_Buffer_t *p, int64_t v0, int64_t v1)
{ flatbuffers_int64_assign_from_pe(&p->offset, v0); flatbuffers_int64_assign_from_pe(&p->length, v1);
  return p; }
static inline org_apache_arrow_flatbuf_Buffer_t *org_apache_arrow_flatbuf_Buffer_copy_from_pe(org_apache_arrow_flatbuf_Buffer_t *p, const org_apache_arrow_flatbuf_Buffer_t *p2)
{ flatbuffers_int64_copy_from_pe(&p->offset, &p2->offset); flatbuffers_int64_copy_from_pe(&p->length, &p2->length);
  return p; }
__flatbuffers_build_struct(flatbuffers_, org_apache_arrow_flatbuf_Buffer, 16, 8, org_apache_arrow_flatbuf_Buffer_file_identifier, org_apache_arrow_flatbuf_Buffer_type_identifier)
__flatbuffers_define_fixed_array_primitives(flatbuffers_, org_apache_arrow_flatbuf_Buffer, org_apache_arrow_flatbuf_Buffer_t)

typedef flatbuffers_union_ref_t org_apache_arrow_flatbuf_Type_union_ref_t;
typedef flatbuffers_union_vec_ref_t org_apache_arrow_flatbuf_Type_union_vec_ref_t;
static org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Type_union_t t);

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Null_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Null_ref_t;
static org_apache_arrow_flatbuf_Null_ref_t org_apache_arrow_flatbuf_Null_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Null_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Null, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Struct__required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Struct__ref_t;
static org_apache_arrow_flatbuf_Struct__ref_t org_apache_arrow_flatbuf_Struct__clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Struct__table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Struct_, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_List_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_List_ref_t;
static org_apache_arrow_flatbuf_List_ref_t org_apache_arrow_flatbuf_List_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_List_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_List, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_LargeList_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_LargeList_ref_t;
static org_apache_arrow_flatbuf_LargeList_ref_t org_apache_arrow_flatbuf_LargeList_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_LargeList_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_LargeList, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_FixedSizeList_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_FixedSizeList_ref_t;
static org_apache_arrow_flatbuf_FixedSizeList_ref_t org_apache_arrow_flatbuf_FixedSizeList_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_FixedSizeList_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_FixedSizeList, 1)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Map_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Map_ref_t;
static org_apache_arrow_flatbuf_Map_ref_t org_apache_arrow_flatbuf_Map_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Map_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Map, 1)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Union_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Union_ref_t;
static org_apache_arrow_flatbuf_Union_ref_t org_apache_arrow_flatbuf_Union_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Union_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Union, 2)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Int_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Int_ref_t;
static org_apache_arrow_flatbuf_Int_ref_t org_apache_arrow_flatbuf_Int_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Int_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Int, 2)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_FloatingPoint_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_FloatingPoint_ref_t;
static org_apache_arrow_flatbuf_FloatingPoint_ref_t org_apache_arrow_flatbuf_FloatingPoint_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_FloatingPoint_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_FloatingPoint, 1)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Utf8_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Utf8_ref_t;
static org_apache_arrow_flatbuf_Utf8_ref_t org_apache_arrow_flatbuf_Utf8_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Utf8_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Utf8, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Binary_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Binary_ref_t;
static org_apache_arrow_flatbuf_Binary_ref_t org_apache_arrow_flatbuf_Binary_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Binary_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Binary, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_LargeUtf8_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_LargeUtf8_ref_t;
static org_apache_arrow_flatbuf_LargeUtf8_ref_t org_apache_arrow_flatbuf_LargeUtf8_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_LargeUtf8_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_LargeUtf8, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_LargeBinary_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_LargeBinary_ref_t;
static org_apache_arrow_flatbuf_LargeBinary_ref_t org_apache_arrow_flatbuf_LargeBinary_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_LargeBinary_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_LargeBinary, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_FixedSizeBinary_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_FixedSizeBinary_ref_t;
static org_apache_arrow_flatbuf_FixedSizeBinary_ref_t org_apache_arrow_flatbuf_FixedSizeBinary_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_FixedSizeBinary_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_FixedSizeBinary, 1)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Bool_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Bool_ref_t;
static org_apache_arrow_flatbuf_Bool_ref_t org_apache_arrow_flatbuf_Bool_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Bool_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Bool, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_RunEndEncoded_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_RunEndEncoded_ref_t;
static org_apache_arrow_flatbuf_RunEndEncoded_ref_t org_apache_arrow_flatbuf_RunEndEncoded_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_RunEndEncoded_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_RunEndEncoded, 0)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Decimal_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Decimal_ref_t;
static org_apache_arrow_flatbuf_Decimal_ref_t org_apache_arrow_flatbuf_Decimal_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Decimal_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Decimal, 3)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Date_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Date_ref_t;
static org_apache_arrow_flatbuf_Date_ref_t org_apache_arrow_flatbuf_Date_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Date_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Date, 1)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Time_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Time_ref_t;
static org_apache_arrow_flatbuf_Time_ref_t org_apache_arrow_flatbuf_Time_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Time_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Time, 2)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Timestamp_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Timestamp_ref_t;
static org_apache_arrow_flatbuf_Timestamp_ref_t org_apache_arrow_flatbuf_Timestamp_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Timestamp_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Timestamp, 2)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Interval_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Interval_ref_t;
static org_apache_arrow_flatbuf_Interval_ref_t org_apache_arrow_flatbuf_Interval_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Interval_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Interval, 1)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Duration_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Duration_ref_t;
static org_apache_arrow_flatbuf_Duration_ref_t org_apache_arrow_flatbuf_Duration_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Duration_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Duration, 1)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_KeyValue_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_KeyValue_ref_t;
static org_apache_arrow_flatbuf_KeyValue_ref_t org_apache_arrow_flatbuf_KeyValue_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_KeyValue_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_KeyValue, 2)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_DictionaryEncoding_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_DictionaryEncoding_ref_t;
static org_apache_arrow_flatbuf_DictionaryEncoding_ref_t org_apache_arrow_flatbuf_DictionaryEncoding_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_DictionaryEncoding_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_DictionaryEncoding, 4)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Field_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Field_ref_t;
static org_apache_arrow_flatbuf_Field_ref_t org_apache_arrow_flatbuf_Field_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Field_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Field, 7)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Schema_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Schema_ref_t;
static org_apache_arrow_flatbuf_Schema_ref_t org_apache_arrow_flatbuf_Schema_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Schema_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Schema, 4)

#define __org_apache_arrow_flatbuf_Null_formal_args
#define __org_apache_arrow_flatbuf_Null_call_args
static inline org_apache_arrow_flatbuf_Null_ref_t org_apache_arrow_flatbuf_Null_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Null_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Null, org_apache_arrow_flatbuf_Null_file_identifier, org_apache_arrow_flatbuf_Null_type_identifier)

#define __org_apache_arrow_flatbuf_Struct__formal_args
#define __org_apache_arrow_flatbuf_Struct__call_args
static inline org_apache_arrow_flatbuf_Struct__ref_t org_apache_arrow_flatbuf_Struct__create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Struct__formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Struct_, org_apache_arrow_flatbuf_Struct__file_identifier, org_apache_arrow_flatbuf_Struct__type_identifier)

#define __org_apache_arrow_flatbuf_List_formal_args
#define __org_apache_arrow_flatbuf_List_call_args
static inline org_apache_arrow_flatbuf_List_ref_t org_apache_arrow_flatbuf_List_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_List_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_List, org_apache_arrow_flatbuf_List_file_identifier, org_apache_arrow_flatbuf_List_type_identifier)

#define __org_apache_arrow_flatbuf_LargeList_formal_args
#define __org_apache_arrow_flatbuf_LargeList_call_args
static inline org_apache_arrow_flatbuf_LargeList_ref_t org_apache_arrow_flatbuf_LargeList_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_LargeList_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_LargeList, org_apache_arrow_flatbuf_LargeList_file_identifier, org_apache_arrow_flatbuf_LargeList_type_identifier)

#define __org_apache_arrow_flatbuf_FixedSizeList_formal_args , int32_t v0
#define __org_apache_arrow_flatbuf_FixedSizeList_call_args , v0
static inline org_apache_arrow_flatbuf_FixedSizeList_ref_t org_apache_arrow_flatbuf_FixedSizeList_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_FixedSizeList_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_FixedSizeList, org_apache_arrow_flatbuf_FixedSizeList_file_identifier, org_apache_arrow_flatbuf_FixedSizeList_type_identifier)

#define __org_apache_arrow_flatbuf_Map_formal_args , flatbuffers_bool_t v0
#define __org_apache_arrow_flatbuf_Map_call_args , v0
static inline org_apache_arrow_flatbuf_Map_ref_t org_apache_arrow_flatbuf_Map_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Map_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Map, org_apache_arrow_flatbuf_Map_file_identifier, org_apache_arrow_flatbuf_Map_type_identifier)

#define __org_apache_arrow_flatbuf_Union_formal_args , org_apache_arrow_flatbuf_UnionMode_enum_t v0, flatbuffers_int32_vec_ref_t v1
#define __org_apache_arrow_flatbuf_Union_call_args , v0, v1
static inline org_apache_arrow_flatbuf_Union_ref_t org_apache_arrow_flatbuf_Union_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Union_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Union, org_apache_arrow_flatbuf_Union_file_identifier, org_apache_arrow_flatbuf_Union_type_identifier)

#define __org_apache_arrow_flatbuf_Int_formal_args , int32_t v0, flatbuffers_bool_t v1
#define __org_apache_arrow_flatbuf_Int_call_args , v0, v1
static inline org_apache_arrow_flatbuf_Int_ref_t org_apache_arrow_flatbuf_Int_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Int_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Int, org_apache_arrow_flatbuf_Int_file_identifier, org_apache_arrow_flatbuf_Int_type_identifier)

#define __org_apache_arrow_flatbuf_FloatingPoint_formal_args , org_apache_arrow_flatbuf_Precision_enum_t v0
#define __org_apache_arrow_flatbuf_FloatingPoint_call_args , v0
static inline org_apache_arrow_flatbuf_FloatingPoint_ref_t org_apache_arrow_flatbuf_FloatingPoint_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_FloatingPoint_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_FloatingPoint, org_apache_arrow_flatbuf_FloatingPoint_file_identifier, org_apache_arrow_flatbuf_FloatingPoint_type_identifier)

#define __org_apache_arrow_flatbuf_Utf8_formal_args
#define __org_apache_arrow_flatbuf_Utf8_call_args
static inline org_apache_arrow_flatbuf_Utf8_ref_t org_apache_arrow_flatbuf_Utf8_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Utf8_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Utf8, org_apache_arrow_flatbuf_Utf8_file_identifier, org_apache_arrow_flatbuf_Utf8_type_identifier)

#define __org_apache_arrow_flatbuf_Binary_formal_args
#define __org_apache_arrow_flatbuf_Binary_call_args
static inline org_apache_arrow_flatbuf_Binary_ref_t org_apache_arrow_flatbuf_Binary_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Binary_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Binary, org_apache_arrow_flatbuf_Binary_file_identifier, org_apache_arrow_flatbuf_Binary_type_identifier)

#define __org_apache_arrow_flatbuf_LargeUtf8_formal_args
#define __org_apache_arrow_flatbuf_LargeUtf8_call_args
static inline org_apache_arrow_flatbuf_LargeUtf8_ref_t org_apache_arrow_flatbuf_LargeUtf8_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_LargeUtf8_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_LargeUtf8, org_apache_arrow_flatbuf_LargeUtf8_file_identifier, org_apache_arrow_flatbuf_LargeUtf8_type_identifier)

#define __org_apache_arrow_flatbuf_LargeBinary_formal_args
#define __org_apache_arrow_flatbuf_LargeBinary_call_args
static inline org_apache_arrow_flatbuf_LargeBinary_ref_t org_apache_arrow_flatbuf_LargeBinary_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_LargeBinary_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_LargeBinary, org_apache_arrow_flatbuf_LargeBinary_file_identifier, org_apache_arrow_flatbuf_LargeBinary_type_identifier)

#define __org_apache_arrow_flatbuf_FixedSizeBinary_formal_args , int32_t v0
#define __org_apache_arrow_flatbuf_FixedSizeBinary_call_args , v0
static inline org_apache_arrow_flatbuf_FixedSizeBinary_ref_t org_apache_arrow_flatbuf_FixedSizeBinary_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_FixedSizeBinary_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_FixedSizeBinary, org_apache_arrow_flatbuf_FixedSizeBinary_file_identifier, org_apache_arrow_flatbuf_FixedSizeBinary_type_identifier)

#define __org_apache_arrow_flatbuf_Bool_formal_args
#define __org_apache_arrow_flatbuf_Bool_call_args
static inline org_apache_arrow_flatbuf_Bool_ref_t org_apache_arrow_flatbuf_Bool_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Bool_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Bool, org_apache_arrow_flatbuf_Bool_file_identifier, org_apache_arrow_flatbuf_Bool_type_identifier)

#define __org_apache_arrow_flatbuf_RunEndEncoded_formal_args
#define __org_apache_arrow_flatbuf_RunEndEncoded_call_args
static inline org_apache_arrow_flatbuf_RunEndEncoded_ref_t org_apache_arrow_flatbuf_RunEndEncoded_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_RunEndEncoded_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_RunEndEncoded, org_apache_arrow_flatbuf_RunEndEncoded_file_identifier, org_apache_arrow_flatbuf_RunEndEncoded_type_identifier)

#define __org_apache_arrow_flatbuf_Decimal_formal_args , int32_t v0, int32_t v1, int32_t v2
#define __org_apache_arrow_flatbuf_Decimal_call_args , v0, v1, v2
static inline org_apache_arrow_flatbuf_Decimal_ref_t org_apache_arrow_flatbuf_Decimal_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Decimal_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Decimal, org_apache_arrow_flatbuf_Decimal_file_identifier, org_apache_arrow_flatbuf_Decimal_type_identifier)

#define __org_apache_arrow_flatbuf_Date_formal_args , org_apache_arrow_flatbuf_DateUnit_enum_t v0
#define __org_apache_arrow_flatbuf_Date_call_args , v0
static inline org_apache_arrow_flatbuf_Date_ref_t org_apache_arrow_flatbuf_Date_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Date_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Date, org_apache_arrow_flatbuf_Date_file_identifier, org_apache_arrow_flatbuf_Date_type_identifier)

#define __org_apache_arrow_flatbuf_Time_formal_args , org_apache_arrow_flatbuf_TimeUnit_enum_t v0, int32_t v1
#define __org_apache_arrow_flatbuf_Time_call_args , v0, v1
static inline org_apache_arrow_flatbuf_Time_ref_t org_apache_arrow_flatbuf_Time_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Time_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Time, org_apache_arrow_flatbuf_Time_file_identifier, org_apache_arrow_flatbuf_Time_type_identifier)

#define __org_apache_arrow_flatbuf_Timestamp_formal_args , org_apache_arrow_flatbuf_TimeUnit_enum_t v0, flatbuffers_string_ref_t v1
#define __org_apache_arrow_flatbuf_Timestamp_call_args , v0, v1
static inline org_apache_arrow_flatbuf_Timestamp_ref_t org_apache_arrow_flatbuf_Timestamp_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Timestamp_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Timestamp, org_apache_arrow_flatbuf_Timestamp_file_identifier, org_apache_arrow_flatbuf_Timestamp_type_identifier)

#define __org_apache_arrow_flatbuf_Interval_formal_args , org_apache_arrow_flatbuf_IntervalUnit_enum_t v0
#define __org_apache_arrow_flatbuf_Interval_call_args , v0
static inline org_apache_arrow_flatbuf_Interval_ref_t org_apache_arrow_flatbuf_Interval_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Interval_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Interval, org_apache_arrow_flatbuf_Interval_file_identifier, org_apache_arrow_flatbuf_Interval_type_identifier)

#define __org_apache_arrow_flatbuf_Duration_formal_args , org_apache_arrow_flatbuf_TimeUnit_enum_t v0
#define __org_apache_arrow_flatbuf_Duration_call_args , v0
static inline org_apache_arrow_flatbuf_Duration_ref_t org_apache_arrow_flatbuf_Duration_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Duration_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Duration, org_apache_arrow_flatbuf_Duration_file_identifier, org_apache_arrow_flatbuf_Duration_type_identifier)

#define __org_apache_arrow_flatbuf_KeyValue_formal_args , flatbuffers_string_ref_t v0, flatbuffers_string_ref_t v1
#define __org_apache_arrow_flatbuf_KeyValue_call_args , v0, v1
static inline org_apache_arrow_flatbuf_KeyValue_ref_t org_apache_arrow_flatbuf_KeyValue_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_KeyValue_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_KeyValue, org_apache_arrow_flatbuf_KeyValue_file_identifier, org_apache_arrow_flatbuf_KeyValue_type_identifier)

#define __org_apache_arrow_flatbuf_DictionaryEncoding_formal_args , int64_t v0, org_apache_arrow_flatbuf_Int_ref_t v1, flatbuffers_bool_t v2, org_apache_arrow_flatbuf_DictionaryKind_enum_t v3
#define __org_apache_arrow_flatbuf_DictionaryEncoding_call_args , v0, v1, v2, v3
static inline org_apache_arrow_flatbuf_DictionaryEncoding_ref_t org_apache_arrow_flatbuf_DictionaryEncoding_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_DictionaryEncoding_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_DictionaryEncoding, org_apache_arrow_flatbuf_DictionaryEncoding_file_identifier, org_apache_arrow_flatbuf_DictionaryEncoding_type_identifier)

#define __org_apache_arrow_flatbuf_Field_formal_args ,\
  flatbuffers_string_ref_t v0, flatbuffers_bool_t v1, org_apache_arrow_flatbuf_Type_union_ref_t v3, org_apache_arrow_flatbuf_DictionaryEncoding_ref_t v4, org_apache_arrow_flatbuf_Field_vec_ref_t v5, org_apache_arrow_flatbuf_KeyValue_vec_ref_t v6
#define __org_apache_arrow_flatbuf_Field_call_args ,\
  v0, v1, v3, v4, v5, v6
static inline org_apache_arrow_flatbuf_Field_ref_t org_apache_arrow_flatbuf_Field_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Field_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Field, org_apache_arrow_flatbuf_Field_file_identifier, org_apache_arrow_flatbuf_Field_type_identifier)

#define __org_apache_arrow_flatbuf_Schema_formal_args , org_apache_arrow_flatbuf_Endianness_enum_t v0, org_apache_arrow_flatbuf_Field_vec_ref_t v1, org_apache_arrow_flatbuf_KeyValue_vec_ref_t v2, org_apache_arrow_flatbuf_Feature_vec_ref_t v3
#define __org_apache_arrow_flatbuf_Schema_call_args , v0, v1, v2, v3
static inline org_apache_arrow_flatbuf_Schema_ref_t org_apache_arrow_flatbuf_Schema_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Schema_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Schema, org_apache_arrow_flatbuf_Schema_file_identifier, org_apache_arrow_flatbuf_Schema_type_identifier)

static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_NONE(void)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_NONE; uref.value = 0; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Null(org_apache_arrow_flatbuf_Null_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Null; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Int(org_apache_arrow_flatbuf_Int_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Int; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_FloatingPoint(org_apache_arrow_flatbuf_FloatingPoint_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_FloatingPoint; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Binary(org_apache_arrow_flatbuf_Binary_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Binary; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Utf8(org_apache_arrow_flatbuf_Utf8_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Utf8; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Bool(org_apache_arrow_flatbuf_Bool_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Bool; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Decimal(org_apache_arrow_flatbuf_Decimal_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Decimal; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Date(org_apache_arrow_flatbuf_Date_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Date; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Time(org_apache_arrow_flatbuf_Time_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Time; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Timestamp(org_apache_arrow_flatbuf_Timestamp_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Timestamp; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Interval(org_apache_arrow_flatbuf_Interval_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Interval; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_List(org_apache_arrow_flatbuf_List_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_List; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Struct_(org_apache_arrow_flatbuf_Struct__ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Struct_; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Union(org_apache_arrow_flatbuf_Union_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Union; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_FixedSizeBinary(org_apache_arrow_flatbuf_FixedSizeBinary_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_FixedSizeBinary; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_FixedSizeList(org_apache_arrow_flatbuf_FixedSizeList_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_FixedSizeList; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Map(org_apache_arrow_flatbuf_Map_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Map; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_Duration(org_apache_arrow_flatbuf_Duration_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_Duration; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_LargeBinary(org_apache_arrow_flatbuf_LargeBinary_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_LargeBinary; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_LargeUtf8(org_apache_arrow_flatbuf_LargeUtf8_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_LargeUtf8; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_LargeList(org_apache_arrow_flatbuf_LargeList_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_LargeList; uref.value = ref; return uref; }
static inline org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_as_RunEndEncoded(org_apache_arrow_flatbuf_RunEndEncoded_ref_t ref)
{ org_apache_arrow_flatbuf_Type_union_ref_t uref; uref.type = org_apache_arrow_flatbuf_Type_RunEndEncoded; uref.value = ref; return uref; }
__flatbuffers_build_union_vector(flatbuffers_, org_apache_arrow_flatbuf_Type)

static org_apache_arrow_flatbuf_Type_union_ref_t org_apache_arrow_flatbuf_Type_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Type_union_t u)
{
    switch (u.type) {
    case 1: return org_apache_arrow_flatbuf_Type_as_Null(org_apache_arrow_flatbuf_Null_clone(B, (org_apache_arrow_flatbuf_Null_table_t)u.value));
    case 2: return org_apache_arrow_flatbuf_Type_as_Int(org_apache_arrow_flatbuf_Int_clone(B, (org_apache_arrow_flatbuf_Int_table_t)u.value));
    case 3: return org_apache_arrow_flatbuf_Type_as_FloatingPoint(org_apache_arrow_flatbuf_FloatingPoint_clone(B, (org_apache_arrow_flatbuf_FloatingPoint_table_t)u.value));
    case 4: return org_apache_arrow_flatbuf_Type_as_Binary(org_apache_arrow_flatbuf_Binary_clone(B, (org_apache_arrow_flatbuf_Binary_table_t)u.value));
    case 5: return org_apache_arrow_flatbuf_Type_as_Utf8(org_apache_arrow_flatbuf_Utf8_clone(B, (org_apache_arrow_flatbuf_Utf8_table_t)u.value));
    case 6: return org_apache_arrow_flatbuf_Type_as_Bool(org_apache_arrow_flatbuf_Bool_clone(B, (org_apache_arrow_flatbuf_Bool_table_t)u.value));
    case 7: return org_apache_arrow_flatbuf_Type_as_Decimal(org_apache_arrow_flatbuf_Decimal_clone(B, (org_apache_arrow_flatbuf_Decimal_table_t)u.value));
    case 8: return org_apache_arrow_flatbuf_Type_as_Date(org_apache_arrow_flatbuf_Date_clone(B, (org_apache_arrow_flatbuf_Date_table_t)u.value));
    case 9: return org_apache_arrow_flatbuf_Type_as_Time(org_apache_arrow_flatbuf_Time_clone(B, (org_apache_arrow_flatbuf_Time_table_t)u.value));
    case 10: return org_apache_arrow_flatbuf_Type_as_Timestamp(org_apache_arrow_flatbuf_Timestamp_clone(B, (org_apache_arrow_flatbuf_Timestamp_table_t)u.value));
    case 11: return org_apache_arrow_flatbuf_Type_as_Interval(org_apache_arrow_flatbuf_Interval_clone(B, (org_apache_arrow_flatbuf_Interval_table_t)u.value));
    case 12: return org_apache_arrow_flatbuf_Type_as_List(org_apache_arrow_flatbuf_List_clone(B, (org_apache_arrow_flatbuf_List_table_t)u.value));
    case 13: return org_apache_arrow_flatbuf_Type_as_Struct_(org_apache_arrow_flatbuf_Struct__clone(B, (org_apache_arrow_flatbuf_Struct__table_t)u.value));
    case 14: return org_apache_arrow_flatbuf_Type_as_Union(org_apache_arrow_flatbuf_Union_clone(B, (org_apache_arrow_flatbuf_Union_table_t)u.value));
    case 15: return org_apache_arrow_flatbuf_Type_as_FixedSizeBinary(org_apache_arrow_flatbuf_FixedSizeBinary_clone(B, (org_apache_arrow_flatbuf_FixedSizeBinary_table_t)u.value));
    case 16: return org_apache_arrow_flatbuf_Type_as_FixedSizeList(org_apache_arrow_flatbuf_FixedSizeList_clone(B, (org_apache_arrow_flatbuf_FixedSizeList_table_t)u.value));
    case 17: return org_apache_arrow_flatbuf_Type_as_Map(org_apache_arrow_flatbuf_Map_clone(B, (org_apache_arrow_flatbuf_Map_table_t)u.value));
    case 18: return org_apache_arrow_flatbuf_Type_as_Duration(org_apache_arrow_flatbuf_Duration_clone(B, (org_apache_arrow_flatbuf_Duration_table_t)u.value));
    case 19: return org_apache_arrow_flatbuf_Type_as_LargeBinary(org_apache_arrow_flatbuf_LargeBinary_clone(B, (org_apache_arrow_flatbuf_LargeBinary_table_t)u.value));
    case 20: return org_apache_arrow_flatbuf_Type_as_LargeUtf8(org_apache_arrow_flatbuf_LargeUtf8_clone(B, (org_apache_arrow_flatbuf_LargeUtf8_table_t)u.value));
    case 21: return org_apache_arrow_flatbuf_Type_as_LargeList(org_apache_arrow_flatbuf_LargeList_clone(B, (org_apache_arrow_flatbuf_LargeList_table_t)u.value));
    case 22: return org_apache_arrow_flatbuf_Type_as_RunEndEncoded(org_apache_arrow_flatbuf_RunEndEncoded_clone(B, (org_apache_arrow_flatbuf_RunEndEncoded_table_t)u.value));
    default: return org_apache_arrow_flatbuf_Type_as_NONE();
    }
}


static inline org_apache_arrow_flatbuf_Null_ref_t org_apache_arrow_flatbuf_Null_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Null_formal_args)
{
    if (org_apache_arrow_flatbuf_Null_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Null_end(B);
}

static org_apache_arrow_flatbuf_Null_ref_t org_apache_arrow_flatbuf_Null_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Null_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Null_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Null_end(B));
}


static inline org_apache_arrow_flatbuf_Struct__ref_t org_apache_arrow_flatbuf_Struct__create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Struct__formal_args)
{
    if (org_apache_arrow_flatbuf_Struct__start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Struct__end(B);
}

static org_apache_arrow_flatbuf_Struct__ref_t org_apache_arrow_flatbuf_Struct__clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Struct__table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Struct__start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Struct__end(B));
}


static inline org_apache_arrow_flatbuf_List_ref_t org_apache_arrow_flatbuf_List_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_List_formal_args)
{
    if (org_apache_arrow_flatbuf_List_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_List_end(B);
}

static org_apache_arrow_flatbuf_List_ref_t org_apache_arrow_flatbuf_List_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_List_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_List_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_List_end(B));
}


static inline org_apache_arrow_flatbuf_LargeList_ref_t org_apache_arrow_flatbuf_LargeList_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_LargeList_formal_args)
{
    if (org_apache_arrow_flatbuf_LargeList_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_LargeList_end(B);
}

static org_apache_arrow_flatbuf_LargeList_ref_t org_apache_arrow_flatbuf_LargeList_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_LargeList_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_LargeList_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_LargeList_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_FixedSizeList_listSize, flatbuffers_int32, int32_t, 4, 4, INT32_C(0), org_apache_arrow_flatbuf_FixedSizeList)

static inline org_apache_arrow_flatbuf_FixedSizeList_ref_t org_apache_arrow_flatbuf_FixedSizeList_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_FixedSizeList_formal_args)
{
    if (org_apache_arrow_flatbuf_FixedSizeList_start(B)
        || org_apache_arrow_flatbuf_FixedSizeList_listSize_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_FixedSizeList_end(B);
}

static org_apache_arrow_flatbuf_FixedSizeList_ref_t org_apache_arrow_flatbuf_FixedSizeList_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_FixedSizeList_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_FixedSizeList_start(B)
        || org_apache_arrow_flatbuf_FixedSizeList_listSize_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_FixedSizeList_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Map_keysSorted, flatbuffers_bool, flatbuffers_bool_t, 1, 1, UINT8_C(0), org_apache_arrow_flatbuf_Map)

static inline org_apache_arrow_flatbuf_Map_ref_t org_apache_arrow_flatbuf_Map_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Map_formal_args)
{
    if (org_apache_arrow_flatbuf_Map_start(B)
        || org_apache_arrow_flatbuf_Map_keysSorted_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Map_end(B);
}

static org_apache_arrow_flatbuf_Map_ref_t org_apache_arrow_flatbuf_Map_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Map_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Map_start(B)
        || org_apache_arrow_flatbuf_Map_keysSorted_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Map_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Union_mode, org_apache_arrow_flatbuf_UnionMode, org_apache_arrow_flatbuf_UnionMode_enum_t, 2, 2, INT16_C(0), org_apache_arrow_flatbuf_Union)
__flatbuffers_build_vector_field(1, flatbuffers_, org_apache_arrow_flatbuf_Union_typeIds, flatbuffers_int32, int32_t, org_apache_arrow_flatbuf_Union)

static inline org_apache_arrow_flatbuf_Union_ref_t org_apache_arrow_flatbuf_Union_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Union_formal_args)
{
    if (org_apache_arrow_flatbuf_Union_start(B)
        || org_apache_arrow_flatbuf_Union_typeIds_add(B, v1)
        || org_apache_arrow_flatbuf_Union_mode_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Union_end(B);
}

static org_apache_arrow_flatbuf_Union_ref_t org_apache_arrow_flatbuf_Union_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Union_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Union_start(B)
        || org_apache_arrow_flatbuf_Union_typeIds_pick(B, t)
        || org_apache_arrow_flatbuf_Union_mode_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Union_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Int_bitWidth, flatbuffers_int32, int32_t, 4, 4, INT32_C(0), org_apache_arrow_flatbuf_Int)
__flatbuffers_build_scalar_field(1, flatbuffers_, org_apache_arrow_flatbuf_Int_is_signed, flatbuffers_bool, flatbuffers_bool_t, 1, 1, UINT8_C(0), org_apache_arrow_flatbuf_Int)

static inline org_apache_arrow_flatbuf_Int_ref_t org_apache_arrow_flatbuf_Int_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Int_formal_args)
{
    if (org_apache_arrow_flatbuf_Int_start(B)
        || org_apache_arrow_flatbuf_Int_bitWidth_add(B, v0)
        || org_apache_arrow_flatbuf_Int_is_signed_add(B, v1)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Int_end(B);
}

static org_apache_arrow_flatbuf_Int_ref_t org_apache_arrow_flatbuf_Int_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Int_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Int_start(B)
        || org_apache_arrow_flatbuf_Int_bitWidth_pick(B, t)
        || org_apache_arrow_flatbuf_Int_is_signed_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Int_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_FloatingPoint_precision, org_apache_arrow_flatbuf_Precision, org_apache_arrow_flatbuf_Precision_enum_t, 2, 2, INT16_C(0), org_apache_arrow_flatbuf_FloatingPoint)

static inline org_apache_arrow_flatbuf_FloatingPoint_ref_t org_apache_arrow_flatbuf_FloatingPoint_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_FloatingPoint_formal_args)
{
    if (org_apache_arrow_flatbuf_FloatingPoint_start(B)
        || org_apache_arrow_flatbuf_FloatingPoint_precision_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_FloatingPoint_end(B);
}

static org_apache_arrow_flatbuf_FloatingPoint_ref_t org_apache_arrow_flatbuf_FloatingPoint_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_FloatingPoint_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_FloatingPoint_start(B)
        || org_apache_arrow_flatbuf_FloatingPoint_precision_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_FloatingPoint_end(B));
}


static inline org_apache_arrow_flatbuf_Utf8_ref_t org_apache_arrow_flatbuf_Utf8_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Utf8_formal_args)
{
    if (org_apache_arrow_flatbuf_Utf8_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Utf8_end(B);
}

static org_apache_arrow_flatbuf_Utf8_ref_t org_apache_arrow_flatbuf_Utf8_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Utf8_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Utf8_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Utf8_end(B));
}


static inline org_apache_arrow_flatbuf_Binary_ref_t org_apache_arrow_flatbuf_Binary_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Binary_formal_args)
{
    if (org_apache_arrow_flatbuf_Binary_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Binary_end(B);
}

static org_apache_arrow_flatbuf_Binary_ref_t org_apache_arrow_flatbuf_Binary_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Binary_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Binary_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Binary_end(B));
}


static inline org_apache_arrow_flatbuf_LargeUtf8_ref_t org_apache_arrow_flatbuf_LargeUtf8_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_LargeUtf8_formal_args)
{
    if (org_apache_arrow_flatbuf_LargeUtf8_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_LargeUtf8_end(B);
}

static org_apache_arrow_flatbuf_LargeUtf8_ref_t org_apache_arrow_flatbuf_LargeUtf8_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_LargeUtf8_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_LargeUtf8_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_LargeUtf8_end(B));
}


static inline org_apache_arrow_flatbuf_LargeBinary_ref_t org_apache_arrow_flatbuf_LargeBinary_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_LargeBinary_formal_args)
{
    if (org_apache_arrow_flatbuf_LargeBinary_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_LargeBinary_end(B);
}

static org_apache_arrow_flatbuf_LargeBinary_ref_t org_apache_arrow_flatbuf_LargeBinary_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_LargeBinary_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_LargeBinary_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_LargeBinary_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_FixedSizeBinary_byteWidth, flatbuffers_int32, int32_t, 4, 4, INT32_C(0), org_apache_arrow_flatbuf_FixedSizeBinary)

static inline org_apache_arrow_flatbuf_FixedSizeBinary_ref_t org_apache_arrow_flatbuf_FixedSizeBinary_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_FixedSizeBinary_formal_args)
{
    if (org_apache_arrow_flatbuf_FixedSizeBinary_start(B)
        || org_apache_arrow_flatbuf_FixedSizeBinary_byteWidth_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_FixedSizeBinary_end(B);
}

static org_apache_arrow_flatbuf_FixedSizeBinary_ref_t org_apache_arrow_flatbuf_FixedSizeBinary_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_FixedSizeBinary_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_FixedSizeBinary_start(B)
        || org_apache_arrow_flatbuf_FixedSizeBinary_byteWidth_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_FixedSizeBinary_end(B));
}


static inline org_apache_arrow_flatbuf_Bool_ref_t org_apache_arrow_flatbuf_Bool_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Bool_formal_args)
{
    if (org_apache_arrow_flatbuf_Bool_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Bool_end(B);
}

static org_apache_arrow_flatbuf_Bool_ref_t org_apache_arrow_flatbuf_Bool_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Bool_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Bool_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Bool_end(B));
}


static inline org_apache_arrow_flatbuf_RunEndEncoded_ref_t org_apache_arrow_flatbuf_RunEndEncoded_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_RunEndEncoded_formal_args)
{
    if (org_apache_arrow_flatbuf_RunEndEncoded_start(B)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_RunEndEncoded_end(B);
}

static org_apache_arrow_flatbuf_RunEndEncoded_ref_t org_apache_arrow_flatbuf_RunEndEncoded_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_RunEndEncoded_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_RunEndEncoded_start(B)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_RunEndEncoded_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Decimal_precision, flatbuffers_int32, int32_t, 4, 4, INT32_C(0), org_apache_arrow_flatbuf_Decimal)
__flatbuffers_build_scalar_field(1, flatbuffers_, org_apache_arrow_flatbuf_Decimal_scale, flatbuffers_int32, int32_t, 4, 4, INT32_C(0), org_apache_arrow_flatbuf_Decimal)
__flatbuffers_build_scalar_field(2, flatbuffers_, org_apache_arrow_flatbuf_Decimal_bitWidth, flatbuffers_int32, int32_t, 4, 4, INT32_C(128), org_apache_arrow_flatbuf_Decimal)

static inline org_apache_arrow_flatbuf_Decimal_ref_t org_apache_arrow_flatbuf_Decimal_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Decimal_formal_args)
{
    if (org_apache_arrow_flatbuf_Decimal_start(B)
        || org_apache_arrow_flatbuf_Decimal_precision_add(B, v0)
        || org_apache_arrow_flatbuf_Decimal_scale_add(B, v1)
        || org_apache_arrow_flatbuf_Decimal_bitWidth_add(B, v2)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Decimal_end(B);
}

static org_apache_arrow_flatbuf_Decimal_ref_t org_apache_arrow_flatbuf_Decimal_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Decimal_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Decimal_start(B)
        || org_apache_arrow_flatbuf_Decimal_precision_pick(B, t)
        || org_apache_arrow_flatbuf_Decimal_scale_pick(B, t)
        || org_apache_arrow_flatbuf_Decimal_bitWidth_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Decimal_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Date_unit, org_apache_arrow_flatbuf_DateUnit, org_apache_arrow_flatbuf_DateUnit_enum_t, 2, 2, INT16_C(1), org_apache_arrow_flatbuf_Date)

static inline org_apache_arrow_flatbuf_Date_ref_t org_apache_arrow_flatbuf_Date_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Date_formal_args)
{
    if (org_apache_arrow_flatbuf_Date_start(B)
        || org_apache_arrow_flatbuf_Date_unit_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Date_end(B);
}

static org_apache_arrow_flatbuf_Date_ref_t org_apache_arrow_flatbuf_Date_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Date_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Date_start(B)
        || org_apache_arrow_flatbuf_Date_unit_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Date_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Time_unit, org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t, 2, 2, INT16_C(1), org_apache_arrow_flatbuf_Time)
__flatbuffers_build_scalar_field(1, flatbuffers_, org_apache_arrow_flatbuf_Time_bitWidth, flatbuffers_int32, int32_t, 4, 4, INT32_C(32), org_apache_arrow_flatbuf_Time)

static inline org_apache_arrow_flatbuf_Time_ref_t org_apache_arrow_flatbuf_Time_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Time_formal_args)
{
    if (org_apache_arrow_flatbuf_Time_start(B)
        || org_apache_arrow_flatbuf_Time_bitWidth_add(B, v1)
        || org_apache_arrow_flatbuf_Time_unit_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Time_end(B);
}

static org_apache_arrow_flatbuf_Time_ref_t org_apache_arrow_flatbuf_Time_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Time_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Time_start(B)
        || org_apache_arrow_flatbuf_Time_bitWidth_pick(B, t)
        || org_apache_arrow_flatbuf_Time_unit_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Time_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Timestamp_unit, org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t, 2, 2, INT16_C(0), org_apache_arrow_flatbuf_Timestamp)
__flatbuffers_build_string_field(1, flatbuffers_, org_apache_arrow_flatbuf_Timestamp_timezone, org_apache_arrow_flatbuf_Timestamp)

static inline org_apache_arrow_flatbuf_Timestamp_ref_t org_apache_arrow_flatbuf_Timestamp_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Timestamp_formal_args)
{
    if (org_apache_arrow_flatbuf_Timestamp_start(B)
        || org_apache_arrow_flatbuf_Timestamp_timezone_add(B, v1)
        || org_apache_arrow_flatbuf_Timestamp_unit_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Timestamp_end(B);
}

static org_apache_arrow_flatbuf_Timestamp_ref_t org_apache_arrow_flatbuf_Timestamp_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Timestamp_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Timestamp_start(B)
        || org_apache_arrow_flatbuf_Timestamp_timezone_pick(B, t)
        || org_apache_arrow_flatbuf_Timestamp_unit_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Timestamp_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Interval_unit, org_apache_arrow_flatbuf_IntervalUnit, org_apache_arrow_flatbuf_IntervalUnit_enum_t, 2, 2, INT16_C(0), org_apache_arrow_flatbuf_Interval)

static inline org_apache_arrow_flatbuf_Interval_ref_t org_apache_arrow_flatbuf_Interval_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Interval_formal_args)
{
    if (org_apache_arrow_flatbuf_Interval_start(B)
        || org_apache_arrow_flatbuf_Interval_unit_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Interval_end(B);
}

static org_apache_arrow_flatbuf_Interval_ref_t org_apache_arrow_flatbuf_Interval_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Interval_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Interval_start(B)
        || org_apache_arrow_flatbuf_Interval_unit_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Interval_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Duration_unit, org_apache_arrow_flatbuf_TimeUnit, org_apache_arrow_flatbuf_TimeUnit_enum_t, 2, 2, INT16_C(1), org_apache_arrow_flatbuf_Duration)

static inline org_apache_arrow_flatbuf_Duration_ref_t org_apache_arrow_flatbuf_Duration_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Duration_formal_args)
{
    if (org_apache_arrow_flatbuf_Duration_start(B)
        || org_apache_arrow_flatbuf_Duration_unit_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Duration_end(B);
}

static org_apache_arrow_flatbuf_Duration_ref_t org_apache_arrow_flatbuf_Duration_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Duration_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Duration_start(B)
        || org_apache_arrow_flatbuf_Duration_unit_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Duration_end(B));
}

__flatbuffers_build_string_field(0, flatbuffers_, org_apache_arrow_flatbuf_KeyValue_key, org_apache_arrow_flatbuf_KeyValue)
__flatbuffers_build_string_field(1, flatbuffers_, org_apache_arrow_flatbuf_KeyValue_value, org_apache_arrow_flatbuf_KeyValue)

static inline org_apache_arrow_flatbuf_KeyValue_ref_t org_apache_arrow_flatbuf_KeyValue_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_KeyValue_formal_args)
{
    if (org_apache_arrow_flatbuf_KeyValue_start(B)
        || org_apache_arrow_flatbuf_KeyValue_key_add(B, v0)
        || org_apache_arrow_flatbuf_KeyValue_value_add(B, v1)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_KeyValue_end(B);
}

static org_apache_arrow_flatbuf_KeyValue_ref_t org_apache_arrow_flatbuf_KeyValue_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_KeyValue_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_KeyValue_start(B)
        || org_apache_arrow_flatbuf_KeyValue_key_pick(B, t)
        || org_apache_arrow_flatbuf_KeyValue_value_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_KeyValue_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_DictionaryEncoding_id, flatbuffers_int64, int64_t, 8, 8, INT64_C(0), org_apache_arrow_flatbuf_DictionaryEncoding)
__flatbuffers_build_table_field(1, flatbuffers_, org_apache_arrow_flatbuf_DictionaryEncoding_indexType, org_apache_arrow_flatbuf_Int, org_apache_arrow_flatbuf_DictionaryEncoding)
__flatbuffers_build_scalar_field(2, flatbuffers_, org_apache_arrow_flatbuf_DictionaryEncoding_isOrdered, flatbuffers_bool, flatbuffers_bool_t, 1, 1, UINT8_C(0), org_apache_arrow_flatbuf_DictionaryEncoding)
__flatbuffers_build_scalar_field(3, flatbuffers_, org_apache_arrow_flatbuf_DictionaryEncoding_dictionaryKind, org_apache_arrow_flatbuf_DictionaryKind, org_apache_arrow_flatbuf_DictionaryKind_enum_t, 2, 2, INT16_C(0), org_apache_arrow_flatbuf_DictionaryEncoding)

static inline org_apache_arrow_flatbuf_DictionaryEncoding_ref_t org_apache_arrow_flatbuf_DictionaryEncoding_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_DictionaryEncoding_formal_args)
{
    if (org_apache_arrow_flatbuf_DictionaryEncoding_start(B)
        || org_apache_arrow_flatbuf_DictionaryEncoding_id_add(B, v0)
        || org_apache_arrow_flatbuf_DictionaryEncoding_indexType_add(B, v1)
        || org_apache_arrow_flatbuf_DictionaryEncoding_dictionaryKind_add(B, v3)
        || org_apache_arrow_flatbuf_DictionaryEncoding_isOrdered_add(B, v2)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_DictionaryEncoding_end(B);
}

static org_apache_arrow_flatbuf_DictionaryEncoding_ref_t org_apache_arrow_flatbuf_DictionaryEncoding_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_DictionaryEncoding_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_DictionaryEncoding_start(B)
        || org_apache_arrow_flatbuf_DictionaryEncoding_id_pick(B, t)
        || org_apache_arrow_flatbuf_DictionaryEncoding_indexType_pick(B, t)
        || org_apache_arrow_flatbuf_DictionaryEncoding_dictionaryKind_pick(B, t)
        || org_apache_arrow_flatbuf_DictionaryEncoding_isOrdered_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_DictionaryEncoding_end(B));
}

__flatbuffers_build_string_field(0, flatbuffers_, org_apache_arrow_flatbuf_Field_name, org_apache_arrow_flatbuf_Field)
__flatbuffers_build_scalar_field(1, flatbuffers_, org_apache_arrow_flatbuf_Field_nullable, flatbuffers_bool, flatbuffers_bool_t, 1, 1, UINT8_C(0), org_apache_arrow_flatbuf_Field)
__flatbuffers_build_union_field(3, flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, org_apache_arrow_flatbuf_Field)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Null, org_apache_arrow_flatbuf_Null)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Int, org_apache_arrow_flatbuf_Int)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, FloatingPoint, org_apache_arrow_flatbuf_FloatingPoint)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Binary, org_apache_arrow_flatbuf_Binary)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Utf8, org_apache_arrow_flatbuf_Utf8)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Bool, org_apache_arrow_flatbuf_Bool)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Decimal, org_apache_arrow_flatbuf_Decimal)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Date, org_apache_arrow_flatbuf_Date)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Time, org_apache_arrow_flatbuf_Time)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Timestamp, org_apache_arrow_flatbuf_Timestamp)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Interval, org_apache_arrow_flatbuf_Interval)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, List, org_apache_arrow_flatbuf_List)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Struct_, org_apache_arrow_flatbuf_Struct_)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Union, org_apache_arrow_flatbuf_Union)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, FixedSizeBinary, org_apache_arrow_flatbuf_FixedSizeBinary)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, FixedSizeList, org_apache_arrow_flatbuf_FixedSizeList)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Map, org_apache_arrow_flatbuf_Map)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, Duration, org_apache_arrow_flatbuf_Duration)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, LargeBinary, org_apache_arrow_flatbuf_LargeBinary)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, LargeUtf8, org_apache_arrow_flatbuf_LargeUtf8)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, LargeList, org_apache_arrow_flatbuf_LargeList)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Field_type, org_apache_arrow_flatbuf_Type, RunEndEncoded, org_apache_arrow_flatbuf_RunEndEncoded)
__flatbuffers_build_table_field(4, flatbuffers_, org_apache_arrow_flatbuf_Field_dictionary, org_apache_arrow_flatbuf_DictionaryEncoding, org_apache_arrow_flatbuf_Field)
__flatbuffers_build_table_vector_field(5, flatbuffers_, org_apache_arrow_flatbuf_Field_children, org_apache_arrow_flatbuf_Field, org_apache_arrow_flatbuf_Field)
__flatbuffers_build_table_vector_field(6, flatbuffers_, org_apache_arrow_flatbuf_Field_custom_metadata, org_apache_arrow_flatbuf_KeyValue, org_apache_arrow_flatbuf_Field)

static inline org_apache_arrow_flatbuf_Field_ref_t org_apache_arrow_flatbuf_Field_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Field_formal_args)
{
    if (org_apache_arrow_flatbuf_Field_start(B)
        || org_apache_arrow_flatbuf_Field_name_add(B, v0)
        || org_apache_arrow_flatbuf_Field_type_add_value(B, v3)
        || org_apache_arrow_flatbuf_Field_dictionary_add(B, v4)
        || org_apache_arrow_flatbuf_Field_children_add(B, v5)
        || org_apache_arrow_flatbuf_Field_custom_metadata_add(B, v6)
        || org_apache_arrow_flatbuf_Field_nullable_add(B, v1)
        || org_apache_arrow_flatbuf_Field_type_add_type(B, v3.type)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Field_end(B);
}

static org_apache_arrow_flatbuf_Field_ref_t org_apache_arrow_flatbuf_Field_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Field_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Field_start(B)
        || org_apache_arrow_flatbuf_Field_name_pick(B, t)
        || org_apache_arrow_flatbuf_Field_type_pick(B, t)
        || org_apache_arrow_flatbuf_Field_dictionary_pick(B, t)
        || org_apache_arrow_flatbuf_Field_children_pick(B, t)
        || org_apache_arrow_flatbuf_Field_custom_metadata_pick(B, t)
        || org_apache_arrow_flatbuf_Field_nullable_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Field_end(B));
}

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_Schema_endianness, org_apache_arrow_flatbuf_Endianness, org_apache_arrow_flatbuf_Endianness_enum_t, 2, 2, INT16_C(0), org_apache_arrow_flatbuf_Schema)
__flatbuffers_build_table_vector_field(1, flatbuffers_, org_apache_arrow_flatbuf_Schema_fields, org_apache_arrow_flatbuf_Field, org_apache_arrow_flatbuf_Schema)
__flatbuffers_build_table_vector_field(2, flatbuffers_, org_apache_arrow_flatbuf_Schema_custom_metadata, org_apache_arrow_flatbuf_KeyValue, org_apache_arrow_flatbuf_Schema)
__flatbuffers_build_vector_field(3, flatbuffers_, org_apache_arrow_flatbuf_Schema_features, org_apache_arrow_flatbuf_Feature, org_apache_arrow_flatbuf_Feature_enum_t, org_apache_arrow_flatbuf_Schema)

static inline org_apache_arrow_flatbuf_Schema_ref_t org_apache_arrow_flatbuf_Schema_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Schema_formal_args)
{
    if (org_apache_arrow_flatbuf_Schema_start(B)
        || org_apache_arrow_flatbuf_Schema_fields_add(B, v1)
        || org_apache_arrow_flatbuf_Schema_custom_metadata_add(B, v2)
        || org_apache_arrow_flatbuf_Schema_features_add(B, v3)
        || org_apache_arrow_flatbuf_Schema_endianness_add(B, v0)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Schema_end(B);
}

static org_apache_arrow_flatbuf_Schema_ref_t org_apache_arrow_flatbuf_Schema_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Schema_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Schema_start(B)
        || org_apache_arrow_flatbuf_Schema_fields_pick(B, t)
        || org_apache_arrow_flatbuf_Schema_custom_metadata_pick(B, t)
        || org_apache_arrow_flatbuf_Schema_features_pick(B, t)
        || org_apache_arrow_flatbuf_Schema_endianness_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Schema_end(B));
}

#include "flatcc/flatcc_epilogue.h"
#endif /* SCHEMA_BUILDER_H */
#ifndef SCHEMA_VERIFIER_H
#define SCHEMA_VERIFIER_H

/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

#ifndef SCHEMA_READER_H
#include "Schema_reader.h"
#endif
#include "flatcc/flatcc_verifier.h"
#include "flatcc/flatcc_prologue.h"

static int org_apache_arrow_flatbuf_Null_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Struct__verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_List_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_LargeList_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_FixedSizeList_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Map_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Union_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Int_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_FloatingPoint_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Utf8_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Binary_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_LargeUtf8_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_LargeBinary_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_FixedSizeBinary_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Bool_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_RunEndEncoded_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Decimal_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Date_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Time_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Timestamp_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Interval_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Duration_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_KeyValue_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_DictionaryEncoding_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Field_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Schema_verify_table(flatcc_table_verifier_descriptor_t *td);

static int org_apache_arrow_flatbuf_Type_union_verifier(flatcc_union_verifier_descriptor_t *ud)
{
    switch (ud->type) {
    case 1: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Null_verify_table); /* Null */
    case 2: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Int_verify_table); /* Int */
    case 3: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_FloatingPoint_verify_table); /* FloatingPoint */
    case 4: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Binary_verify_table); /* Binary */
    case 5: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Utf8_verify_table); /* Utf8 */
    case 6: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Bool_verify_table); /* Bool */
    case 7: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Decimal_verify_table); /* Decimal */
    case 8: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Date_verify_table); /* Date */
    case 9: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Time_verify_table); /* Time */
    case 10: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Timestamp_verify_table); /* Timestamp */
    case 11: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Interval_verify_table); /* Interval */
    case 12: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_List_verify_table); /* List */
    case 13: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Struct__verify_table); /* Struct_ */
    case 14: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Union_verify_table); /* Union */
    case 15: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_FixedSizeBinary_verify_table); /* FixedSizeBinary */
    case 16: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_FixedSizeList_verify_table); /* FixedSizeList */
    case 17: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Map_verify_table); /* Map */
    case 18: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_Duration_verify_table); /* Duration */
    case 19: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_LargeBinary_verify_table); /* LargeBinary */
    case 20: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_LargeUtf8_verify_table); /* LargeUtf8 */
    case 21: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_LargeList_verify_table); /* LargeList */
    case 22: return flatcc_verify_union_table(ud, org_apache_arrow_flatbuf_RunEndEncoded_verify_table); /* RunEndEncoded */
    default: return flatcc_verify_ok;
    }
}

static inline int org_apache_arrow_flatbuf_Buffer_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_struct_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Buffer_identifier, 16, 8);
}

static inline int org_apache_arrow_flatbuf_Buffer_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_struct_as_typed_root(buf, bufsiz, org_apache_arrow_flatbuf_Buffer_type_hash, 16, 8);
}

static inline int org_apache_arrow_flatbuf_Buffer_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_struct_as_typed_root(buf, bufsiz, thash, 16, 8);
}

static inline int org_apache_arrow_flatbuf_Buffer_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_struct_as_root(buf, bufsiz, fid, 16, 8);
}

static int org_apache_arrow_flatbuf_Null_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Null_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Null_identifier, &org_apache_arrow_flatbuf_Null_verify_table);
}

static inline int org_apache_arrow_flatbuf_Null_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Null_type_identifier, &org_apache_arrow_flatbuf_Null_verify_table);
}

static inline int org_apache_arrow_flatbuf_Null_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Null_verify_table);
}

static inline int org_apache_arrow_flatbuf_Null_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Null_verify_table);
}

static int org_apache_arrow_flatbuf_Struct__verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Struct__verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Struct__identifier, &org_apache_arrow_flatbuf_Struct__verify_table);
}

static inline int org_apache_arrow_flatbuf_Struct__verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Struct__type_identifier, &org_apache_arrow_flatbuf_Struct__verify_table);
}

static inline int org_apache_arrow_flatbuf_Struct__verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Struct__verify_table);
}

static inline int org_apache_arrow_flatbuf_Struct__verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Struct__verify_table);
}

static int org_apache_arrow_flatbuf_List_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_List_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_List_identifier, &org_apache_arrow_flatbuf_List_verify_table);
}

static inline int org_apache_arrow_flatbuf_List_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_List_type_identifier, &org_apache_arrow_flatbuf_List_verify_table);
}

static inline int org_apache_arrow_flatbuf_List_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_List_verify_table);
}

static inline int org_apache_arrow_flatbuf_List_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_List_verify_table);
}

static int org_apache_arrow_flatbuf_LargeList_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_LargeList_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_LargeList_identifier, &org_apache_arrow_flatbuf_LargeList_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeList_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_LargeList_type_identifier, &org_apache_arrow_flatbuf_LargeList_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeList_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_LargeList_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeList_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_LargeList_verify_table);
}

static int org_apache_arrow_flatbuf_FixedSizeList_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 4, 4) /* listSize */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_FixedSizeList_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_FixedSizeList_identifier, &org_apache_arrow_flatbuf_FixedSizeList_verify_table);
}

static inline int org_apache_arrow_flatbuf_FixedSizeList_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_FixedSizeList_type_identifier, &org_apache_arrow_flatbuf_FixedSizeList_verify_table);
}

static inline int org_apache_arrow_flatbuf_FixedSizeList_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_FixedSizeList_verify_table);
}

static inline int org_apache_arrow_flatbuf_FixedSizeList_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_FixedSizeList_verify_table);
}

static int org_apache_arrow_flatbuf_Map_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 1, 1) /* keysSorted */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Map_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Map_identifier, &org_apache_arrow_flatbuf_Map_verify_table);
}

static inline int org_apache_arrow_flatbuf_Map_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Map_type_identifier, &org_apache_arrow_flatbuf_Map_verify_table);
}

static inline int org_apache_arrow_flatbuf_Map_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Map_verify_table);
}

static inline int org_apache_arrow_flatbuf_Map_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Map_verify_table);
}

static int org_apache_arrow_flatbuf_Union_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* mode */)) return ret;
    if ((ret = flatcc_verify_vector_field(td, 1, 0, 4, 4, INT64_C(1073741823)) /* typeIds */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Union_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Union_identifier, &org_apache_arrow_flatbuf_Union_verify_table);
}

static inline int org_apache_arrow_flatbuf_Union_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Union_type_identifier, &org_apache_arrow_flatbuf_Union_verify_table);
}

static inline int org_apache_arrow_flatbuf_Union_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Union_verify_table);
}

static inline int org_apache_arrow_flatbuf_Union_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Union_verify_table);
}

static int org_apache_arrow_flatbuf_Int_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 4, 4) /* bitWidth */)) return ret;
    if ((ret = flatcc_verify_field(td, 1, 1, 1) /* is_signed */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Int_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Int_identifier, &org_apache_arrow_flatbuf_Int_verify_table);
}

static inline int org_apache_arrow_flatbuf_Int_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Int_type_identifier, &org_apache_arrow_flatbuf_Int_verify_table);
}

static inline int org_apache_arrow_flatbuf_Int_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Int_verify_table);
}

static inline int org_apache_arrow_flatbuf_Int_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Int_verify_table);
}

static int org_apache_arrow_flatbuf_FloatingPoint_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* precision */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_FloatingPoint_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_FloatingPoint_identifier, &org_apache_arrow_flatbuf_FloatingPoint_verify_table);
}

static inline int org_apache_arrow_flatbuf_FloatingPoint_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_FloatingPoint_type_identifier, &org_apache_arrow_flatbuf_FloatingPoint_verify_table);
}

static inline int org_apache_arrow_flatbuf_FloatingPoint_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_FloatingPoint_verify_table);
}

static inline int org_apache_arrow_flatbuf_FloatingPoint_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_FloatingPoint_verify_table);
}

static int org_apache_arrow_flatbuf_Utf8_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Utf8_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Utf8_identifier, &org_apache_arrow_flatbuf_Utf8_verify_table);
}

static inline int org_apache_arrow_flatbuf_Utf8_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Utf8_type_identifier, &org_apache_arrow_flatbuf_Utf8_verify_table);
}

static inline int org_apache_arrow_flatbuf_Utf8_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Utf8_verify_table);
}

static inline int org_apache_arrow_flatbuf_Utf8_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Utf8_verify_table);
}

static int org_apache_arrow_flatbuf_Binary_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Binary_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Binary_identifier, &org_apache_arrow_flatbuf_Binary_verify_table);
}

static inline int org_apache_arrow_flatbuf_Binary_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Binary_type_identifier, &org_apache_arrow_flatbuf_Binary_verify_table);
}

static inline int org_apache_arrow_flatbuf_Binary_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Binary_verify_table);
}

static inline int org_apache_arrow_flatbuf_Binary_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Binary_verify_table);
}

static int org_apache_arrow_flatbuf_LargeUtf8_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_LargeUtf8_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_LargeUtf8_identifier, &org_apache_arrow_flatbuf_LargeUtf8_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeUtf8_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_LargeUtf8_type_identifier, &org_apache_arrow_flatbuf_LargeUtf8_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeUtf8_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_LargeUtf8_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeUtf8_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_LargeUtf8_verify_table);
}

static int org_apache_arrow_flatbuf_LargeBinary_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_LargeBinary_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_LargeBinary_identifier, &org_apache_arrow_flatbuf_LargeBinary_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeBinary_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_LargeBinary_type_identifier, &org_apache_arrow_flatbuf_LargeBinary_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeBinary_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_LargeBinary_verify_table);
}

static inline int org_apache_arrow_flatbuf_LargeBinary_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_LargeBinary_verify_table);
}

static int org_apache_arrow_flatbuf_FixedSizeBinary_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 4, 4) /* byteWidth */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_FixedSizeBinary_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_FixedSizeBinary_identifier, &org_apache_arrow_flatbuf_FixedSizeBinary_verify_table);
}

static inline int org_apache_arrow_flatbuf_FixedSizeBinary_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_FixedSizeBinary_type_identifier, &org_apache_arrow_flatbuf_FixedSizeBinary_verify_table);
}

static inline int org_apache_arrow_flatbuf_FixedSizeBinary_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_FixedSizeBinary_verify_table);
}

static inline int org_apache_arrow_flatbuf_FixedSizeBinary_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_FixedSizeBinary_verify_table);
}

static int org_apache_arrow_flatbuf_Bool_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Bool_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Bool_identifier, &org_apache_arrow_flatbuf_Bool_verify_table);
}

static inline int org_apache_arrow_flatbuf_Bool_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Bool_type_identifier, &org_apache_arrow_flatbuf_Bool_verify_table);
}

static inline int org_apache_arrow_flatbuf_Bool_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Bool_verify_table);
}

static inline int org_apache_arrow_flatbuf_Bool_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Bool_verify_table);
}

static int org_apache_arrow_flatbuf_RunEndEncoded_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_RunEndEncoded_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_RunEndEncoded_identifier, &org_apache_arrow_flatbuf_RunEndEncoded_verify_table);
}

static inline int org_apache_arrow_flatbuf_RunEndEncoded_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_RunEndEncoded_type_identifier, &org_apache_arrow_flatbuf_RunEndEncoded_verify_table);
}

static inline int org_apache_arrow_flatbuf_RunEndEncoded_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_RunEndEncoded_verify_table);
}

static inline int org_apache_arrow_flatbuf_RunEndEncoded_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_RunEndEncoded_verify_table);
}

static int org_apache_arrow_flatbuf_Decimal_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 4, 4) /* precision */)) return ret;
    if ((ret = flatcc_verify_field(td, 1, 4, 4) /* scale */)) return ret;
    if ((ret = flatcc_verify_field(td, 2, 4, 4) /* bitWidth */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Decimal_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Decimal_identifier, &org_apache_arrow_flatbuf_Decimal_verify_table);
}

static inline int org_apache_arrow_flatbuf_Decimal_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Decimal_type_identifier, &org_apache_arrow_flatbuf_Decimal_verify_table);
}

static inline int org_apache_arrow_flatbuf_Decimal_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Decimal_verify_table);
}

static inline int org_apache_arrow_flatbuf_Decimal_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Decimal_verify_table);
}

static int org_apache_arrow_flatbuf_Date_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* unit */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Date_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Date_identifier, &org_apache_arrow_flatbuf_Date_verify_table);
}

static inline int org_apache_arrow_flatbuf_Date_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Date_type_identifier, &org_apache_arrow_flatbuf_Date_verify_table);
}

static inline int org_apache_arrow_flatbuf_Date_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Date_verify_table);
}

static inline int org_apache_arrow_flatbuf_Date_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Date_verify_table);
}

static int org_apache_arrow_flatbuf_Time_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* unit */)) return ret;
    if ((ret = flatcc_verify_field(td, 1, 4, 4) /* bitWidth */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Time_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Time_identifier, &org_apache_arrow_flatbuf_Time_verify_table);
}

static inline int org_apache_arrow_flatbuf_Time_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Time_type_identifier, &org_apache_arrow_flatbuf_Time_verify_table);
}

static inline int org_apache_arrow_flatbuf_Time_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Time_verify_table);
}

static inline int org_apache_arrow_flatbuf_Time_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Time_verify_table);
}

static int org_apache_arrow_flatbuf_Timestamp_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* unit */)) return ret;
    if ((ret = flatcc_verify_string_field(td, 1, 0) /* timezone */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Timestamp_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Timestamp_identifier, &org_apache_arrow_flatbuf_Timestamp_verify_table);
}

static inline int org_apache_arrow_flatbuf_Timestamp_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Timestamp_type_identifier, &org_apache_arrow_flatbuf_Timestamp_verify_table);
}

static inline int org_apache_arrow_flatbuf_Timestamp_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Timestamp_verify_table);
}

static inline int org_apache_arrow_flatbuf_Timestamp_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Timestamp_verify_table);
}

static int org_apache_arrow_flatbuf_Interval_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* unit */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Interval_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Interval_identifier, &org_apache_arrow_flatbuf_Interval_verify_table);
}

static inline int org_apache_arrow_flatbuf_Interval_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Interval_type_identifier, &org_apache_arrow_flatbuf_Interval_verify_table);
}

static inline int org_apache_arrow_flatbuf_Interval_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Interval_verify_table);
}

static inline int org_apache_arrow_flatbuf_Interval_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Interval_verify_table);
}

static int org_apache_arrow_flatbuf_Duration_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* unit */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Duration_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Duration_identifier, &org_apache_arrow_flatbuf_Duration_verify_table);
}

static inline int org_apache_arrow_flatbuf_Duration_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Duration_type_identifier, &org_apache_arrow_flatbuf_Duration_verify_table);
}

static inline int org_apache_arrow_flatbuf_Duration_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Duration_verify_table);
}

static inline int org_apache_arrow_flatbuf_Duration_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Duration_verify_table);
}

static int org_apache_arrow_flatbuf_KeyValue_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_string_field(td, 0, 0) /* key */)) return ret;
    if ((ret = flatcc_verify_string_field(td, 1, 0) /* value */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_KeyValue_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_KeyValue_identifier, &org_apache_arrow_flatbuf_KeyValue_verify_table);
}

static inline int org_apache_arrow_flatbuf_KeyValue_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_KeyValue_type_identifier, &org_apache_arrow_flatbuf_KeyValue_verify_table);
}

static inline int org_apache_arrow_flatbuf_KeyValue_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_KeyValue_verify_table);
}

static inline int org_apache_arrow_flatbuf_KeyValue_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_KeyValue_verify_table);
}

static int org_apache_arrow_flatbuf_DictionaryEncoding_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 8, 8) /* id */)) return ret;
    if ((ret = flatcc_verify_table_field(td, 1, 0, &org_apache_arrow_flatbuf_Int_verify_table) /* indexType */)) return ret;
    if ((ret = flatcc_verify_field(td, 2, 1, 1) /* isOrdered */)) return ret;
    if ((ret = flatcc_verify_field(td, 3, 2, 2) /* dictionaryKind */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_DictionaryEncoding_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_DictionaryEncoding_identifier, &org_apache_arrow_flatbuf_DictionaryEncoding_verify_table);
}

static inline int org_apache_arrow_flatbuf_DictionaryEncoding_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_DictionaryEncoding_type_identifier, &org_apache_arrow_flatbuf_DictionaryEncoding_verify_table);
}

static inline int org_apache_arrow_flatbuf_DictionaryEncoding_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_DictionaryEncoding_verify_table);
}

static inline int org_apache_arrow_flatbuf_DictionaryEncoding_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_DictionaryEncoding_verify_table);
}

static int org_apache_arrow_flatbuf_Field_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_string_field(td, 0, 0) /* name */)) return ret;
    if ((ret = flatcc_verify_field(td, 1, 1, 1) /* nullable */)) return ret;
    if ((ret = flatcc_verify_union_field(td, 3, 0, &org_apache_arrow_flatbuf_Type_union_verifier) /* type */)) return ret;
    if ((ret = flatcc_verify_table_field(td, 4, 0, &org_apache_arrow_flatbuf_DictionaryEncoding_verify_table) /* dictionary */)) return ret;
    if ((ret = flatcc_verify_table_vector_field(td, 5, 0, &org_apache_arrow_flatbuf_Field_verify_table) /* children */)) return ret;
    if ((ret = flatcc_verify_table_vector_field(td, 6, 0, &org_apache_arrow_flatbuf_KeyValue_verify_table) /* custom_metadata */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Field_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Field_identifier, &org_apache_arrow_flatbuf_Field_verify_table);
}

static inline int org_apache_arrow_flatbuf_Field_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Field_type_identifier, &org_apache_arrow_flatbuf_Field_verify_table);
}

static inline int org_apache_arrow_flatbuf_Field_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Field_verify_table);
}

static inline int org_apache_arrow_flatbuf_Field_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Field_verify_table);
}

static int org_apache_arrow_flatbuf_Schema_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 2, 2) /* endianness */)) return ret;
    if ((ret = flatcc_verify_table_vector_field(td, 1, 0, &org_apache_arrow_flatbuf_Field_verify_table) /* fields */)) return ret;
    if ((ret = flatcc_verify_table_vector_field(td, 2, 0, &org_apache_arrow_flatbuf_KeyValue_verify_table) /* custom_metadata */)) return ret;
    if ((ret = flatcc_verify_vector_field(td, 3, 0, 8, 8, INT64_C(536870911)) /* features */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Schema_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Schema_identifier, &org_apache_arrow_flatbuf_Schema_verify_table);
}

static inline int org_apache_arrow_flatbuf_Schema_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Schema_type_identifier, &org_apache_arrow_flatbuf_Schema_verify_table);
}

static inline int org_apache_arrow_flatbuf_Schema_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Schema_verify_table);
}

static inline int org_apache_arrow_flatbuf_Schema_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Schema_verify_table);
}

#include "flatcc/flatcc_epilogue.h"
#endif /* SCHEMA_VERIFIER_H */
#ifndef TENSOR_READER_H
#define TENSOR_READER_H

/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

#ifndef FLATBUFFERS_COMMON_READER_H
#include "flatbuffers_common_reader.h"
#endif
#ifndef SCHEMA_READER_H
#include "Schema_reader.h"
#endif
#include "flatcc/flatcc_flatbuffers.h"
#ifndef __alignas_is_defined
#include <stdalign.h>
#endif
#include "flatcc/flatcc_prologue.h"
#ifndef flatbuffers_identifier
#define flatbuffers_identifier 0
#endif
#ifndef flatbuffers_extension
#define flatbuffers_extension "bin"
#endif


typedef const struct org_apache_arrow_flatbuf_TensorDim_table *org_apache_arrow_flatbuf_TensorDim_table_t;
typedef struct org_apache_arrow_flatbuf_TensorDim_table *org_apache_arrow_flatbuf_TensorDim_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_TensorDim_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_TensorDim_mutable_vec_t;
typedef const struct org_apache_arrow_flatbuf_Tensor_table *org_apache_arrow_flatbuf_Tensor_table_t;
typedef struct org_apache_arrow_flatbuf_Tensor_table *org_apache_arrow_flatbuf_Tensor_mutable_table_t;
typedef const flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Tensor_vec_t;
typedef flatbuffers_uoffset_t *org_apache_arrow_flatbuf_Tensor_mutable_vec_t;
#ifndef org_apache_arrow_flatbuf_TensorDim_file_identifier
#define org_apache_arrow_flatbuf_TensorDim_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_TensorDim_file_identifier */
#ifndef org_apache_arrow_flatbuf_TensorDim_identifier
#define org_apache_arrow_flatbuf_TensorDim_identifier 0
#endif
#define org_apache_arrow_flatbuf_TensorDim_type_hash ((flatbuffers_thash_t)0xbc6d7b25)
#define org_apache_arrow_flatbuf_TensorDim_type_identifier "\x25\x7b\x6d\xbc"
#ifndef org_apache_arrow_flatbuf_TensorDim_file_extension
#define org_apache_arrow_flatbuf_TensorDim_file_extension "bin"
#endif
#ifndef org_apache_arrow_flatbuf_Tensor_file_identifier
#define org_apache_arrow_flatbuf_Tensor_file_identifier 0
#endif
/* deprecated, use org_apache_arrow_flatbuf_Tensor_file_identifier */
#ifndef org_apache_arrow_flatbuf_Tensor_identifier
#define org_apache_arrow_flatbuf_Tensor_identifier 0
#endif
#define org_apache_arrow_flatbuf_Tensor_type_hash ((flatbuffers_thash_t)0x1764df19)
#define org_apache_arrow_flatbuf_Tensor_type_identifier "\x19\xdf\x64\x17"
#ifndef org_apache_arrow_flatbuf_Tensor_file_extension
#define org_apache_arrow_flatbuf_Tensor_file_extension "bin"
#endif



/**  ----------------------------------------------------------------------
 *  Data structures for dense tensors
 *  Shape data for a single axis in a tensor */
struct org_apache_arrow_flatbuf_TensorDim_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_TensorDim_vec_len(org_apache_arrow_flatbuf_TensorDim_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_TensorDim_table_t org_apache_arrow_flatbuf_TensorDim_vec_at(org_apache_arrow_flatbuf_TensorDim_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_TensorDim_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_TensorDim)

/**  Length of dimension */
__flatbuffers_define_scalar_field(0, org_apache_arrow_flatbuf_TensorDim, size, flatbuffers_int64, int64_t, INT64_C(0))
/**  Name of the dimension, optional */
__flatbuffers_define_string_field(1, org_apache_arrow_flatbuf_TensorDim, name, 0)

struct org_apache_arrow_flatbuf_Tensor_table { uint8_t unused__; };

static inline size_t org_apache_arrow_flatbuf_Tensor_vec_len(org_apache_arrow_flatbuf_Tensor_vec_t vec)
__flatbuffers_vec_len(vec)
static inline org_apache_arrow_flatbuf_Tensor_table_t org_apache_arrow_flatbuf_Tensor_vec_at(org_apache_arrow_flatbuf_Tensor_vec_t vec, size_t i)
__flatbuffers_offset_vec_at(org_apache_arrow_flatbuf_Tensor_table_t, vec, i, 0)
__flatbuffers_table_as_root(org_apache_arrow_flatbuf_Tensor)

/**  The type of data contained in a value cell. Currently only fixed-width
 *  value types are supported, no strings or nested types */
__flatbuffers_define_union_field(flatbuffers_, 1, org_apache_arrow_flatbuf_Tensor, type, org_apache_arrow_flatbuf_Type, 1)
/**  The dimensions of the tensor, optionally named */
__flatbuffers_define_vector_field(2, org_apache_arrow_flatbuf_Tensor, shape, org_apache_arrow_flatbuf_TensorDim_vec_t, 1)
/**  Non-negative byte offsets to advance one value cell along each dimension
 *  If omitted, default to row-major order (C-like). */
__flatbuffers_define_vector_field(3, org_apache_arrow_flatbuf_Tensor, strides, flatbuffers_int64_vec_t, 0)
/**  The location and size of the tensor's data */
__flatbuffers_define_struct_field(4, org_apache_arrow_flatbuf_Tensor, data, org_apache_arrow_flatbuf_Buffer_struct_t, 1)


#include "flatcc/flatcc_epilogue.h"
#endif /* TENSOR_READER_H */
#ifndef TENSOR_BUILDER_H
#define TENSOR_BUILDER_H

/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

#ifndef TENSOR_READER_H
#include "Tensor_reader.h"
#endif
#ifndef FLATBUFFERS_COMMON_BUILDER_H
#include "flatbuffers_common_builder.h"
#endif
#ifndef SCHEMA_BUILDER_H
#include "Schema_builder.h"
#endif
#include "flatcc/flatcc_prologue.h"
#ifndef flatbuffers_identifier
#define flatbuffers_identifier 0
#endif
#ifndef flatbuffers_extension
#define flatbuffers_extension "bin"
#endif

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_TensorDim_required[] = { 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_TensorDim_ref_t;
static org_apache_arrow_flatbuf_TensorDim_ref_t org_apache_arrow_flatbuf_TensorDim_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_TensorDim_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_TensorDim, 2)

static const flatbuffers_voffset_t __org_apache_arrow_flatbuf_Tensor_required[] = { 1, 2, 4, 0 };
typedef flatbuffers_ref_t org_apache_arrow_flatbuf_Tensor_ref_t;
static org_apache_arrow_flatbuf_Tensor_ref_t org_apache_arrow_flatbuf_Tensor_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Tensor_table_t t);
__flatbuffers_build_table(flatbuffers_, org_apache_arrow_flatbuf_Tensor, 5)

#define __org_apache_arrow_flatbuf_TensorDim_formal_args , int64_t v0, flatbuffers_string_ref_t v1
#define __org_apache_arrow_flatbuf_TensorDim_call_args , v0, v1
static inline org_apache_arrow_flatbuf_TensorDim_ref_t org_apache_arrow_flatbuf_TensorDim_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_TensorDim_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_TensorDim, org_apache_arrow_flatbuf_TensorDim_file_identifier, org_apache_arrow_flatbuf_TensorDim_type_identifier)

#define __org_apache_arrow_flatbuf_Tensor_formal_args , org_apache_arrow_flatbuf_Type_union_ref_t v1, org_apache_arrow_flatbuf_TensorDim_vec_ref_t v2, flatbuffers_int64_vec_ref_t v3, org_apache_arrow_flatbuf_Buffer_t *v4
#define __org_apache_arrow_flatbuf_Tensor_call_args , v1, v2, v3, v4
static inline org_apache_arrow_flatbuf_Tensor_ref_t org_apache_arrow_flatbuf_Tensor_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Tensor_formal_args);
__flatbuffers_build_table_prolog(flatbuffers_, org_apache_arrow_flatbuf_Tensor, org_apache_arrow_flatbuf_Tensor_file_identifier, org_apache_arrow_flatbuf_Tensor_type_identifier)

__flatbuffers_build_scalar_field(0, flatbuffers_, org_apache_arrow_flatbuf_TensorDim_size, flatbuffers_int64, int64_t, 8, 8, INT64_C(0), org_apache_arrow_flatbuf_TensorDim)
__flatbuffers_build_string_field(1, flatbuffers_, org_apache_arrow_flatbuf_TensorDim_name, org_apache_arrow_flatbuf_TensorDim)

static inline org_apache_arrow_flatbuf_TensorDim_ref_t org_apache_arrow_flatbuf_TensorDim_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_TensorDim_formal_args)
{
    if (org_apache_arrow_flatbuf_TensorDim_start(B)
        || org_apache_arrow_flatbuf_TensorDim_size_add(B, v0)
        || org_apache_arrow_flatbuf_TensorDim_name_add(B, v1)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_TensorDim_end(B);
}

static org_apache_arrow_flatbuf_TensorDim_ref_t org_apache_arrow_flatbuf_TensorDim_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_TensorDim_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_TensorDim_start(B)
        || org_apache_arrow_flatbuf_TensorDim_size_pick(B, t)
        || org_apache_arrow_flatbuf_TensorDim_name_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_TensorDim_end(B));
}

__flatbuffers_build_union_field(1, flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, org_apache_arrow_flatbuf_Tensor)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, Null, org_apache_arrow_flatbuf_Null)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, Int, org_apache_arrow_flatbuf_Int)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, FloatingPoint, org_apache_arrow_flatbuf_FloatingPoint)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, Binary, org_apache_arrow_flatbuf_Binary)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, Utf8, org_apache_arrow_flatbuf_Utf8)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, Bool, org_apache_arrow_flatbuf_Bool)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, Decimal, org_apache_arrow_flatbuf_Decimal)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, Date, org_apache_arrow_flatbuf_Date)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, Time, org_apache_arrow_flatbuf_Time)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, Timestamp, org_apache_arrow_flatbuf_Timestamp)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, Interval, org_apache_arrow_flatbuf_Interval)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, List, org_apache_arrow_flatbuf_List)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, Struct_, org_apache_arrow_flatbuf_Struct_)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, Union, org_apache_arrow_flatbuf_Union)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, FixedSizeBinary, org_apache_arrow_flatbuf_FixedSizeBinary)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, FixedSizeList, org_apache_arrow_flatbuf_FixedSizeList)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, Map, org_apache_arrow_flatbuf_Map)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, Duration, org_apache_arrow_flatbuf_Duration)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, LargeBinary, org_apache_arrow_flatbuf_LargeBinary)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, LargeUtf8, org_apache_arrow_flatbuf_LargeUtf8)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, LargeList, org_apache_arrow_flatbuf_LargeList)
__flatbuffers_build_union_table_value_field(flatbuffers_, org_apache_arrow_flatbuf_Tensor_type, org_apache_arrow_flatbuf_Type, RunEndEncoded, org_apache_arrow_flatbuf_RunEndEncoded)
__flatbuffers_build_table_vector_field(2, flatbuffers_, org_apache_arrow_flatbuf_Tensor_shape, org_apache_arrow_flatbuf_TensorDim, org_apache_arrow_flatbuf_Tensor)
__flatbuffers_build_vector_field(3, flatbuffers_, org_apache_arrow_flatbuf_Tensor_strides, flatbuffers_int64, int64_t, org_apache_arrow_flatbuf_Tensor)
__flatbuffers_build_struct_field(4, flatbuffers_, org_apache_arrow_flatbuf_Tensor_data, org_apache_arrow_flatbuf_Buffer, 16, 8, org_apache_arrow_flatbuf_Tensor)

static inline org_apache_arrow_flatbuf_Tensor_ref_t org_apache_arrow_flatbuf_Tensor_create(flatbuffers_builder_t *B __org_apache_arrow_flatbuf_Tensor_formal_args)
{
    if (org_apache_arrow_flatbuf_Tensor_start(B)
        || org_apache_arrow_flatbuf_Tensor_data_add(B, v4)
        || org_apache_arrow_flatbuf_Tensor_type_add_value(B, v1)
        || org_apache_arrow_flatbuf_Tensor_shape_add(B, v2)
        || org_apache_arrow_flatbuf_Tensor_strides_add(B, v3)
        || org_apache_arrow_flatbuf_Tensor_type_add_type(B, v1.type)) {
        return 0;
    }
    return org_apache_arrow_flatbuf_Tensor_end(B);
}

static org_apache_arrow_flatbuf_Tensor_ref_t org_apache_arrow_flatbuf_Tensor_clone(flatbuffers_builder_t *B, org_apache_arrow_flatbuf_Tensor_table_t t)
{
    __flatbuffers_memoize_begin(B, t);
    if (org_apache_arrow_flatbuf_Tensor_start(B)
        || org_apache_arrow_flatbuf_Tensor_data_pick(B, t)
        || org_apache_arrow_flatbuf_Tensor_type_pick(B, t)
        || org_apache_arrow_flatbuf_Tensor_shape_pick(B, t)
        || org_apache_arrow_flatbuf_Tensor_strides_pick(B, t)) {
        return 0;
    }
    __flatbuffers_memoize_end(B, t, org_apache_arrow_flatbuf_Tensor_end(B));
}

#include "flatcc/flatcc_epilogue.h"
#endif /* TENSOR_BUILDER_H */
#ifndef TENSOR_VERIFIER_H
#define TENSOR_VERIFIER_H

/* Generated by flatcc 0.6.1 FlatBuffers schema compiler for C by dvide.com */

#ifndef TENSOR_READER_H
#include "Tensor_reader.h"
#endif
#include "flatcc/flatcc_verifier.h"
#ifndef SCHEMA_VERIFIER_H
#include "Schema_verifier.h"
#endif
#include "flatcc/flatcc_prologue.h"

static int org_apache_arrow_flatbuf_TensorDim_verify_table(flatcc_table_verifier_descriptor_t *td);
static int org_apache_arrow_flatbuf_Tensor_verify_table(flatcc_table_verifier_descriptor_t *td);

static int org_apache_arrow_flatbuf_TensorDim_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_field(td, 0, 8, 8) /* size */)) return ret;
    if ((ret = flatcc_verify_string_field(td, 1, 0) /* name */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_TensorDim_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_TensorDim_identifier, &org_apache_arrow_flatbuf_TensorDim_verify_table);
}

static inline int org_apache_arrow_flatbuf_TensorDim_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_TensorDim_type_identifier, &org_apache_arrow_flatbuf_TensorDim_verify_table);
}

static inline int org_apache_arrow_flatbuf_TensorDim_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_TensorDim_verify_table);
}

static inline int org_apache_arrow_flatbuf_TensorDim_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_TensorDim_verify_table);
}

static int org_apache_arrow_flatbuf_Tensor_verify_table(flatcc_table_verifier_descriptor_t *td)
{
    int ret;
    if ((ret = flatcc_verify_union_field(td, 1, 1, &org_apache_arrow_flatbuf_Type_union_verifier) /* type */)) return ret;
    if ((ret = flatcc_verify_table_vector_field(td, 2, 1, &org_apache_arrow_flatbuf_TensorDim_verify_table) /* shape */)) return ret;
    if ((ret = flatcc_verify_vector_field(td, 3, 0, 8, 8, INT64_C(536870911)) /* strides */)) return ret;
    if ((ret = flatcc_verify_field(td, 4, 16, 8) /* data */)) return ret;
    return flatcc_verify_ok;
}

static inline int org_apache_arrow_flatbuf_Tensor_verify_as_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Tensor_identifier, &org_apache_arrow_flatbuf_Tensor_verify_table);
}

static inline int org_apache_arrow_flatbuf_Tensor_verify_as_typed_root(const void *buf, size_t bufsiz)
{
    return flatcc_verify_table_as_root(buf, bufsiz, org_apache_arrow_flatbuf_Tensor_type_identifier, &org_apache_arrow_flatbuf_Tensor_verify_table);
}

static inline int org_apache_arrow_flatbuf_Tensor_verify_as_root_with_identifier(const void *buf, size_t bufsiz, const char *fid)
{
    return flatcc_verify_table_as_root(buf, bufsiz, fid, &org_apache_arrow_flatbuf_Tensor_verify_table);
}

static inline int org_apache_arrow_flatbuf_Tensor_verify_as_root_with_type_hash(const void *buf, size_t bufsiz, flatbuffers_thash_t thash)
{
    return flatcc_verify_table_as_typed_root(buf, bufsiz, thash, &org_apache_arrow_flatbuf_Tensor_verify_table);
}

#include "flatcc/flatcc_epilogue.h"
#endif /* TENSOR_VERIFIER_H */
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License.

#include <errno.h>
#include <stdio.h>
#include <string.h>

// For thread safe shared buffers we need C11 + stdatomic.h
// Can compile with -DNANOARROW_IPC_USE_STDATOMIC=0 or 1 to override
// automatic detection
#if !defined(NANOARROW_IPC_USE_STDATOMIC)
#define NANOARROW_IPC_USE_STDATOMIC 0

// Check for C11
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L

// Check for GCC 4.8, which doesn't include stdatomic.h but does
// not define __STDC_NO_ATOMICS__
#if defined(__clang__) || !defined(__GNUC__) || __GNUC__ >= 5

#if !defined(__STDC_NO_ATOMICS__)
#include <stdatomic.h>
#undef NANOARROW_IPC_USE_STDATOMIC
#define NANOARROW_IPC_USE_STDATOMIC 1
#endif
#endif
#endif

#endif

#include "nanoarrow.h"
#include "nanoarrow_ipc.h"


// A more readable expression way to refer to the fact that there are 8 bytes
// at the beginning of every message header.
const static int64_t kMessageHeaderPrefixSize = 8;

// Internal representation of a parsed "Field" from flatbuffers. This
// represents a field in a depth-first walk of column arrays and their
// children.
struct ArrowIpcField {
  // Pointer to the ArrowIpcDecoderPrivate::array_view or child for this node
  struct ArrowArrayView* array_view;
  // Pointer to the ArrowIpcDecoderPrivate::array or child for this node. This
  // array is scratch space for any intermediary allocations (i.e., it is never moved
  // to the user).
  struct ArrowArray* array;
  // The cumulative number of buffers preceding this node.
  int64_t buffer_offset;
};

// Internal data specific to the read/decode process
struct ArrowIpcDecoderPrivate {
  // The endianness that will be assumed for decoding future RecordBatch messages
  enum ArrowIpcEndianness endianness;
  // A cached system endianness value
  enum ArrowIpcEndianness system_endianness;
  // An ArrowArrayView whose length/null_count/buffers are set directly from the
  // deserialized flatbuffer message (i.e., no fully underlying ArrowArray exists,
  // although some buffers may be temporarily owned by ArrowIpcDecoderPrivate::array).
  struct ArrowArrayView array_view;
  // An ArrowArray with the same structure as the ArrowArrayView whose ArrowArrayBuffer()
  // values are used to allocate or store memory when this is required. This ArrowArray
  // is never moved to the caller; however, its buffers may be moved to the final output
  // ArrowArray if the caller requests one.
  struct ArrowArray array;
  // The number of fields in the flattened depth-first walk of columns and their children
  int64_t n_fields;
  // Array of cached information such that given a field index it is possible to locate
  // the ArrowArrayView/ArrowArray where the depth-first buffer/field walk should start.
  struct ArrowIpcField* fields;
  // The number of buffers that future RecordBatch messages must have to match the schema
  // that has been set.
  int64_t n_buffers;
  // A pointer to the last flatbuffers message.
  const void* last_message;
};

ArrowErrorCode ArrowIpcCheckRuntime(struct ArrowError* error) {
  const char* nanoarrow_runtime_version = ArrowNanoarrowVersion();
  const char* nanoarrow_ipc_build_time_version = NANOARROW_VERSION;

  if (strcmp(nanoarrow_runtime_version, nanoarrow_ipc_build_time_version) != 0) {
    ArrowErrorSet(error, "Expected nanoarrow runtime version '%s' but found version '%s'",
                  nanoarrow_ipc_build_time_version, nanoarrow_runtime_version);
    return EINVAL;
  }

  return NANOARROW_OK;
}

static enum ArrowIpcEndianness ArrowIpcSystemEndianness(void) {
  uint32_t check = 1;
  char first_byte;
  memcpy(&first_byte, &check, sizeof(char));
  if (first_byte) {
    return NANOARROW_IPC_ENDIANNESS_LITTLE;
  } else {
    return NANOARROW_IPC_ENDIANNESS_BIG;
  }
}

#if NANOARROW_IPC_USE_STDATOMIC
struct ArrowIpcSharedBufferPrivate {
  struct ArrowBuffer src;
  atomic_long reference_count;
};

static int64_t ArrowIpcSharedBufferUpdate(
    struct ArrowIpcSharedBufferPrivate* private_data, int delta) {
  int64_t old_count = atomic_fetch_add(&private_data->reference_count, delta);
  return old_count + delta;
}

static void ArrowIpcSharedBufferSet(struct ArrowIpcSharedBufferPrivate* private_data,
                                    int64_t count) {
  atomic_store(&private_data->reference_count, count);
}

int ArrowIpcSharedBufferIsThreadSafe(void) { return 1; }
#else
struct ArrowIpcSharedBufferPrivate {
  struct ArrowBuffer src;
  int64_t reference_count;
};

static int64_t ArrowIpcSharedBufferUpdate(
    struct ArrowIpcSharedBufferPrivate* private_data, int delta) {
  private_data->reference_count += delta;
  return private_data->reference_count;
}

static void ArrowIpcSharedBufferSet(struct ArrowIpcSharedBufferPrivate* private_data,
                                    int64_t count) {
  private_data->reference_count = count;
}

int ArrowIpcSharedBufferIsThreadSafe(void) { return 0; }
#endif

static void ArrowIpcSharedBufferFree(struct ArrowBufferAllocator* allocator, uint8_t* ptr,
                                     int64_t size) {
  struct ArrowIpcSharedBufferPrivate* private_data =
      (struct ArrowIpcSharedBufferPrivate*)allocator->private_data;

  if (ArrowIpcSharedBufferUpdate(private_data, -1) == 0) {
    ArrowBufferReset(&private_data->src);
    ArrowFree(private_data);
  }
}

ArrowErrorCode ArrowIpcSharedBufferInit(struct ArrowIpcSharedBuffer* shared,
                                        struct ArrowBuffer* src) {
  if (src->data == NULL) {
    ArrowBufferMove(src, &shared->private_src);
    return NANOARROW_OK;
  }

  struct ArrowIpcSharedBufferPrivate* private_data =
      (struct ArrowIpcSharedBufferPrivate*)ArrowMalloc(
          sizeof(struct ArrowIpcSharedBufferPrivate));
  if (private_data == NULL) {
    return ENOMEM;
  }

  ArrowBufferMove(src, &private_data->src);
  ArrowIpcSharedBufferSet(private_data, 1);

  ArrowBufferInit(&shared->private_src);
  shared->private_src.data = private_data->src.data;
  shared->private_src.size_bytes = private_data->src.size_bytes;
  // Don't expose any extra capcity from src so that any calls to ArrowBufferAppend
  // on this buffer will fail.
  shared->private_src.capacity_bytes = private_data->src.size_bytes;
  shared->private_src.allocator =
      ArrowBufferDeallocator(&ArrowIpcSharedBufferFree, private_data);
  return NANOARROW_OK;
}

static void ArrowIpcSharedBufferClone(struct ArrowIpcSharedBuffer* shared,
                                      struct ArrowBuffer* shared_out) {
  if (shared->private_src.data == NULL) {
    ArrowBufferInit(shared_out);
    shared_out->size_bytes = shared_out->size_bytes;
    shared_out->capacity_bytes = shared_out->capacity_bytes;
    return;
  }

  struct ArrowIpcSharedBufferPrivate* private_data =
      (struct ArrowIpcSharedBufferPrivate*)shared->private_src.allocator.private_data;
  ArrowIpcSharedBufferUpdate(private_data, 1);
  memcpy(shared_out, shared, sizeof(struct ArrowBuffer));
}

void ArrowIpcSharedBufferReset(struct ArrowIpcSharedBuffer* shared) {
  ArrowBufferReset(&shared->private_src);
}

static int ArrowIpcDecoderNeedsSwapEndian(struct ArrowIpcDecoder* decoder) {
  struct ArrowIpcDecoderPrivate* private_data =
      (struct ArrowIpcDecoderPrivate*)decoder->private_data;
  switch (private_data->endianness) {
    case NANOARROW_IPC_ENDIANNESS_LITTLE:
    case NANOARROW_IPC_ENDIANNESS_BIG:
      return private_data->endianness != NANOARROW_IPC_ENDIANNESS_UNINITIALIZED &&
             private_data->endianness != private_data->system_endianness;
    default:
      return 0;
  }
}

ArrowErrorCode ArrowIpcDecoderInit(struct ArrowIpcDecoder* decoder) {
  memset(decoder, 0, sizeof(struct ArrowIpcDecoder));
  struct ArrowIpcDecoderPrivate* private_data =
      (struct ArrowIpcDecoderPrivate*)ArrowMalloc(sizeof(struct ArrowIpcDecoderPrivate));
  if (private_data == NULL) {
    return ENOMEM;
  }

  memset(private_data, 0, sizeof(struct ArrowIpcDecoderPrivate));
  private_data->system_endianness = ArrowIpcSystemEndianness();
  decoder->private_data = private_data;
  return NANOARROW_OK;
}

void ArrowIpcDecoderReset(struct ArrowIpcDecoder* decoder) {
  struct ArrowIpcDecoderPrivate* private_data =
      (struct ArrowIpcDecoderPrivate*)decoder->private_data;

  if (private_data != NULL) {
    ArrowArrayViewReset(&private_data->array_view);

    if (private_data->array.release != NULL) {
      private_data->array.release(&private_data->array);
    }

    if (private_data->fields != NULL) {
      ArrowFree(private_data->fields);
      private_data->n_fields = 0;
    }

    ArrowFree(private_data);
    memset(decoder, 0, sizeof(struct ArrowIpcDecoder));
  }
}

static inline uint32_t ArrowIpcReadContinuationBytes(struct ArrowBufferView* data) {
  uint32_t value;
  memcpy(&value, data->data.as_uint8, sizeof(uint32_t));
  data->data.as_uint8 += sizeof(uint32_t);
  data->size_bytes -= sizeof(uint32_t);
  return value;
}

static inline int32_t ArrowIpcReadInt32LE(struct ArrowBufferView* data, int swap_endian) {
  int32_t value;
  memcpy(&value, data->data.as_uint8, sizeof(int32_t));
  if (swap_endian) {
    value = bswap32(value);
  }

  data->data.as_uint8 += sizeof(int32_t);
  data->size_bytes -= sizeof(int32_t);
  return value;
}

#define ns(x) FLATBUFFERS_WRAP_NAMESPACE(org_apache_arrow_flatbuf, x)

static int ArrowIpcDecoderSetMetadata(struct ArrowSchema* schema,
                                      ns(KeyValue_vec_t) kv_vec,
                                      struct ArrowError* error) {
  int64_t n_pairs = ns(KeyValue_vec_len(kv_vec));
  if (n_pairs == 0) {
    return NANOARROW_OK;
  }

  if (n_pairs > 2147483647) {
    ArrowErrorSet(error,
                  "Expected between 0 and 2147483647 key/value pairs but found %ld",
                  (long)n_pairs);
    return EINVAL;
  }

  struct ArrowBuffer buf;
  struct ArrowStringView key;
  struct ArrowStringView value;
  ns(KeyValue_table_t) kv;

  int result = ArrowMetadataBuilderInit(&buf, NULL);
  if (result != NANOARROW_OK) {
    ArrowBufferReset(&buf);
    ArrowErrorSet(error, "ArrowMetadataBuilderInit() failed");
    return result;
  }

  for (int64_t i = 0; i < n_pairs; i++) {
    kv = ns(KeyValue_vec_at(kv_vec, i));

    key.data = ns(KeyValue_key(kv));
    key.size_bytes = strlen(key.data);
    value.data = ns(KeyValue_value(kv));
    value.size_bytes = strlen(value.data);

    result = ArrowMetadataBuilderAppend(&buf, key, value);
    if (result != NANOARROW_OK) {
      ArrowBufferReset(&buf);
      ArrowErrorSet(error, "ArrowMetadataBuilderAppend() failed");
      return result;
    }
  }

  result = ArrowSchemaSetMetadata(schema, (const char*)buf.data);
  ArrowBufferReset(&buf);
  if (result != NANOARROW_OK) {
    ArrowErrorSet(error, "ArrowSchemaSetMetadata() failed");
    return result;
  }

  return NANOARROW_OK;
}

static int ArrowIpcDecoderSetTypeSimple(struct ArrowSchema* schema, int nanoarrow_type,
                                        struct ArrowError* error) {
  int result = ArrowSchemaSetType(schema, nanoarrow_type);
  if (result != NANOARROW_OK) {
    ArrowErrorSet(error, "ArrowSchemaSetType() failed for type %s",
                  ArrowTypeString(nanoarrow_type));
    return result;
  }

  return NANOARROW_OK;
}

static int ArrowIpcDecoderSetTypeInt(struct ArrowSchema* schema,
                                     flatbuffers_generic_t type_generic,
                                     struct ArrowError* error) {
  ns(Int_table_t) type = (ns(Int_table_t))type_generic;

  int is_signed = ns(Int_is_signed_get(type));
  int bitwidth = ns(Int_bitWidth_get(type));
  int nanoarrow_type = NANOARROW_TYPE_UNINITIALIZED;

  if (is_signed) {
    switch (bitwidth) {
      case 8:
        nanoarrow_type = NANOARROW_TYPE_INT8;
        break;
      case 16:
        nanoarrow_type = NANOARROW_TYPE_INT16;
        break;
      case 32:
        nanoarrow_type = NANOARROW_TYPE_INT32;
        break;
      case 64:
        nanoarrow_type = NANOARROW_TYPE_INT64;
        break;
      default:
        ArrowErrorSet(error,
                      "Expected signed int bitwidth of 8, 16, 32, or 64 but got %d",
                      (int)bitwidth);
        return EINVAL;
    }
  } else {
    switch (bitwidth) {
      case 8:
        nanoarrow_type = NANOARROW_TYPE_UINT8;
        break;
      case 16:
        nanoarrow_type = NANOARROW_TYPE_UINT16;
        break;
      case 32:
        nanoarrow_type = NANOARROW_TYPE_UINT32;
        break;
      case 64:
        nanoarrow_type = NANOARROW_TYPE_UINT64;
        break;
      default:
        ArrowErrorSet(error,
                      "Expected unsigned int bitwidth of 8, 16, 32, or 64 but got %d",
                      (int)bitwidth);
        return EINVAL;
    }
  }

  return ArrowIpcDecoderSetTypeSimple(schema, nanoarrow_type, error);
}

static int ArrowIpcDecoderSetTypeFloatingPoint(struct ArrowSchema* schema,
                                               flatbuffers_generic_t type_generic,
                                               struct ArrowError* error) {
  ns(FloatingPoint_table_t) type = (ns(FloatingPoint_table_t))type_generic;
  int precision = ns(FloatingPoint_precision(type));
  switch (precision) {
    case ns(Precision_HALF):
      return ArrowIpcDecoderSetTypeSimple(schema, NANOARROW_TYPE_HALF_FLOAT, error);
    case ns(Precision_SINGLE):
      return ArrowIpcDecoderSetTypeSimple(schema, NANOARROW_TYPE_FLOAT, error);
    case ns(Precision_DOUBLE):
      return ArrowIpcDecoderSetTypeSimple(schema, NANOARROW_TYPE_DOUBLE, error);
    default:
      ArrowErrorSet(error, "Unexpected FloatingPoint Precision value: %d",
                    (int)precision);
      return EINVAL;
  }
}

static int ArrowIpcDecoderSetTypeDecimal(struct ArrowSchema* schema,
                                         flatbuffers_generic_t type_generic,
                                         struct ArrowError* error) {
  ns(Decimal_table_t) type = (ns(Decimal_table_t))type_generic;
  int scale = ns(Decimal_scale(type));
  int precision = ns(Decimal_precision(type));
  int bitwidth = ns(Decimal_bitWidth(type));

  int result;
  switch (bitwidth) {
    case 128:
      result =
          ArrowSchemaSetTypeDecimal(schema, NANOARROW_TYPE_DECIMAL128, precision, scale);
      break;
    case 256:
      result =
          ArrowSchemaSetTypeDecimal(schema, NANOARROW_TYPE_DECIMAL256, precision, scale);
      break;
    default:
      ArrowErrorSet(error, "Unexpected Decimal bitwidth value: %d", (int)bitwidth);
      return EINVAL;
  }

  if (result != NANOARROW_OK) {
    ArrowErrorSet(error, "ArrowSchemaSetTypeDecimal() failed");
    return result;
  }

  return NANOARROW_OK;
}

static int ArrowIpcDecoderSetTypeFixedSizeBinary(struct ArrowSchema* schema,
                                                 flatbuffers_generic_t type_generic,
                                                 struct ArrowError* error) {
  ns(FixedSizeBinary_table_t) type = (ns(FixedSizeBinary_table_t))type_generic;
  int fixed_size = ns(FixedSizeBinary_byteWidth(type));
  return ArrowSchemaSetTypeFixedSize(schema, NANOARROW_TYPE_FIXED_SIZE_BINARY,
                                     fixed_size);
}

static int ArrowIpcDecoderSetTypeDate(struct ArrowSchema* schema,
                                      flatbuffers_generic_t type_generic,
                                      struct ArrowError* error) {
  ns(Date_table_t) type = (ns(Date_table_t))type_generic;
  int date_unit = ns(Date_unit(type));
  switch (date_unit) {
    case ns(DateUnit_DAY):
      return ArrowIpcDecoderSetTypeSimple(schema, NANOARROW_TYPE_DATE32, error);
    case ns(DateUnit_MILLISECOND):
      return ArrowIpcDecoderSetTypeSimple(schema, NANOARROW_TYPE_DATE64, error);
    default:
      ArrowErrorSet(error, "Unexpected Date DateUnit value: %d", (int)date_unit);
      return EINVAL;
  }
}

static int ArrowIpcDecoderSetTypeTime(struct ArrowSchema* schema,
                                      flatbuffers_generic_t type_generic,
                                      struct ArrowError* error) {
  ns(Time_table_t) type = (ns(Time_table_t))type_generic;
  int time_unit = ns(Time_unit(type));
  int bitwidth = ns(Time_bitWidth(type));
  int nanoarrow_type;

  switch (time_unit) {
    case ns(TimeUnit_SECOND):
    case ns(TimeUnit_MILLISECOND):
      if (bitwidth != 32) {
        ArrowErrorSet(error, "Expected bitwidth of 32 for Time TimeUnit %s but found %d",
                      ns(TimeUnit_name(time_unit)), bitwidth);
        return EINVAL;
      }

      nanoarrow_type = NANOARROW_TYPE_TIME32;
      break;

    case ns(TimeUnit_MICROSECOND):
    case ns(TimeUnit_NANOSECOND):
      if (bitwidth != 64) {
        ArrowErrorSet(error, "Expected bitwidth of 64 for Time TimeUnit %s but found %d",
                      ns(TimeUnit_name(time_unit)), bitwidth);
        return EINVAL;
      }

      nanoarrow_type = NANOARROW_TYPE_TIME64;
      break;

    default:
      ArrowErrorSet(error, "Unexpected Time TimeUnit value: %d", (int)time_unit);
      return EINVAL;
  }

  int result = ArrowSchemaSetTypeDateTime(schema, nanoarrow_type, time_unit, NULL);
  if (result != NANOARROW_OK) {
    ArrowErrorSet(error, "ArrowSchemaSetTypeDateTime() failed");
    return result;
  }

  return NANOARROW_OK;
}

static int ArrowIpcDecoderSetTypeTimestamp(struct ArrowSchema* schema,
                                           flatbuffers_generic_t type_generic,
                                           struct ArrowError* error) {
  ns(Timestamp_table_t) type = (ns(Timestamp_table_t))type_generic;
  int time_unit = ns(Timestamp_unit(type));

  const char* timezone = "";
  if (ns(Timestamp_timezone_is_present(type))) {
    timezone = ns(Timestamp_timezone_get(type));
  }

  int result =
      ArrowSchemaSetTypeDateTime(schema, NANOARROW_TYPE_TIMESTAMP, time_unit, timezone);
  if (result != NANOARROW_OK) {
    ArrowErrorSet(error, "ArrowSchemaSetTypeDateTime() failed");
    return result;
  }

  return NANOARROW_OK;
}

static int ArrowIpcDecoderSetTypeDuration(struct ArrowSchema* schema,
                                          flatbuffers_generic_t type_generic,
                                          struct ArrowError* error) {
  ns(Duration_table_t) type = (ns(Duration_table_t))type_generic;
  int time_unit = ns(Duration_unit(type));

  int result =
      ArrowSchemaSetTypeDateTime(schema, NANOARROW_TYPE_DURATION, time_unit, NULL);
  if (result != NANOARROW_OK) {
    ArrowErrorSet(error, "ArrowSchemaSetTypeDateTime() failed");
    return result;
  }

  return NANOARROW_OK;
}

static int ArrowIpcDecoderSetTypeInterval(struct ArrowSchema* schema,
                                          flatbuffers_generic_t type_generic,
                                          struct ArrowError* error) {
  ns(Interval_table_t) type = (ns(Interval_table_t))type_generic;
  int interval_unit = ns(Interval_unit(type));

  switch (interval_unit) {
    case ns(IntervalUnit_YEAR_MONTH):
      return ArrowIpcDecoderSetTypeSimple(schema, NANOARROW_TYPE_INTERVAL_MONTHS, error);
    case ns(IntervalUnit_DAY_TIME):
      return ArrowIpcDecoderSetTypeSimple(schema, NANOARROW_TYPE_INTERVAL_DAY_TIME,
                                          error);
    case ns(IntervalUnit_MONTH_DAY_NANO):
      return ArrowIpcDecoderSetTypeSimple(schema, NANOARROW_TYPE_INTERVAL_MONTH_DAY_NANO,
                                          error);
    default:
      ArrowErrorSet(error, "Unexpected Interval unit value: %d", (int)interval_unit);
      return EINVAL;
  }
}

// We can't quite use nanoarrow's built-in SchemaSet functions for nested types
// because the IPC format allows modifying some of the defaults those functions assume.
// In particular, the allocate + initialize children step is handled outside these
// setters.
static int ArrowIpcDecoderSetTypeSimpleNested(struct ArrowSchema* schema,
                                              const char* format,
                                              struct ArrowError* error) {
  int result = ArrowSchemaSetFormat(schema, format);
  if (result != NANOARROW_OK) {
    ArrowErrorSet(error, "ArrowSchemaSetFormat('%s') failed", format);
    return result;
  }

  return NANOARROW_OK;
}

static int ArrowIpcDecoderSetTypeFixedSizeList(struct ArrowSchema* schema,
                                               flatbuffers_generic_t type_generic,
                                               struct ArrowError* error) {
  ns(FixedSizeList_table_t) type = (ns(FixedSizeList_table_t))type_generic;
  int32_t fixed_size = ns(FixedSizeList_listSize(type));

  char fixed_size_str[128];
  int n_chars = snprintf(fixed_size_str, 128, "+w:%d", fixed_size);
  fixed_size_str[n_chars] = '\0';
  return ArrowIpcDecoderSetTypeSimpleNested(schema, fixed_size_str, error);
}

static int ArrowIpcDecoderSetTypeMap(struct ArrowSchema* schema,
                                     flatbuffers_generic_t type_generic,
                                     struct ArrowError* error) {
  ns(Map_table_t) type = (ns(Map_table_t))type_generic;
  NANOARROW_RETURN_NOT_OK(ArrowIpcDecoderSetTypeSimpleNested(schema, "+m", error));

  if (ns(Map_keysSorted(type))) {
    schema->flags |= ARROW_FLAG_MAP_KEYS_SORTED;
  } else {
    schema->flags &= ~ARROW_FLAG_MAP_KEYS_SORTED;
  }

  return NANOARROW_OK;
}

static int ArrowIpcDecoderSetTypeUnion(struct ArrowSchema* schema,
                                       flatbuffers_generic_t type_generic,
                                       int64_t n_children, struct ArrowError* error) {
  ns(Union_table_t) type = (ns(Union_table_t))type_generic;
  int union_mode = ns(Union_mode(type));

  if (n_children < 0 || n_children > 127) {
    ArrowErrorSet(error,
                  "Expected between 0 and 127 children for Union type but found %ld",
                  (long)n_children);
    return EINVAL;
  }

  // Max valid typeIds size is 127; the longest single ID that could be present here
  // is -INT_MIN (11 chars). With commas and the prefix the max size would be
  // 1527 characters. (Any ids outside the range 0...127 are unlikely to be valid
  // elsewhere but they could in theory be present here).
  char union_types_str[2048];
  memset(union_types_str, 0, sizeof(union_types_str));
  char* format_cursor = union_types_str;
  int format_out_size = sizeof(union_types_str);
  int n_chars = 0;

  const char* format_prefix;
  switch (union_mode) {
    case ns(UnionMode_Sparse):
      n_chars = snprintf(format_cursor, format_out_size, "+us:");
      format_cursor += n_chars;
      format_out_size -= n_chars;
      break;
    case ns(UnionMode_Dense):
      n_chars = snprintf(format_cursor, format_out_size, "+ud:");
      format_cursor += n_chars;
      format_out_size -= n_chars;
      break;
    default:
      ArrowErrorSet(error, "Unexpected Union UnionMode value: %d", (int)union_mode);
      return EINVAL;
  }

  if (ns(Union_typeIds_is_present(type))) {
    flatbuffers_int32_vec_t type_ids = ns(Union_typeIds(type));
    int64_t n_type_ids = flatbuffers_int32_vec_len(type_ids);

    if (n_type_ids != n_children) {
      ArrowErrorSet(
          error,
          "Expected between %ld children for Union type with %ld typeIds but found %ld",
          (long)n_type_ids, (long)n_type_ids, (long)n_children);
      return EINVAL;
    }

    if (n_type_ids > 0) {
      n_chars = snprintf(format_cursor, format_out_size, "%d",
                         flatbuffers_int32_vec_at(type_ids, 0));
      format_cursor += n_chars;
      format_out_size -= n_chars;

      for (int64_t i = 1; i < n_type_ids; i++) {
        n_chars = snprintf(format_cursor, format_out_size, ",%d",
                           (int)flatbuffers_int32_vec_at(type_ids, i));
        format_cursor += n_chars;
        format_out_size -= n_chars;
      }
    }
  } else if (n_children > 0) {
    n_chars = snprintf(format_cursor, format_out_size, "0");
    format_cursor += n_chars;
    format_out_size -= n_chars;

    for (int64_t i = 1; i < n_children; i++) {
      n_chars = snprintf(format_cursor, format_out_size, ",%d", (int)i);
      format_cursor += n_chars;
      format_out_size -= n_chars;
    }
  }

  return ArrowIpcDecoderSetTypeSimpleNested(schema, union_types_str, error);
}

static int ArrowIpcDecoderSetType(struct ArrowSchema* schema, ns(Field_table_t) field,
                                  int64_t n_children, struct ArrowError* error) {
  int type_type = ns(Field_type_type(field));
  switch (type_type) {
    case ns(Type_Null):
      return ArrowIpcDecoderSetTypeSimple(schema, NANOARROW_TYPE_NA, error);
    case ns(Type_Bool):
      return ArrowIpcDecoderSetTypeSimple(schema, NANOARROW_TYPE_BOOL, error);
    case ns(Type_Int):
      return ArrowIpcDecoderSetTypeInt(schema, ns(Field_type_get(field)), error);
    case ns(Type_FloatingPoint):
      return ArrowIpcDecoderSetTypeFloatingPoint(schema, ns(Field_type_get(field)),
                                                 error);
    case ns(Type_Decimal):
      return ArrowIpcDecoderSetTypeDecimal(schema, ns(Field_type_get(field)), error);
    case ns(Type_Binary):
      return ArrowIpcDecoderSetTypeSimple(schema, NANOARROW_TYPE_BINARY, error);
    case ns(Type_LargeBinary):
      return ArrowIpcDecoderSetTypeSimple(schema, NANOARROW_TYPE_LARGE_BINARY, error);
    case ns(Type_FixedSizeBinary):
      return ArrowIpcDecoderSetTypeFixedSizeBinary(schema, ns(Field_type_get(field)),
                                                   error);
    case ns(Type_Utf8):
      return ArrowIpcDecoderSetTypeSimple(schema, NANOARROW_TYPE_STRING, error);
    case ns(Type_LargeUtf8):
      return ArrowIpcDecoderSetTypeSimple(schema, NANOARROW_TYPE_LARGE_STRING, error);
    case ns(Type_Date):
      return ArrowIpcDecoderSetTypeDate(schema, ns(Field_type_get(field)), error);
    case ns(Type_Time):
      return ArrowIpcDecoderSetTypeTime(schema, ns(Field_type_get(field)), error);
    case ns(Type_Timestamp):
      return ArrowIpcDecoderSetTypeTimestamp(schema, ns(Field_type_get(field)), error);
    case ns(Type_Duration):
      return ArrowIpcDecoderSetTypeDuration(schema, ns(Field_type_get(field)), error);
    case ns(Type_Interval):
      return ArrowIpcDecoderSetTypeInterval(schema, ns(Field_type_get(field)), error);
    case ns(Type_Struct_):
      return ArrowIpcDecoderSetTypeSimpleNested(schema, "+s", error);
    case ns(Type_List):
      return ArrowIpcDecoderSetTypeSimpleNested(schema, "+l", error);
    case ns(Type_LargeList):
      return ArrowIpcDecoderSetTypeSimpleNested(schema, "+L", error);
    case ns(Type_FixedSizeList):
      return ArrowIpcDecoderSetTypeFixedSizeList(schema, ns(Field_type_get(field)),
                                                 error);
    case ns(Type_Map):
      return ArrowIpcDecoderSetTypeMap(schema, ns(Field_type_get(field)), error);
    case ns(Type_Union):
      return ArrowIpcDecoderSetTypeUnion(schema, ns(Field_type_get(field)), n_children,
                                         error);
    default:
      ArrowErrorSet(error, "Unrecognized Field type with value %d", (int)type_type);
      return EINVAL;
  }
}

static int ArrowIpcDecoderSetChildren(struct ArrowSchema* schema, ns(Field_vec_t) fields,
                                      struct ArrowError* error);

static int ArrowIpcDecoderSetField(struct ArrowSchema* schema, ns(Field_table_t) field,
                                   struct ArrowError* error) {
  // No dictionary support yet
  if (ns(Field_dictionary_is_present(field))) {
    ArrowErrorSet(error, "Schema message field with DictionaryEncoding not supported");
    return ENOTSUP;
  }

  int result;
  if (ns(Field_name_is_present(field))) {
    result = ArrowSchemaSetName(schema, ns(Field_name_get(field)));
  } else {
    result = ArrowSchemaSetName(schema, "");
  }

  if (result != NANOARROW_OK) {
    ArrowErrorSet(error, "ArrowSchemaSetName() failed");
    return result;
  }

  // Sets the schema->format and validates type-related inconsistencies
  // that might exist in the flatbuffer
  ns(Field_vec_t) children = ns(Field_children(field));
  int64_t n_children = ns(Field_vec_len(children));

  NANOARROW_RETURN_NOT_OK(ArrowIpcDecoderSetType(schema, field, n_children, error));

  // nanoarrow's type setters set the nullable flag by default, so we might
  // have to unset it here.
  if (ns(Field_nullable_get(field))) {
    schema->flags |= ARROW_FLAG_NULLABLE;
  } else {
    schema->flags &= ~ARROW_FLAG_NULLABLE;
  }

  // Children are defined separately in the flatbuffer, so we allocate, initialize
  // and set them separately as well.
  result = ArrowSchemaAllocateChildren(schema, n_children);
  if (result != NANOARROW_OK) {
    ArrowErrorSet(error, "ArrowSchemaAllocateChildren() failed");
    return result;
  }

  for (int64_t i = 0; i < n_children; i++) {
    ArrowSchemaInit(schema->children[i]);
  }

  NANOARROW_RETURN_NOT_OK(ArrowIpcDecoderSetChildren(schema, children, error));
  return ArrowIpcDecoderSetMetadata(schema, ns(Field_custom_metadata(field)), error);
}

static int ArrowIpcDecoderSetChildren(struct ArrowSchema* schema, ns(Field_vec_t) fields,
                                      struct ArrowError* error) {
  int64_t n_fields = ns(Schema_vec_len(fields));

  for (int64_t i = 0; i < n_fields; i++) {
    ns(Field_table_t) field = ns(Field_vec_at(fields, i));
    NANOARROW_RETURN_NOT_OK(ArrowIpcDecoderSetField(schema->children[i], field, error));
  }

  return NANOARROW_OK;
}

static int ArrowIpcDecoderDecodeSchemaHeader(struct ArrowIpcDecoder* decoder,
                                             flatbuffers_generic_t message_header,
                                             struct ArrowError* error) {
  struct ArrowIpcDecoderPrivate* private_data =
      (struct ArrowIpcDecoderPrivate*)decoder->private_data;

  ns(Schema_table_t) schema = (ns(Schema_table_t))message_header;
  int endianness = ns(Schema_endianness(schema));
  switch (endianness) {
    case ns(Endianness_Little):
      decoder->endianness = NANOARROW_IPC_ENDIANNESS_LITTLE;
      break;
    case ns(Endianness_Big):
      decoder->endianness = NANOARROW_IPC_ENDIANNESS_BIG;
      break;
    default:
      ArrowErrorSet(error,
                    "Expected Schema endianness of 0 (little) or 1 (big) but got %d",
                    (int)endianness);
      return EINVAL;
  }

  ns(Feature_vec_t) features = ns(Schema_features(schema));
  int64_t n_features = ns(Feature_vec_len(features));
  decoder->feature_flags = 0;

  for (int64_t i = 0; i < n_features; i++) {
    ns(Feature_enum_t) feature = ns(Feature_vec_at(features, i));
    switch (feature) {
      case ns(Feature_COMPRESSED_BODY):
        decoder->feature_flags |= NANOARROW_IPC_FEATURE_COMPRESSED_BODY;
        break;
      case ns(Feature_DICTIONARY_REPLACEMENT):
        decoder->feature_flags |= NANOARROW_IPC_FEATURE_DICTIONARY_REPLACEMENT;
        break;
      default:
        ArrowErrorSet(error, "Unrecognized Schema feature with value %d", (int)feature);
        return EINVAL;
    }
  }

  return NANOARROW_OK;
}

static int ArrowIpcDecoderDecodeRecordBatchHeader(struct ArrowIpcDecoder* decoder,
                                                  flatbuffers_generic_t message_header,
                                                  struct ArrowError* error) {
  struct ArrowIpcDecoderPrivate* private_data =
      (struct ArrowIpcDecoderPrivate*)decoder->private_data;

  ns(RecordBatch_table_t) batch = (ns(RecordBatch_table_t))message_header;

  ns(FieldNode_vec_t) fields = ns(RecordBatch_nodes(batch));
  ns(Buffer_vec_t) buffers = ns(RecordBatch_buffers(batch));
  int64_t n_fields = ns(FieldNode_vec_len(fields));
  int64_t n_buffers = ns(Buffer_vec_len(buffers));

  // Check field node and buffer count. We have one more field and buffer
  // because we count the root struct and the flatbuffer message does not.
  if ((n_fields + 1) != private_data->n_fields) {
    ArrowErrorSet(error, "Expected %ld field nodes in message but found %ld",
                  (long)private_data->n_fields - 1, (long)n_fields);
    return EINVAL;
  }

  if ((n_buffers + 1) != private_data->n_buffers) {
    ArrowErrorSet(error, "Expected %ld buffers in message but found %ld",
                  (long)private_data->n_buffers - 1, (long)n_buffers);
    return EINVAL;
  }

  if (ns(RecordBatch_compression_is_present(batch))) {
    ns(BodyCompression_table_t) compression = ns(RecordBatch_compression(batch));
    ns(CompressionType_enum_t) codec = ns(BodyCompression_codec(compression));
    switch (codec) {
      case ns(CompressionType_LZ4_FRAME):
        decoder->codec = NANOARROW_IPC_COMPRESSION_TYPE_LZ4_FRAME;
        break;
      case ns(CompressionType_ZSTD):
        decoder->codec = NANOARROW_IPC_COMPRESSION_TYPE_ZSTD;
        break;
      default:
        ArrowErrorSet(error, "Unrecognized RecordBatch BodyCompression codec value: %d",
                      (int)codec);
        return EINVAL;
    }
  } else {
    decoder->codec = NANOARROW_IPC_COMPRESSION_TYPE_NONE;
  }

  // Copying field node and buffer information is separate so as only to pay for the
  // nodes that are actually accessed.
  return NANOARROW_OK;
}

// Wipes any "current message" fields before moving on to a new message
static inline void ArrowIpcDecoderResetHeaderInfo(struct ArrowIpcDecoder* decoder) {
  struct ArrowIpcDecoderPrivate* private_data =
      (struct ArrowIpcDecoderPrivate*)decoder->private_data;

  decoder->message_type = 0;
  decoder->metadata_version = 0;
  decoder->endianness = 0;
  decoder->feature_flags = 0;
  decoder->codec = 0;
  decoder->header_size_bytes = 0;
  decoder->body_size_bytes = 0;
  private_data->last_message = NULL;
}

// Returns NANOARROW_OK if data is large enough to read the first 8 bytes
// of the message header, ESPIPE if reading more data might help, or EINVAL if the content
// is not valid. Advances the input ArrowBufferView by 8 bytes.
static inline int ArrowIpcDecoderReadHeaderPrefix(struct ArrowIpcDecoder* decoder,
                                                  struct ArrowBufferView* data_mut,
                                                  int32_t* message_size_bytes,
                                                  struct ArrowError* error) {
  struct ArrowIpcDecoderPrivate* private_data =
      (struct ArrowIpcDecoderPrivate*)decoder->private_data;

  if (data_mut->size_bytes < kMessageHeaderPrefixSize) {
    ArrowErrorSet(error, "Expected data of at least 8 bytes but only %ld bytes remain",
                  (long)data_mut->size_bytes);
    return ESPIPE;
  }

  uint32_t continuation = ArrowIpcReadContinuationBytes(data_mut);
  if (continuation != 0xFFFFFFFF) {
    ArrowErrorSet(error, "Expected 0xFFFFFFFF at start of message but found 0x%08X",
                  (unsigned int)continuation);
    return EINVAL;
  }

  int swap_endian = private_data->system_endianness == NANOARROW_IPC_ENDIANNESS_BIG;
  int32_t header_body_size_bytes = ArrowIpcReadInt32LE(data_mut, swap_endian);
  *message_size_bytes = header_body_size_bytes + kMessageHeaderPrefixSize;
  if (header_body_size_bytes < 0) {
    ArrowErrorSet(
        error, "Expected message body size > 0 but found message body size of %ld bytes",
        (long)header_body_size_bytes);
    return EINVAL;
  }

  if (header_body_size_bytes == 0) {
    ArrowErrorSet(error, "End of Arrow stream");
    return ENODATA;
  }

  return NANOARROW_OK;
}

ArrowErrorCode ArrowIpcDecoderPeekHeader(struct ArrowIpcDecoder* decoder,
                                         struct ArrowBufferView data,
                                         struct ArrowError* error) {
  struct ArrowIpcDecoderPrivate* private_data =
      (struct ArrowIpcDecoderPrivate*)decoder->private_data;

  ArrowIpcDecoderResetHeaderInfo(decoder);
  NANOARROW_RETURN_NOT_OK(ArrowIpcDecoderReadHeaderPrefix(
      decoder, &data, &decoder->header_size_bytes, error));
  return NANOARROW_OK;
}

ArrowErrorCode ArrowIpcDecoderVerifyHeader(struct ArrowIpcDecoder* decoder,
                                           struct ArrowBufferView data,
                                           struct ArrowError* error) {
  struct ArrowIpcDecoderPrivate* private_data =
      (struct ArrowIpcDecoderPrivate*)decoder->private_data;

  ArrowIpcDecoderResetHeaderInfo(decoder);
  NANOARROW_RETURN_NOT_OK(ArrowIpcDecoderReadHeaderPrefix(
      decoder, &data, &decoder->header_size_bytes, error));

  // Check that data contains at least the entire header (return ESPIPE to signal
  // that reading more data may help).
  int64_t message_body_size = decoder->header_size_bytes - kMessageHeaderPrefixSize;
  if (data.size_bytes < message_body_size) {
    ArrowErrorSet(error,
                  "Expected >= %ld bytes of remaining data but found %ld bytes in buffer",
                  (long)message_body_size + kMessageHeaderPrefixSize,
                  (long)data.size_bytes + kMessageHeaderPrefixSize);
    return ESPIPE;
  }

  // Run flatbuffers verification
  if (ns(Message_verify_as_root(data.data.as_uint8, message_body_size) !=
         flatcc_verify_ok)) {
    ArrowErrorSet(error, "Message flatbuffer verification failed");
    return EINVAL;
  }

  // Read some basic information from the message
  ns(Message_table_t) message = ns(Message_as_root(data.data.as_uint8));
  decoder->metadata_version = ns(Message_version(message));
  decoder->message_type = ns(Message_header_type(message));
  decoder->body_size_bytes = ns(Message_bodyLength(message));

  private_data->last_message = ns(Message_header_get(message));
  return NANOARROW_OK;
}

ArrowErrorCode ArrowIpcDecoderDecodeHeader(struct ArrowIpcDecoder* decoder,
                                           struct ArrowBufferView data,
                                           struct ArrowError* error) {
  struct ArrowIpcDecoderPrivate* private_data =
      (struct ArrowIpcDecoderPrivate*)decoder->private_data;

  ArrowIpcDecoderResetHeaderInfo(decoder);
  NANOARROW_RETURN_NOT_OK(ArrowIpcDecoderReadHeaderPrefix(
      decoder, &data, &decoder->header_size_bytes, error));

  // Check that data contains at least the entire header (return ESPIPE to signal
  // that reading more data may help).
  int64_t message_body_size = decoder->header_size_bytes - kMessageHeaderPrefixSize;
  if (data.size_bytes < message_body_size) {
    ArrowErrorSet(error,
                  "Expected >= %ld bytes of remaining data but found %ld bytes in buffer",
                  (long)message_body_size + kMessageHeaderPrefixSize,
                  (long)data.size_bytes + kMessageHeaderPrefixSize);
    return ESPIPE;
  }

  ns(Message_table_t) message = ns(Message_as_root(data.data.as_uint8));
  if (!message) {
    return EINVAL;
  }

  // Read some basic information from the message
  int32_t metadata_version = ns(Message_version(message));
  decoder->message_type = ns(Message_header_type(message));
  decoder->body_size_bytes = ns(Message_bodyLength(message));

  switch (decoder->metadata_version) {
    case ns(MetadataVersion_V5):
      break;
    case ns(MetadataVersion_V1):
    case ns(MetadataVersion_V2):
    case ns(MetadataVersion_V3):
    case ns(MetadataVersion_V4):
      ArrowErrorSet(error, "Expected metadata version V5 but found %s",
                    ns(MetadataVersion_name(decoder->metadata_version)));
      break;
    default:
      ArrowErrorSet(error, "Unexpected value for Message metadata version (%d)",
                    decoder->metadata_version);
      return EINVAL;
  }

  flatbuffers_generic_t message_header = ns(Message_header_get(message));
  switch (decoder->message_type) {
    case ns(MessageHeader_Schema):
      NANOARROW_RETURN_NOT_OK(
          ArrowIpcDecoderDecodeSchemaHeader(decoder, message_header, error));
      break;
    case ns(MessageHeader_RecordBatch):
      NANOARROW_RETURN_NOT_OK(
          ArrowIpcDecoderDecodeRecordBatchHeader(decoder, message_header, error));
      break;
    case ns(MessageHeader_DictionaryBatch):
    case ns(MessageHeader_Tensor):
    case ns(MessageHeader_SparseTensor):
      ArrowErrorSet(error, "Unsupported message type: '%s'",
                    ns(MessageHeader_type_name(decoder->message_type)));
      return ENOTSUP;
    default:
      ArrowErrorSet(error, "Unknown message type: %d", (int)(decoder->message_type));
      return EINVAL;
  }

  private_data->last_message = message_header;
  return NANOARROW_OK;
}

ArrowErrorCode ArrowIpcDecoderDecodeSchema(struct ArrowIpcDecoder* decoder,
                                           struct ArrowSchema* out,
                                           struct ArrowError* error) {
  struct ArrowIpcDecoderPrivate* private_data =
      (struct ArrowIpcDecoderPrivate*)decoder->private_data;

  if (private_data->last_message == NULL ||
      decoder->message_type != NANOARROW_IPC_MESSAGE_TYPE_SCHEMA) {
    ArrowErrorSet(error, "decoder did not just decode a Schema message");
    return EINVAL;
  }

  ns(Schema_table_t) schema = (ns(Schema_table_t))private_data->last_message;

  ns(Field_vec_t) fields = ns(Schema_fields(schema));
  int64_t n_fields = ns(Schema_vec_len(fields));

  struct ArrowSchema tmp;
  ArrowSchemaInit(&tmp);
  int result = ArrowSchemaSetTypeStruct(&tmp, n_fields);
  if (result != NANOARROW_OK) {
    tmp.release(&tmp);
    ArrowErrorSet(error, "Failed to allocate struct schema with %ld children",
                  (long)n_fields);
    return result;
  }

  result = ArrowIpcDecoderSetChildren(&tmp, fields, error);
  if (result != NANOARROW_OK) {
    tmp.release(&tmp);
    return result;
  }

  result = ArrowIpcDecoderSetMetadata(&tmp, ns(Schema_custom_metadata(schema)), error);
  if (result != NANOARROW_OK) {
    tmp.release(&tmp);
    return result;
  }

  ArrowSchemaMove(&tmp, out);
  return NANOARROW_OK;
}

static void ArrowIpcDecoderCountFields(struct ArrowSchema* schema, int64_t* n_fields) {
  *n_fields += 1;
  for (int64_t i = 0; i < schema->n_children; i++) {
    ArrowIpcDecoderCountFields(schema->children[i], n_fields);
  }
}

static void ArrowIpcDecoderInitFields(struct ArrowIpcField* fields,
                                      struct ArrowArrayView* array_view,
                                      struct ArrowArray* array, int64_t* n_fields,
                                      int64_t* n_buffers) {
  struct ArrowIpcField* field = fields + (*n_fields);
  field->array_view = array_view;
  field->array = array;
  field->buffer_offset = *n_buffers;

  for (int i = 0; i < 3; i++) {
    *n_buffers += array_view->layout.buffer_type[i] != NANOARROW_BUFFER_TYPE_NONE;
  }

  *n_fields += 1;

  for (int64_t i = 0; i < array_view->n_children; i++) {
    ArrowIpcDecoderInitFields(fields, array_view->children[i], array->children[i],
                              n_fields, n_buffers);
  }
}

ArrowErrorCode ArrowIpcDecoderSetSchema(struct ArrowIpcDecoder* decoder,
                                        struct ArrowSchema* schema,
                                        struct ArrowError* error) {
  struct ArrowIpcDecoderPrivate* private_data =
      (struct ArrowIpcDecoderPrivate*)decoder->private_data;

  // Reset previously allocated schema-specific resources
  private_data->n_buffers = 0;
  private_data->n_fields = 0;
  ArrowArrayViewReset(&private_data->array_view);
  if (private_data->array.release != NULL) {
    private_data->array.release(&private_data->array);
  }
  if (private_data->fields != NULL) {
    ArrowFree(private_data->fields);
  }

  // Allocate Array and ArrayView based on schema without moving the schema.
  // This will fail if the schema is not valid.
  NANOARROW_RETURN_NOT_OK(
      ArrowArrayViewInitFromSchema(&private_data->array_view, schema, error));
  NANOARROW_RETURN_NOT_OK(ArrowArrayInitFromArrayView(&private_data->array,
                                                      &private_data->array_view, error));

  // Root must be a struct
  if (private_data->array_view.storage_type != NANOARROW_TYPE_STRUCT) {
    ArrowErrorSet(error, "schema must be a struct type");
    return EINVAL;
  }

  // Walk tree and calculate how many fields we need to allocate
  ArrowIpcDecoderCountFields(schema, &private_data->n_fields);
  private_data->fields = (struct ArrowIpcField*)ArrowMalloc(private_data->n_fields *
                                                            sizeof(struct ArrowIpcField));
  if (private_data->fields == NULL) {
    ArrowErrorSet(error, "Failed to allocate decoder->fields");
    return ENOMEM;
  }
  memset(private_data->fields, 0, private_data->n_fields * sizeof(struct ArrowIpcField));

  // Init field information and calculate starting buffer offset for each
  int64_t field_i = 0;
  ArrowIpcDecoderInitFields(private_data->fields, &private_data->array_view,
                            &private_data->array, &field_i, &private_data->n_buffers);

  return NANOARROW_OK;
}

ArrowErrorCode ArrowIpcDecoderSetEndianness(struct ArrowIpcDecoder* decoder,
                                            enum ArrowIpcEndianness endianness) {
  struct ArrowIpcDecoderPrivate* private_data =
      (struct ArrowIpcDecoderPrivate*)decoder->private_data;

  switch (endianness) {
    case NANOARROW_IPC_ENDIANNESS_UNINITIALIZED:
    case NANOARROW_IPC_ENDIANNESS_LITTLE:
    case NANOARROW_IPC_ENDIANNESS_BIG:
      private_data->endianness = endianness;
      return NANOARROW_OK;
    default:
      return EINVAL;
  }
}

/// \brief Information required to read and/or decompress a single buffer
///
/// The RecordBatch message header contains a description of each buffer
/// in the message body. The ArrowIpcBufferSource is the parsed result of
/// a single buffer with compression and endian information such that the
/// original buffer can be reconstructed.
struct ArrowIpcBufferSource {
  int64_t body_offset_bytes;
  int64_t buffer_length_bytes;
  enum ArrowIpcCompressionType codec;
  enum ArrowType data_type;
  int32_t element_size_bits;
  int swap_endian;
};

/// \brief Materializing ArrowBuffer objects
///
/// Given a description of where a buffer is located inside the message body, make
/// the ArrowBuffer that will be placed into the correct ArrowArray. The decoder
/// does not do any IO and does not make any assumptions about how or if the body
/// has been read into memory. This abstraction is currently internal and exists
/// to support the two obvious ways a user might go about this: (1) using a
/// non-owned view of memory that must be copied slice-wise or (2) adding a reference
/// to an ArrowIpcSharedBuffer and returning a slice of that memory.
struct ArrowIpcBufferFactory {
  /// \brief User-defined callback to populate a buffer view
  ///
  /// At the time that this callback is called, the ArrowIpcBufferSource has been checked
  /// to ensure that it is within the body size declared by the message header. A
  /// possibly preallocated ArrowBuffer (dst) is provided, which implementations must use
  /// if an allocation is required (in which case the view must be populated pointing to
  /// the contents of the ArrowBuffer) If NANOARROW_OK is not returned, error must contain
  /// a null-terminated message.
  ArrowErrorCode (*make_buffer)(struct ArrowIpcBufferFactory* factory,
                                struct ArrowIpcBufferSource* src,
                                struct ArrowBufferView* dst_view, struct ArrowBuffer* dst,
                                struct ArrowError* error);

  /// \brief Caller-defined private data to be used in the callback.
  ///
  /// Usually this would be a description of where the body has been read into memory or
  /// information required to do so.
  void* private_data;
};

static ArrowErrorCode ArrowIpcMakeBufferFromView(struct ArrowIpcBufferFactory* factory,
                                                 struct ArrowIpcBufferSource* src,
                                                 struct ArrowBufferView* dst_view,
                                                 struct ArrowBuffer* dst,
                                                 struct ArrowError* error) {
  struct ArrowBufferView* body = (struct ArrowBufferView*)factory->private_data;
  dst_view->data.as_uint8 = body->data.as_uint8 + src->body_offset_bytes;
  dst_view->size_bytes = src->buffer_length_bytes;
  return NANOARROW_OK;
}

static struct ArrowIpcBufferFactory ArrowIpcBufferFactoryFromView(
    struct ArrowBufferView* buffer_view) {
  struct ArrowIpcBufferFactory out;
  out.make_buffer = &ArrowIpcMakeBufferFromView;
  out.private_data = buffer_view;
  return out;
}

static ArrowErrorCode ArrowIpcMakeBufferFromShared(struct ArrowIpcBufferFactory* factory,
                                                   struct ArrowIpcBufferSource* src,
                                                   struct ArrowBufferView* dst_view,
                                                   struct ArrowBuffer* dst,
                                                   struct ArrowError* error) {
  struct ArrowIpcSharedBuffer* shared =
      (struct ArrowIpcSharedBuffer*)factory->private_data;
  ArrowBufferReset(dst);
  ArrowIpcSharedBufferClone(shared, dst);
  dst->data += src->body_offset_bytes;
  dst->size_bytes = src->buffer_length_bytes;
  dst_view->data.data = dst->data;
  dst_view->size_bytes = dst->size_bytes;
  return NANOARROW_OK;
}

static struct ArrowIpcBufferFactory ArrowIpcBufferFactoryFromShared(
    struct ArrowIpcSharedBuffer* shared) {
  struct ArrowIpcBufferFactory out;
  out.make_buffer = &ArrowIpcMakeBufferFromShared;
  out.private_data = shared;
  return out;
}

// Just for the purposes of endian-swapping
struct ArrowIpcIntervalMonthDayNano {
  uint32_t months;
  uint32_t days;
  uint64_t ns;
};

static int ArrowIpcDecoderSwapEndian(struct ArrowIpcBufferSource* src,
                                     struct ArrowBufferView* out_view,
                                     struct ArrowBuffer* dst, struct ArrowError* error) {
  // Some buffer data types don't need any endian swapping
  switch (src->data_type) {
    case NANOARROW_TYPE_BOOL:
    case NANOARROW_TYPE_INT8:
    case NANOARROW_TYPE_UINT8:
    case NANOARROW_TYPE_STRING:
    case NANOARROW_TYPE_BINARY:
      return NANOARROW_OK;
    default:
      break;
  }

  // Make sure dst is not a shared buffer that we can't modify
  struct ArrowBuffer tmp;
  ArrowBufferInit(&tmp);

  if (dst->allocator.private_data != NULL) {
    ArrowBufferMove(dst, &tmp);
    ArrowBufferInit(dst);
  }

  if (dst->size_bytes == 0) {
    NANOARROW_RETURN_NOT_OK(ArrowBufferReserve(dst, out_view->size_bytes));
    dst->size_bytes = out_view->size_bytes;
  }

  switch (src->data_type) {
    case NANOARROW_TYPE_DECIMAL128:
    case NANOARROW_TYPE_DECIMAL256: {
      const uint64_t* ptr_src = out_view->data.as_uint64;
      uint64_t* ptr_dst = (uint64_t*)dst->data;
      uint64_t words[4];
      int n_words = src->element_size_bits / 64;

      for (int64_t i = 0; i < (dst->size_bytes / n_words / 8); i++) {
        for (int j = 0; j < n_words; j++) {
          words[j] = bswap64(ptr_src[i * n_words + j]);
        }

        for (int j = 0; j < n_words; j++) {
          ptr_dst[i * n_words + j] = words[n_words - j - 1];
        }
      }
      break;
    }
    case NANOARROW_TYPE_INTERVAL_DAY_TIME: {
      uint32_t* ptr = (uint32_t*)dst->data;
      for (int64_t i = 0; i < (dst->size_bytes / 4); i++) {
        ptr[i] = bswap32(out_view->data.as_uint32[i]);
      }
      break;
    }
    case NANOARROW_TYPE_INTERVAL_MONTH_DAY_NANO: {
      const uint8_t* ptr_src = out_view->data.as_uint8;
      uint8_t* ptr_dst = dst->data;
      int item_size_bytes = 16;
      struct ArrowIpcIntervalMonthDayNano item;
      for (int64_t i = 0; i < (dst->size_bytes / item_size_bytes); i++) {
        memcpy(&item, ptr_src + i * item_size_bytes, item_size_bytes);
        item.months = bswap32(item.months);
        item.days = bswap32(item.days);
        item.ns = bswap64(item.ns);
        memcpy(ptr_dst + i * item_size_bytes, &item, item_size_bytes);
      }
      break;
    }
    default:
      switch (src->element_size_bits) {
        case 16: {
          uint16_t* ptr = (uint16_t*)dst->data;
          for (int64_t i = 0; i < (dst->size_bytes / 2); i++) {
            ptr[i] = bswap16(out_view->data.as_uint16[i]);
          }
          break;
        }
        case 32: {
          uint32_t* ptr = (uint32_t*)dst->data;
          for (int64_t i = 0; i < (dst->size_bytes / 4); i++) {
            ptr[i] = bswap32(out_view->data.as_uint32[i]);
          }
          break;
        }
        case 64: {
          uint64_t* ptr = (uint64_t*)dst->data;
          for (int64_t i = 0; i < (dst->size_bytes / 8); i++) {
            ptr[i] = bswap64(out_view->data.as_uint64[i]);
          }
          break;
        }
        default:
          ArrowErrorSet(error, "Endian swapping for element bitwidth %d is not supported",
                        (int)src->element_size_bits);
          return ENOTSUP;
      }
      break;
  }

  ArrowBufferReset(&tmp);
  out_view->data.data = dst->data;
  return NANOARROW_OK;
}

struct ArrowIpcArraySetter {
  ns(FieldNode_vec_t) fields;
  int64_t field_i;
  ns(Buffer_vec_t) buffers;
  int64_t buffer_i;
  int64_t body_size_bytes;
  struct ArrowIpcBufferSource src;
  struct ArrowIpcBufferFactory factory;
};

static int ArrowIpcDecoderMakeBuffer(struct ArrowIpcArraySetter* setter, int64_t offset,
                                     int64_t length, struct ArrowBufferView* out_view,
                                     struct ArrowBuffer* out, struct ArrowError* error) {
  out_view->data.data = NULL;
  out_view->size_bytes = 0;

  if (length == 0) {
    return NANOARROW_OK;
  }

  // Check that this buffer fits within the body
  int64_t buffer_start = offset;
  int64_t buffer_end = buffer_start + length;
  if (buffer_start < 0 || buffer_end > setter->body_size_bytes) {
    ArrowErrorSet(error, "Buffer requires body offsets [%ld..%ld) but body has size %ld",
                  (long)buffer_start, (long)buffer_end, (long)setter->body_size_bytes);
    return EINVAL;
  }

  // If the ArrowIpcBufferFactory is made public, these should get moved (since then a
  // user could inject support for either one). More likely, by the time that happens,
  // this library will be able to support some of these features.
  if (setter->src.codec != NANOARROW_IPC_COMPRESSION_TYPE_NONE) {
    ArrowErrorSet(error, "The nanoarrow_ipc extension does not support compression");
    return ENOTSUP;
  }

  setter->src.body_offset_bytes = offset;
  setter->src.buffer_length_bytes = length;
  NANOARROW_RETURN_NOT_OK(
      setter->factory.make_buffer(&setter->factory, &setter->src, out_view, out, error));

  if (setter->src.swap_endian) {
    NANOARROW_RETURN_NOT_OK(
        ArrowIpcDecoderSwapEndian(&setter->src, out_view, out, error));
  }

  return NANOARROW_OK;
}

static int ArrowIpcDecoderWalkGetArray(struct ArrowArrayView* array_view,
                                       struct ArrowArray* array, struct ArrowArray* out,
                                       struct ArrowError* error) {
  out->length = array_view->length;
  out->null_count = array_view->null_count;

  for (int64_t i = 0; i < array->n_buffers; i++) {
    struct ArrowBufferView view = array_view->buffer_views[i];
    struct ArrowBuffer* scratch_buffer = ArrowArrayBuffer(array, i);
    struct ArrowBuffer* buffer_out = ArrowArrayBuffer(out, i);

    // If the scratch buffer was used, move it to the final array. Otherwise,
    // copy the view.
    if (scratch_buffer->size_bytes == 0) {
      NANOARROW_RETURN_NOT_OK(ArrowBufferAppendBufferView(buffer_out, view));
    } else if (scratch_buffer->data == view.data.as_uint8) {
      ArrowBufferMove(scratch_buffer, buffer_out);
    } else {
      ArrowErrorSet(
          error,
          "Internal: scratch buffer was used but doesn't point to the same data as view");
      return EINVAL;
    }
  }

  for (int64_t i = 0; i < array->n_children; i++) {
    NANOARROW_RETURN_NOT_OK(ArrowIpcDecoderWalkGetArray(
        array_view->children[i], array->children[i], out->children[i], error));
  }

  return NANOARROW_OK;
}

static int ArrowIpcDecoderWalkSetArrayView(struct ArrowIpcArraySetter* setter,
                                           struct ArrowArrayView* array_view,
                                           struct ArrowArray* array,
                                           struct ArrowError* error) {
  ns(FieldNode_struct_t) field =
      ns(FieldNode_vec_at(setter->fields, (size_t)setter->field_i));
  array_view->length = ns(FieldNode_length(field));
  array_view->null_count = ns(FieldNode_null_count(field));
  setter->field_i += 1;

  for (int64_t i = 0; i < 3; i++) {
    if (array_view->layout.buffer_type[i] == NANOARROW_BUFFER_TYPE_NONE) {
      break;
    }

    ns(Buffer_struct_t) buffer =
        ns(Buffer_vec_at(setter->buffers, (size_t)setter->buffer_i));
    int64_t buffer_offset = ns(Buffer_offset(buffer));
    int64_t buffer_length = ns(Buffer_length(buffer));
    setter->buffer_i += 1;

    // Provide a buffer that will be used if any allocation has to occur
    struct ArrowBuffer* buffer_dst = ArrowArrayBuffer(array, i);

    // Attempt to re-use any previous allocation unless this buffer is
    // wrapping a custom allocator.
    if (buffer_dst->allocator.private_data != NULL) {
      ArrowBufferReset(buffer_dst);
    } else {
      buffer_dst->size_bytes = 0;
    }

    setter->src.data_type = array_view->layout.buffer_data_type[i];
    setter->src.element_size_bits = array_view->layout.element_size_bits[i];

    NANOARROW_RETURN_NOT_OK(
        ArrowIpcDecoderMakeBuffer(setter, buffer_offset, buffer_length,
                                  &array_view->buffer_views[i], buffer_dst, error));
  }

  for (int64_t i = 0; i < array_view->n_children; i++) {
    NANOARROW_RETURN_NOT_OK(ArrowIpcDecoderWalkSetArrayView(
        setter, array_view->children[i], array->children[i], error));
  }

  return NANOARROW_OK;
}

static ArrowErrorCode ArrowIpcDecoderDecodeArrayInternal(
    struct ArrowIpcDecoder* decoder, int64_t field_i, struct ArrowArray* out,
    enum ArrowValidationLevel validation_level, struct ArrowError* error) {
  struct ArrowIpcDecoderPrivate* private_data =
      (struct ArrowIpcDecoderPrivate*)decoder->private_data;

  struct ArrowIpcField* root = private_data->fields + field_i + 1;

  if (field_i == -1) {
    NANOARROW_RETURN_NOT_OK(
        ArrowArrayInitFromArrayView(out, &private_data->array_view, error));
    out->length = private_data->array_view.length;
    out->null_count = private_data->array_view.null_count;

    for (int64_t i = 0; i < private_data->array_view.n_children; i++) {
      NANOARROW_RETURN_NOT_OK(ArrowIpcDecoderWalkGetArray(
          private_data->array_view.children[i], private_data->array.children[i],
          out->children[i], error));
    }

  } else {
    NANOARROW_RETURN_NOT_OK(ArrowArrayInitFromArrayView(out, root->array_view, error));
    NANOARROW_RETURN_NOT_OK(
        ArrowIpcDecoderWalkGetArray(root->array_view, root->array, out, error));
  }

  // If validation is going to happen it has already occurred; however, the part of
  // ArrowArrayFinishBuilding() that allocates a data buffer if the data buffer is
  // NULL (required for compatibility with Arrow <= 9.0.0) assumes CPU data access
  // and thus needs a validation level >= default.
  if (validation_level >= NANOARROW_VALIDATION_LEVEL_DEFAULT) {
    NANOARROW_RETURN_NOT_OK(
        ArrowArrayFinishBuilding(out, NANOARROW_VALIDATION_LEVEL_DEFAULT, error));
  } else {
    NANOARROW_RETURN_NOT_OK(
        ArrowArrayFinishBuilding(out, NANOARROW_VALIDATION_LEVEL_NONE, error));
  }

  return NANOARROW_OK;
}

static ArrowErrorCode ArrowIpcDecoderDecodeArrayViewInternal(
    struct ArrowIpcDecoder* decoder, struct ArrowIpcBufferFactory factory,
    int64_t field_i, struct ArrowArrayView** out_view, struct ArrowError* error) {
  struct ArrowIpcDecoderPrivate* private_data =
      (struct ArrowIpcDecoderPrivate*)decoder->private_data;

  if (private_data->last_message == NULL ||
      decoder->message_type != NANOARROW_IPC_MESSAGE_TYPE_RECORD_BATCH) {
    ArrowErrorSet(error, "decoder did not just decode a RecordBatch message");
    return EINVAL;
  }

  ns(RecordBatch_table_t) batch = (ns(RecordBatch_table_t))private_data->last_message;

  // RecordBatch messages don't count the root node but decoder->fields does
  struct ArrowIpcField* root = private_data->fields + field_i + 1;

  struct ArrowIpcArraySetter setter;
  setter.fields = ns(RecordBatch_nodes(batch));
  setter.field_i = field_i;
  setter.buffers = ns(RecordBatch_buffers(batch));
  setter.buffer_i = root->buffer_offset - 1;
  setter.body_size_bytes = decoder->body_size_bytes;
  setter.factory = factory;
  setter.src.codec = decoder->codec;
  setter.src.swap_endian = ArrowIpcDecoderNeedsSwapEndian(decoder);

  // The flatbuffers FieldNode doesn't count the root struct so we have to loop over the
  // children ourselves
  if (field_i == -1) {
    root->array_view->length = ns(RecordBatch_length(batch));
    root->array_view->null_count = 0;
    setter.field_i++;
    setter.buffer_i++;

    for (int64_t i = 0; i < root->array_view->n_children; i++) {
      NANOARROW_RETURN_NOT_OK(ArrowIpcDecoderWalkSetArrayView(
          &setter, root->array_view->children[i], root->array->children[i], error));
    }
  } else {
    NANOARROW_RETURN_NOT_OK(
        ArrowIpcDecoderWalkSetArrayView(&setter, root->array_view, root->array, error));
  }

  *out_view = root->array_view;
  return NANOARROW_OK;
}

ArrowErrorCode ArrowIpcDecoderDecodeArrayView(struct ArrowIpcDecoder* decoder,
                                              struct ArrowBufferView body, int64_t i,
                                              struct ArrowArrayView** out,
                                              struct ArrowError* error) {
  return ArrowIpcDecoderDecodeArrayViewInternal(
      decoder, ArrowIpcBufferFactoryFromView(&body), i, out, error);
}

ArrowErrorCode ArrowIpcDecoderDecodeArray(struct ArrowIpcDecoder* decoder,
                                          struct ArrowBufferView body, int64_t i,
                                          struct ArrowArray* out,
                                          enum ArrowValidationLevel validation_level,
                                          struct ArrowError* error) {
  struct ArrowArrayView* array_view;
  NANOARROW_RETURN_NOT_OK(ArrowIpcDecoderDecodeArrayViewInternal(
      decoder, ArrowIpcBufferFactoryFromView(&body), i, &array_view, error));

  NANOARROW_RETURN_NOT_OK(ArrowArrayViewValidate(array_view, validation_level, error));

  struct ArrowArray temp;
  temp.release = NULL;
  int result =
      ArrowIpcDecoderDecodeArrayInternal(decoder, i, &temp, validation_level, error);
  if (result != NANOARROW_OK && temp.release != NULL) {
    temp.release(&temp);
  } else if (result != NANOARROW_OK) {
    return result;
  }

  ArrowArrayMove(&temp, out);
  return NANOARROW_OK;
}

ArrowErrorCode ArrowIpcDecoderDecodeArrayFromShared(
    struct ArrowIpcDecoder* decoder, struct ArrowIpcSharedBuffer* body, int64_t i,
    struct ArrowArray* out, enum ArrowValidationLevel validation_level,
    struct ArrowError* error) {
  struct ArrowArrayView* array_view;
  NANOARROW_RETURN_NOT_OK(ArrowIpcDecoderDecodeArrayViewInternal(
      decoder, ArrowIpcBufferFactoryFromShared(body), i, &array_view, error));

  NANOARROW_RETURN_NOT_OK(ArrowArrayViewValidate(array_view, validation_level, error));

  struct ArrowArray temp;
  temp.release = NULL;
  int result =
      ArrowIpcDecoderDecodeArrayInternal(decoder, i, &temp, validation_level, error);
  if (result != NANOARROW_OK && temp.release != NULL) {
    temp.release(&temp);
  } else if (result != NANOARROW_OK) {
    return result;
  }

  ArrowArrayMove(&temp, out);
  return NANOARROW_OK;
}
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License.

#include <errno.h>
#include <stdio.h>
#include <string.h>

#include "nanoarrow.h"
#include "nanoarrow_ipc.h"

void ArrowIpcInputStreamMove(struct ArrowIpcInputStream* src,
                             struct ArrowIpcInputStream* dst) {
  memcpy(dst, src, sizeof(struct ArrowIpcInputStream));
  src->release = NULL;
}

struct ArrowIpcInputStreamBufferPrivate {
  struct ArrowBuffer input;
  int64_t cursor_bytes;
};

static ArrowErrorCode ArrowIpcInputStreamBufferRead(struct ArrowIpcInputStream* stream,
                                                    uint8_t* buf, int64_t buf_size_bytes,
                                                    int64_t* size_read_out,
                                                    struct ArrowError* error) {
  if (buf_size_bytes == 0) {
    *size_read_out = 0;
    return NANOARROW_OK;
  }

  struct ArrowIpcInputStreamBufferPrivate* private_data =
      (struct ArrowIpcInputStreamBufferPrivate*)stream->private_data;
  int64_t bytes_remaining = private_data->input.size_bytes - private_data->cursor_bytes;
  int64_t bytes_to_read;
  if (bytes_remaining > buf_size_bytes) {
    bytes_to_read = buf_size_bytes;
  } else {
    bytes_to_read = bytes_remaining;
  }

  if (bytes_to_read > 0) {
    memcpy(buf, private_data->input.data + private_data->cursor_bytes, bytes_to_read);
  }

  *size_read_out = bytes_to_read;
  private_data->cursor_bytes += bytes_to_read;
  return NANOARROW_OK;
}

static void ArrowIpcInputStreamBufferRelease(struct ArrowIpcInputStream* stream) {
  struct ArrowIpcInputStreamBufferPrivate* private_data =
      (struct ArrowIpcInputStreamBufferPrivate*)stream->private_data;
  ArrowBufferReset(&private_data->input);
  ArrowFree(private_data);
  stream->release = NULL;
}

ArrowErrorCode ArrowIpcInputStreamInitBuffer(struct ArrowIpcInputStream* stream,
                                             struct ArrowBuffer* input) {
  struct ArrowIpcInputStreamBufferPrivate* private_data =
      (struct ArrowIpcInputStreamBufferPrivate*)ArrowMalloc(
          sizeof(struct ArrowIpcInputStreamBufferPrivate));
  if (private_data == NULL) {
    return ENOMEM;
  }

  ArrowBufferMove(input, &private_data->input);
  private_data->cursor_bytes = 0;
  stream->read = &ArrowIpcInputStreamBufferRead;
  stream->release = &ArrowIpcInputStreamBufferRelease;
  stream->private_data = private_data;

  return NANOARROW_OK;
}

struct ArrowIpcInputStreamFilePrivate {
  FILE* file_ptr;
  int stream_finished;
  int close_on_release;
};

static void ArrowIpcInputStreamFileRelease(struct ArrowIpcInputStream* stream) {
  struct ArrowIpcInputStreamFilePrivate* private_data =
      (struct ArrowIpcInputStreamFilePrivate*)stream->private_data;

  if (private_data->file_ptr != NULL && private_data->close_on_release) {
    fclose(private_data->file_ptr);
  }

  ArrowFree(private_data);
  stream->release = NULL;
}

static ArrowErrorCode ArrowIpcInputStreamFileRead(struct ArrowIpcInputStream* stream,
                                                  uint8_t* buf, int64_t buf_size_bytes,
                                                  int64_t* size_read_out,
                                                  struct ArrowError* error) {
  struct ArrowIpcInputStreamFilePrivate* private_data =
      (struct ArrowIpcInputStreamFilePrivate*)stream->private_data;

  if (private_data->stream_finished) {
    *size_read_out = 0;
    return NANOARROW_OK;
  }

  // Do the read
  int64_t bytes_read = (int64_t)fread(buf, 1, buf_size_bytes, private_data->file_ptr);
  *size_read_out = bytes_read;

  if (bytes_read != buf_size_bytes) {
    private_data->stream_finished = 1;

    // Inspect error
    int has_error = !feof(private_data->file_ptr) && ferror(private_data->file_ptr);

    // Try to close the file now
    if (private_data->close_on_release) {
      if (fclose(private_data->file_ptr) == 0) {
        private_data->file_ptr = NULL;
      }
    }

    // Maybe return error
    if (has_error) {
      ArrowErrorSet(error, "ArrowIpcInputStreamFile IO error");
      return EIO;
    }
  }

  return NANOARROW_OK;
}

ArrowErrorCode ArrowIpcInputStreamInitFile(struct ArrowIpcInputStream* stream,
                                           void* file_ptr, int close_on_release) {
  struct ArrowIpcInputStreamFilePrivate* private_data =
      (struct ArrowIpcInputStreamFilePrivate*)ArrowMalloc(
          sizeof(struct ArrowIpcInputStreamFilePrivate));
  if (private_data == NULL) {
    return ENOMEM;
  }

  private_data->file_ptr = (FILE*)file_ptr;
  private_data->close_on_release = close_on_release;
  private_data->stream_finished = 0;

  stream->read = &ArrowIpcInputStreamFileRead;
  stream->release = &ArrowIpcInputStreamFileRelease;
  stream->private_data = private_data;
  return NANOARROW_OK;
}

struct ArrowIpcArrayStreamReaderPrivate {
  struct ArrowIpcInputStream input;
  struct ArrowIpcDecoder decoder;
  int use_shared_buffers;
  struct ArrowSchema out_schema;
  int64_t field_index;
  struct ArrowBuffer header;
  struct ArrowBuffer body;
  struct ArrowError error;
};

static void ArrowIpcArrayStreamReaderRelease(struct ArrowArrayStream* stream) {
  struct ArrowIpcArrayStreamReaderPrivate* private_data =
      (struct ArrowIpcArrayStreamReaderPrivate*)stream->private_data;

  if (private_data->input.release != NULL) {
    private_data->input.release(&private_data->input);
  }

  ArrowIpcDecoderReset(&private_data->decoder);

  if (private_data->out_schema.release != NULL) {
    private_data->out_schema.release(&private_data->out_schema);
  }

  ArrowBufferReset(&private_data->header);
  ArrowBufferReset(&private_data->body);

  ArrowFree(private_data);
  stream->release = NULL;
}

static int ArrowIpcArrayStreamReaderNextHeader(
    struct ArrowIpcArrayStreamReaderPrivate* private_data,
    enum ArrowIpcMessageType message_type) {
  private_data->header.size_bytes = 0;
  int64_t bytes_read = 0;

  // Read 8 bytes (continuation + header size in bytes)
  NANOARROW_RETURN_NOT_OK_WITH_ERROR(ArrowBufferReserve(&private_data->header, 8),
                                     &private_data->error);
  NANOARROW_RETURN_NOT_OK(private_data->input.read(&private_data->input,
                                                   private_data->header.data, 8,
                                                   &bytes_read, &private_data->error));
  private_data->header.size_bytes += bytes_read;

  if (bytes_read == 0) {
    // The caller might not use this error message (e.g., if the end of the stream
    // is one of the valid outcomes) but we set the error anyway in case it gets
    // propagated higher (e.g., if the stream is empty and there's no schema message)
    ArrowErrorSet(&private_data->error, "No data available on stream");
    return ENODATA;
  } else if (bytes_read != 8) {
    ArrowErrorSet(&private_data->error,
                  "Expected at least 8 bytes in remainder of stream");
    return EINVAL;
  }

  struct ArrowBufferView input_view;
  input_view.data.data = private_data->header.data;
  input_view.size_bytes = private_data->header.size_bytes;

  // Use PeekHeader to fill in decoder.header_size_bytes
  NANOARROW_RETURN_NOT_OK(ArrowIpcDecoderPeekHeader(&private_data->decoder, input_view,
                                                    &private_data->error));

  // Read the header bytes
  int64_t expected_header_bytes = private_data->decoder.header_size_bytes - 8;
  NANOARROW_RETURN_NOT_OK_WITH_ERROR(
      ArrowBufferReserve(&private_data->header, expected_header_bytes),
      &private_data->error);
  NANOARROW_RETURN_NOT_OK(
      private_data->input.read(&private_data->input, private_data->header.data + 8,
                               expected_header_bytes, &bytes_read, &private_data->error));
  private_data->header.size_bytes += bytes_read;

  // Verify + decode the header
  input_view.data.data = private_data->header.data;
  input_view.size_bytes = private_data->header.size_bytes;
  NANOARROW_RETURN_NOT_OK(ArrowIpcDecoderVerifyHeader(&private_data->decoder, input_view,
                                                      &private_data->error));

  // Don't decode the message if it's of the wrong type (because the error message
  // is better communicated by the caller)
  if (private_data->decoder.message_type != message_type) {
    return NANOARROW_OK;
  }

  NANOARROW_RETURN_NOT_OK(ArrowIpcDecoderDecodeHeader(&private_data->decoder, input_view,
                                                      &private_data->error));
  return NANOARROW_OK;
}

static int ArrowIpcArrayStreamReaderNextBody(
    struct ArrowIpcArrayStreamReaderPrivate* private_data) {
  int64_t bytes_read;
  int64_t bytes_to_read = private_data->decoder.body_size_bytes;

  // Read the body bytes
  private_data->body.size_bytes = 0;
  NANOARROW_RETURN_NOT_OK_WITH_ERROR(
      ArrowBufferReserve(&private_data->body, bytes_to_read), &private_data->error);
  NANOARROW_RETURN_NOT_OK(private_data->input.read(&private_data->input,
                                                   private_data->body.data, bytes_to_read,
                                                   &bytes_read, &private_data->error));
  private_data->body.size_bytes += bytes_read;

  if (bytes_read != bytes_to_read) {
    ArrowErrorSet(&private_data->error,
                  "Expected to be able to read %ld bytes for message body but got %ld",
                  (long)bytes_to_read, bytes_read);
    return ESPIPE;
  } else {
    return NANOARROW_OK;
  }
}

static int ArrowIpcArrayStreamReaderReadSchemaIfNeeded(
    struct ArrowIpcArrayStreamReaderPrivate* private_data) {
  if (private_data->out_schema.release != NULL) {
    return NANOARROW_OK;
  }

  NANOARROW_RETURN_NOT_OK(ArrowIpcArrayStreamReaderNextHeader(
      private_data, NANOARROW_IPC_MESSAGE_TYPE_SCHEMA));

  // Error if this isn't a schema message
  if (private_data->decoder.message_type != NANOARROW_IPC_MESSAGE_TYPE_SCHEMA) {
    ArrowErrorSet(&private_data->error,
                  "Unexpected message type at start of input (expected Schema)");
    return EINVAL;
  }

  // ...or if it uses features we don't support
  if (private_data->decoder.feature_flags & NANOARROW_IPC_FEATURE_COMPRESSED_BODY) {
    ArrowErrorSet(&private_data->error,
                  "This stream uses unsupported feature COMPRESSED_BODY");
    return EINVAL;
  }

  if (private_data->decoder.feature_flags &
      NANOARROW_IPC_FEATURE_DICTIONARY_REPLACEMENT) {
    ArrowErrorSet(&private_data->error,
                  "This stream uses unsupported feature DICTIONARY_REPLACEMENT");
    return EINVAL;
  }

  // Notify the decoder of buffer endianness
  NANOARROW_RETURN_NOT_OK_WITH_ERROR(
      ArrowIpcDecoderSetEndianness(&private_data->decoder,
                                   private_data->decoder.endianness),
      &private_data->error);

  struct ArrowSchema tmp;
  NANOARROW_RETURN_NOT_OK(
      ArrowIpcDecoderDecodeSchema(&private_data->decoder, &tmp, &private_data->error));

  // Only support "read the whole thing" for now
  if (private_data->field_index != -1) {
    tmp.release(&tmp);
    ArrowErrorSet(&private_data->error, "Field index != -1 is not yet supported");
    return ENOTSUP;
  }

  // Notify the decoder of the schema for forthcoming messages
  int result =
      ArrowIpcDecoderSetSchema(&private_data->decoder, &tmp, &private_data->error);
  if (result != NANOARROW_OK) {
    tmp.release(&tmp);
    return result;
  }

  ArrowSchemaMove(&tmp, &private_data->out_schema);
  return NANOARROW_OK;
}

static int ArrowIpcArrayStreamReaderGetSchema(struct ArrowArrayStream* stream,
                                              struct ArrowSchema* out) {
  struct ArrowIpcArrayStreamReaderPrivate* private_data =
      (struct ArrowIpcArrayStreamReaderPrivate*)stream->private_data;
  private_data->error.message[0] = '\0';
  NANOARROW_RETURN_NOT_OK(ArrowIpcArrayStreamReaderReadSchemaIfNeeded(private_data));
  return ArrowSchemaDeepCopy(&private_data->out_schema, out);
}

static int ArrowIpcArrayStreamReaderGetNext(struct ArrowArrayStream* stream,
                                            struct ArrowArray* out) {
  struct ArrowIpcArrayStreamReaderPrivate* private_data =
      (struct ArrowIpcArrayStreamReaderPrivate*)stream->private_data;
  ArrowErrorInit(&private_data->error);
  NANOARROW_RETURN_NOT_OK(ArrowIpcArrayStreamReaderReadSchemaIfNeeded(private_data));

  // Read + decode the next header
  int result = ArrowIpcArrayStreamReaderNextHeader(
      private_data, NANOARROW_IPC_MESSAGE_TYPE_RECORD_BATCH);
  if (result == ENODATA) {
    // Stream is finished either because there is no input or because
    // end of stream bytes were read.
    out->release = NULL;
    return NANOARROW_OK;
  } else if (result != NANOARROW_OK) {
    // Other error
    return result;
  }

  // Make sure we have a RecordBatch message
  if (private_data->decoder.message_type != NANOARROW_IPC_MESSAGE_TYPE_RECORD_BATCH) {
    ArrowErrorSet(&private_data->error, "Unexpected message type (expected RecordBatch)");
    return EINVAL;
  }

  // Read in the body
  NANOARROW_RETURN_NOT_OK(ArrowIpcArrayStreamReaderNextBody(private_data));

  struct ArrowArray tmp;

  if (private_data->use_shared_buffers) {
    struct ArrowIpcSharedBuffer shared;
    NANOARROW_RETURN_NOT_OK_WITH_ERROR(
        ArrowIpcSharedBufferInit(&shared, &private_data->body), &private_data->error);
    result = ArrowIpcDecoderDecodeArrayFromShared(
        &private_data->decoder, &shared, private_data->field_index, &tmp,
        NANOARROW_VALIDATION_LEVEL_FULL, &private_data->error);
    ArrowIpcSharedBufferReset(&shared);
    NANOARROW_RETURN_NOT_OK(result);
  } else {
    struct ArrowBufferView body_view;
    body_view.data.data = private_data->body.data;
    body_view.size_bytes = private_data->body.size_bytes;

    NANOARROW_RETURN_NOT_OK(ArrowIpcDecoderDecodeArray(
        &private_data->decoder, body_view, private_data->field_index, &tmp,
        NANOARROW_VALIDATION_LEVEL_FULL, &private_data->error));
  }

  ArrowArrayMove(&tmp, out);
  return NANOARROW_OK;
}

static const char* ArrowIpcArrayStreamReaderGetLastError(
    struct ArrowArrayStream* stream) {
  struct ArrowIpcArrayStreamReaderPrivate* private_data =
      (struct ArrowIpcArrayStreamReaderPrivate*)stream->private_data;
  return private_data->error.message;
}

ArrowErrorCode ArrowIpcArrayStreamReaderInit(
    struct ArrowArrayStream* out, struct ArrowIpcInputStream* input_stream,
    struct ArrowIpcArrayStreamReaderOptions* options) {
  struct ArrowIpcArrayStreamReaderPrivate* private_data =
      (struct ArrowIpcArrayStreamReaderPrivate*)ArrowMalloc(
          sizeof(struct ArrowIpcArrayStreamReaderPrivate));
  if (private_data == NULL) {
    return ENOMEM;
  }

  int result = ArrowIpcDecoderInit(&private_data->decoder);
  if (result != NANOARROW_OK) {
    ArrowFree(private_data);
    return result;
  }

  ArrowBufferInit(&private_data->header);
  ArrowBufferInit(&private_data->body);
  private_data->out_schema.release = NULL;
  ArrowIpcInputStreamMove(input_stream, &private_data->input);

  if (options != NULL) {
    private_data->field_index = options->field_index;
    private_data->use_shared_buffers = options->use_shared_buffers;
  } else {
    private_data->field_index = -1;
    private_data->use_shared_buffers = ArrowIpcSharedBufferIsThreadSafe();
  }

  out->private_data = private_data;
  out->get_schema = &ArrowIpcArrayStreamReaderGetSchema;
  out->get_next = &ArrowIpcArrayStreamReaderGetNext;
  out->get_last_error = &ArrowIpcArrayStreamReaderGetLastError;
  out->release = &ArrowIpcArrayStreamReaderRelease;

  return NANOARROW_OK;
}
