Subversion Repositories SmartDukaan

Rev

Rev 3896 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
3893 chandransh 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.content;
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 ContentService {
24
 
25
  public interface Iface extends in.shop2020.generic.GenericService.Iface {
26
 
3896 chandransh 27
    /**
28
     * Push the content of the given entity to production
29
     * 
30
     * @param entityId
31
     */
32
    public boolean pushContentToProduction(long entityId) throws ContentServiceException, org.apache.thrift.TException;
3893 chandransh 33
 
19686 kshitij.so 34
    public List<BulkContentUploadResult> uploadContent(List<BulkContentUpload> bulkUploadContentList) throws org.apache.thrift.TException;
35
 
3893 chandransh 36
  }
37
 
38
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
39
 
40
    public void pushContentToProduction(long entityId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.pushContentToProduction_call> resultHandler) throws org.apache.thrift.TException;
41
 
19686 kshitij.so 42
    public void uploadContent(List<BulkContentUpload> bulkUploadContentList, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.uploadContent_call> resultHandler) throws org.apache.thrift.TException;
43
 
3893 chandransh 44
  }
45
 
46
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
47
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
48
      public Factory() {}
49
      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
50
        return new Client(prot);
51
      }
52
      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
53
        return new Client(iprot, oprot);
54
      }
55
    }
56
 
57
    public Client(org.apache.thrift.protocol.TProtocol prot)
58
    {
59
      super(prot, prot);
60
    }
61
 
62
    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
63
      super(iprot, oprot);
64
    }
65
 
3896 chandransh 66
    public boolean pushContentToProduction(long entityId) throws ContentServiceException, org.apache.thrift.TException
3893 chandransh 67
    {
68
      send_pushContentToProduction(entityId);
3896 chandransh 69
      return recv_pushContentToProduction();
3893 chandransh 70
    }
71
 
72
    public void send_pushContentToProduction(long entityId) throws org.apache.thrift.TException
73
    {
74
      pushContentToProduction_args args = new pushContentToProduction_args();
75
      args.setEntityId(entityId);
76
      sendBase("pushContentToProduction", args);
77
    }
78
 
3896 chandransh 79
    public boolean recv_pushContentToProduction() throws ContentServiceException, org.apache.thrift.TException
3893 chandransh 80
    {
81
      pushContentToProduction_result result = new pushContentToProduction_result();
82
      receiveBase(result, "pushContentToProduction");
3896 chandransh 83
      if (result.isSetSuccess()) {
84
        return result.success;
85
      }
86
      if (result.cse != null) {
87
        throw result.cse;
88
      }
89
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "pushContentToProduction failed: unknown result");
3893 chandransh 90
    }
91
 
19686 kshitij.so 92
    public List<BulkContentUploadResult> uploadContent(List<BulkContentUpload> bulkUploadContentList) throws org.apache.thrift.TException
93
    {
94
      send_uploadContent(bulkUploadContentList);
95
      return recv_uploadContent();
96
    }
97
 
98
    public void send_uploadContent(List<BulkContentUpload> bulkUploadContentList) throws org.apache.thrift.TException
99
    {
100
      uploadContent_args args = new uploadContent_args();
101
      args.setBulkUploadContentList(bulkUploadContentList);
102
      sendBase("uploadContent", args);
103
    }
104
 
105
    public List<BulkContentUploadResult> recv_uploadContent() throws org.apache.thrift.TException
106
    {
107
      uploadContent_result result = new uploadContent_result();
108
      receiveBase(result, "uploadContent");
109
      if (result.isSetSuccess()) {
110
        return result.success;
111
      }
112
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "uploadContent failed: unknown result");
113
    }
114
 
3893 chandransh 115
  }
116
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
117
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
118
      private org.apache.thrift.async.TAsyncClientManager clientManager;
119
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
120
      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
121
        this.clientManager = clientManager;
122
        this.protocolFactory = protocolFactory;
123
      }
124
      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
125
        return new AsyncClient(protocolFactory, clientManager, transport);
126
      }
127
    }
128
 
129
    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
130
      super(protocolFactory, clientManager, transport);
131
    }
132
 
133
    public void pushContentToProduction(long entityId, org.apache.thrift.async.AsyncMethodCallback<pushContentToProduction_call> resultHandler) throws org.apache.thrift.TException {
134
      checkReady();
135
      pushContentToProduction_call method_call = new pushContentToProduction_call(entityId, resultHandler, this, ___protocolFactory, ___transport);
136
      this.___currentMethod = method_call;
137
      ___manager.call(method_call);
138
    }
139
 
140
    public static class pushContentToProduction_call extends org.apache.thrift.async.TAsyncMethodCall {
141
      private long entityId;
142
      public pushContentToProduction_call(long entityId, org.apache.thrift.async.AsyncMethodCallback<pushContentToProduction_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 {
143
        super(client, protocolFactory, transport, resultHandler, false);
144
        this.entityId = entityId;
145
      }
146
 
147
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
148
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("pushContentToProduction", org.apache.thrift.protocol.TMessageType.CALL, 0));
149
        pushContentToProduction_args args = new pushContentToProduction_args();
150
        args.setEntityId(entityId);
151
        args.write(prot);
152
        prot.writeMessageEnd();
153
      }
154
 
3896 chandransh 155
      public boolean getResult() throws ContentServiceException, org.apache.thrift.TException {
3893 chandransh 156
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
157
          throw new IllegalStateException("Method call not finished!");
158
        }
159
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
160
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
3896 chandransh 161
        return (new Client(prot)).recv_pushContentToProduction();
3893 chandransh 162
      }
163
    }
164
 
19686 kshitij.so 165
    public void uploadContent(List<BulkContentUpload> bulkUploadContentList, org.apache.thrift.async.AsyncMethodCallback<uploadContent_call> resultHandler) throws org.apache.thrift.TException {
166
      checkReady();
167
      uploadContent_call method_call = new uploadContent_call(bulkUploadContentList, resultHandler, this, ___protocolFactory, ___transport);
168
      this.___currentMethod = method_call;
169
      ___manager.call(method_call);
170
    }
171
 
172
    public static class uploadContent_call extends org.apache.thrift.async.TAsyncMethodCall {
173
      private List<BulkContentUpload> bulkUploadContentList;
174
      public uploadContent_call(List<BulkContentUpload> bulkUploadContentList, org.apache.thrift.async.AsyncMethodCallback<uploadContent_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 {
175
        super(client, protocolFactory, transport, resultHandler, false);
176
        this.bulkUploadContentList = bulkUploadContentList;
177
      }
178
 
179
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
180
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("uploadContent", org.apache.thrift.protocol.TMessageType.CALL, 0));
181
        uploadContent_args args = new uploadContent_args();
182
        args.setBulkUploadContentList(bulkUploadContentList);
183
        args.write(prot);
184
        prot.writeMessageEnd();
185
      }
186
 
187
      public List<BulkContentUploadResult> getResult() throws org.apache.thrift.TException {
188
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
189
          throw new IllegalStateException("Method call not finished!");
190
        }
191
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
192
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
193
        return (new Client(prot)).recv_uploadContent();
194
      }
195
    }
196
 
3893 chandransh 197
  }
198
 
199
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
200
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
201
    public Processor(I iface) {
202
      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
203
    }
204
 
205
    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
206
      super(iface, getProcessMap(processMap));
207
    }
208
 
209
    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) {
210
      processMap.put("pushContentToProduction", new pushContentToProduction());
19686 kshitij.so 211
      processMap.put("uploadContent", new uploadContent());
3893 chandransh 212
      return processMap;
213
    }
214
 
215
    private static class pushContentToProduction<I extends Iface> extends org.apache.thrift.ProcessFunction<I, pushContentToProduction_args> {
216
      public pushContentToProduction() {
217
        super("pushContentToProduction");
218
      }
219
 
220
      protected pushContentToProduction_args getEmptyArgsInstance() {
221
        return new pushContentToProduction_args();
222
      }
223
 
224
      protected pushContentToProduction_result getResult(I iface, pushContentToProduction_args args) throws org.apache.thrift.TException {
225
        pushContentToProduction_result result = new pushContentToProduction_result();
3896 chandransh 226
        try {
227
          result.success = iface.pushContentToProduction(args.entityId);
228
          result.setSuccessIsSet(true);
229
        } catch (ContentServiceException cse) {
230
          result.cse = cse;
231
        }
3893 chandransh 232
        return result;
233
      }
234
    }
235
 
19686 kshitij.so 236
    private static class uploadContent<I extends Iface> extends org.apache.thrift.ProcessFunction<I, uploadContent_args> {
237
      public uploadContent() {
238
        super("uploadContent");
239
      }
240
 
241
      protected uploadContent_args getEmptyArgsInstance() {
242
        return new uploadContent_args();
243
      }
244
 
245
      protected uploadContent_result getResult(I iface, uploadContent_args args) throws org.apache.thrift.TException {
246
        uploadContent_result result = new uploadContent_result();
247
        result.success = iface.uploadContent(args.bulkUploadContentList);
248
        return result;
249
      }
250
    }
251
 
3893 chandransh 252
  }
253
 
254
  public static class pushContentToProduction_args implements org.apache.thrift.TBase<pushContentToProduction_args, pushContentToProduction_args._Fields>, java.io.Serializable, Cloneable   {
255
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("pushContentToProduction_args");
256
 
257
    private static final org.apache.thrift.protocol.TField ENTITY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("entityId", org.apache.thrift.protocol.TType.I64, (short)1);
258
 
259
    private long entityId; // required
260
 
261
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
262
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
263
      ENTITY_ID((short)1, "entityId");
264
 
265
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
266
 
267
      static {
268
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
269
          byName.put(field.getFieldName(), field);
270
        }
271
      }
272
 
273
      /**
274
       * Find the _Fields constant that matches fieldId, or null if its not found.
275
       */
276
      public static _Fields findByThriftId(int fieldId) {
277
        switch(fieldId) {
278
          case 1: // ENTITY_ID
279
            return ENTITY_ID;
280
          default:
281
            return null;
282
        }
283
      }
284
 
285
      /**
286
       * Find the _Fields constant that matches fieldId, throwing an exception
287
       * if it is not found.
288
       */
289
      public static _Fields findByThriftIdOrThrow(int fieldId) {
290
        _Fields fields = findByThriftId(fieldId);
291
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
292
        return fields;
293
      }
294
 
295
      /**
296
       * Find the _Fields constant that matches name, or null if its not found.
297
       */
298
      public static _Fields findByName(String name) {
299
        return byName.get(name);
300
      }
301
 
302
      private final short _thriftId;
303
      private final String _fieldName;
304
 
305
      _Fields(short thriftId, String fieldName) {
306
        _thriftId = thriftId;
307
        _fieldName = fieldName;
308
      }
309
 
310
      public short getThriftFieldId() {
311
        return _thriftId;
312
      }
313
 
314
      public String getFieldName() {
315
        return _fieldName;
316
      }
317
    }
318
 
319
    // isset id assignments
320
    private static final int __ENTITYID_ISSET_ID = 0;
321
    private BitSet __isset_bit_vector = new BitSet(1);
322
 
323
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
324
    static {
325
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
326
      tmpMap.put(_Fields.ENTITY_ID, new org.apache.thrift.meta_data.FieldMetaData("entityId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
327
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
328
      metaDataMap = Collections.unmodifiableMap(tmpMap);
329
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(pushContentToProduction_args.class, metaDataMap);
330
    }
331
 
332
    public pushContentToProduction_args() {
333
    }
334
 
335
    public pushContentToProduction_args(
336
      long entityId)
337
    {
338
      this();
339
      this.entityId = entityId;
340
      setEntityIdIsSet(true);
341
    }
342
 
343
    /**
344
     * Performs a deep copy on <i>other</i>.
345
     */
346
    public pushContentToProduction_args(pushContentToProduction_args other) {
347
      __isset_bit_vector.clear();
348
      __isset_bit_vector.or(other.__isset_bit_vector);
349
      this.entityId = other.entityId;
350
    }
351
 
352
    public pushContentToProduction_args deepCopy() {
353
      return new pushContentToProduction_args(this);
354
    }
355
 
356
    @Override
357
    public void clear() {
358
      setEntityIdIsSet(false);
359
      this.entityId = 0;
360
    }
361
 
362
    public long getEntityId() {
363
      return this.entityId;
364
    }
365
 
366
    public void setEntityId(long entityId) {
367
      this.entityId = entityId;
368
      setEntityIdIsSet(true);
369
    }
370
 
371
    public void unsetEntityId() {
372
      __isset_bit_vector.clear(__ENTITYID_ISSET_ID);
373
    }
374
 
375
    /** Returns true if field entityId is set (has been assigned a value) and false otherwise */
376
    public boolean isSetEntityId() {
377
      return __isset_bit_vector.get(__ENTITYID_ISSET_ID);
378
    }
379
 
380
    public void setEntityIdIsSet(boolean value) {
381
      __isset_bit_vector.set(__ENTITYID_ISSET_ID, value);
382
    }
383
 
384
    public void setFieldValue(_Fields field, Object value) {
385
      switch (field) {
386
      case ENTITY_ID:
387
        if (value == null) {
388
          unsetEntityId();
389
        } else {
390
          setEntityId((Long)value);
391
        }
392
        break;
393
 
394
      }
395
    }
396
 
397
    public Object getFieldValue(_Fields field) {
398
      switch (field) {
399
      case ENTITY_ID:
400
        return Long.valueOf(getEntityId());
401
 
402
      }
403
      throw new IllegalStateException();
404
    }
405
 
406
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
407
    public boolean isSet(_Fields field) {
408
      if (field == null) {
409
        throw new IllegalArgumentException();
410
      }
411
 
412
      switch (field) {
413
      case ENTITY_ID:
414
        return isSetEntityId();
415
      }
416
      throw new IllegalStateException();
417
    }
418
 
419
    @Override
420
    public boolean equals(Object that) {
421
      if (that == null)
422
        return false;
423
      if (that instanceof pushContentToProduction_args)
424
        return this.equals((pushContentToProduction_args)that);
425
      return false;
426
    }
427
 
428
    public boolean equals(pushContentToProduction_args that) {
429
      if (that == null)
430
        return false;
431
 
432
      boolean this_present_entityId = true;
433
      boolean that_present_entityId = true;
434
      if (this_present_entityId || that_present_entityId) {
435
        if (!(this_present_entityId && that_present_entityId))
436
          return false;
437
        if (this.entityId != that.entityId)
438
          return false;
439
      }
440
 
441
      return true;
442
    }
443
 
444
    @Override
445
    public int hashCode() {
446
      return 0;
447
    }
448
 
449
    public int compareTo(pushContentToProduction_args other) {
450
      if (!getClass().equals(other.getClass())) {
451
        return getClass().getName().compareTo(other.getClass().getName());
452
      }
453
 
454
      int lastComparison = 0;
455
      pushContentToProduction_args typedOther = (pushContentToProduction_args)other;
456
 
457
      lastComparison = Boolean.valueOf(isSetEntityId()).compareTo(typedOther.isSetEntityId());
458
      if (lastComparison != 0) {
459
        return lastComparison;
460
      }
461
      if (isSetEntityId()) {
462
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.entityId, typedOther.entityId);
463
        if (lastComparison != 0) {
464
          return lastComparison;
465
        }
466
      }
467
      return 0;
468
    }
469
 
470
    public _Fields fieldForId(int fieldId) {
471
      return _Fields.findByThriftId(fieldId);
472
    }
473
 
474
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
475
      org.apache.thrift.protocol.TField field;
476
      iprot.readStructBegin();
477
      while (true)
478
      {
479
        field = iprot.readFieldBegin();
480
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
481
          break;
482
        }
483
        switch (field.id) {
484
          case 1: // ENTITY_ID
485
            if (field.type == org.apache.thrift.protocol.TType.I64) {
486
              this.entityId = iprot.readI64();
487
              setEntityIdIsSet(true);
488
            } else { 
489
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
490
            }
491
            break;
492
          default:
493
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
494
        }
495
        iprot.readFieldEnd();
496
      }
497
      iprot.readStructEnd();
498
      validate();
499
    }
500
 
501
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
502
      validate();
503
 
504
      oprot.writeStructBegin(STRUCT_DESC);
505
      oprot.writeFieldBegin(ENTITY_ID_FIELD_DESC);
506
      oprot.writeI64(this.entityId);
507
      oprot.writeFieldEnd();
508
      oprot.writeFieldStop();
509
      oprot.writeStructEnd();
510
    }
511
 
512
    @Override
513
    public String toString() {
514
      StringBuilder sb = new StringBuilder("pushContentToProduction_args(");
515
      boolean first = true;
516
 
517
      sb.append("entityId:");
518
      sb.append(this.entityId);
519
      first = false;
520
      sb.append(")");
521
      return sb.toString();
522
    }
523
 
524
    public void validate() throws org.apache.thrift.TException {
525
      // check for required fields
526
    }
527
 
528
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
529
      try {
530
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
531
      } catch (org.apache.thrift.TException te) {
532
        throw new java.io.IOException(te);
533
      }
534
    }
535
 
536
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
537
      try {
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 pushContentToProduction_result implements org.apache.thrift.TBase<pushContentToProduction_result, pushContentToProduction_result._Fields>, java.io.Serializable, Cloneable   {
547
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("pushContentToProduction_result");
548
 
3896 chandransh 549
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
550
    private static final org.apache.thrift.protocol.TField CSE_FIELD_DESC = new org.apache.thrift.protocol.TField("cse", org.apache.thrift.protocol.TType.STRUCT, (short)1);
3893 chandransh 551
 
3896 chandransh 552
    private boolean success; // required
553
    private ContentServiceException cse; // required
3893 chandransh 554
 
555
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
556
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3896 chandransh 557
      SUCCESS((short)0, "success"),
558
      CSE((short)1, "cse");
3893 chandransh 559
 
560
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
561
 
562
      static {
563
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
564
          byName.put(field.getFieldName(), field);
565
        }
566
      }
567
 
568
      /**
569
       * Find the _Fields constant that matches fieldId, or null if its not found.
570
       */
571
      public static _Fields findByThriftId(int fieldId) {
572
        switch(fieldId) {
3896 chandransh 573
          case 0: // SUCCESS
574
            return SUCCESS;
575
          case 1: // CSE
576
            return CSE;
3893 chandransh 577
          default:
578
            return null;
579
        }
580
      }
581
 
582
      /**
583
       * Find the _Fields constant that matches fieldId, throwing an exception
584
       * if it is not found.
585
       */
586
      public static _Fields findByThriftIdOrThrow(int fieldId) {
587
        _Fields fields = findByThriftId(fieldId);
588
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
589
        return fields;
590
      }
591
 
592
      /**
593
       * Find the _Fields constant that matches name, or null if its not found.
594
       */
595
      public static _Fields findByName(String name) {
596
        return byName.get(name);
597
      }
598
 
599
      private final short _thriftId;
600
      private final String _fieldName;
601
 
602
      _Fields(short thriftId, String fieldName) {
603
        _thriftId = thriftId;
604
        _fieldName = fieldName;
605
      }
606
 
607
      public short getThriftFieldId() {
608
        return _thriftId;
609
      }
610
 
611
      public String getFieldName() {
612
        return _fieldName;
613
      }
614
    }
3896 chandransh 615
 
616
    // isset id assignments
617
    private static final int __SUCCESS_ISSET_ID = 0;
618
    private BitSet __isset_bit_vector = new BitSet(1);
619
 
3893 chandransh 620
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
621
    static {
622
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3896 chandransh 623
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
624
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
625
      tmpMap.put(_Fields.CSE, new org.apache.thrift.meta_data.FieldMetaData("cse", org.apache.thrift.TFieldRequirementType.DEFAULT, 
626
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3893 chandransh 627
      metaDataMap = Collections.unmodifiableMap(tmpMap);
628
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(pushContentToProduction_result.class, metaDataMap);
629
    }
630
 
631
    public pushContentToProduction_result() {
632
    }
633
 
3896 chandransh 634
    public pushContentToProduction_result(
635
      boolean success,
636
      ContentServiceException cse)
637
    {
638
      this();
639
      this.success = success;
640
      setSuccessIsSet(true);
641
      this.cse = cse;
642
    }
643
 
3893 chandransh 644
    /**
645
     * Performs a deep copy on <i>other</i>.
646
     */
647
    public pushContentToProduction_result(pushContentToProduction_result other) {
3896 chandransh 648
      __isset_bit_vector.clear();
649
      __isset_bit_vector.or(other.__isset_bit_vector);
650
      this.success = other.success;
651
      if (other.isSetCse()) {
652
        this.cse = new ContentServiceException(other.cse);
653
      }
3893 chandransh 654
    }
655
 
656
    public pushContentToProduction_result deepCopy() {
657
      return new pushContentToProduction_result(this);
658
    }
659
 
660
    @Override
661
    public void clear() {
3896 chandransh 662
      setSuccessIsSet(false);
663
      this.success = false;
664
      this.cse = null;
3893 chandransh 665
    }
666
 
3896 chandransh 667
    public boolean isSuccess() {
668
      return this.success;
669
    }
670
 
671
    public void setSuccess(boolean success) {
672
      this.success = success;
673
      setSuccessIsSet(true);
674
    }
675
 
676
    public void unsetSuccess() {
677
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
678
    }
679
 
680
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
681
    public boolean isSetSuccess() {
682
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
683
    }
684
 
685
    public void setSuccessIsSet(boolean value) {
686
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
687
    }
688
 
689
    public ContentServiceException getCse() {
690
      return this.cse;
691
    }
692
 
693
    public void setCse(ContentServiceException cse) {
694
      this.cse = cse;
695
    }
696
 
697
    public void unsetCse() {
698
      this.cse = null;
699
    }
700
 
701
    /** Returns true if field cse is set (has been assigned a value) and false otherwise */
702
    public boolean isSetCse() {
703
      return this.cse != null;
704
    }
705
 
706
    public void setCseIsSet(boolean value) {
707
      if (!value) {
708
        this.cse = null;
709
      }
710
    }
711
 
3893 chandransh 712
    public void setFieldValue(_Fields field, Object value) {
713
      switch (field) {
3896 chandransh 714
      case SUCCESS:
715
        if (value == null) {
716
          unsetSuccess();
717
        } else {
718
          setSuccess((Boolean)value);
719
        }
720
        break;
721
 
722
      case CSE:
723
        if (value == null) {
724
          unsetCse();
725
        } else {
726
          setCse((ContentServiceException)value);
727
        }
728
        break;
729
 
3893 chandransh 730
      }
731
    }
732
 
733
    public Object getFieldValue(_Fields field) {
734
      switch (field) {
3896 chandransh 735
      case SUCCESS:
736
        return Boolean.valueOf(isSuccess());
737
 
738
      case CSE:
739
        return getCse();
740
 
3893 chandransh 741
      }
742
      throw new IllegalStateException();
743
    }
744
 
745
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
746
    public boolean isSet(_Fields field) {
747
      if (field == null) {
748
        throw new IllegalArgumentException();
749
      }
750
 
751
      switch (field) {
3896 chandransh 752
      case SUCCESS:
753
        return isSetSuccess();
754
      case CSE:
755
        return isSetCse();
3893 chandransh 756
      }
757
      throw new IllegalStateException();
758
    }
759
 
760
    @Override
761
    public boolean equals(Object that) {
762
      if (that == null)
763
        return false;
764
      if (that instanceof pushContentToProduction_result)
765
        return this.equals((pushContentToProduction_result)that);
766
      return false;
767
    }
768
 
769
    public boolean equals(pushContentToProduction_result that) {
770
      if (that == null)
771
        return false;
772
 
3896 chandransh 773
      boolean this_present_success = true;
774
      boolean that_present_success = true;
775
      if (this_present_success || that_present_success) {
776
        if (!(this_present_success && that_present_success))
777
          return false;
778
        if (this.success != that.success)
779
          return false;
780
      }
781
 
782
      boolean this_present_cse = true && this.isSetCse();
783
      boolean that_present_cse = true && that.isSetCse();
784
      if (this_present_cse || that_present_cse) {
785
        if (!(this_present_cse && that_present_cse))
786
          return false;
787
        if (!this.cse.equals(that.cse))
788
          return false;
789
      }
790
 
3893 chandransh 791
      return true;
792
    }
793
 
794
    @Override
795
    public int hashCode() {
796
      return 0;
797
    }
798
 
799
    public int compareTo(pushContentToProduction_result other) {
800
      if (!getClass().equals(other.getClass())) {
801
        return getClass().getName().compareTo(other.getClass().getName());
802
      }
803
 
804
      int lastComparison = 0;
805
      pushContentToProduction_result typedOther = (pushContentToProduction_result)other;
806
 
3896 chandransh 807
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
808
      if (lastComparison != 0) {
809
        return lastComparison;
810
      }
811
      if (isSetSuccess()) {
812
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
813
        if (lastComparison != 0) {
814
          return lastComparison;
815
        }
816
      }
817
      lastComparison = Boolean.valueOf(isSetCse()).compareTo(typedOther.isSetCse());
818
      if (lastComparison != 0) {
819
        return lastComparison;
820
      }
821
      if (isSetCse()) {
822
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cse, typedOther.cse);
823
        if (lastComparison != 0) {
824
          return lastComparison;
825
        }
826
      }
3893 chandransh 827
      return 0;
828
    }
829
 
830
    public _Fields fieldForId(int fieldId) {
831
      return _Fields.findByThriftId(fieldId);
832
    }
833
 
834
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
835
      org.apache.thrift.protocol.TField field;
836
      iprot.readStructBegin();
837
      while (true)
838
      {
839
        field = iprot.readFieldBegin();
840
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
841
          break;
842
        }
843
        switch (field.id) {
3896 chandransh 844
          case 0: // SUCCESS
845
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
846
              this.success = iprot.readBool();
847
              setSuccessIsSet(true);
848
            } else { 
849
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
850
            }
851
            break;
852
          case 1: // CSE
853
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
854
              this.cse = new ContentServiceException();
855
              this.cse.read(iprot);
856
            } else { 
857
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
858
            }
859
            break;
3893 chandransh 860
          default:
861
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
862
        }
863
        iprot.readFieldEnd();
864
      }
865
      iprot.readStructEnd();
866
      validate();
867
    }
868
 
869
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
870
      oprot.writeStructBegin(STRUCT_DESC);
871
 
3896 chandransh 872
      if (this.isSetSuccess()) {
873
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
874
        oprot.writeBool(this.success);
875
        oprot.writeFieldEnd();
876
      } else if (this.isSetCse()) {
877
        oprot.writeFieldBegin(CSE_FIELD_DESC);
878
        this.cse.write(oprot);
879
        oprot.writeFieldEnd();
880
      }
3893 chandransh 881
      oprot.writeFieldStop();
882
      oprot.writeStructEnd();
883
    }
884
 
885
    @Override
886
    public String toString() {
887
      StringBuilder sb = new StringBuilder("pushContentToProduction_result(");
888
      boolean first = true;
889
 
3896 chandransh 890
      sb.append("success:");
891
      sb.append(this.success);
892
      first = false;
893
      if (!first) sb.append(", ");
894
      sb.append("cse:");
895
      if (this.cse == null) {
896
        sb.append("null");
897
      } else {
898
        sb.append(this.cse);
899
      }
900
      first = false;
3893 chandransh 901
      sb.append(")");
902
      return sb.toString();
903
    }
904
 
905
    public void validate() throws org.apache.thrift.TException {
906
      // check for required fields
907
    }
908
 
909
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
910
      try {
911
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
912
      } catch (org.apache.thrift.TException te) {
913
        throw new java.io.IOException(te);
914
      }
915
    }
916
 
917
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
918
      try {
919
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
920
      } catch (org.apache.thrift.TException te) {
921
        throw new java.io.IOException(te);
922
      }
923
    }
924
 
925
  }
926
 
19686 kshitij.so 927
  public static class uploadContent_args implements org.apache.thrift.TBase<uploadContent_args, uploadContent_args._Fields>, java.io.Serializable, Cloneable   {
928
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("uploadContent_args");
929
 
930
    private static final org.apache.thrift.protocol.TField BULK_UPLOAD_CONTENT_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("bulkUploadContentList", org.apache.thrift.protocol.TType.LIST, (short)1);
931
 
932
    private List<BulkContentUpload> bulkUploadContentList; // required
933
 
934
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
935
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
936
      BULK_UPLOAD_CONTENT_LIST((short)1, "bulkUploadContentList");
937
 
938
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
939
 
940
      static {
941
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
942
          byName.put(field.getFieldName(), field);
943
        }
944
      }
945
 
946
      /**
947
       * Find the _Fields constant that matches fieldId, or null if its not found.
948
       */
949
      public static _Fields findByThriftId(int fieldId) {
950
        switch(fieldId) {
951
          case 1: // BULK_UPLOAD_CONTENT_LIST
952
            return BULK_UPLOAD_CONTENT_LIST;
953
          default:
954
            return null;
955
        }
956
      }
957
 
958
      /**
959
       * Find the _Fields constant that matches fieldId, throwing an exception
960
       * if it is not found.
961
       */
962
      public static _Fields findByThriftIdOrThrow(int fieldId) {
963
        _Fields fields = findByThriftId(fieldId);
964
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
965
        return fields;
966
      }
967
 
968
      /**
969
       * Find the _Fields constant that matches name, or null if its not found.
970
       */
971
      public static _Fields findByName(String name) {
972
        return byName.get(name);
973
      }
974
 
975
      private final short _thriftId;
976
      private final String _fieldName;
977
 
978
      _Fields(short thriftId, String fieldName) {
979
        _thriftId = thriftId;
980
        _fieldName = fieldName;
981
      }
982
 
983
      public short getThriftFieldId() {
984
        return _thriftId;
985
      }
986
 
987
      public String getFieldName() {
988
        return _fieldName;
989
      }
990
    }
991
 
992
    // isset id assignments
993
 
994
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
995
    static {
996
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
997
      tmpMap.put(_Fields.BULK_UPLOAD_CONTENT_LIST, new org.apache.thrift.meta_data.FieldMetaData("bulkUploadContentList", org.apache.thrift.TFieldRequirementType.DEFAULT, 
998
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
999
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, BulkContentUpload.class))));
1000
      metaDataMap = Collections.unmodifiableMap(tmpMap);
1001
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(uploadContent_args.class, metaDataMap);
1002
    }
1003
 
1004
    public uploadContent_args() {
1005
    }
1006
 
1007
    public uploadContent_args(
1008
      List<BulkContentUpload> bulkUploadContentList)
1009
    {
1010
      this();
1011
      this.bulkUploadContentList = bulkUploadContentList;
1012
    }
1013
 
1014
    /**
1015
     * Performs a deep copy on <i>other</i>.
1016
     */
1017
    public uploadContent_args(uploadContent_args other) {
1018
      if (other.isSetBulkUploadContentList()) {
1019
        List<BulkContentUpload> __this__bulkUploadContentList = new ArrayList<BulkContentUpload>();
1020
        for (BulkContentUpload other_element : other.bulkUploadContentList) {
1021
          __this__bulkUploadContentList.add(new BulkContentUpload(other_element));
1022
        }
1023
        this.bulkUploadContentList = __this__bulkUploadContentList;
1024
      }
1025
    }
1026
 
1027
    public uploadContent_args deepCopy() {
1028
      return new uploadContent_args(this);
1029
    }
1030
 
1031
    @Override
1032
    public void clear() {
1033
      this.bulkUploadContentList = null;
1034
    }
1035
 
1036
    public int getBulkUploadContentListSize() {
1037
      return (this.bulkUploadContentList == null) ? 0 : this.bulkUploadContentList.size();
1038
    }
1039
 
1040
    public java.util.Iterator<BulkContentUpload> getBulkUploadContentListIterator() {
1041
      return (this.bulkUploadContentList == null) ? null : this.bulkUploadContentList.iterator();
1042
    }
1043
 
1044
    public void addToBulkUploadContentList(BulkContentUpload elem) {
1045
      if (this.bulkUploadContentList == null) {
1046
        this.bulkUploadContentList = new ArrayList<BulkContentUpload>();
1047
      }
1048
      this.bulkUploadContentList.add(elem);
1049
    }
1050
 
1051
    public List<BulkContentUpload> getBulkUploadContentList() {
1052
      return this.bulkUploadContentList;
1053
    }
1054
 
1055
    public void setBulkUploadContentList(List<BulkContentUpload> bulkUploadContentList) {
1056
      this.bulkUploadContentList = bulkUploadContentList;
1057
    }
1058
 
1059
    public void unsetBulkUploadContentList() {
1060
      this.bulkUploadContentList = null;
1061
    }
1062
 
1063
    /** Returns true if field bulkUploadContentList is set (has been assigned a value) and false otherwise */
1064
    public boolean isSetBulkUploadContentList() {
1065
      return this.bulkUploadContentList != null;
1066
    }
1067
 
1068
    public void setBulkUploadContentListIsSet(boolean value) {
1069
      if (!value) {
1070
        this.bulkUploadContentList = null;
1071
      }
1072
    }
1073
 
1074
    public void setFieldValue(_Fields field, Object value) {
1075
      switch (field) {
1076
      case BULK_UPLOAD_CONTENT_LIST:
1077
        if (value == null) {
1078
          unsetBulkUploadContentList();
1079
        } else {
1080
          setBulkUploadContentList((List<BulkContentUpload>)value);
1081
        }
1082
        break;
1083
 
1084
      }
1085
    }
1086
 
1087
    public Object getFieldValue(_Fields field) {
1088
      switch (field) {
1089
      case BULK_UPLOAD_CONTENT_LIST:
1090
        return getBulkUploadContentList();
1091
 
1092
      }
1093
      throw new IllegalStateException();
1094
    }
1095
 
1096
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
1097
    public boolean isSet(_Fields field) {
1098
      if (field == null) {
1099
        throw new IllegalArgumentException();
1100
      }
1101
 
1102
      switch (field) {
1103
      case BULK_UPLOAD_CONTENT_LIST:
1104
        return isSetBulkUploadContentList();
1105
      }
1106
      throw new IllegalStateException();
1107
    }
1108
 
1109
    @Override
1110
    public boolean equals(Object that) {
1111
      if (that == null)
1112
        return false;
1113
      if (that instanceof uploadContent_args)
1114
        return this.equals((uploadContent_args)that);
1115
      return false;
1116
    }
1117
 
1118
    public boolean equals(uploadContent_args that) {
1119
      if (that == null)
1120
        return false;
1121
 
1122
      boolean this_present_bulkUploadContentList = true && this.isSetBulkUploadContentList();
1123
      boolean that_present_bulkUploadContentList = true && that.isSetBulkUploadContentList();
1124
      if (this_present_bulkUploadContentList || that_present_bulkUploadContentList) {
1125
        if (!(this_present_bulkUploadContentList && that_present_bulkUploadContentList))
1126
          return false;
1127
        if (!this.bulkUploadContentList.equals(that.bulkUploadContentList))
1128
          return false;
1129
      }
1130
 
1131
      return true;
1132
    }
1133
 
1134
    @Override
1135
    public int hashCode() {
1136
      return 0;
1137
    }
1138
 
1139
    public int compareTo(uploadContent_args other) {
1140
      if (!getClass().equals(other.getClass())) {
1141
        return getClass().getName().compareTo(other.getClass().getName());
1142
      }
1143
 
1144
      int lastComparison = 0;
1145
      uploadContent_args typedOther = (uploadContent_args)other;
1146
 
1147
      lastComparison = Boolean.valueOf(isSetBulkUploadContentList()).compareTo(typedOther.isSetBulkUploadContentList());
1148
      if (lastComparison != 0) {
1149
        return lastComparison;
1150
      }
1151
      if (isSetBulkUploadContentList()) {
1152
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bulkUploadContentList, typedOther.bulkUploadContentList);
1153
        if (lastComparison != 0) {
1154
          return lastComparison;
1155
        }
1156
      }
1157
      return 0;
1158
    }
1159
 
1160
    public _Fields fieldForId(int fieldId) {
1161
      return _Fields.findByThriftId(fieldId);
1162
    }
1163
 
1164
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
1165
      org.apache.thrift.protocol.TField field;
1166
      iprot.readStructBegin();
1167
      while (true)
1168
      {
1169
        field = iprot.readFieldBegin();
1170
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
1171
          break;
1172
        }
1173
        switch (field.id) {
1174
          case 1: // BULK_UPLOAD_CONTENT_LIST
1175
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
1176
              {
1177
                org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
1178
                this.bulkUploadContentList = new ArrayList<BulkContentUpload>(_list0.size);
1179
                for (int _i1 = 0; _i1 < _list0.size; ++_i1)
1180
                {
1181
                  BulkContentUpload _elem2; // required
1182
                  _elem2 = new BulkContentUpload();
1183
                  _elem2.read(iprot);
1184
                  this.bulkUploadContentList.add(_elem2);
1185
                }
1186
                iprot.readListEnd();
1187
              }
1188
            } else { 
1189
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1190
            }
1191
            break;
1192
          default:
1193
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1194
        }
1195
        iprot.readFieldEnd();
1196
      }
1197
      iprot.readStructEnd();
1198
      validate();
1199
    }
1200
 
1201
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
1202
      validate();
1203
 
1204
      oprot.writeStructBegin(STRUCT_DESC);
1205
      if (this.bulkUploadContentList != null) {
1206
        oprot.writeFieldBegin(BULK_UPLOAD_CONTENT_LIST_FIELD_DESC);
1207
        {
1208
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.bulkUploadContentList.size()));
1209
          for (BulkContentUpload _iter3 : this.bulkUploadContentList)
1210
          {
1211
            _iter3.write(oprot);
1212
          }
1213
          oprot.writeListEnd();
1214
        }
1215
        oprot.writeFieldEnd();
1216
      }
1217
      oprot.writeFieldStop();
1218
      oprot.writeStructEnd();
1219
    }
1220
 
1221
    @Override
1222
    public String toString() {
1223
      StringBuilder sb = new StringBuilder("uploadContent_args(");
1224
      boolean first = true;
1225
 
1226
      sb.append("bulkUploadContentList:");
1227
      if (this.bulkUploadContentList == null) {
1228
        sb.append("null");
1229
      } else {
1230
        sb.append(this.bulkUploadContentList);
1231
      }
1232
      first = false;
1233
      sb.append(")");
1234
      return sb.toString();
1235
    }
1236
 
1237
    public void validate() throws org.apache.thrift.TException {
1238
      // check for required fields
1239
    }
1240
 
1241
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
1242
      try {
1243
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
1244
      } catch (org.apache.thrift.TException te) {
1245
        throw new java.io.IOException(te);
1246
      }
1247
    }
1248
 
1249
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
1250
      try {
1251
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
1252
      } catch (org.apache.thrift.TException te) {
1253
        throw new java.io.IOException(te);
1254
      }
1255
    }
1256
 
1257
  }
1258
 
1259
  public static class uploadContent_result implements org.apache.thrift.TBase<uploadContent_result, uploadContent_result._Fields>, java.io.Serializable, Cloneable   {
1260
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("uploadContent_result");
1261
 
1262
    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);
1263
 
1264
    private List<BulkContentUploadResult> success; // required
1265
 
1266
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1267
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
1268
      SUCCESS((short)0, "success");
1269
 
1270
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1271
 
1272
      static {
1273
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1274
          byName.put(field.getFieldName(), field);
1275
        }
1276
      }
1277
 
1278
      /**
1279
       * Find the _Fields constant that matches fieldId, or null if its not found.
1280
       */
1281
      public static _Fields findByThriftId(int fieldId) {
1282
        switch(fieldId) {
1283
          case 0: // SUCCESS
1284
            return SUCCESS;
1285
          default:
1286
            return null;
1287
        }
1288
      }
1289
 
1290
      /**
1291
       * Find the _Fields constant that matches fieldId, throwing an exception
1292
       * if it is not found.
1293
       */
1294
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1295
        _Fields fields = findByThriftId(fieldId);
1296
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1297
        return fields;
1298
      }
1299
 
1300
      /**
1301
       * Find the _Fields constant that matches name, or null if its not found.
1302
       */
1303
      public static _Fields findByName(String name) {
1304
        return byName.get(name);
1305
      }
1306
 
1307
      private final short _thriftId;
1308
      private final String _fieldName;
1309
 
1310
      _Fields(short thriftId, String fieldName) {
1311
        _thriftId = thriftId;
1312
        _fieldName = fieldName;
1313
      }
1314
 
1315
      public short getThriftFieldId() {
1316
        return _thriftId;
1317
      }
1318
 
1319
      public String getFieldName() {
1320
        return _fieldName;
1321
      }
1322
    }
1323
 
1324
    // isset id assignments
1325
 
1326
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
1327
    static {
1328
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
1329
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
1330
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
1331
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, BulkContentUploadResult.class))));
1332
      metaDataMap = Collections.unmodifiableMap(tmpMap);
1333
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(uploadContent_result.class, metaDataMap);
1334
    }
1335
 
1336
    public uploadContent_result() {
1337
    }
1338
 
1339
    public uploadContent_result(
1340
      List<BulkContentUploadResult> success)
1341
    {
1342
      this();
1343
      this.success = success;
1344
    }
1345
 
1346
    /**
1347
     * Performs a deep copy on <i>other</i>.
1348
     */
1349
    public uploadContent_result(uploadContent_result other) {
1350
      if (other.isSetSuccess()) {
1351
        List<BulkContentUploadResult> __this__success = new ArrayList<BulkContentUploadResult>();
1352
        for (BulkContentUploadResult other_element : other.success) {
1353
          __this__success.add(new BulkContentUploadResult(other_element));
1354
        }
1355
        this.success = __this__success;
1356
      }
1357
    }
1358
 
1359
    public uploadContent_result deepCopy() {
1360
      return new uploadContent_result(this);
1361
    }
1362
 
1363
    @Override
1364
    public void clear() {
1365
      this.success = null;
1366
    }
1367
 
1368
    public int getSuccessSize() {
1369
      return (this.success == null) ? 0 : this.success.size();
1370
    }
1371
 
1372
    public java.util.Iterator<BulkContentUploadResult> getSuccessIterator() {
1373
      return (this.success == null) ? null : this.success.iterator();
1374
    }
1375
 
1376
    public void addToSuccess(BulkContentUploadResult elem) {
1377
      if (this.success == null) {
1378
        this.success = new ArrayList<BulkContentUploadResult>();
1379
      }
1380
      this.success.add(elem);
1381
    }
1382
 
1383
    public List<BulkContentUploadResult> getSuccess() {
1384
      return this.success;
1385
    }
1386
 
1387
    public void setSuccess(List<BulkContentUploadResult> success) {
1388
      this.success = success;
1389
    }
1390
 
1391
    public void unsetSuccess() {
1392
      this.success = null;
1393
    }
1394
 
1395
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
1396
    public boolean isSetSuccess() {
1397
      return this.success != null;
1398
    }
1399
 
1400
    public void setSuccessIsSet(boolean value) {
1401
      if (!value) {
1402
        this.success = null;
1403
      }
1404
    }
1405
 
1406
    public void setFieldValue(_Fields field, Object value) {
1407
      switch (field) {
1408
      case SUCCESS:
1409
        if (value == null) {
1410
          unsetSuccess();
1411
        } else {
1412
          setSuccess((List<BulkContentUploadResult>)value);
1413
        }
1414
        break;
1415
 
1416
      }
1417
    }
1418
 
1419
    public Object getFieldValue(_Fields field) {
1420
      switch (field) {
1421
      case SUCCESS:
1422
        return getSuccess();
1423
 
1424
      }
1425
      throw new IllegalStateException();
1426
    }
1427
 
1428
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
1429
    public boolean isSet(_Fields field) {
1430
      if (field == null) {
1431
        throw new IllegalArgumentException();
1432
      }
1433
 
1434
      switch (field) {
1435
      case SUCCESS:
1436
        return isSetSuccess();
1437
      }
1438
      throw new IllegalStateException();
1439
    }
1440
 
1441
    @Override
1442
    public boolean equals(Object that) {
1443
      if (that == null)
1444
        return false;
1445
      if (that instanceof uploadContent_result)
1446
        return this.equals((uploadContent_result)that);
1447
      return false;
1448
    }
1449
 
1450
    public boolean equals(uploadContent_result that) {
1451
      if (that == null)
1452
        return false;
1453
 
1454
      boolean this_present_success = true && this.isSetSuccess();
1455
      boolean that_present_success = true && that.isSetSuccess();
1456
      if (this_present_success || that_present_success) {
1457
        if (!(this_present_success && that_present_success))
1458
          return false;
1459
        if (!this.success.equals(that.success))
1460
          return false;
1461
      }
1462
 
1463
      return true;
1464
    }
1465
 
1466
    @Override
1467
    public int hashCode() {
1468
      return 0;
1469
    }
1470
 
1471
    public int compareTo(uploadContent_result other) {
1472
      if (!getClass().equals(other.getClass())) {
1473
        return getClass().getName().compareTo(other.getClass().getName());
1474
      }
1475
 
1476
      int lastComparison = 0;
1477
      uploadContent_result typedOther = (uploadContent_result)other;
1478
 
1479
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
1480
      if (lastComparison != 0) {
1481
        return lastComparison;
1482
      }
1483
      if (isSetSuccess()) {
1484
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
1485
        if (lastComparison != 0) {
1486
          return lastComparison;
1487
        }
1488
      }
1489
      return 0;
1490
    }
1491
 
1492
    public _Fields fieldForId(int fieldId) {
1493
      return _Fields.findByThriftId(fieldId);
1494
    }
1495
 
1496
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
1497
      org.apache.thrift.protocol.TField field;
1498
      iprot.readStructBegin();
1499
      while (true)
1500
      {
1501
        field = iprot.readFieldBegin();
1502
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
1503
          break;
1504
        }
1505
        switch (field.id) {
1506
          case 0: // SUCCESS
1507
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
1508
              {
1509
                org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
1510
                this.success = new ArrayList<BulkContentUploadResult>(_list4.size);
1511
                for (int _i5 = 0; _i5 < _list4.size; ++_i5)
1512
                {
1513
                  BulkContentUploadResult _elem6; // required
1514
                  _elem6 = new BulkContentUploadResult();
1515
                  _elem6.read(iprot);
1516
                  this.success.add(_elem6);
1517
                }
1518
                iprot.readListEnd();
1519
              }
1520
            } else { 
1521
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1522
            }
1523
            break;
1524
          default:
1525
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1526
        }
1527
        iprot.readFieldEnd();
1528
      }
1529
      iprot.readStructEnd();
1530
      validate();
1531
    }
1532
 
1533
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
1534
      oprot.writeStructBegin(STRUCT_DESC);
1535
 
1536
      if (this.isSetSuccess()) {
1537
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
1538
        {
1539
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
1540
          for (BulkContentUploadResult _iter7 : this.success)
1541
          {
1542
            _iter7.write(oprot);
1543
          }
1544
          oprot.writeListEnd();
1545
        }
1546
        oprot.writeFieldEnd();
1547
      }
1548
      oprot.writeFieldStop();
1549
      oprot.writeStructEnd();
1550
    }
1551
 
1552
    @Override
1553
    public String toString() {
1554
      StringBuilder sb = new StringBuilder("uploadContent_result(");
1555
      boolean first = true;
1556
 
1557
      sb.append("success:");
1558
      if (this.success == null) {
1559
        sb.append("null");
1560
      } else {
1561
        sb.append(this.success);
1562
      }
1563
      first = false;
1564
      sb.append(")");
1565
      return sb.toString();
1566
    }
1567
 
1568
    public void validate() throws org.apache.thrift.TException {
1569
      // check for required fields
1570
    }
1571
 
1572
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
1573
      try {
1574
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
1575
      } catch (org.apache.thrift.TException te) {
1576
        throw new java.io.IOException(te);
1577
      }
1578
    }
1579
 
1580
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
1581
      try {
1582
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
1583
      } catch (org.apache.thrift.TException te) {
1584
        throw new java.io.IOException(te);
1585
      }
1586
    }
1587
 
1588
  }
1589
 
3893 chandransh 1590
}