blob: 495671bdfb4697d36639e893b1b0c2b2b9b93ca8 [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;
10using global::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_2_0_0(); }
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
29 public static Offset<KeywordTest.KeywordsInTable> CreateKeywordsInTable(FlatBufferBuilder builder,
30 KeywordTest.ABC @is = KeywordTest.ABC.@void,
31 KeywordTest.@public @private = KeywordTest.@public.NONE,
32 int type = 0) {
33 builder.StartTable(3);
34 KeywordsInTable.AddType(builder, type);
35 KeywordsInTable.AddPrivate(builder, @private);
36 KeywordsInTable.AddIs(builder, @is);
37 return KeywordsInTable.EndKeywordsInTable(builder);
38 }
39
40 public static void StartKeywordsInTable(FlatBufferBuilder builder) { builder.StartTable(3); }
41 public static void AddIs(FlatBufferBuilder builder, KeywordTest.ABC @is) { builder.AddInt(0, (int)@is, 0); }
42 public static void AddPrivate(FlatBufferBuilder builder, KeywordTest.@public @private) { builder.AddInt(1, (int)@private, 0); }
43 public static void AddType(FlatBufferBuilder builder, int type) { builder.AddInt(2, type, 0); }
44 public static Offset<KeywordTest.KeywordsInTable> EndKeywordsInTable(FlatBufferBuilder builder) {
45 int o = builder.EndTable();
46 return new Offset<KeywordTest.KeywordsInTable>(o);
47 }
48 public KeywordsInTableT UnPack() {
49 var _o = new KeywordsInTableT();
50 this.UnPackTo(_o);
51 return _o;
52 }
53 public void UnPackTo(KeywordsInTableT _o) {
54 _o.Is = this.Is;
55 _o.Private = this.Private;
56 _o.Type = this.Type;
57 }
58 public static Offset<KeywordTest.KeywordsInTable> Pack(FlatBufferBuilder builder, KeywordsInTableT _o) {
59 if (_o == null) return default(Offset<KeywordTest.KeywordsInTable>);
60 return CreateKeywordsInTable(
61 builder,
62 _o.Is,
63 _o.Private,
64 _o.Type);
65 }
66}
67
68public class KeywordsInTableT
69{
70 [Newtonsoft.Json.JsonProperty("is")]
71 public KeywordTest.ABC Is { get; set; }
72 [Newtonsoft.Json.JsonProperty("private")]
73 public KeywordTest.@public Private { get; set; }
74 [Newtonsoft.Json.JsonProperty("type")]
75 public int Type { get; set; }
76
77 public KeywordsInTableT() {
78 this.Is = KeywordTest.ABC.@void;
79 this.Private = KeywordTest.@public.NONE;
80 this.Type = 0;
81 }
82}
83
84
85}