blob: 271b21b3f84fd4aeb3e1eae42dc1fecb70634b70 [file] [log] [blame]
James Kuszmaul8e62b022022-03-22 09:33:25 -07001// <auto-generated>
2// automatically generated by the FlatBuffers compiler, do not modify
3// </auto-generated>
4
5namespace KeywordTest
6{
7
8using global::System;
9using global::System.Collections.Generic;
Austin Schuh2dd86a92022-09-14 21:19:23 -070010using global::Google.FlatBuffers;
James Kuszmaul8e62b022022-03-22 09:33:25 -070011
12public struct KeywordsInTable : IFlatbufferObject
13{
14 private Table __p;
15 public ByteBuffer ByteBuffer { get { return __p.bb; } }
James Kuszmaul3b15b0c2022-11-08 14:03:16 -080016 public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_22_10_26(); }
James Kuszmaul8e62b022022-03-22 09:33:25 -070017 public static KeywordsInTable GetRootAsKeywordsInTable(ByteBuffer _bb) { return GetRootAsKeywordsInTable(_bb, new KeywordsInTable()); }
18 public static KeywordsInTable GetRootAsKeywordsInTable(ByteBuffer _bb, KeywordsInTable obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
19 public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
20 public KeywordsInTable __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
21
22 public KeywordTest.ABC Is { get { int o = __p.__offset(4); return o != 0 ? (KeywordTest.ABC)__p.bb.GetInt(o + __p.bb_pos) : KeywordTest.ABC.@void; } }
23 public bool MutateIs(KeywordTest.ABC @is) { int o = __p.__offset(4); if (o != 0) { __p.bb.PutInt(o + __p.bb_pos, (int)@is); return true; } else { return false; } }
24 public KeywordTest.@public Private { get { int o = __p.__offset(6); return o != 0 ? (KeywordTest.@public)__p.bb.GetInt(o + __p.bb_pos) : KeywordTest.@public.NONE; } }
25 public bool MutatePrivate(KeywordTest.@public @private) { int o = __p.__offset(6); if (o != 0) { __p.bb.PutInt(o + __p.bb_pos, (int)@private); return true; } else { return false; } }
26 public int Type { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }
27 public bool MutateType(int type) { int o = __p.__offset(8); if (o != 0) { __p.bb.PutInt(o + __p.bb_pos, type); return true; } else { return false; } }
Austin Schuh2dd86a92022-09-14 21:19:23 -070028 public bool Default { get { int o = __p.__offset(10); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } }
29 public bool MutateDefault(bool @default) { int o = __p.__offset(10); if (o != 0) { __p.bb.Put(o + __p.bb_pos, (byte)(@default ? 1 : 0)); return true; } else { return false; } }
James Kuszmaul8e62b022022-03-22 09:33:25 -070030
31 public static Offset<KeywordTest.KeywordsInTable> CreateKeywordsInTable(FlatBufferBuilder builder,
32 KeywordTest.ABC @is = KeywordTest.ABC.@void,
33 KeywordTest.@public @private = KeywordTest.@public.NONE,
Austin Schuh2dd86a92022-09-14 21:19:23 -070034 int type = 0,
35 bool @default = false) {
36 builder.StartTable(4);
James Kuszmaul8e62b022022-03-22 09:33:25 -070037 KeywordsInTable.AddType(builder, type);
38 KeywordsInTable.AddPrivate(builder, @private);
39 KeywordsInTable.AddIs(builder, @is);
Austin Schuh2dd86a92022-09-14 21:19:23 -070040 KeywordsInTable.AddDefault(builder, @default);
James Kuszmaul8e62b022022-03-22 09:33:25 -070041 return KeywordsInTable.EndKeywordsInTable(builder);
42 }
43
Austin Schuh2dd86a92022-09-14 21:19:23 -070044 public static void StartKeywordsInTable(FlatBufferBuilder builder) { builder.StartTable(4); }
James Kuszmaul8e62b022022-03-22 09:33:25 -070045 public static void AddIs(FlatBufferBuilder builder, KeywordTest.ABC @is) { builder.AddInt(0, (int)@is, 0); }
46 public static void AddPrivate(FlatBufferBuilder builder, KeywordTest.@public @private) { builder.AddInt(1, (int)@private, 0); }
47 public static void AddType(FlatBufferBuilder builder, int type) { builder.AddInt(2, type, 0); }
Austin Schuh2dd86a92022-09-14 21:19:23 -070048 public static void AddDefault(FlatBufferBuilder builder, bool @default) { builder.AddBool(3, @default, false); }
James Kuszmaul8e62b022022-03-22 09:33:25 -070049 public static Offset<KeywordTest.KeywordsInTable> EndKeywordsInTable(FlatBufferBuilder builder) {
50 int o = builder.EndTable();
51 return new Offset<KeywordTest.KeywordsInTable>(o);
52 }
53 public KeywordsInTableT UnPack() {
54 var _o = new KeywordsInTableT();
55 this.UnPackTo(_o);
56 return _o;
57 }
58 public void UnPackTo(KeywordsInTableT _o) {
59 _o.Is = this.Is;
60 _o.Private = this.Private;
61 _o.Type = this.Type;
Austin Schuh2dd86a92022-09-14 21:19:23 -070062 _o.Default = this.Default;
James Kuszmaul8e62b022022-03-22 09:33:25 -070063 }
64 public static Offset<KeywordTest.KeywordsInTable> Pack(FlatBufferBuilder builder, KeywordsInTableT _o) {
65 if (_o == null) return default(Offset<KeywordTest.KeywordsInTable>);
66 return CreateKeywordsInTable(
67 builder,
68 _o.Is,
69 _o.Private,
Austin Schuh2dd86a92022-09-14 21:19:23 -070070 _o.Type,
71 _o.Default);
James Kuszmaul8e62b022022-03-22 09:33:25 -070072 }
73}
74
75public class KeywordsInTableT
76{
77 [Newtonsoft.Json.JsonProperty("is")]
78 public KeywordTest.ABC Is { get; set; }
79 [Newtonsoft.Json.JsonProperty("private")]
80 public KeywordTest.@public Private { get; set; }
81 [Newtonsoft.Json.JsonProperty("type")]
82 public int Type { get; set; }
Austin Schuh2dd86a92022-09-14 21:19:23 -070083 [Newtonsoft.Json.JsonProperty("default")]
84 public bool Default { get; set; }
James Kuszmaul8e62b022022-03-22 09:33:25 -070085
86 public KeywordsInTableT() {
87 this.Is = KeywordTest.ABC.@void;
88 this.Private = KeywordTest.@public.NONE;
89 this.Type = 0;
Austin Schuh2dd86a92022-09-14 21:19:23 -070090 this.Default = false;
James Kuszmaul8e62b022022-03-22 09:33:25 -070091 }
92}
93
94
95}