// ------------------------------------------------------------------------------
// <auto-generated>
//    Generated by AvroGen, version 1.11.1
//    Changes to this file may cause incorrect behavior and will be lost if code
//    is regenerated
// </auto-generated>
// ------------------------------------------------------------------------------

namespace BigQueryStorage.Samples.Utilities
{
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("AvroGen", "1.11.1")]
    public partial class BabyNamesData : global::Avro.Specific.ISpecificRecord
    {
        public static global::Avro.Schema _SCHEMA = global::Avro.Schema.Parse(@"{""type"":""record"",""name"":""BabyNamesData"",""namespace"":""AvroUtilities"",""fields"":[{""name"":""state"",""doc"":""2 - digit state code"",""type"":[""null"",""string""]},{""name"":""name"",""doc"":""Given name of a person at birth"",""type"":[""null"",""string""]},{""name"":""number"",""doc"":""Number of occurrences of the name"",""type"":[""null"",""long""]}]}");
        /// <summary>
        /// 2 - digit state code
        /// </summary>
        private string _state;
        /// <summary>
        /// Given name of a person at birth
        /// </summary>
        private string _name;
        /// <summary>
        /// Number of occurrences of the name
        /// </summary>
        private System.Nullable<System.Int64> _number;
        public virtual global::Avro.Schema Schema
        {
            get
            {
                return BabyNamesData._SCHEMA;
            }
        }
        /// <summary>
        /// 2 - digit state code
        /// </summary>
        public string state
        {
            get
            {
                return this._state;
            }
            set
            {
                this._state = value;
            }
        }
        /// <summary>
        /// Given name of a person at birth
        /// </summary>
        public string name
        {
            get
            {
                return this._name;
            }
            set
            {
                this._name = value;
            }
        }
        /// <summary>
        /// Number of occurrences of the name
        /// </summary>
        public System.Nullable<System.Int64> number
        {
            get
            {
                return this._number;
            }
            set
            {
                this._number = value;
            }
        }
        public virtual object Get(int fieldPos)
        {
            switch (fieldPos)
            {
                case 0: return this.state;
                case 1: return this.name;
                case 2: return this.number;
                default: throw new global::Avro.AvroRuntimeException("Bad index " + fieldPos + " in Get()");
            };
        }
        public virtual void Put(int fieldPos, object fieldValue)
        {
            switch (fieldPos)
            {
                case 0: this.state = (System.String)fieldValue; break;
                case 1: this.name = (System.String)fieldValue; break;
                case 2: this.number = (System.Nullable<System.Int64>)fieldValue; break;
                default: throw new global::Avro.AvroRuntimeException("Bad index " + fieldPos + " in Put()");
            };
        }
    }

}
