| // ------------------------------------------------------------------------------ |
| // <auto-generated> |
| // 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 |
| // </auto-generated> |
| // ------------------------------------------------------------------------------ |
| namespace org.apache.avro.test |
| { |
| using System; |
| using System.Collections.Generic; |
| using System.Text; |
| using Avro; |
| using Avro.Specific; |
| |
| public partial class AllTestRecord : ISpecificRecord |
| { |
| private static Schema _SCHEMA = Avro.Schema.Parse(@"{""type"":""record"",""name"":""AllTestRecord"",""namespace"":""org.apache.avro.test"",""fields"":[{""name"":""booleanTest"",""type"":""boolean""},{""name"":""intTest"",""type"":""int""},{""name"":""longTest"",""type"":""long""},{""name"":""floatTest"",""type"":""float""},{""name"":""doubleTest"",""type"":""double""},{""name"":""bytesTest"",""type"":""bytes""},{""name"":""stringTest"",""type"":""string""},{""name"":""enumTest"",""type"":{""type"":""enum"",""name"":""AllEnum"",""namespace"":""org.apache.avro.test"",""symbols"":[""FOO"",""BAR""]}},{""name"":""fixedTest"",""type"":{""type"":""fixed"",""name"":""FixedTest"",""namespace"":""org.apache.avro.test"",""size"":10}},{""name"":""arrayTest"",""type"":{""type"":""array"",""items"":""long""}},{""name"":""mapTest"",""type"":{""type"":""map"",""values"":""long""}},{""name"":""nestedTest"",""type"":[""AllTestRecord"",""null""]}]}"); |
| private bool _booleanTest; |
| private int _intTest; |
| private long _longTest; |
| private float _floatTest; |
| private double _doubleTest; |
| private byte[] _bytesTest; |
| private string _stringTest; |
| private org.apache.avro.test.AllEnum _enumTest; |
| private org.apache.avro.test.FixedTest _fixedTest; |
| private IList<System.Int64> _arrayTest; |
| private IDictionary<string,System.Int64> _mapTest; |
| private org.apache.avro.test.AllTestRecord _nestedTest; |
| public virtual Schema Schema |
| { |
| get |
| { |
| return AllTestRecord._SCHEMA; |
| } |
| } |
| public bool booleanTest |
| { |
| get |
| { |
| return this._booleanTest; |
| } |
| set |
| { |
| this._booleanTest = value; |
| } |
| } |
| public int intTest |
| { |
| get |
| { |
| return this._intTest; |
| } |
| set |
| { |
| this._intTest = value; |
| } |
| } |
| public long longTest |
| { |
| get |
| { |
| return this._longTest; |
| } |
| set |
| { |
| this._longTest = value; |
| } |
| } |
| public float floatTest |
| { |
| get |
| { |
| return this._floatTest; |
| } |
| set |
| { |
| this._floatTest = value; |
| } |
| } |
| public double doubleTest |
| { |
| get |
| { |
| return this._doubleTest; |
| } |
| set |
| { |
| this._doubleTest = value; |
| } |
| } |
| public byte[] bytesTest |
| { |
| get |
| { |
| return this._bytesTest; |
| } |
| set |
| { |
| this._bytesTest = value; |
| } |
| } |
| public string stringTest |
| { |
| get |
| { |
| return this._stringTest; |
| } |
| set |
| { |
| this._stringTest = value; |
| } |
| } |
| public org.apache.avro.test.AllEnum enumTest |
| { |
| get |
| { |
| return this._enumTest; |
| } |
| set |
| { |
| this._enumTest = value; |
| } |
| } |
| public org.apache.avro.test.FixedTest fixedTest |
| { |
| get |
| { |
| return this._fixedTest; |
| } |
| set |
| { |
| this._fixedTest = value; |
| } |
| } |
| public IList<System.Int64> arrayTest |
| { |
| get |
| { |
| return this._arrayTest; |
| } |
| set |
| { |
| this._arrayTest = value; |
| } |
| } |
| public IDictionary<string,System.Int64> mapTest |
| { |
| get |
| { |
| return this._mapTest; |
| } |
| set |
| { |
| this._mapTest = value; |
| } |
| } |
| public org.apache.avro.test.AllTestRecord nestedTest |
| { |
| get |
| { |
| return this._nestedTest; |
| } |
| set |
| { |
| this._nestedTest = value; |
| } |
| } |
| public virtual object Get(int fieldPos) |
| { |
| switch (fieldPos) |
| { |
| case 0: return this.booleanTest; |
| case 1: return this.intTest; |
| case 2: return this.longTest; |
| case 3: return this.floatTest; |
| case 4: return this.doubleTest; |
| case 5: return this.bytesTest; |
| case 6: return this.stringTest; |
| case 7: return this.enumTest; |
| case 8: return this.fixedTest; |
| case 9: return this.arrayTest; |
| case 10: return this.mapTest; |
| case 11: return this.nestedTest; |
| default: throw new AvroRuntimeException("Bad index " + fieldPos + " in Get()"); |
| }; |
| } |
| public virtual void Put(int fieldPos, object fieldValue) |
| { |
| switch (fieldPos) |
| { |
| case 0: this.booleanTest = (System.Boolean)fieldValue; break; |
| case 1: this.intTest = (System.Int32)fieldValue; break; |
| case 2: this.longTest = (System.Int64)fieldValue; break; |
| case 3: this.floatTest = (System.Single)fieldValue; break; |
| case 4: this.doubleTest = (System.Double)fieldValue; break; |
| case 5: this.bytesTest = (System.Byte[])fieldValue; break; |
| case 6: this.stringTest = (System.String)fieldValue; break; |
| case 7: this.enumTest = (org.apache.avro.test.AllEnum)fieldValue; break; |
| case 8: this.fixedTest = (org.apache.avro.test.FixedTest)fieldValue; break; |
| case 9: this.arrayTest = (IList<System.Int64>)fieldValue; break; |
| case 10: this.mapTest = (IDictionary<string,System.Int64>)fieldValue; break; |
| case 11: this.nestedTest = (org.apache.avro.test.AllTestRecord)fieldValue; break; |
| default: throw new AvroRuntimeException("Bad index " + fieldPos + " in Put()"); |
| }; |
| } |
| } |
| } |