| /** |
| * Licensed to the Apache Software Foundation (ASF) under one |
| * or more contributor license agreements. See the NOTICE file |
| * distributed with this work for additional information |
| * regarding copyright ownership. The ASF licenses this file |
| * to you under the Apache License, Version 2.0 (the |
| * "License"); you may not use this file except in compliance |
| * with the License. You may obtain a copy of the License at |
| * |
| * https://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| // ------------------------------------------------------------------------------ |
| // <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 org.apache.avro.benchmark.big |
| { |
| using System; |
| using System.Collections.Generic; |
| using System.Text; |
| using Avro; |
| using Avro.Specific; |
| |
| public partial class userInfo : ISpecificRecord |
| { |
| public static Schema _SCHEMA = Avro.Schema.Parse(@"{""type"":""record"",""name"":""userInfo"",""namespace"":""org.apache.avro.benchmark.big"",""fields"":[{""name"":""username"",""default"":""NONE"",""type"":""string""},{""name"":""age"",""default"":-1,""type"":""int""},{""name"":""phone"",""default"":""NONE"",""type"":""string""},{""name"":""housenum"",""default"":""NONE"",""type"":""string""},{""name"":""address"",""default"":{},""type"":{""type"":""record"",""name"":""mailing_address"",""namespace"":""org.apache.avro.benchmark.big"",""fields"":[{""name"":""street"",""default"":""NONE"",""type"":""string""},{""name"":""city"",""default"":""NONE"",""type"":""string""},{""name"":""state_prov"",""default"":""NONE"",""type"":""string""},{""name"":""country"",""default"":""NONE"",""type"":""string""},{""name"":""zip"",""default"":""NONE"",""type"":""string""}]}}]}"); |
| private string _username; |
| private int _age; |
| private string _phone; |
| private string _housenum; |
| private org.apache.avro.benchmark.big.mailing_address _address; |
| public virtual Schema Schema |
| { |
| get |
| { |
| return userInfo._SCHEMA; |
| } |
| } |
| public string username |
| { |
| get |
| { |
| return this._username; |
| } |
| set |
| { |
| this._username = value; |
| } |
| } |
| public int age |
| { |
| get |
| { |
| return this._age; |
| } |
| set |
| { |
| this._age = value; |
| } |
| } |
| public string phone |
| { |
| get |
| { |
| return this._phone; |
| } |
| set |
| { |
| this._phone = value; |
| } |
| } |
| public string housenum |
| { |
| get |
| { |
| return this._housenum; |
| } |
| set |
| { |
| this._housenum = value; |
| } |
| } |
| public org.apache.avro.benchmark.big.mailing_address address |
| { |
| get |
| { |
| return this._address; |
| } |
| set |
| { |
| this._address = value; |
| } |
| } |
| public virtual object Get(int fieldPos) |
| { |
| switch (fieldPos) |
| { |
| case 0: return this.username; |
| case 1: return this.age; |
| case 2: return this.phone; |
| case 3: return this.housenum; |
| case 4: return this.address; |
| default: throw new AvroRuntimeException("Bad index " + fieldPos + " in Get()"); |
| }; |
| } |
| public virtual void Put(int fieldPos, object fieldValue) |
| { |
| switch (fieldPos) |
| { |
| case 0: this.username = (System.String)fieldValue; break; |
| case 1: this.age = (System.Int32)fieldValue; break; |
| case 2: this.phone = (System.String)fieldValue; break; |
| case 3: this.housenum = (System.String)fieldValue; break; |
| case 4: this.address = (org.apache.avro.benchmark.big.mailing_address)fieldValue; break; |
| default: throw new AvroRuntimeException("Bad index " + fieldPos + " in Put()"); |
| }; |
| } |
| } |
| } |