| 14384 |
kshitij.so |
1 |
/**
|
|
|
2 |
* Autogenerated by Thrift Compiler (0.7.0)
|
|
|
3 |
*
|
|
|
4 |
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
|
|
5 |
*/
|
|
|
6 |
package in.shop2020.model.v1.dtr;
|
|
|
7 |
|
|
|
8 |
import java.util.List;
|
|
|
9 |
import java.util.ArrayList;
|
|
|
10 |
import java.util.Map;
|
|
|
11 |
import java.util.HashMap;
|
|
|
12 |
import java.util.EnumMap;
|
|
|
13 |
import java.util.Set;
|
|
|
14 |
import java.util.HashSet;
|
|
|
15 |
import java.util.EnumSet;
|
|
|
16 |
import java.util.Collections;
|
|
|
17 |
import java.util.BitSet;
|
|
|
18 |
import java.nio.ByteBuffer;
|
|
|
19 |
import java.util.Arrays;
|
|
|
20 |
import org.slf4j.Logger;
|
|
|
21 |
import org.slf4j.LoggerFactory;
|
|
|
22 |
|
|
|
23 |
public class DtrService {
|
|
|
24 |
|
|
|
25 |
public interface Iface extends in.shop2020.generic.GenericService.Iface {
|
|
|
26 |
|
|
|
27 |
public List<LivePricing> getLatestPricing(long skuBundleId, long source_id) throws org.apache.thrift.TException;
|
|
|
28 |
|
|
|
29 |
}
|
|
|
30 |
|
|
|
31 |
public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
|
|
|
32 |
|
|
|
33 |
public void getLatestPricing(long skuBundleId, long source_id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getLatestPricing_call> resultHandler) throws org.apache.thrift.TException;
|
|
|
34 |
|
|
|
35 |
}
|
|
|
36 |
|
|
|
37 |
public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
|
|
|
38 |
public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
|
|
|
39 |
public Factory() {}
|
|
|
40 |
public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
|
|
|
41 |
return new Client(prot);
|
|
|
42 |
}
|
|
|
43 |
public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
|
|
|
44 |
return new Client(iprot, oprot);
|
|
|
45 |
}
|
|
|
46 |
}
|
|
|
47 |
|
|
|
48 |
public Client(org.apache.thrift.protocol.TProtocol prot)
|
|
|
49 |
{
|
|
|
50 |
super(prot, prot);
|
|
|
51 |
}
|
|
|
52 |
|
|
|
53 |
public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
|
|
|
54 |
super(iprot, oprot);
|
|
|
55 |
}
|
|
|
56 |
|
|
|
57 |
public List<LivePricing> getLatestPricing(long skuBundleId, long source_id) throws org.apache.thrift.TException
|
|
|
58 |
{
|
|
|
59 |
send_getLatestPricing(skuBundleId, source_id);
|
|
|
60 |
return recv_getLatestPricing();
|
|
|
61 |
}
|
|
|
62 |
|
|
|
63 |
public void send_getLatestPricing(long skuBundleId, long source_id) throws org.apache.thrift.TException
|
|
|
64 |
{
|
|
|
65 |
getLatestPricing_args args = new getLatestPricing_args();
|
|
|
66 |
args.setSkuBundleId(skuBundleId);
|
|
|
67 |
args.setSource_id(source_id);
|
|
|
68 |
sendBase("getLatestPricing", args);
|
|
|
69 |
}
|
|
|
70 |
|
|
|
71 |
public List<LivePricing> recv_getLatestPricing() throws org.apache.thrift.TException
|
|
|
72 |
{
|
|
|
73 |
getLatestPricing_result result = new getLatestPricing_result();
|
|
|
74 |
receiveBase(result, "getLatestPricing");
|
|
|
75 |
if (result.isSetSuccess()) {
|
|
|
76 |
return result.success;
|
|
|
77 |
}
|
|
|
78 |
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLatestPricing failed: unknown result");
|
|
|
79 |
}
|
|
|
80 |
|
|
|
81 |
}
|
|
|
82 |
public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
|
|
|
83 |
public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
|
|
|
84 |
private org.apache.thrift.async.TAsyncClientManager clientManager;
|
|
|
85 |
private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
|
|
|
86 |
public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
|
|
|
87 |
this.clientManager = clientManager;
|
|
|
88 |
this.protocolFactory = protocolFactory;
|
|
|
89 |
}
|
|
|
90 |
public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
|
|
|
91 |
return new AsyncClient(protocolFactory, clientManager, transport);
|
|
|
92 |
}
|
|
|
93 |
}
|
|
|
94 |
|
|
|
95 |
public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
|
|
|
96 |
super(protocolFactory, clientManager, transport);
|
|
|
97 |
}
|
|
|
98 |
|
|
|
99 |
public void getLatestPricing(long skuBundleId, long source_id, org.apache.thrift.async.AsyncMethodCallback<getLatestPricing_call> resultHandler) throws org.apache.thrift.TException {
|
|
|
100 |
checkReady();
|
|
|
101 |
getLatestPricing_call method_call = new getLatestPricing_call(skuBundleId, source_id, resultHandler, this, ___protocolFactory, ___transport);
|
|
|
102 |
this.___currentMethod = method_call;
|
|
|
103 |
___manager.call(method_call);
|
|
|
104 |
}
|
|
|
105 |
|
|
|
106 |
public static class getLatestPricing_call extends org.apache.thrift.async.TAsyncMethodCall {
|
|
|
107 |
private long skuBundleId;
|
|
|
108 |
private long source_id;
|
|
|
109 |
public getLatestPricing_call(long skuBundleId, long source_id, org.apache.thrift.async.AsyncMethodCallback<getLatestPricing_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
|
|
|
110 |
super(client, protocolFactory, transport, resultHandler, false);
|
|
|
111 |
this.skuBundleId = skuBundleId;
|
|
|
112 |
this.source_id = source_id;
|
|
|
113 |
}
|
|
|
114 |
|
|
|
115 |
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
|
|
|
116 |
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getLatestPricing", org.apache.thrift.protocol.TMessageType.CALL, 0));
|
|
|
117 |
getLatestPricing_args args = new getLatestPricing_args();
|
|
|
118 |
args.setSkuBundleId(skuBundleId);
|
|
|
119 |
args.setSource_id(source_id);
|
|
|
120 |
args.write(prot);
|
|
|
121 |
prot.writeMessageEnd();
|
|
|
122 |
}
|
|
|
123 |
|
|
|
124 |
public List<LivePricing> getResult() throws org.apache.thrift.TException {
|
|
|
125 |
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
|
|
|
126 |
throw new IllegalStateException("Method call not finished!");
|
|
|
127 |
}
|
|
|
128 |
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
|
|
|
129 |
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
|
|
|
130 |
return (new Client(prot)).recv_getLatestPricing();
|
|
|
131 |
}
|
|
|
132 |
}
|
|
|
133 |
|
|
|
134 |
}
|
|
|
135 |
|
|
|
136 |
public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
|
|
|
137 |
private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
|
|
|
138 |
public Processor(I iface) {
|
|
|
139 |
super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
|
|
|
140 |
}
|
|
|
141 |
|
|
|
142 |
protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
|
|
|
143 |
super(iface, getProcessMap(processMap));
|
|
|
144 |
}
|
|
|
145 |
|
|
|
146 |
private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
|
|
|
147 |
processMap.put("getLatestPricing", new getLatestPricing());
|
|
|
148 |
return processMap;
|
|
|
149 |
}
|
|
|
150 |
|
|
|
151 |
private static class getLatestPricing<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getLatestPricing_args> {
|
|
|
152 |
public getLatestPricing() {
|
|
|
153 |
super("getLatestPricing");
|
|
|
154 |
}
|
|
|
155 |
|
|
|
156 |
protected getLatestPricing_args getEmptyArgsInstance() {
|
|
|
157 |
return new getLatestPricing_args();
|
|
|
158 |
}
|
|
|
159 |
|
|
|
160 |
protected getLatestPricing_result getResult(I iface, getLatestPricing_args args) throws org.apache.thrift.TException {
|
|
|
161 |
getLatestPricing_result result = new getLatestPricing_result();
|
|
|
162 |
result.success = iface.getLatestPricing(args.skuBundleId, args.source_id);
|
|
|
163 |
return result;
|
|
|
164 |
}
|
|
|
165 |
}
|
|
|
166 |
|
|
|
167 |
}
|
|
|
168 |
|
|
|
169 |
public static class getLatestPricing_args implements org.apache.thrift.TBase<getLatestPricing_args, getLatestPricing_args._Fields>, java.io.Serializable, Cloneable {
|
|
|
170 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLatestPricing_args");
|
|
|
171 |
|
|
|
172 |
private static final org.apache.thrift.protocol.TField SKU_BUNDLE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("skuBundleId", org.apache.thrift.protocol.TType.I64, (short)1);
|
|
|
173 |
private static final org.apache.thrift.protocol.TField SOURCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("source_id", org.apache.thrift.protocol.TType.I64, (short)2);
|
|
|
174 |
|
|
|
175 |
private long skuBundleId; // required
|
|
|
176 |
private long source_id; // required
|
|
|
177 |
|
|
|
178 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
179 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
180 |
SKU_BUNDLE_ID((short)1, "skuBundleId"),
|
|
|
181 |
SOURCE_ID((short)2, "source_id");
|
|
|
182 |
|
|
|
183 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
184 |
|
|
|
185 |
static {
|
|
|
186 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
187 |
byName.put(field.getFieldName(), field);
|
|
|
188 |
}
|
|
|
189 |
}
|
|
|
190 |
|
|
|
191 |
/**
|
|
|
192 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
193 |
*/
|
|
|
194 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
195 |
switch(fieldId) {
|
|
|
196 |
case 1: // SKU_BUNDLE_ID
|
|
|
197 |
return SKU_BUNDLE_ID;
|
|
|
198 |
case 2: // SOURCE_ID
|
|
|
199 |
return SOURCE_ID;
|
|
|
200 |
default:
|
|
|
201 |
return null;
|
|
|
202 |
}
|
|
|
203 |
}
|
|
|
204 |
|
|
|
205 |
/**
|
|
|
206 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
207 |
* if it is not found.
|
|
|
208 |
*/
|
|
|
209 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
210 |
_Fields fields = findByThriftId(fieldId);
|
|
|
211 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
212 |
return fields;
|
|
|
213 |
}
|
|
|
214 |
|
|
|
215 |
/**
|
|
|
216 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
217 |
*/
|
|
|
218 |
public static _Fields findByName(String name) {
|
|
|
219 |
return byName.get(name);
|
|
|
220 |
}
|
|
|
221 |
|
|
|
222 |
private final short _thriftId;
|
|
|
223 |
private final String _fieldName;
|
|
|
224 |
|
|
|
225 |
_Fields(short thriftId, String fieldName) {
|
|
|
226 |
_thriftId = thriftId;
|
|
|
227 |
_fieldName = fieldName;
|
|
|
228 |
}
|
|
|
229 |
|
|
|
230 |
public short getThriftFieldId() {
|
|
|
231 |
return _thriftId;
|
|
|
232 |
}
|
|
|
233 |
|
|
|
234 |
public String getFieldName() {
|
|
|
235 |
return _fieldName;
|
|
|
236 |
}
|
|
|
237 |
}
|
|
|
238 |
|
|
|
239 |
// isset id assignments
|
|
|
240 |
private static final int __SKUBUNDLEID_ISSET_ID = 0;
|
|
|
241 |
private static final int __SOURCE_ID_ISSET_ID = 1;
|
|
|
242 |
private BitSet __isset_bit_vector = new BitSet(2);
|
|
|
243 |
|
|
|
244 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
245 |
static {
|
|
|
246 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
247 |
tmpMap.put(_Fields.SKU_BUNDLE_ID, new org.apache.thrift.meta_data.FieldMetaData("skuBundleId", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
248 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
249 |
tmpMap.put(_Fields.SOURCE_ID, new org.apache.thrift.meta_data.FieldMetaData("source_id", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
250 |
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
|
|
|
251 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
252 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLatestPricing_args.class, metaDataMap);
|
|
|
253 |
}
|
|
|
254 |
|
|
|
255 |
public getLatestPricing_args() {
|
|
|
256 |
}
|
|
|
257 |
|
|
|
258 |
public getLatestPricing_args(
|
|
|
259 |
long skuBundleId,
|
|
|
260 |
long source_id)
|
|
|
261 |
{
|
|
|
262 |
this();
|
|
|
263 |
this.skuBundleId = skuBundleId;
|
|
|
264 |
setSkuBundleIdIsSet(true);
|
|
|
265 |
this.source_id = source_id;
|
|
|
266 |
setSource_idIsSet(true);
|
|
|
267 |
}
|
|
|
268 |
|
|
|
269 |
/**
|
|
|
270 |
* Performs a deep copy on <i>other</i>.
|
|
|
271 |
*/
|
|
|
272 |
public getLatestPricing_args(getLatestPricing_args other) {
|
|
|
273 |
__isset_bit_vector.clear();
|
|
|
274 |
__isset_bit_vector.or(other.__isset_bit_vector);
|
|
|
275 |
this.skuBundleId = other.skuBundleId;
|
|
|
276 |
this.source_id = other.source_id;
|
|
|
277 |
}
|
|
|
278 |
|
|
|
279 |
public getLatestPricing_args deepCopy() {
|
|
|
280 |
return new getLatestPricing_args(this);
|
|
|
281 |
}
|
|
|
282 |
|
|
|
283 |
@Override
|
|
|
284 |
public void clear() {
|
|
|
285 |
setSkuBundleIdIsSet(false);
|
|
|
286 |
this.skuBundleId = 0;
|
|
|
287 |
setSource_idIsSet(false);
|
|
|
288 |
this.source_id = 0;
|
|
|
289 |
}
|
|
|
290 |
|
|
|
291 |
public long getSkuBundleId() {
|
|
|
292 |
return this.skuBundleId;
|
|
|
293 |
}
|
|
|
294 |
|
|
|
295 |
public void setSkuBundleId(long skuBundleId) {
|
|
|
296 |
this.skuBundleId = skuBundleId;
|
|
|
297 |
setSkuBundleIdIsSet(true);
|
|
|
298 |
}
|
|
|
299 |
|
|
|
300 |
public void unsetSkuBundleId() {
|
|
|
301 |
__isset_bit_vector.clear(__SKUBUNDLEID_ISSET_ID);
|
|
|
302 |
}
|
|
|
303 |
|
|
|
304 |
/** Returns true if field skuBundleId is set (has been assigned a value) and false otherwise */
|
|
|
305 |
public boolean isSetSkuBundleId() {
|
|
|
306 |
return __isset_bit_vector.get(__SKUBUNDLEID_ISSET_ID);
|
|
|
307 |
}
|
|
|
308 |
|
|
|
309 |
public void setSkuBundleIdIsSet(boolean value) {
|
|
|
310 |
__isset_bit_vector.set(__SKUBUNDLEID_ISSET_ID, value);
|
|
|
311 |
}
|
|
|
312 |
|
|
|
313 |
public long getSource_id() {
|
|
|
314 |
return this.source_id;
|
|
|
315 |
}
|
|
|
316 |
|
|
|
317 |
public void setSource_id(long source_id) {
|
|
|
318 |
this.source_id = source_id;
|
|
|
319 |
setSource_idIsSet(true);
|
|
|
320 |
}
|
|
|
321 |
|
|
|
322 |
public void unsetSource_id() {
|
|
|
323 |
__isset_bit_vector.clear(__SOURCE_ID_ISSET_ID);
|
|
|
324 |
}
|
|
|
325 |
|
|
|
326 |
/** Returns true if field source_id is set (has been assigned a value) and false otherwise */
|
|
|
327 |
public boolean isSetSource_id() {
|
|
|
328 |
return __isset_bit_vector.get(__SOURCE_ID_ISSET_ID);
|
|
|
329 |
}
|
|
|
330 |
|
|
|
331 |
public void setSource_idIsSet(boolean value) {
|
|
|
332 |
__isset_bit_vector.set(__SOURCE_ID_ISSET_ID, value);
|
|
|
333 |
}
|
|
|
334 |
|
|
|
335 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
336 |
switch (field) {
|
|
|
337 |
case SKU_BUNDLE_ID:
|
|
|
338 |
if (value == null) {
|
|
|
339 |
unsetSkuBundleId();
|
|
|
340 |
} else {
|
|
|
341 |
setSkuBundleId((Long)value);
|
|
|
342 |
}
|
|
|
343 |
break;
|
|
|
344 |
|
|
|
345 |
case SOURCE_ID:
|
|
|
346 |
if (value == null) {
|
|
|
347 |
unsetSource_id();
|
|
|
348 |
} else {
|
|
|
349 |
setSource_id((Long)value);
|
|
|
350 |
}
|
|
|
351 |
break;
|
|
|
352 |
|
|
|
353 |
}
|
|
|
354 |
}
|
|
|
355 |
|
|
|
356 |
public Object getFieldValue(_Fields field) {
|
|
|
357 |
switch (field) {
|
|
|
358 |
case SKU_BUNDLE_ID:
|
|
|
359 |
return Long.valueOf(getSkuBundleId());
|
|
|
360 |
|
|
|
361 |
case SOURCE_ID:
|
|
|
362 |
return Long.valueOf(getSource_id());
|
|
|
363 |
|
|
|
364 |
}
|
|
|
365 |
throw new IllegalStateException();
|
|
|
366 |
}
|
|
|
367 |
|
|
|
368 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
369 |
public boolean isSet(_Fields field) {
|
|
|
370 |
if (field == null) {
|
|
|
371 |
throw new IllegalArgumentException();
|
|
|
372 |
}
|
|
|
373 |
|
|
|
374 |
switch (field) {
|
|
|
375 |
case SKU_BUNDLE_ID:
|
|
|
376 |
return isSetSkuBundleId();
|
|
|
377 |
case SOURCE_ID:
|
|
|
378 |
return isSetSource_id();
|
|
|
379 |
}
|
|
|
380 |
throw new IllegalStateException();
|
|
|
381 |
}
|
|
|
382 |
|
|
|
383 |
@Override
|
|
|
384 |
public boolean equals(Object that) {
|
|
|
385 |
if (that == null)
|
|
|
386 |
return false;
|
|
|
387 |
if (that instanceof getLatestPricing_args)
|
|
|
388 |
return this.equals((getLatestPricing_args)that);
|
|
|
389 |
return false;
|
|
|
390 |
}
|
|
|
391 |
|
|
|
392 |
public boolean equals(getLatestPricing_args that) {
|
|
|
393 |
if (that == null)
|
|
|
394 |
return false;
|
|
|
395 |
|
|
|
396 |
boolean this_present_skuBundleId = true;
|
|
|
397 |
boolean that_present_skuBundleId = true;
|
|
|
398 |
if (this_present_skuBundleId || that_present_skuBundleId) {
|
|
|
399 |
if (!(this_present_skuBundleId && that_present_skuBundleId))
|
|
|
400 |
return false;
|
|
|
401 |
if (this.skuBundleId != that.skuBundleId)
|
|
|
402 |
return false;
|
|
|
403 |
}
|
|
|
404 |
|
|
|
405 |
boolean this_present_source_id = true;
|
|
|
406 |
boolean that_present_source_id = true;
|
|
|
407 |
if (this_present_source_id || that_present_source_id) {
|
|
|
408 |
if (!(this_present_source_id && that_present_source_id))
|
|
|
409 |
return false;
|
|
|
410 |
if (this.source_id != that.source_id)
|
|
|
411 |
return false;
|
|
|
412 |
}
|
|
|
413 |
|
|
|
414 |
return true;
|
|
|
415 |
}
|
|
|
416 |
|
|
|
417 |
@Override
|
|
|
418 |
public int hashCode() {
|
|
|
419 |
return 0;
|
|
|
420 |
}
|
|
|
421 |
|
|
|
422 |
public int compareTo(getLatestPricing_args other) {
|
|
|
423 |
if (!getClass().equals(other.getClass())) {
|
|
|
424 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
425 |
}
|
|
|
426 |
|
|
|
427 |
int lastComparison = 0;
|
|
|
428 |
getLatestPricing_args typedOther = (getLatestPricing_args)other;
|
|
|
429 |
|
|
|
430 |
lastComparison = Boolean.valueOf(isSetSkuBundleId()).compareTo(typedOther.isSetSkuBundleId());
|
|
|
431 |
if (lastComparison != 0) {
|
|
|
432 |
return lastComparison;
|
|
|
433 |
}
|
|
|
434 |
if (isSetSkuBundleId()) {
|
|
|
435 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.skuBundleId, typedOther.skuBundleId);
|
|
|
436 |
if (lastComparison != 0) {
|
|
|
437 |
return lastComparison;
|
|
|
438 |
}
|
|
|
439 |
}
|
|
|
440 |
lastComparison = Boolean.valueOf(isSetSource_id()).compareTo(typedOther.isSetSource_id());
|
|
|
441 |
if (lastComparison != 0) {
|
|
|
442 |
return lastComparison;
|
|
|
443 |
}
|
|
|
444 |
if (isSetSource_id()) {
|
|
|
445 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.source_id, typedOther.source_id);
|
|
|
446 |
if (lastComparison != 0) {
|
|
|
447 |
return lastComparison;
|
|
|
448 |
}
|
|
|
449 |
}
|
|
|
450 |
return 0;
|
|
|
451 |
}
|
|
|
452 |
|
|
|
453 |
public _Fields fieldForId(int fieldId) {
|
|
|
454 |
return _Fields.findByThriftId(fieldId);
|
|
|
455 |
}
|
|
|
456 |
|
|
|
457 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
458 |
org.apache.thrift.protocol.TField field;
|
|
|
459 |
iprot.readStructBegin();
|
|
|
460 |
while (true)
|
|
|
461 |
{
|
|
|
462 |
field = iprot.readFieldBegin();
|
|
|
463 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
464 |
break;
|
|
|
465 |
}
|
|
|
466 |
switch (field.id) {
|
|
|
467 |
case 1: // SKU_BUNDLE_ID
|
|
|
468 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
469 |
this.skuBundleId = iprot.readI64();
|
|
|
470 |
setSkuBundleIdIsSet(true);
|
|
|
471 |
} else {
|
|
|
472 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
473 |
}
|
|
|
474 |
break;
|
|
|
475 |
case 2: // SOURCE_ID
|
|
|
476 |
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
|
|
477 |
this.source_id = iprot.readI64();
|
|
|
478 |
setSource_idIsSet(true);
|
|
|
479 |
} else {
|
|
|
480 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
481 |
}
|
|
|
482 |
break;
|
|
|
483 |
default:
|
|
|
484 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
485 |
}
|
|
|
486 |
iprot.readFieldEnd();
|
|
|
487 |
}
|
|
|
488 |
iprot.readStructEnd();
|
|
|
489 |
validate();
|
|
|
490 |
}
|
|
|
491 |
|
|
|
492 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
493 |
validate();
|
|
|
494 |
|
|
|
495 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
496 |
oprot.writeFieldBegin(SKU_BUNDLE_ID_FIELD_DESC);
|
|
|
497 |
oprot.writeI64(this.skuBundleId);
|
|
|
498 |
oprot.writeFieldEnd();
|
|
|
499 |
oprot.writeFieldBegin(SOURCE_ID_FIELD_DESC);
|
|
|
500 |
oprot.writeI64(this.source_id);
|
|
|
501 |
oprot.writeFieldEnd();
|
|
|
502 |
oprot.writeFieldStop();
|
|
|
503 |
oprot.writeStructEnd();
|
|
|
504 |
}
|
|
|
505 |
|
|
|
506 |
@Override
|
|
|
507 |
public String toString() {
|
|
|
508 |
StringBuilder sb = new StringBuilder("getLatestPricing_args(");
|
|
|
509 |
boolean first = true;
|
|
|
510 |
|
|
|
511 |
sb.append("skuBundleId:");
|
|
|
512 |
sb.append(this.skuBundleId);
|
|
|
513 |
first = false;
|
|
|
514 |
if (!first) sb.append(", ");
|
|
|
515 |
sb.append("source_id:");
|
|
|
516 |
sb.append(this.source_id);
|
|
|
517 |
first = false;
|
|
|
518 |
sb.append(")");
|
|
|
519 |
return sb.toString();
|
|
|
520 |
}
|
|
|
521 |
|
|
|
522 |
public void validate() throws org.apache.thrift.TException {
|
|
|
523 |
// check for required fields
|
|
|
524 |
}
|
|
|
525 |
|
|
|
526 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
527 |
try {
|
|
|
528 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
529 |
} catch (org.apache.thrift.TException te) {
|
|
|
530 |
throw new java.io.IOException(te);
|
|
|
531 |
}
|
|
|
532 |
}
|
|
|
533 |
|
|
|
534 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
535 |
try {
|
|
|
536 |
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
|
|
|
537 |
__isset_bit_vector = new BitSet(1);
|
|
|
538 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
539 |
} catch (org.apache.thrift.TException te) {
|
|
|
540 |
throw new java.io.IOException(te);
|
|
|
541 |
}
|
|
|
542 |
}
|
|
|
543 |
|
|
|
544 |
}
|
|
|
545 |
|
|
|
546 |
public static class getLatestPricing_result implements org.apache.thrift.TBase<getLatestPricing_result, getLatestPricing_result._Fields>, java.io.Serializable, Cloneable {
|
|
|
547 |
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLatestPricing_result");
|
|
|
548 |
|
|
|
549 |
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
|
|
|
550 |
|
|
|
551 |
private List<LivePricing> success; // required
|
|
|
552 |
|
|
|
553 |
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
|
|
554 |
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
|
|
|
555 |
SUCCESS((short)0, "success");
|
|
|
556 |
|
|
|
557 |
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
|
|
|
558 |
|
|
|
559 |
static {
|
|
|
560 |
for (_Fields field : EnumSet.allOf(_Fields.class)) {
|
|
|
561 |
byName.put(field.getFieldName(), field);
|
|
|
562 |
}
|
|
|
563 |
}
|
|
|
564 |
|
|
|
565 |
/**
|
|
|
566 |
* Find the _Fields constant that matches fieldId, or null if its not found.
|
|
|
567 |
*/
|
|
|
568 |
public static _Fields findByThriftId(int fieldId) {
|
|
|
569 |
switch(fieldId) {
|
|
|
570 |
case 0: // SUCCESS
|
|
|
571 |
return SUCCESS;
|
|
|
572 |
default:
|
|
|
573 |
return null;
|
|
|
574 |
}
|
|
|
575 |
}
|
|
|
576 |
|
|
|
577 |
/**
|
|
|
578 |
* Find the _Fields constant that matches fieldId, throwing an exception
|
|
|
579 |
* if it is not found.
|
|
|
580 |
*/
|
|
|
581 |
public static _Fields findByThriftIdOrThrow(int fieldId) {
|
|
|
582 |
_Fields fields = findByThriftId(fieldId);
|
|
|
583 |
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
|
|
|
584 |
return fields;
|
|
|
585 |
}
|
|
|
586 |
|
|
|
587 |
/**
|
|
|
588 |
* Find the _Fields constant that matches name, or null if its not found.
|
|
|
589 |
*/
|
|
|
590 |
public static _Fields findByName(String name) {
|
|
|
591 |
return byName.get(name);
|
|
|
592 |
}
|
|
|
593 |
|
|
|
594 |
private final short _thriftId;
|
|
|
595 |
private final String _fieldName;
|
|
|
596 |
|
|
|
597 |
_Fields(short thriftId, String fieldName) {
|
|
|
598 |
_thriftId = thriftId;
|
|
|
599 |
_fieldName = fieldName;
|
|
|
600 |
}
|
|
|
601 |
|
|
|
602 |
public short getThriftFieldId() {
|
|
|
603 |
return _thriftId;
|
|
|
604 |
}
|
|
|
605 |
|
|
|
606 |
public String getFieldName() {
|
|
|
607 |
return _fieldName;
|
|
|
608 |
}
|
|
|
609 |
}
|
|
|
610 |
|
|
|
611 |
// isset id assignments
|
|
|
612 |
|
|
|
613 |
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
|
|
|
614 |
static {
|
|
|
615 |
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
|
|
|
616 |
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
|
|
|
617 |
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
|
|
|
618 |
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LivePricing.class))));
|
|
|
619 |
metaDataMap = Collections.unmodifiableMap(tmpMap);
|
|
|
620 |
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLatestPricing_result.class, metaDataMap);
|
|
|
621 |
}
|
|
|
622 |
|
|
|
623 |
public getLatestPricing_result() {
|
|
|
624 |
}
|
|
|
625 |
|
|
|
626 |
public getLatestPricing_result(
|
|
|
627 |
List<LivePricing> success)
|
|
|
628 |
{
|
|
|
629 |
this();
|
|
|
630 |
this.success = success;
|
|
|
631 |
}
|
|
|
632 |
|
|
|
633 |
/**
|
|
|
634 |
* Performs a deep copy on <i>other</i>.
|
|
|
635 |
*/
|
|
|
636 |
public getLatestPricing_result(getLatestPricing_result other) {
|
|
|
637 |
if (other.isSetSuccess()) {
|
|
|
638 |
List<LivePricing> __this__success = new ArrayList<LivePricing>();
|
|
|
639 |
for (LivePricing other_element : other.success) {
|
|
|
640 |
__this__success.add(new LivePricing(other_element));
|
|
|
641 |
}
|
|
|
642 |
this.success = __this__success;
|
|
|
643 |
}
|
|
|
644 |
}
|
|
|
645 |
|
|
|
646 |
public getLatestPricing_result deepCopy() {
|
|
|
647 |
return new getLatestPricing_result(this);
|
|
|
648 |
}
|
|
|
649 |
|
|
|
650 |
@Override
|
|
|
651 |
public void clear() {
|
|
|
652 |
this.success = null;
|
|
|
653 |
}
|
|
|
654 |
|
|
|
655 |
public int getSuccessSize() {
|
|
|
656 |
return (this.success == null) ? 0 : this.success.size();
|
|
|
657 |
}
|
|
|
658 |
|
|
|
659 |
public java.util.Iterator<LivePricing> getSuccessIterator() {
|
|
|
660 |
return (this.success == null) ? null : this.success.iterator();
|
|
|
661 |
}
|
|
|
662 |
|
|
|
663 |
public void addToSuccess(LivePricing elem) {
|
|
|
664 |
if (this.success == null) {
|
|
|
665 |
this.success = new ArrayList<LivePricing>();
|
|
|
666 |
}
|
|
|
667 |
this.success.add(elem);
|
|
|
668 |
}
|
|
|
669 |
|
|
|
670 |
public List<LivePricing> getSuccess() {
|
|
|
671 |
return this.success;
|
|
|
672 |
}
|
|
|
673 |
|
|
|
674 |
public void setSuccess(List<LivePricing> success) {
|
|
|
675 |
this.success = success;
|
|
|
676 |
}
|
|
|
677 |
|
|
|
678 |
public void unsetSuccess() {
|
|
|
679 |
this.success = null;
|
|
|
680 |
}
|
|
|
681 |
|
|
|
682 |
/** Returns true if field success is set (has been assigned a value) and false otherwise */
|
|
|
683 |
public boolean isSetSuccess() {
|
|
|
684 |
return this.success != null;
|
|
|
685 |
}
|
|
|
686 |
|
|
|
687 |
public void setSuccessIsSet(boolean value) {
|
|
|
688 |
if (!value) {
|
|
|
689 |
this.success = null;
|
|
|
690 |
}
|
|
|
691 |
}
|
|
|
692 |
|
|
|
693 |
public void setFieldValue(_Fields field, Object value) {
|
|
|
694 |
switch (field) {
|
|
|
695 |
case SUCCESS:
|
|
|
696 |
if (value == null) {
|
|
|
697 |
unsetSuccess();
|
|
|
698 |
} else {
|
|
|
699 |
setSuccess((List<LivePricing>)value);
|
|
|
700 |
}
|
|
|
701 |
break;
|
|
|
702 |
|
|
|
703 |
}
|
|
|
704 |
}
|
|
|
705 |
|
|
|
706 |
public Object getFieldValue(_Fields field) {
|
|
|
707 |
switch (field) {
|
|
|
708 |
case SUCCESS:
|
|
|
709 |
return getSuccess();
|
|
|
710 |
|
|
|
711 |
}
|
|
|
712 |
throw new IllegalStateException();
|
|
|
713 |
}
|
|
|
714 |
|
|
|
715 |
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
|
|
|
716 |
public boolean isSet(_Fields field) {
|
|
|
717 |
if (field == null) {
|
|
|
718 |
throw new IllegalArgumentException();
|
|
|
719 |
}
|
|
|
720 |
|
|
|
721 |
switch (field) {
|
|
|
722 |
case SUCCESS:
|
|
|
723 |
return isSetSuccess();
|
|
|
724 |
}
|
|
|
725 |
throw new IllegalStateException();
|
|
|
726 |
}
|
|
|
727 |
|
|
|
728 |
@Override
|
|
|
729 |
public boolean equals(Object that) {
|
|
|
730 |
if (that == null)
|
|
|
731 |
return false;
|
|
|
732 |
if (that instanceof getLatestPricing_result)
|
|
|
733 |
return this.equals((getLatestPricing_result)that);
|
|
|
734 |
return false;
|
|
|
735 |
}
|
|
|
736 |
|
|
|
737 |
public boolean equals(getLatestPricing_result that) {
|
|
|
738 |
if (that == null)
|
|
|
739 |
return false;
|
|
|
740 |
|
|
|
741 |
boolean this_present_success = true && this.isSetSuccess();
|
|
|
742 |
boolean that_present_success = true && that.isSetSuccess();
|
|
|
743 |
if (this_present_success || that_present_success) {
|
|
|
744 |
if (!(this_present_success && that_present_success))
|
|
|
745 |
return false;
|
|
|
746 |
if (!this.success.equals(that.success))
|
|
|
747 |
return false;
|
|
|
748 |
}
|
|
|
749 |
|
|
|
750 |
return true;
|
|
|
751 |
}
|
|
|
752 |
|
|
|
753 |
@Override
|
|
|
754 |
public int hashCode() {
|
|
|
755 |
return 0;
|
|
|
756 |
}
|
|
|
757 |
|
|
|
758 |
public int compareTo(getLatestPricing_result other) {
|
|
|
759 |
if (!getClass().equals(other.getClass())) {
|
|
|
760 |
return getClass().getName().compareTo(other.getClass().getName());
|
|
|
761 |
}
|
|
|
762 |
|
|
|
763 |
int lastComparison = 0;
|
|
|
764 |
getLatestPricing_result typedOther = (getLatestPricing_result)other;
|
|
|
765 |
|
|
|
766 |
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
|
|
|
767 |
if (lastComparison != 0) {
|
|
|
768 |
return lastComparison;
|
|
|
769 |
}
|
|
|
770 |
if (isSetSuccess()) {
|
|
|
771 |
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
|
|
|
772 |
if (lastComparison != 0) {
|
|
|
773 |
return lastComparison;
|
|
|
774 |
}
|
|
|
775 |
}
|
|
|
776 |
return 0;
|
|
|
777 |
}
|
|
|
778 |
|
|
|
779 |
public _Fields fieldForId(int fieldId) {
|
|
|
780 |
return _Fields.findByThriftId(fieldId);
|
|
|
781 |
}
|
|
|
782 |
|
|
|
783 |
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
|
|
784 |
org.apache.thrift.protocol.TField field;
|
|
|
785 |
iprot.readStructBegin();
|
|
|
786 |
while (true)
|
|
|
787 |
{
|
|
|
788 |
field = iprot.readFieldBegin();
|
|
|
789 |
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
|
|
790 |
break;
|
|
|
791 |
}
|
|
|
792 |
switch (field.id) {
|
|
|
793 |
case 0: // SUCCESS
|
|
|
794 |
if (field.type == org.apache.thrift.protocol.TType.LIST) {
|
|
|
795 |
{
|
|
|
796 |
org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
|
|
|
797 |
this.success = new ArrayList<LivePricing>(_list0.size);
|
|
|
798 |
for (int _i1 = 0; _i1 < _list0.size; ++_i1)
|
|
|
799 |
{
|
|
|
800 |
LivePricing _elem2; // required
|
|
|
801 |
_elem2 = new LivePricing();
|
|
|
802 |
_elem2.read(iprot);
|
|
|
803 |
this.success.add(_elem2);
|
|
|
804 |
}
|
|
|
805 |
iprot.readListEnd();
|
|
|
806 |
}
|
|
|
807 |
} else {
|
|
|
808 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
809 |
}
|
|
|
810 |
break;
|
|
|
811 |
default:
|
|
|
812 |
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
|
|
813 |
}
|
|
|
814 |
iprot.readFieldEnd();
|
|
|
815 |
}
|
|
|
816 |
iprot.readStructEnd();
|
|
|
817 |
validate();
|
|
|
818 |
}
|
|
|
819 |
|
|
|
820 |
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
|
|
821 |
oprot.writeStructBegin(STRUCT_DESC);
|
|
|
822 |
|
|
|
823 |
if (this.isSetSuccess()) {
|
|
|
824 |
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
|
|
|
825 |
{
|
|
|
826 |
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
|
|
|
827 |
for (LivePricing _iter3 : this.success)
|
|
|
828 |
{
|
|
|
829 |
_iter3.write(oprot);
|
|
|
830 |
}
|
|
|
831 |
oprot.writeListEnd();
|
|
|
832 |
}
|
|
|
833 |
oprot.writeFieldEnd();
|
|
|
834 |
}
|
|
|
835 |
oprot.writeFieldStop();
|
|
|
836 |
oprot.writeStructEnd();
|
|
|
837 |
}
|
|
|
838 |
|
|
|
839 |
@Override
|
|
|
840 |
public String toString() {
|
|
|
841 |
StringBuilder sb = new StringBuilder("getLatestPricing_result(");
|
|
|
842 |
boolean first = true;
|
|
|
843 |
|
|
|
844 |
sb.append("success:");
|
|
|
845 |
if (this.success == null) {
|
|
|
846 |
sb.append("null");
|
|
|
847 |
} else {
|
|
|
848 |
sb.append(this.success);
|
|
|
849 |
}
|
|
|
850 |
first = false;
|
|
|
851 |
sb.append(")");
|
|
|
852 |
return sb.toString();
|
|
|
853 |
}
|
|
|
854 |
|
|
|
855 |
public void validate() throws org.apache.thrift.TException {
|
|
|
856 |
// check for required fields
|
|
|
857 |
}
|
|
|
858 |
|
|
|
859 |
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
|
|
860 |
try {
|
|
|
861 |
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
|
|
862 |
} catch (org.apache.thrift.TException te) {
|
|
|
863 |
throw new java.io.IOException(te);
|
|
|
864 |
}
|
|
|
865 |
}
|
|
|
866 |
|
|
|
867 |
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
|
|
868 |
try {
|
|
|
869 |
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
|
|
870 |
} catch (org.apache.thrift.TException te) {
|
|
|
871 |
throw new java.io.IOException(te);
|
|
|
872 |
}
|
|
|
873 |
}
|
|
|
874 |
|
|
|
875 |
}
|
|
|
876 |
|
|
|
877 |
}
|