// ------------------------------------------------------------------------------ // // Generated by avrogen.exe, version 0.9.0.0 // Changes to this file may cause incorrect behavior and will be lost if code // is regenerated // // ------------------------------------------------------------------------------ namespace com.foo { using System; using System.Collections.Generic; using System.Text; using Avro; using Avro.Specific; public partial class Complex : ISpecificRecord { public static Schema _SCHEMA = Avro.Schema.Parse(@"{""type"":""record"",""name"":""Complex"",""namespace"":""com.foo"",""fields"":[{""name"":""myUInt"",""type"":[""int"",""null""]},{""name"":""myULong"",""type"":[""long"",""null""]},{""name"":""myUBool"",""type"":[""boolean"",""null""]},{""name"":""myUDouble"",""type"":[""double"",""null""]},{""name"":""myUFloat"",""type"":[""float"",""null""]},{""name"":""myUBytes"",""type"":[""bytes"",""null""]},{""name"":""myUString"",""type"":[""string"",""null""]},{""name"":""myInt"",""type"":""int""},{""name"":""myLong"",""type"":""long""},{""name"":""myBool"",""type"":""boolean""},{""name"":""myDouble"",""type"":""double""},{""name"":""myFloat"",""type"":""float""},{""name"":""myBytes"",""type"":""bytes""},{""name"":""myString"",""type"":""string""},{""name"":""myNull"",""type"":""null""},{""name"":""myFixed"",""type"":{""type"":""fixed"",""name"":""MyFixed"",""namespace"":""com.foo"",""size"":16}},{""name"":""myA"",""type"":{""type"":""record"",""name"":""A"",""namespace"":""com.foo"",""fields"":[{""name"":""f1"",""type"":""long""}]}},{""name"":""myE"",""type"":{""type"":""enum"",""name"":""MyEnum"",""namespace"":""com.foo"",""symbols"":[""A"",""B"",""C""]}},{""name"":""myArray"",""type"":{""type"":""array"",""items"":""bytes""}},{""name"":""myArray2"",""type"":{""type"":""array"",""items"":{""type"":""record"",""name"":""newRec"",""namespace"":""com.foo"",""fields"":[{""name"":""f1"",""type"":""long""}]}}},{""name"":""myMap"",""type"":{""type"":""map"",""values"":""string""}},{""name"":""myMap2"",""type"":{""type"":""map"",""values"":""newRec""}},{""name"":""myObject"",""type"":[""MyEnum"",""A"",""null""]},{""name"":""myArray3"",""type"":{""type"":""array"",""items"":{""type"":""array"",""items"":[""double"",""string"",""null""]}}}]}"); private System.Nullable _myUInt; private System.Nullable _myULong; private System.Nullable _myUBool; private System.Nullable _myUDouble; private System.Nullable _myUFloat; private byte[] _myUBytes; private string _myUString; private int _myInt; private long _myLong; private bool _myBool; private double _myDouble; private float _myFloat; private byte[] _myBytes; private string _myString; private object _myNull; private com.foo.MyFixed _myFixed; private com.foo.A _myA; private com.foo.MyEnum _myE; private IList _myArray; private IList _myArray2; private IDictionary _myMap; private IDictionary _myMap2; private object _myObject; private IList> _myArray3; public virtual Schema Schema { get { return Complex._SCHEMA; } } public System.Nullable myUInt { get { return this._myUInt; } set { this._myUInt = value; } } public System.Nullable myULong { get { return this._myULong; } set { this._myULong = value; } } public System.Nullable myUBool { get { return this._myUBool; } set { this._myUBool = value; } } public System.Nullable myUDouble { get { return this._myUDouble; } set { this._myUDouble = value; } } public System.Nullable myUFloat { get { return this._myUFloat; } set { this._myUFloat = value; } } public byte[] myUBytes { get { return this._myUBytes; } set { this._myUBytes = value; } } public string myUString { get { return this._myUString; } set { this._myUString = value; } } public int myInt { get { return this._myInt; } set { this._myInt = value; } } public long myLong { get { return this._myLong; } set { this._myLong = value; } } public bool myBool { get { return this._myBool; } set { this._myBool = value; } } public double myDouble { get { return this._myDouble; } set { this._myDouble = value; } } public float myFloat { get { return this._myFloat; } set { this._myFloat = value; } } public byte[] myBytes { get { return this._myBytes; } set { this._myBytes = value; } } public string myString { get { return this._myString; } set { this._myString = value; } } public object myNull { get { return this._myNull; } set { this._myNull = value; } } public com.foo.MyFixed myFixed { get { return this._myFixed; } set { this._myFixed = value; } } public com.foo.A myA { get { return this._myA; } set { this._myA = value; } } public com.foo.MyEnum myE { get { return this._myE; } set { this._myE = value; } } public IList myArray { get { return this._myArray; } set { this._myArray = value; } } public IList myArray2 { get { return this._myArray2; } set { this._myArray2 = value; } } public IDictionary myMap { get { return this._myMap; } set { this._myMap = value; } } public IDictionary myMap2 { get { return this._myMap2; } set { this._myMap2 = value; } } public object myObject { get { return this._myObject; } set { this._myObject = value; } } public IList> myArray3 { get { return this._myArray3; } set { this._myArray3 = value; } } public virtual object Get(int fieldPos) { switch (fieldPos) { case 0: return this.myUInt; case 1: return this.myULong; case 2: return this.myUBool; case 3: return this.myUDouble; case 4: return this.myUFloat; case 5: return this.myUBytes; case 6: return this.myUString; case 7: return this.myInt; case 8: return this.myLong; case 9: return this.myBool; case 10: return this.myDouble; case 11: return this.myFloat; case 12: return this.myBytes; case 13: return this.myString; case 14: return this.myNull; case 15: return this.myFixed; case 16: return this.myA; case 17: return this.myE; case 18: return this.myArray; case 19: return this.myArray2; case 20: return this.myMap; case 21: return this.myMap2; case 22: return this.myObject; case 23: return this.myArray3; default: throw new AvroRuntimeException("Bad index " + fieldPos + " in Get()"); }; } public virtual void Put(int fieldPos, object fieldValue) { switch (fieldPos) { case 0: this.myUInt = (System.Nullable)fieldValue; break; case 1: this.myULong = (System.Nullable)fieldValue; break; case 2: this.myUBool = (System.Nullable)fieldValue; break; case 3: this.myUDouble = (System.Nullable)fieldValue; break; case 4: this.myUFloat = (System.Nullable)fieldValue; break; case 5: this.myUBytes = (System.Byte[])fieldValue; break; case 6: this.myUString = (System.String)fieldValue; break; case 7: this.myInt = (System.Int32)fieldValue; break; case 8: this.myLong = (System.Int64)fieldValue; break; case 9: this.myBool = (System.Boolean)fieldValue; break; case 10: this.myDouble = (System.Double)fieldValue; break; case 11: this.myFloat = (System.Single)fieldValue; break; case 12: this.myBytes = (System.Byte[])fieldValue; break; case 13: this.myString = (System.String)fieldValue; break; case 14: this.myNull = (System.Object)fieldValue; break; case 15: this.myFixed = (com.foo.MyFixed)fieldValue; break; case 16: this.myA = (com.foo.A)fieldValue; break; case 17: this.myE = (com.foo.MyEnum)fieldValue; break; case 18: this.myArray = (IList)fieldValue; break; case 19: this.myArray2 = (IList)fieldValue; break; case 20: this.myMap = (IDictionary)fieldValue; break; case 21: this.myMap2 = (IDictionary)fieldValue; break; case 22: this.myObject = (System.Object)fieldValue; break; case 23: this.myArray3 = (IList>)fieldValue; break; default: throw new AvroRuntimeException("Bad index " + fieldPos + " in Put()"); }; } } }