// ------------------------------------------------------------------------------
// <auto-generated>
//    Generated by avrogen, version 1.11.0.0
//    Changes to this file may cause incorrect behavior and will be lost if code
//    is regenerated
// </auto-generated>
// ------------------------------------------------------------------------------
namespace AvroUtilities
{
	using System;
	using System.Collections.Generic;
	using System.Text;
	using Avro;
	using Avro.Specific;

	/// <summary>
	/// A list of states in the United States of America.
	/// </summary>
	public partial class State : ISpecificRecord
	{
		public static Schema _SCHEMA = Avro.Schema.Parse("{\"type\":\"record\",\"name\":\"State\",\"namespace\":\"utilities\",\"fields\":[{\"name\":\"name\"," +
				"\"doc\":\"The common name of the state.\",\"type\":\"string\"},{\"name\":\"post_abbr\",\"doc\"" +
				":\"The postal code abbreviation of the state.\",\"type\":\"string\"}]}");
		/// <summary>
		/// The common name of the state.
		/// </summary>
		private string _name;
		/// <summary>
		/// The postal code abbreviation of the state.
		/// </summary>
		private string _post_abbr;
		public virtual Schema Schema
		{
			get
			{
				return State._SCHEMA;
			}
		}
		/// <summary>
		/// The common name of the state.
		/// </summary>
		public string name
		{
			get
			{
				return this._name;
			}
			set
			{
				this._name = value;
			}
		}
		/// <summary>
		/// The postal code abbreviation of the state.
		/// </summary>
		public string post_abbr
		{
			get
			{
				return this._post_abbr;
			}
			set
			{
				this._post_abbr = value;
			}
		}
		public virtual object Get(int fieldPos)
		{
			switch (fieldPos)
			{
			case 0: return this.name;
			case 1: return this.post_abbr;
			default: throw new AvroRuntimeException("Bad index " + fieldPos + " in Get()");
			};
		}
		public virtual void Put(int fieldPos, object fieldValue)
		{
			switch (fieldPos)
			{
			case 0: this.name = (System.String)fieldValue; break;
			case 1: this.post_abbr = (System.String)fieldValue; break;
			default: throw new AvroRuntimeException("Bad index " + fieldPos + " in Put()");
			};
		}
	}
}
