// ------------------------------------------------------------------------------
// <auto-generated>
//    Generated by MSBuild.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.ipc
{
	using System;
	using System.Collections.Generic;
	using System.Text;
	using Avro;
	using Avro.Specific;
	
	public partial class HandshakeResponse : ISpecificRecord
	{
		private static Schema _SCHEMA = Avro.Schema.Parse(@"{""type"":""record"",""name"":""HandshakeResponse"",""namespace"":""org.apache.avro.ipc"",""fields"":[{""name"":""match"",""type"":{""type"":""enum"",""name"":""HandshakeMatch"",""namespace"":""org.apache.avro.ipc"",""symbols"":[""BOTH"",""CLIENT"",""NONE""]}},{""name"":""serverProtocol"",""type"":[""null"",""string""]},{""name"":""serverHash"",""type"":[""null"",{""type"":""fixed"",""name"":""MD5"",""namespace"":""org.apache.avro.ipc"",""size"":16}]},{""name"":""meta"",""type"":[""null"",{""type"":""map"",""values"":""bytes""}]}]}");
		private org.apache.avro.ipc.HandshakeMatch _match;
		private string _serverProtocol;
		private org.apache.avro.ipc.MD5 _serverHash;
		private IDictionary<string,System.Byte[]> _meta;
		public virtual Schema Schema
		{
			get
			{
				return HandshakeResponse._SCHEMA;
			}
		}
		public org.apache.avro.ipc.HandshakeMatch match
		{
			get
			{
				return this._match;
			}
			set
			{
				this._match = value;
			}
		}
		public string serverProtocol
		{
			get
			{
				return this._serverProtocol;
			}
			set
			{
				this._serverProtocol = value;
			}
		}
		public org.apache.avro.ipc.MD5 serverHash
		{
			get
			{
				return this._serverHash;
			}
			set
			{
				this._serverHash = value;
			}
		}
		public IDictionary<string,System.Byte[]> meta
		{
			get
			{
				return this._meta;
			}
			set
			{
				this._meta = value;
			}
		}
		public virtual object Get(int fieldPos)
		{
			switch (fieldPos)
			{
			case 0: return this.match;
			case 1: return this.serverProtocol;
			case 2: return this.serverHash;
			case 3: return this.meta;
			default: throw new AvroRuntimeException("Bad index " + fieldPos + " in Get()");
			};
		}
		public virtual void Put(int fieldPos, object fieldValue)
		{
			switch (fieldPos)
			{
			case 0: this.match = (org.apache.avro.ipc.HandshakeMatch)fieldValue; break;
			case 1: this.serverProtocol = (System.String)fieldValue; break;
			case 2: this.serverHash = (org.apache.avro.ipc.MD5)fieldValue; break;
			case 3: this.meta = (IDictionary<string,System.Byte[]>)fieldValue; break;
			default: throw new AvroRuntimeException("Bad index " + fieldPos + " in Put()");
			};
		}
	}
}
