forked from Azure/azure-schema-registry-for-kafka
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCustomerInvoice.cs
103 lines (102 loc) · 3.22 KB
/
CustomerInvoice.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
// ------------------------------------------------------------------------------
// <auto-generated>
// Generated by ignite-sr-consumer, version 1.10.0.0
// Changes to this file may cause incorrect behavior and will be lost if code
// is regenerated
// </auto-generated>
// ------------------------------------------------------------------------------
namespace com.azure.schemaregistry.samples
{
using System;
using System.Collections.Generic;
using System.Text;
using Avro;
using Avro.Specific;
/// <summary>
/// Schema for customer invoice data submitted from stores
/// </summary>
public partial class CustomerInvoice : ISpecificRecord
{
public static Schema _SCHEMA = Avro.Schema.Parse("{\"type\":\"record\",\"name\":\"CustomerInvoice\",\"namespace\":\"com.azure.schemaregistry.s" +
"amples\",\"fields\":[{\"name\":\"InvoiceId\",\"type\":\"string\"},{\"name\":\"MerchantId\",\"typ" +
"e\":\"string\"},{\"name\":\"TransactionValueUsd\",\"type\":\"int\"},{\"name\":\"UserId\",\"type\"" +
":\"string\"}]}");
private string _InvoiceId;
private string _MerchantId;
private int _TransactionValueUsd;
private string _UserId;
public virtual Schema Schema
{
get
{
return CustomerInvoice._SCHEMA;
}
}
public string InvoiceId
{
get
{
return this._InvoiceId;
}
set
{
this._InvoiceId = value;
}
}
public string MerchantId
{
get
{
return this._MerchantId;
}
set
{
this._MerchantId = value;
}
}
public int TransactionValueUsd
{
get
{
return this._TransactionValueUsd;
}
set
{
this._TransactionValueUsd = value;
}
}
public string UserId
{
get
{
return this._UserId;
}
set
{
this._UserId = value;
}
}
public virtual object Get(int fieldPos)
{
switch (fieldPos)
{
case 0: return this.InvoiceId;
case 1: return this.MerchantId;
case 2: return this.TransactionValueUsd;
case 3: return this.UserId;
default: throw new AvroRuntimeException("Bad index " + fieldPos + " in Get()");
};
}
public virtual void Put(int fieldPos, object fieldValue)
{
switch (fieldPos)
{
case 0: this.InvoiceId = (System.String)fieldValue; break;
case 1: this.MerchantId = (System.String)fieldValue; break;
case 2: this.TransactionValueUsd = (System.Int32)fieldValue; break;
case 3: this.UserId = (System.String)fieldValue; break;
default: throw new AvroRuntimeException("Bad index " + fieldPos + " in Put()");
};
}
}
}