summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/openslx/imagemaster/thrift/iface/ImageData.java
blob: b1c91fab512e53af627a7508b47478a3400a9dd3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
/**
 * Autogenerated by Thrift Compiler (0.9.0)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package org.openslx.imagemaster.thrift.iface;

import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;

import org.apache.thrift.scheme.TupleScheme;
import org.apache.thrift.protocol.TTupleProtocol;
import org.apache.thrift.protocol.TProtocolException;
import org.apache.thrift.EncodingUtils;
import org.apache.thrift.TException;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class ImageData implements org.apache.thrift.TBase<ImageData, ImageData._Fields>, java.io.Serializable, Cloneable {
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ImageData");

  private static final org.apache.thrift.protocol.TField UUID_FIELD_DESC = new org.apache.thrift.protocol.TField("uuid", org.apache.thrift.protocol.TType.STRING, (short)1);
  private static final org.apache.thrift.protocol.TField REVISION_FIELD_DESC = new org.apache.thrift.protocol.TField("revision", org.apache.thrift.protocol.TType.I32, (short)2);
  private static final org.apache.thrift.protocol.TField TITLE_FIELD_DESC = new org.apache.thrift.protocol.TField("title", org.apache.thrift.protocol.TType.STRING, (short)3);
  private static final org.apache.thrift.protocol.TField CREATE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("createTime", org.apache.thrift.protocol.TType.I64, (short)4);
  private static final org.apache.thrift.protocol.TField UPDATE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("updateTime", org.apache.thrift.protocol.TType.I64, (short)5);
  private static final org.apache.thrift.protocol.TField OWNER_LOGIN_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerLogin", org.apache.thrift.protocol.TType.STRING, (short)6);
  private static final org.apache.thrift.protocol.TField OPERATING_SYSTEM_FIELD_DESC = new org.apache.thrift.protocol.TField("operatingSystem", org.apache.thrift.protocol.TType.I32, (short)7);
  private static final org.apache.thrift.protocol.TField IS_VALID_FIELD_DESC = new org.apache.thrift.protocol.TField("isValid", org.apache.thrift.protocol.TType.BOOL, (short)8);
  private static final org.apache.thrift.protocol.TField IS_DELETED_FIELD_DESC = new org.apache.thrift.protocol.TField("isDeleted", org.apache.thrift.protocol.TType.BOOL, (short)9);
  private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)11);
  private static final org.apache.thrift.protocol.TField FILE_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("fileSize", org.apache.thrift.protocol.TType.I64, (short)12);

  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
  static {
    schemes.put(StandardScheme.class, new ImageDataStandardSchemeFactory());
    schemes.put(TupleScheme.class, new ImageDataTupleSchemeFactory());
  }

  public String uuid; // required
  public int revision; // required
  public String title; // required
  public long createTime; // required
  public long updateTime; // required
  public String ownerLogin; // required
  public int operatingSystem; // required
  public boolean isValid; // required
  public boolean isDeleted; // required
  public String description; // required
  public long fileSize; // required

  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
    UUID((short)1, "uuid"),
    REVISION((short)2, "revision"),
    TITLE((short)3, "title"),
    CREATE_TIME((short)4, "createTime"),
    UPDATE_TIME((short)5, "updateTime"),
    OWNER_LOGIN((short)6, "ownerLogin"),
    OPERATING_SYSTEM((short)7, "operatingSystem"),
    IS_VALID((short)8, "isValid"),
    IS_DELETED((short)9, "isDeleted"),
    DESCRIPTION((short)11, "description"),
    FILE_SIZE((short)12, "fileSize");

    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

    static {
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
        byName.put(field.getFieldName(), field);
      }
    }

    /**
     * Find the _Fields constant that matches fieldId, or null if its not found.
     */
    public static _Fields findByThriftId(int fieldId) {
      switch(fieldId) {
        case 1: // UUID
          return UUID;
        case 2: // REVISION
          return REVISION;
        case 3: // TITLE
          return TITLE;
        case 4: // CREATE_TIME
          return CREATE_TIME;
        case 5: // UPDATE_TIME
          return UPDATE_TIME;
        case 6: // OWNER_LOGIN
          return OWNER_LOGIN;
        case 7: // OPERATING_SYSTEM
          return OPERATING_SYSTEM;
        case 8: // IS_VALID
          return IS_VALID;
        case 9: // IS_DELETED
          return IS_DELETED;
        case 11: // DESCRIPTION
          return DESCRIPTION;
        case 12: // FILE_SIZE
          return FILE_SIZE;
        default:
          return null;
      }
    }

    /**
     * Find the _Fields constant that matches fieldId, throwing an exception
     * if it is not found.
     */
    public static _Fields findByThriftIdOrThrow(int fieldId) {
      _Fields fields = findByThriftId(fieldId);
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
      return fields;
    }

    /**
     * Find the _Fields constant that matches name, or null if its not found.
     */
    public static _Fields findByName(String name) {
      return byName.get(name);
    }

    private final short _thriftId;
    private final String _fieldName;

    _Fields(short thriftId, String fieldName) {
      _thriftId = thriftId;
      _fieldName = fieldName;
    }

    public short getThriftFieldId() {
      return _thriftId;
    }

    public String getFieldName() {
      return _fieldName;
    }
  }

  // isset id assignments
  private static final int __REVISION_ISSET_ID = 0;
  private static final int __CREATETIME_ISSET_ID = 1;
  private static final int __UPDATETIME_ISSET_ID = 2;
  private static final int __OPERATINGSYSTEM_ISSET_ID = 3;
  private static final int __ISVALID_ISSET_ID = 4;
  private static final int __ISDELETED_ISSET_ID = 5;
  private static final int __FILESIZE_ISSET_ID = 6;
  private byte __isset_bitfield = 0;
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
  static {
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
    tmpMap.put(_Fields.UUID, new org.apache.thrift.meta_data.FieldMetaData("uuid", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , "UUID")));
    tmpMap.put(_Fields.REVISION, new org.apache.thrift.meta_data.FieldMetaData("revision", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.TITLE, new org.apache.thrift.meta_data.FieldMetaData("title", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.CREATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("createTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64        , "UnixTimestamp")));
    tmpMap.put(_Fields.UPDATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("updateTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64        , "UnixTimestamp")));
    tmpMap.put(_Fields.OWNER_LOGIN, new org.apache.thrift.meta_data.FieldMetaData("ownerLogin", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.OPERATING_SYSTEM, new org.apache.thrift.meta_data.FieldMetaData("operatingSystem", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.IS_VALID, new org.apache.thrift.meta_data.FieldMetaData("isValid", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.IS_DELETED, new org.apache.thrift.meta_data.FieldMetaData("isDeleted", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.FILE_SIZE, new org.apache.thrift.meta_data.FieldMetaData("fileSize", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    metaDataMap = Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ImageData.class, metaDataMap);
  }

  public ImageData() {
  }

  public ImageData(
    String uuid,
    int revision,
    String title,
    long createTime,
    long updateTime,
    String ownerLogin,
    int operatingSystem,
    boolean isValid,
    boolean isDeleted,
    String description,
    long fileSize)
  {
    this();
    this.uuid = uuid;
    this.revision = revision;
    setRevisionIsSet(true);
    this.title = title;
    this.createTime = createTime;
    setCreateTimeIsSet(true);
    this.updateTime = updateTime;
    setUpdateTimeIsSet(true);
    this.ownerLogin = ownerLogin;
    this.operatingSystem = operatingSystem;
    setOperatingSystemIsSet(true);
    this.isValid = isValid;
    setIsValidIsSet(true);
    this.isDeleted = isDeleted;
    setIsDeletedIsSet(true);
    this.description = description;
    this.fileSize = fileSize;
    setFileSizeIsSet(true);
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public ImageData(ImageData other) {
    __isset_bitfield = other.__isset_bitfield;
    if (other.isSetUuid()) {
      this.uuid = other.uuid;
    }
    this.revision = other.revision;
    if (other.isSetTitle()) {
      this.title = other.title;
    }
    this.createTime = other.createTime;
    this.updateTime = other.updateTime;
    if (other.isSetOwnerLogin()) {
      this.ownerLogin = other.ownerLogin;
    }
    this.operatingSystem = other.operatingSystem;
    this.isValid = other.isValid;
    this.isDeleted = other.isDeleted;
    if (other.isSetDescription()) {
      this.description = other.description;
    }
    this.fileSize = other.fileSize;
  }

  public ImageData deepCopy() {
    return new ImageData(this);
  }

  @Override
  public void clear() {
    this.uuid = null;
    setRevisionIsSet(false);
    this.revision = 0;
    this.title = null;
    setCreateTimeIsSet(false);
    this.createTime = 0;
    setUpdateTimeIsSet(false);
    this.updateTime = 0;
    this.ownerLogin = null;
    setOperatingSystemIsSet(false);
    this.operatingSystem = 0;
    setIsValidIsSet(false);
    this.isValid = false;
    setIsDeletedIsSet(false);
    this.isDeleted = false;
    this.description = null;
    setFileSizeIsSet(false);
    this.fileSize = 0;
  }

  public String getUuid() {
    return this.uuid;
  }

  public ImageData setUuid(String uuid) {
    this.uuid = uuid;
    return this;
  }

  public void unsetUuid() {
    this.uuid = null;
  }

  /** Returns true if field uuid is set (has been assigned a value) and false otherwise */
  public boolean isSetUuid() {
    return this.uuid != null;
  }

  public void setUuidIsSet(boolean value) {
    if (!value) {
      this.uuid = null;
    }
  }

  public int getRevision() {
    return this.revision;
  }

  public ImageData setRevision(int revision) {
    this.revision = revision;
    setRevisionIsSet(true);
    return this;
  }

  public void unsetRevision() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REVISION_ISSET_ID);
  }

  /** Returns true if field revision is set (has been assigned a value) and false otherwise */
  public boolean isSetRevision() {
    return EncodingUtils.testBit(__isset_bitfield, __REVISION_ISSET_ID);
  }

  public void setRevisionIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REVISION_ISSET_ID, value);
  }

  public String getTitle() {
    return this.title;
  }

  public ImageData setTitle(String title) {
    this.title = title;
    return this;
  }

  public void unsetTitle() {
    this.title = null;
  }

  /** Returns true if field title is set (has been assigned a value) and false otherwise */
  public boolean isSetTitle() {
    return this.title != null;
  }

  public void setTitleIsSet(boolean value) {
    if (!value) {
      this.title = null;
    }
  }

  public long getCreateTime() {
    return this.createTime;
  }

  public ImageData setCreateTime(long createTime) {
    this.createTime = createTime;
    setCreateTimeIsSet(true);
    return this;
  }

  public void unsetCreateTime() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATETIME_ISSET_ID);
  }

  /** Returns true if field createTime is set (has been assigned a value) and false otherwise */
  public boolean isSetCreateTime() {
    return EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID);
  }

  public void setCreateTimeIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value);
  }

  public long getUpdateTime() {
    return this.updateTime;
  }

  public ImageData setUpdateTime(long updateTime) {
    this.updateTime = updateTime;
    setUpdateTimeIsSet(true);
    return this;
  }

  public void unsetUpdateTime() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATETIME_ISSET_ID);
  }

  /** Returns true if field updateTime is set (has been assigned a value) and false otherwise */
  public boolean isSetUpdateTime() {
    return EncodingUtils.testBit(__isset_bitfield, __UPDATETIME_ISSET_ID);
  }

  public void setUpdateTimeIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATETIME_ISSET_ID, value);
  }

  public String getOwnerLogin() {
    return this.ownerLogin;
  }

  public ImageData setOwnerLogin(String ownerLogin) {
    this.ownerLogin = ownerLogin;
    return this;
  }

  public void unsetOwnerLogin() {
    this.ownerLogin = null;
  }

  /** Returns true if field ownerLogin is set (has been assigned a value) and false otherwise */
  public boolean isSetOwnerLogin() {
    return this.ownerLogin != null;
  }

  public void setOwnerLoginIsSet(boolean value) {
    if (!value) {
      this.ownerLogin = null;
    }
  }

  public int getOperatingSystem() {
    return this.operatingSystem;
  }

  public ImageData setOperatingSystem(int operatingSystem) {
    this.operatingSystem = operatingSystem;
    setOperatingSystemIsSet(true);
    return this;
  }

  public void unsetOperatingSystem() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __OPERATINGSYSTEM_ISSET_ID);
  }

  /** Returns true if field operatingSystem is set (has been assigned a value) and false otherwise */
  public boolean isSetOperatingSystem() {
    return EncodingUtils.testBit(__isset_bitfield, __OPERATINGSYSTEM_ISSET_ID);
  }

  public void setOperatingSystemIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OPERATINGSYSTEM_ISSET_ID, value);
  }

  public boolean isIsValid() {
    return this.isValid;
  }

  public ImageData setIsValid(boolean isValid) {
    this.isValid = isValid;
    setIsValidIsSet(true);
    return this;
  }

  public void unsetIsValid() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISVALID_ISSET_ID);
  }

  /** Returns true if field isValid is set (has been assigned a value) and false otherwise */
  public boolean isSetIsValid() {
    return EncodingUtils.testBit(__isset_bitfield, __ISVALID_ISSET_ID);
  }

  public void setIsValidIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISVALID_ISSET_ID, value);
  }

  public boolean isIsDeleted() {
    return this.isDeleted;
  }

  public ImageData setIsDeleted(boolean isDeleted) {
    this.isDeleted = isDeleted;
    setIsDeletedIsSet(true);
    return this;
  }

  public void unsetIsDeleted() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISDELETED_ISSET_ID);
  }

  /** Returns true if field isDeleted is set (has been assigned a value) and false otherwise */
  public boolean isSetIsDeleted() {
    return EncodingUtils.testBit(__isset_bitfield, __ISDELETED_ISSET_ID);
  }

  public void setIsDeletedIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISDELETED_ISSET_ID, value);
  }

  public String getDescription() {
    return this.description;
  }

  public ImageData setDescription(String description) {
    this.description = description;
    return this;
  }

  public void unsetDescription() {
    this.description = null;
  }

  /** Returns true if field description is set (has been assigned a value) and false otherwise */
  public boolean isSetDescription() {
    return this.description != null;
  }

  public void setDescriptionIsSet(boolean value) {
    if (!value) {
      this.description = null;
    }
  }

  public long getFileSize() {
    return this.fileSize;
  }

  public ImageData setFileSize(long fileSize) {
    this.fileSize = fileSize;
    setFileSizeIsSet(true);
    return this;
  }

  public void unsetFileSize() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILESIZE_ISSET_ID);
  }

  /** Returns true if field fileSize is set (has been assigned a value) and false otherwise */
  public boolean isSetFileSize() {
    return EncodingUtils.testBit(__isset_bitfield, __FILESIZE_ISSET_ID);
  }

  public void setFileSizeIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILESIZE_ISSET_ID, value);
  }

  public void setFieldValue(_Fields field, Object value) {
    switch (field) {
    case UUID:
      if (value == null) {
        unsetUuid();
      } else {
        setUuid((String)value);
      }
      break;

    case REVISION:
      if (value == null) {
        unsetRevision();
      } else {
        setRevision((Integer)value);
      }
      break;

    case TITLE:
      if (value == null) {
        unsetTitle();
      } else {
        setTitle((String)value);
      }
      break;

    case CREATE_TIME:
      if (value == null) {
        unsetCreateTime();
      } else {
        setCreateTime((Long)value);
      }
      break;

    case UPDATE_TIME:
      if (value == null) {
        unsetUpdateTime();
      } else {
        setUpdateTime((Long)value);
      }
      break;

    case OWNER_LOGIN:
      if (value == null) {
        unsetOwnerLogin();
      } else {
        setOwnerLogin((String)value);
      }
      break;

    case OPERATING_SYSTEM:
      if (value == null) {
        unsetOperatingSystem();
      } else {
        setOperatingSystem((Integer)value);
      }
      break;

    case IS_VALID:
      if (value == null) {
        unsetIsValid();
      } else {
        setIsValid((Boolean)value);
      }
      break;

    case IS_DELETED:
      if (value == null) {
        unsetIsDeleted();
      } else {
        setIsDeleted((Boolean)value);
      }
      break;

    case DESCRIPTION:
      if (value == null) {
        unsetDescription();
      } else {
        setDescription((String)value);
      }
      break;

    case FILE_SIZE:
      if (value == null) {
        unsetFileSize();
      } else {
        setFileSize((Long)value);
      }
      break;

    }
  }

  public Object getFieldValue(_Fields field) {
    switch (field) {
    case UUID:
      return getUuid();

    case REVISION:
      return Integer.valueOf(getRevision());

    case TITLE:
      return getTitle();

    case CREATE_TIME:
      return Long.valueOf(getCreateTime());

    case UPDATE_TIME:
      return Long.valueOf(getUpdateTime());

    case OWNER_LOGIN:
      return getOwnerLogin();

    case OPERATING_SYSTEM:
      return Integer.valueOf(getOperatingSystem());

    case IS_VALID:
      return Boolean.valueOf(isIsValid());

    case IS_DELETED:
      return Boolean.valueOf(isIsDeleted());

    case DESCRIPTION:
      return getDescription();

    case FILE_SIZE:
      return Long.valueOf(getFileSize());

    }
    throw new IllegalStateException();
  }

  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
  public boolean isSet(_Fields field) {
    if (field == null) {
      throw new IllegalArgumentException();
    }

    switch (field) {
    case UUID:
      return isSetUuid();
    case REVISION:
      return isSetRevision();
    case TITLE:
      return isSetTitle();
    case CREATE_TIME:
      return isSetCreateTime();
    case UPDATE_TIME:
      return isSetUpdateTime();
    case OWNER_LOGIN:
      return isSetOwnerLogin();
    case OPERATING_SYSTEM:
      return isSetOperatingSystem();
    case IS_VALID:
      return isSetIsValid();
    case IS_DELETED:
      return isSetIsDeleted();
    case DESCRIPTION:
      return isSetDescription();
    case FILE_SIZE:
      return isSetFileSize();
    }
    throw new IllegalStateException();
  }

  @Override
  public boolean equals(Object that) {
    if (that == null)
      return false;
    if (that instanceof ImageData)
      return this.equals((ImageData)that);
    return false;
  }

  public boolean equals(ImageData that) {
    if (that == null)
      return false;

    boolean this_present_uuid = true && this.isSetUuid();
    boolean that_present_uuid = true && that.isSetUuid();
    if (this_present_uuid || that_present_uuid) {
      if (!(this_present_uuid && that_present_uuid))
        return false;
      if (!this.uuid.equals(that.uuid))
        return false;
    }

    boolean this_present_revision = true;
    boolean that_present_revision = true;
    if (this_present_revision || that_present_revision) {
      if (!(this_present_revision && that_present_revision))
        return false;
      if (this.revision != that.revision)
        return false;
    }

    boolean this_present_title = true && this.isSetTitle();
    boolean that_present_title = true && that.isSetTitle();
    if (this_present_title || that_present_title) {
      if (!(this_present_title && that_present_title))
        return false;
      if (!this.title.equals(that.title))
        return false;
    }

    boolean this_present_createTime = true;
    boolean that_present_createTime = true;
    if (this_present_createTime || that_present_createTime) {
      if (!(this_present_createTime && that_present_createTime))
        return false;
      if (this.createTime != that.createTime)
        return false;
    }

    boolean this_present_updateTime = true;
    boolean that_present_updateTime = true;
    if (this_present_updateTime || that_present_updateTime) {
      if (!(this_present_updateTime && that_present_updateTime))
        return false;
      if (this.updateTime != that.updateTime)
        return false;
    }

    boolean this_present_ownerLogin = true && this.isSetOwnerLogin();
    boolean that_present_ownerLogin = true && that.isSetOwnerLogin();
    if (this_present_ownerLogin || that_present_ownerLogin) {
      if (!(this_present_ownerLogin && that_present_ownerLogin))
        return false;
      if (!this.ownerLogin.equals(that.ownerLogin))
        return false;
    }

    boolean this_present_operatingSystem = true;
    boolean that_present_operatingSystem = true;
    if (this_present_operatingSystem || that_present_operatingSystem) {
      if (!(this_present_operatingSystem && that_present_operatingSystem))
        return false;
      if (this.operatingSystem != that.operatingSystem)
        return false;
    }

    boolean this_present_isValid = true;
    boolean that_present_isValid = true;
    if (this_present_isValid || that_present_isValid) {
      if (!(this_present_isValid && that_present_isValid))
        return false;
      if (this.isValid != that.isValid)
        return false;
    }

    boolean this_present_isDeleted = true;
    boolean that_present_isDeleted = true;
    if (this_present_isDeleted || that_present_isDeleted) {
      if (!(this_present_isDeleted && that_present_isDeleted))
        return false;
      if (this.isDeleted != that.isDeleted)
        return false;
    }

    boolean this_present_description = true && this.isSetDescription();
    boolean that_present_description = true && that.isSetDescription();
    if (this_present_description || that_present_description) {
      if (!(this_present_description && that_present_description))
        return false;
      if (!this.description.equals(that.description))
        return false;
    }

    boolean this_present_fileSize = true;
    boolean that_present_fileSize = true;
    if (this_present_fileSize || that_present_fileSize) {
      if (!(this_present_fileSize && that_present_fileSize))
        return false;
      if (this.fileSize != that.fileSize)
        return false;
    }

    return true;
  }

  @Override
  public int hashCode() {
    return 0;
  }

  public int compareTo(ImageData other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;
    ImageData typedOther = (ImageData)other;

    lastComparison = Boolean.valueOf(isSetUuid()).compareTo(typedOther.isSetUuid());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUuid()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uuid, typedOther.uuid);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetRevision()).compareTo(typedOther.isSetRevision());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetRevision()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.revision, typedOther.revision);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetTitle()).compareTo(typedOther.isSetTitle());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTitle()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.title, typedOther.title);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(typedOther.isSetCreateTime());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCreateTime()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createTime, typedOther.createTime);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetUpdateTime()).compareTo(typedOther.isSetUpdateTime());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUpdateTime()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updateTime, typedOther.updateTime);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetOwnerLogin()).compareTo(typedOther.isSetOwnerLogin());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetOwnerLogin()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerLogin, typedOther.ownerLogin);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetOperatingSystem()).compareTo(typedOther.isSetOperatingSystem());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetOperatingSystem()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operatingSystem, typedOther.operatingSystem);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetIsValid()).compareTo(typedOther.isSetIsValid());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIsValid()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isValid, typedOther.isValid);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetIsDeleted()).compareTo(typedOther.isSetIsDeleted());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIsDeleted()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isDeleted, typedOther.isDeleted);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetDescription()).compareTo(typedOther.isSetDescription());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDescription()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, typedOther.description);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetFileSize()).compareTo(typedOther.isSetFileSize());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetFileSize()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileSize, typedOther.fileSize);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }

  public _Fields fieldForId(int fieldId) {
    return _Fields.findByThriftId(fieldId);
  }

  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
  }

  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder("ImageData(");
    boolean first = true;

    sb.append("uuid:");
    if (this.uuid == null) {
      sb.append("null");
    } else {
      sb.append(this.uuid);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("revision:");
    sb.append(this.revision);
    first = false;
    if (!first) sb.append(", ");
    sb.append("title:");
    if (this.title == null) {
      sb.append("null");
    } else {
      sb.append(this.title);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("createTime:");
    sb.append(this.createTime);
    first = false;
    if (!first) sb.append(", ");
    sb.append("updateTime:");
    sb.append(this.updateTime);
    first = false;
    if (!first) sb.append(", ");
    sb.append("ownerLogin:");
    if (this.ownerLogin == null) {
      sb.append("null");
    } else {
      sb.append(this.ownerLogin);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("operatingSystem:");
    sb.append(this.operatingSystem);
    first = false;
    if (!first) sb.append(", ");
    sb.append("isValid:");
    sb.append(this.isValid);
    first = false;
    if (!first) sb.append(", ");
    sb.append("isDeleted:");
    sb.append(this.isDeleted);
    first = false;
    if (!first) sb.append(", ");
    sb.append("description:");
    if (this.description == null) {
      sb.append("null");
    } else {
      sb.append(this.description);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("fileSize:");
    sb.append(this.fileSize);
    first = false;
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws org.apache.thrift.TException {
    // check for required fields
    // check for sub-struct validity
  }

  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
    try {
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
    } catch (org.apache.thrift.TException te) {
      throw new java.io.IOException(te);
    }
  }

  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
    try {
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
      __isset_bitfield = 0;
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
    } catch (org.apache.thrift.TException te) {
      throw new java.io.IOException(te);
    }
  }

  private static class ImageDataStandardSchemeFactory implements SchemeFactory {
    public ImageDataStandardScheme getScheme() {
      return new ImageDataStandardScheme();
    }
  }

  private static class ImageDataStandardScheme extends StandardScheme<ImageData> {

    public void read(org.apache.thrift.protocol.TProtocol iprot, ImageData struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField schemeField;
      iprot.readStructBegin();
      while (true)
      {
        schemeField = iprot.readFieldBegin();
        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (schemeField.id) {
          case 1: // UUID
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.uuid = iprot.readString();
              struct.setUuidIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // REVISION
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.revision = iprot.readI32();
              struct.setRevisionIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // TITLE
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.title = iprot.readString();
              struct.setTitleIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // CREATE_TIME
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.createTime = iprot.readI64();
              struct.setCreateTimeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // UPDATE_TIME
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.updateTime = iprot.readI64();
              struct.setUpdateTimeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // OWNER_LOGIN
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.ownerLogin = iprot.readString();
              struct.setOwnerLoginIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 7: // OPERATING_SYSTEM
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.operatingSystem = iprot.readI32();
              struct.setOperatingSystemIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 8: // IS_VALID
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.isValid = iprot.readBool();
              struct.setIsValidIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 9: // IS_DELETED
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.isDeleted = iprot.readBool();
              struct.setIsDeletedIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 11: // DESCRIPTION
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.description = iprot.readString();
              struct.setDescriptionIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 12: // FILE_SIZE
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.fileSize = iprot.readI64();
              struct.setFileSizeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();

      // check for required fields of primitive type, which can't be checked in the validate method
      struct.validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot, ImageData struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.uuid != null) {
        oprot.writeFieldBegin(UUID_FIELD_DESC);
        oprot.writeString(struct.uuid);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(REVISION_FIELD_DESC);
      oprot.writeI32(struct.revision);
      oprot.writeFieldEnd();
      if (struct.title != null) {
        oprot.writeFieldBegin(TITLE_FIELD_DESC);
        oprot.writeString(struct.title);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC);
      oprot.writeI64(struct.createTime);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(UPDATE_TIME_FIELD_DESC);
      oprot.writeI64(struct.updateTime);
      oprot.writeFieldEnd();
      if (struct.ownerLogin != null) {
        oprot.writeFieldBegin(OWNER_LOGIN_FIELD_DESC);
        oprot.writeString(struct.ownerLogin);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(OPERATING_SYSTEM_FIELD_DESC);
      oprot.writeI32(struct.operatingSystem);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(IS_VALID_FIELD_DESC);
      oprot.writeBool(struct.isValid);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(IS_DELETED_FIELD_DESC);
      oprot.writeBool(struct.isDeleted);
      oprot.writeFieldEnd();
      if (struct.description != null) {
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
        oprot.writeString(struct.description);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(FILE_SIZE_FIELD_DESC);
      oprot.writeI64(struct.fileSize);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

  private static class ImageDataTupleSchemeFactory implements SchemeFactory {
    public ImageDataTupleScheme getScheme() {
      return new ImageDataTupleScheme();
    }
  }

  private static class ImageDataTupleScheme extends TupleScheme<ImageData> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, ImageData struct) throws org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetUuid()) {
        optionals.set(0);
      }
      if (struct.isSetRevision()) {
        optionals.set(1);
      }
      if (struct.isSetTitle()) {
        optionals.set(2);
      }
      if (struct.isSetCreateTime()) {
        optionals.set(3);
      }
      if (struct.isSetUpdateTime()) {
        optionals.set(4);
      }
      if (struct.isSetOwnerLogin()) {
        optionals.set(5);
      }
      if (struct.isSetOperatingSystem()) {
        optionals.set(6);
      }
      if (struct.isSetIsValid()) {
        optionals.set(7);
      }
      if (struct.isSetIsDeleted()) {
        optionals.set(8);
      }
      if (struct.isSetDescription()) {
        optionals.set(9);
      }
      if (struct.isSetFileSize()) {
        optionals.set(10);
      }
      oprot.writeBitSet(optionals, 11);
      if (struct.isSetUuid()) {
        oprot.writeString(struct.uuid);
      }
      if (struct.isSetRevision()) {
        oprot.writeI32(struct.revision);
      }
      if (struct.isSetTitle()) {
        oprot.writeString(struct.title);
      }
      if (struct.isSetCreateTime()) {
        oprot.writeI64(struct.createTime);
      }
      if (struct.isSetUpdateTime()) {
        oprot.writeI64(struct.updateTime);
      }
      if (struct.isSetOwnerLogin()) {
        oprot.writeString(struct.ownerLogin);
      }
      if (struct.isSetOperatingSystem()) {
        oprot.writeI32(struct.operatingSystem);
      }
      if (struct.isSetIsValid()) {
        oprot.writeBool(struct.isValid);
      }
      if (struct.isSetIsDeleted()) {
        oprot.writeBool(struct.isDeleted);
      }
      if (struct.isSetDescription()) {
        oprot.writeString(struct.description);
      }
      if (struct.isSetFileSize()) {
        oprot.writeI64(struct.fileSize);
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, ImageData struct) throws org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(11);
      if (incoming.get(0)) {
        struct.uuid = iprot.readString();
        struct.setUuidIsSet(true);
      }
      if (incoming.get(1)) {
        struct.revision = iprot.readI32();
        struct.setRevisionIsSet(true);
      }
      if (incoming.get(2)) {
        struct.title = iprot.readString();
        struct.setTitleIsSet(true);
      }
      if (incoming.get(3)) {
        struct.createTime = iprot.readI64();
        struct.setCreateTimeIsSet(true);
      }
      if (incoming.get(4)) {
        struct.updateTime = iprot.readI64();
        struct.setUpdateTimeIsSet(true);
      }
      if (incoming.get(5)) {
        struct.ownerLogin = iprot.readString();
        struct.setOwnerLoginIsSet(true);
      }
      if (incoming.get(6)) {
        struct.operatingSystem = iprot.readI32();
        struct.setOperatingSystemIsSet(true);
      }
      if (incoming.get(7)) {
        struct.isValid = iprot.readBool();
        struct.setIsValidIsSet(true);
      }
      if (incoming.get(8)) {
        struct.isDeleted = iprot.readBool();
        struct.setIsDeletedIsSet(true);
      }
      if (incoming.get(9)) {
        struct.description = iprot.readString();
        struct.setDescriptionIsSet(true);
      }
      if (incoming.get(10)) {
        struct.fileSize = iprot.readI64();
        struct.setFileSizeIsSet(true);
      }
    }
  }

}