forked from mattvv/hectorsharp
/
SlicePredicate.cs
152 lines (141 loc) · 3.7 KB
/
SlicePredicate.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
/**
* Autogenerated by Thrift
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.IO;
using Thrift;
using Thrift.Collections;
using Thrift.Protocol;
using Thrift.Transport;
namespace Apache.Cassandra
{
[Serializable]
public partial class SlicePredicate : TBase
{
private List<byte[]> column_names;
private SliceRange slice_range;
public List<byte[]> Column_names
{
get
{
return column_names;
}
set
{
__isset.column_names = true;
this.column_names = value;
}
}
public SliceRange Slice_range
{
get
{
return slice_range;
}
set
{
__isset.slice_range = true;
this.slice_range = value;
}
}
public Isset __isset;
[Serializable]
public struct Isset {
public bool column_names;
public bool slice_range;
}
public SlicePredicate() {
}
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.List) {
{
this.column_names = new List<byte[]>();
TList _list4 = iprot.ReadListBegin();
for( int _i5 = 0; _i5 < _list4.Count; ++_i5)
{
byte[] _elem6 = null;
_elem6 = iprot.ReadBinary();
this.column_names.Add(_elem6);
}
iprot.ReadListEnd();
}
this.__isset.column_names = true;
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 2:
if (field.Type == TType.Struct) {
this.slice_range = new SliceRange();
this.slice_range.Read(iprot);
this.__isset.slice_range = true;
} 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("SlicePredicate");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (this.column_names != null && __isset.column_names) {
field.Name = "column_names";
field.Type = TType.List;
field.ID = 1;
oprot.WriteFieldBegin(field);
{
oprot.WriteListBegin(new TList(TType.String, this.column_names.Count));
foreach (byte[] _iter7 in this.column_names)
{
oprot.WriteBinary(_iter7);
oprot.WriteListEnd();
}
}
oprot.WriteFieldEnd();
}
if (this.slice_range != null && __isset.slice_range) {
field.Name = "slice_range";
field.Type = TType.Struct;
field.ID = 2;
oprot.WriteFieldBegin(field);
this.slice_range.Write(oprot);
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
public override string ToString() {
StringBuilder sb = new StringBuilder("SlicePredicate(");
sb.Append("column_names: ");
sb.Append(this.column_names);
sb.Append(",slice_range: ");
sb.Append(this.slice_range== null ? "<null>" : this.slice_range.ToString());
sb.Append(")");
return sb.ToString();
}
}
}