blob: ed6c74d1c68fdfc9378988eed67e1c1fad703fad [file] [log] [blame]
// ------------------------------------------------------------------------------
// <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 Message : ISpecificRecord
{
private static Schema _SCHEMA = Avro.Schema.Parse("{\"type\":\"record\",\"name\":\"Message\",\"namespace\":\"org.apache.avro.test\",\"fields\":[{\"" +
"name\":\"to\",\"type\":\"string\"},{\"name\":\"from\",\"type\":\"string\"},{\"name\":\"body\",\"type" +
"\":\"string\"}]}");
private string _to;
private string _from;
private string _body;
public virtual Schema Schema
{
get
{
return Message._SCHEMA;
}
}
public string to
{
get
{
return this._to;
}
set
{
this._to = value;
}
}
public string from
{
get
{
return this._from;
}
set
{
this._from = value;
}
}
public string body
{
get
{
return this._body;
}
set
{
this._body = value;
}
}
public virtual object Get(int fieldPos)
{
switch (fieldPos)
{
case 0: return this.to;
case 1: return this.from;
case 2: return this.body;
default: throw new AvroRuntimeException("Bad index " + fieldPos + " in Get()");
};
}
public virtual void Put(int fieldPos, object fieldValue)
{
switch (fieldPos)
{
case 0: this.to = (System.String)fieldValue; break;
case 1: this.from = (System.String)fieldValue; break;
case 2: this.body = (System.String)fieldValue; break;
default: throw new AvroRuntimeException("Bad index " + fieldPos + " in Put()");
};
}
}
}