1// <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;
10using global::Google.FlatBuffers;
11
12public struct KeywordsInTable : IFlatbufferObject
13{
14 private Table __p;
15 public ByteBuffer ByteBuffer { get { return __p.bb; } }
16 public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_23_5_26(); }
17 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; } }
28 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; } }
30
31 public static Offset<KeywordTest.KeywordsInTable> CreateKeywordsInTable(FlatBufferBuilder builder,
32 KeywordTest.ABC @is = KeywordTest.ABC.@void,
33 KeywordTest.@public @private = KeywordTest.@public.NONE,
34 int type = 0,
35 bool @default = false) {
36 builder.StartTable(4);
37 KeywordsInTable.AddType(builder, type);
38 KeywordsInTable.AddPrivate(builder, @private);
39 KeywordsInTable.AddIs(builder, @is);
40 KeywordsInTable.AddDefault(builder, @default);
41 return KeywordsInTable.EndKeywordsInTable(builder);
42 }
43
44 public static void StartKeywordsInTable(FlatBufferBuilder builder) { builder.StartTable(4); }
45 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); }
48 public static void AddDefault(FlatBufferBuilder builder, bool @default) { builder.AddBool(3, @default, false); }
49 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;
62 _o.Default = this.Default;
63 }
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,
70 _o.Type,
71 _o.Default);
72 }
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; }
83 [Newtonsoft.Json.JsonProperty("default")]
84 public bool Default { get; set; }
85
86 public KeywordsInTableT() {
87 this.Is = KeywordTest.ABC.@void;
88 this.Private = KeywordTest.@public.NONE;
89 this.Type = 0;
90 this.Default = false;
91 }
92}
93
94
95static public class KeywordsInTableVerify
96{
97 static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
98 {
99 return verifier.VerifyTableStart(tablePos)
100 && verifier.VerifyField(tablePos, 4 /*Is*/, 4 /*KeywordTest.ABC*/, 4, false)
101 && verifier.VerifyField(tablePos, 6 /*Private*/, 4 /*KeywordTest.@public*/, 4, false)
102 && verifier.VerifyField(tablePos, 8 /*Type*/, 4 /*int*/, 4, false)
103 && verifier.VerifyField(tablePos, 10 /*Default*/, 1 /*bool*/, 1, false)
104 && verifier.VerifyTableEnd(tablePos);
105 }
106}
107
108}
View as plain text