This repository has been archived by the owner on May 25, 2021. It is now read-only.
/
CqlMetadata.cs
237 lines (223 loc) · 6.11 KB
/
CqlMetadata.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
using FluentCassandra.Thrift.Protocol;
/**
* Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
using System;
using System.Collections.Generic;
using System.Text;
namespace FluentCassandra.Apache.Cassandra
{
#if !SILVERLIGHT
[Serializable]
#endif
public partial class CqlMetadata : TBase
{
private Dictionary<byte[], string> _name_types;
private Dictionary<byte[], string> _value_types;
private string _default_name_type;
private string _default_value_type;
public Dictionary<byte[], string> Name_types
{
get
{
return _name_types;
}
set
{
__isset.name_types = true;
this._name_types = value;
}
}
public Dictionary<byte[], string> Value_types
{
get
{
return _value_types;
}
set
{
__isset.value_types = true;
this._value_types = value;
}
}
public string Default_name_type
{
get
{
return _default_name_type;
}
set
{
__isset.default_name_type = true;
this._default_name_type = value;
}
}
public string Default_value_type
{
get
{
return _default_value_type;
}
set
{
__isset.default_value_type = true;
this._default_value_type = value;
}
}
public Isset __isset;
#if !SILVERLIGHT
[Serializable]
#endif
public struct Isset {
public bool name_types;
public bool value_types;
public bool default_name_type;
public bool default_value_type;
}
public CqlMetadata() {
}
public void Read (TProtocol iprot)
{
TField field;
iprot.ReadStructBegin();
while (true)
{
field = iprot.ReadFieldBegin();
if (field.Type == TType.Stop) {
break;
}
switch (field.ID)
{
case 1:
if (field.Type == TType.Map) {
{
Name_types = new Dictionary<byte[], string>();
TMap _map73 = iprot.ReadMapBegin();
for( int _i74 = 0; _i74 < _map73.Count; ++_i74)
{
byte[] _key75;
string _val76;
_key75 = iprot.ReadBinary();
_val76 = iprot.ReadString();
Name_types[_key75] = _val76;
}
iprot.ReadMapEnd();
}
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 2:
if (field.Type == TType.Map) {
{
Value_types = new Dictionary<byte[], string>();
TMap _map77 = iprot.ReadMapBegin();
for( int _i78 = 0; _i78 < _map77.Count; ++_i78)
{
byte[] _key79;
string _val80;
_key79 = iprot.ReadBinary();
_val80 = iprot.ReadString();
Value_types[_key79] = _val80;
}
iprot.ReadMapEnd();
}
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 3:
if (field.Type == TType.String) {
Default_name_type = iprot.ReadString();
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 4:
if (field.Type == TType.String) {
Default_value_type = iprot.ReadString();
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
default:
TProtocolUtil.Skip(iprot, field.Type);
break;
}
iprot.ReadFieldEnd();
}
iprot.ReadStructEnd();
}
public void Write(TProtocol oprot) {
TStruct struc = new TStruct("CqlMetadata");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (Name_types != null && __isset.name_types) {
field.Name = "name_types";
field.Type = TType.Map;
field.ID = 1;
oprot.WriteFieldBegin(field);
{
oprot.WriteMapBegin(new TMap(TType.String, TType.String, Name_types.Count));
foreach (byte[] _iter81 in Name_types.Keys)
{
oprot.WriteBinary(_iter81);
oprot.WriteString(Name_types[_iter81]);
}
oprot.WriteMapEnd();
}
oprot.WriteFieldEnd();
}
if (Value_types != null && __isset.value_types) {
field.Name = "value_types";
field.Type = TType.Map;
field.ID = 2;
oprot.WriteFieldBegin(field);
{
oprot.WriteMapBegin(new TMap(TType.String, TType.String, Value_types.Count));
foreach (byte[] _iter82 in Value_types.Keys)
{
oprot.WriteBinary(_iter82);
oprot.WriteString(Value_types[_iter82]);
}
oprot.WriteMapEnd();
}
oprot.WriteFieldEnd();
}
if (Default_name_type != null && __isset.default_name_type) {
field.Name = "default_name_type";
field.Type = TType.String;
field.ID = 3;
oprot.WriteFieldBegin(field);
oprot.WriteString(Default_name_type);
oprot.WriteFieldEnd();
}
if (Default_value_type != null && __isset.default_value_type) {
field.Name = "default_value_type";
field.Type = TType.String;
field.ID = 4;
oprot.WriteFieldBegin(field);
oprot.WriteString(Default_value_type);
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
public override string ToString() {
StringBuilder sb = new StringBuilder("CqlMetadata(");
sb.Append("Name_types: ");
sb.Append(Name_types);
sb.Append(",Value_types: ");
sb.Append(Value_types);
sb.Append(",Default_name_type: ");
sb.Append(Default_name_type);
sb.Append(",Default_value_type: ");
sb.Append(Default_value_type);
sb.Append(")");
return sb.ToString();
}
}
}