//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

using Ajuna.NetApi.Model.Types;
using Ajuna.NetApi.Model.Types.Base;
using Ajuna.NetApi.Model.Types.Primitive;
using System.Collections.Generic;


namespace Bajun.Network.NET.NetApiExt.Generated.Model.sp_runtime.generic.era
{
    
    
    public enum Era
    {
        
        Immortal = 0,
        
        Mortal1 = 1,
        
        Mortal2 = 2,
        
        Mortal3 = 3,
        
        Mortal4 = 4,
        
        Mortal5 = 5,
        
        Mortal6 = 6,
        
        Mortal7 = 7,
        
        Mortal8 = 8,
        
        Mortal9 = 9,
        
        Mortal10 = 10,
        
        Mortal11 = 11,
        
        Mortal12 = 12,
        
        Mortal13 = 13,
        
        Mortal14 = 14,
        
        Mortal15 = 15,
        
        Mortal16 = 16,
        
        Mortal17 = 17,
        
        Mortal18 = 18,
        
        Mortal19 = 19,
        
        Mortal20 = 20,
        
        Mortal21 = 21,
        
        Mortal22 = 22,
        
        Mortal23 = 23,
        
        Mortal24 = 24,
        
        Mortal25 = 25,
        
        Mortal26 = 26,
        
        Mortal27 = 27,
        
        Mortal28 = 28,
        
        Mortal29 = 29,
        
        Mortal30 = 30,
        
        Mortal31 = 31,
        
        Mortal32 = 32,
        
        Mortal33 = 33,
        
        Mortal34 = 34,
        
        Mortal35 = 35,
        
        Mortal36 = 36,
        
        Mortal37 = 37,
        
        Mortal38 = 38,
        
        Mortal39 = 39,
        
        Mortal40 = 40,
        
        Mortal41 = 41,
        
        Mortal42 = 42,
        
        Mortal43 = 43,
        
        Mortal44 = 44,
        
        Mortal45 = 45,
        
        Mortal46 = 46,
        
        Mortal47 = 47,
        
        Mortal48 = 48,
        
        Mortal49 = 49,
        
        Mortal50 = 50,
        
        Mortal51 = 51,
        
        Mortal52 = 52,
        
        Mortal53 = 53,
        
        Mortal54 = 54,
        
        Mortal55 = 55,
        
        Mortal56 = 56,
        
        Mortal57 = 57,
        
        Mortal58 = 58,
        
        Mortal59 = 59,
        
        Mortal60 = 60,
        
        Mortal61 = 61,
        
        Mortal62 = 62,
        
        Mortal63 = 63,
        
        Mortal64 = 64,
        
        Mortal65 = 65,
        
        Mortal66 = 66,
        
        Mortal67 = 67,
        
        Mortal68 = 68,
        
        Mortal69 = 69,
        
        Mortal70 = 70,
        
        Mortal71 = 71,
        
        Mortal72 = 72,
        
        Mortal73 = 73,
        
        Mortal74 = 74,
        
        Mortal75 = 75,
        
        Mortal76 = 76,
        
        Mortal77 = 77,
        
        Mortal78 = 78,
        
        Mortal79 = 79,
        
        Mortal80 = 80,
        
        Mortal81 = 81,
        
        Mortal82 = 82,
        
        Mortal83 = 83,
        
        Mortal84 = 84,
        
        Mortal85 = 85,
        
        Mortal86 = 86,
        
        Mortal87 = 87,
        
        Mortal88 = 88,
        
        Mortal89 = 89,
        
        Mortal90 = 90,
        
        Mortal91 = 91,
        
        Mortal92 = 92,
        
        Mortal93 = 93,
        
        Mortal94 = 94,
        
        Mortal95 = 95,
        
        Mortal96 = 96,
        
        Mortal97 = 97,
        
        Mortal98 = 98,
        
        Mortal99 = 99,
        
        Mortal100 = 100,
        
        Mortal101 = 101,
        
        Mortal102 = 102,
        
        Mortal103 = 103,
        
        Mortal104 = 104,
        
        Mortal105 = 105,
        
        Mortal106 = 106,
        
        Mortal107 = 107,
        
        Mortal108 = 108,
        
        Mortal109 = 109,
        
        Mortal110 = 110,
        
        Mortal111 = 111,
        
        Mortal112 = 112,
        
        Mortal113 = 113,
        
        Mortal114 = 114,
        
        Mortal115 = 115,
        
        Mortal116 = 116,
        
        Mortal117 = 117,
        
        Mortal118 = 118,
        
        Mortal119 = 119,
        
        Mortal120 = 120,
        
        Mortal121 = 121,
        
        Mortal122 = 122,
        
        Mortal123 = 123,
        
        Mortal124 = 124,
        
        Mortal125 = 125,
        
        Mortal126 = 126,
        
        Mortal127 = 127,
        
        Mortal128 = 128,
        
        Mortal129 = 129,
        
        Mortal130 = 130,
        
        Mortal131 = 131,
        
        Mortal132 = 132,
        
        Mortal133 = 133,
        
        Mortal134 = 134,
        
        Mortal135 = 135,
        
        Mortal136 = 136,
        
        Mortal137 = 137,
        
        Mortal138 = 138,
        
        Mortal139 = 139,
        
        Mortal140 = 140,
        
        Mortal141 = 141,
        
        Mortal142 = 142,
        
        Mortal143 = 143,
        
        Mortal144 = 144,
        
        Mortal145 = 145,
        
        Mortal146 = 146,
        
        Mortal147 = 147,
        
        Mortal148 = 148,
        
        Mortal149 = 149,
        
        Mortal150 = 150,
        
        Mortal151 = 151,
        
        Mortal152 = 152,
        
        Mortal153 = 153,
        
        Mortal154 = 154,
        
        Mortal155 = 155,
        
        Mortal156 = 156,
        
        Mortal157 = 157,
        
        Mortal158 = 158,
        
        Mortal159 = 159,
        
        Mortal160 = 160,
        
        Mortal161 = 161,
        
        Mortal162 = 162,
        
        Mortal163 = 163,
        
        Mortal164 = 164,
        
        Mortal165 = 165,
        
        Mortal166 = 166,
        
        Mortal167 = 167,
        
        Mortal168 = 168,
        
        Mortal169 = 169,
        
        Mortal170 = 170,
        
        Mortal171 = 171,
        
        Mortal172 = 172,
        
        Mortal173 = 173,
        
        Mortal174 = 174,
        
        Mortal175 = 175,
        
        Mortal176 = 176,
        
        Mortal177 = 177,
        
        Mortal178 = 178,
        
        Mortal179 = 179,
        
        Mortal180 = 180,
        
        Mortal181 = 181,
        
        Mortal182 = 182,
        
        Mortal183 = 183,
        
        Mortal184 = 184,
        
        Mortal185 = 185,
        
        Mortal186 = 186,
        
        Mortal187 = 187,
        
        Mortal188 = 188,
        
        Mortal189 = 189,
        
        Mortal190 = 190,
        
        Mortal191 = 191,
        
        Mortal192 = 192,
        
        Mortal193 = 193,
        
        Mortal194 = 194,
        
        Mortal195 = 195,
        
        Mortal196 = 196,
        
        Mortal197 = 197,
        
        Mortal198 = 198,
        
        Mortal199 = 199,
        
        Mortal200 = 200,
        
        Mortal201 = 201,
        
        Mortal202 = 202,
        
        Mortal203 = 203,
        
        Mortal204 = 204,
        
        Mortal205 = 205,
        
        Mortal206 = 206,
        
        Mortal207 = 207,
        
        Mortal208 = 208,
        
        Mortal209 = 209,
        
        Mortal210 = 210,
        
        Mortal211 = 211,
        
        Mortal212 = 212,
        
        Mortal213 = 213,
        
        Mortal214 = 214,
        
        Mortal215 = 215,
        
        Mortal216 = 216,
        
        Mortal217 = 217,
        
        Mortal218 = 218,
        
        Mortal219 = 219,
        
        Mortal220 = 220,
        
        Mortal221 = 221,
        
        Mortal222 = 222,
        
        Mortal223 = 223,
        
        Mortal224 = 224,
        
        Mortal225 = 225,
        
        Mortal226 = 226,
        
        Mortal227 = 227,
        
        Mortal228 = 228,
        
        Mortal229 = 229,
        
        Mortal230 = 230,
        
        Mortal231 = 231,
        
        Mortal232 = 232,
        
        Mortal233 = 233,
        
        Mortal234 = 234,
        
        Mortal235 = 235,
        
        Mortal236 = 236,
        
        Mortal237 = 237,
        
        Mortal238 = 238,
        
        Mortal239 = 239,
        
        Mortal240 = 240,
        
        Mortal241 = 241,
        
        Mortal242 = 242,
        
        Mortal243 = 243,
        
        Mortal244 = 244,
        
        Mortal245 = 245,
        
        Mortal246 = 246,
        
        Mortal247 = 247,
        
        Mortal248 = 248,
        
        Mortal249 = 249,
        
        Mortal250 = 250,
        
        Mortal251 = 251,
        
        Mortal252 = 252,
        
        Mortal253 = 253,
        
        Mortal254 = 254,
        
        Mortal255 = 255,
    }
    
    /// <summary>
    /// >> 472 - Variant[sp_runtime.generic.era.Era]
    /// </summary>
    public sealed class EnumEra : BaseEnumExt<Era, BaseVoid>
    {
        
        public override void Decode(byte[] byteArray, ref int p)
        {
            var start = p;
            var enumByte = byteArray[p];
            Value = (Era)System.Enum.Parse(typeof(Era), enumByte.ToString(), true);
            p += 1;
            Value2 = DecodeOneOf(enumByte, byteArray, ref p);
            TypeSize = p - start;
        }
        
        private Ajuna.NetApi.Model.Types.IType DecodeOneOf(byte value, byte[] byteArray, ref int p)
        {
            IType result;
            if (value == 0) { return null; };
            result = new U8();
            result.Decode(byteArray, ref p);
            return result;
        }
    }
}
