/
Employee.cs
70 lines (69 loc) · 1.63 KB
/
Employee.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// ------------------------------------------------------------------------------
// <auto-generated>
// Generated by ApacheAvroTestTool, version 1.10.0.0
// Changes to this file may cause incorrect behavior and will be lost if code
// is regenerated
// </auto-generated>
// ------------------------------------------------------------------------------
namespace TestSchema
{
using System;
using System.Collections.Generic;
using System.Text;
using Avro;
using Avro.Specific;
public partial class Employee : ISpecificRecord
{
public static Schema _SCHEMA = Avro.Schema.Parse("{\"type\":\"record\",\"name\":\"Employee\",\"aliases\": [\"EmployeeV2\"],\"namespace\":\"TestSchema\",\"fields\":[{\"name\":\"Na" +
"me\",\"type\":\"string\"},{\"name\":\"Age\",\"type\":\"int\"}]}");
private string _Name;
private int _Age;
public virtual Schema Schema
{
get
{
return Employee._SCHEMA;
}
}
public string Name
{
get
{
return this._Name;
}
set
{
this._Name = value;
}
}
public int Age
{
get
{
return this._Age;
}
set
{
this._Age = value;
}
}
public virtual object Get(int fieldPos)
{
switch (fieldPos)
{
case 0: return this.Name;
case 1: return this.Age;
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.Age = (System.Int32)fieldValue; break;
default: throw new AvroRuntimeException("Bad index " + fieldPos + " in Put()");
};
}
}
}