summaryrefslogblamecommitdiffstats
path: root/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java
blob: 517614e76cb511078fdcde09e80f32102d7a819a (plain) (tree)
1
2
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808
11809
11810
11811
11812
11813
11814
11815
11816
11817
11818
11819
11820
11821
11822
11823
11824
11825
11826
11827
11828
11829
11830
11831
11832
11833
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846
11847
11848
11849
11850
11851
11852
11853
11854
11855
11856
11857
11858
11859
11860
11861
11862
11863
11864
11865
11866
11867
11868
11869
11870
11871
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
11932
11933
11934
11935
11936
11937
11938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
11987
11988
11989
11990
11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
12014
12015
12016
12017
12018
12019
12020
12021
12022
12023
12024
12025
12026
12027
12028
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286
12287
12288
12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316
12317
12318
12319
12320
12321
12322
12323
12324
12325
12326
12327
12328
12329
12330
12331
12332
12333
12334
12335
12336
12337
12338
12339
12340
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350
12351
12352
12353
12354
12355
12356
12357
12358
12359
12360
12361
12362
12363
12364
12365
12366
12367
12368
12369
12370
12371
12372
12373
12374
12375
12376
12377
12378
12379
12380
12381
12382
12383
12384
12385
12386
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
12417
12418
12419
12420
12421
12422
12423
12424
12425
12426
12427
12428
12429
12430
12431
12432
12433
12434
12435
12436
12437
12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454
12455
12456
12457
12458
12459
12460
12461
12462
12463
12464
12465
12466
12467
12468
12469
12470
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480
12481
12482
12483
12484
12485
12486
12487
12488
12489
12490
12491
12492
12493
12494
12495
12496
12497
12498
12499
12500
12501
12502
12503
12504
12505
12506
12507
12508
12509
12510
12511
12512
12513
12514
12515
12516
12517
12518
12519
12520
12521
12522
12523
12524
12525
12526
12527
12528
12529
12530
12531
12532
12533
12534
12535
12536
12537
12538
12539
12540
12541
12542
12543
12544
12545
12546
12547
12548
12549
12550
12551
12552
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564
12565
12566
12567
12568
12569
12570
12571
12572
12573
12574
12575
12576
12577
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587
12588
12589
12590
12591
12592
12593
12594
12595
12596
12597
12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
12620
12621
12622
12623
12624
12625
12626
12627
12628
12629
12630
12631
12632
12633
12634
12635
12636
12637
12638
12639
12640
12641
12642
12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670
12671
12672
12673
12674
12675
12676
12677
12678
12679
12680
12681
12682
12683
12684
12685
12686
12687
12688
12689
12690
12691
12692
12693
12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
12730
12731
12732
12733
12734
12735
12736
12737
12738
12739
12740
12741
12742
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754
12755
12756
12757
12758
12759
12760
12761
12762
12763
12764
12765
12766
12767
12768
12769
12770
12771
12772
12773
12774
12775
12776
12777
12778
12779
12780
12781
12782
12783
12784
12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
12819
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
12839
12840
12841
12842
12843
12844
12845
12846
12847
12848
12849
12850
12851
12852
12853
12854
12855
12856
12857
12858
12859
12860
12861
12862
12863
12864
12865
12866
12867
12868
12869
12870
12871
12872
12873
12874
12875
12876
12877
12878
12879
12880
12881
12882
12883
12884
12885
12886
12887
12888
12889
12890
12891
12892
12893
12894
12895
12896
12897
12898
12899
12900
12901
12902
12903
12904
12905
12906
12907
12908
12909
12910
12911
12912
12913
12914
12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928
12929
12930
12931
12932
15954
15955
15956
15957
15958
15959
15960
15961
15962
15963
15964
15965
15966
15967
15968
15969
15970
15971
15972
15973
15974
15975
15976
15977
15978
15979
15980
15981
15982
15983
15984
15985
15986
15987
15988
15989
15990
15991
15992
15993
15994
15995
15996
15997
15998
15999
16000
16001
16002
16003
16004
16005
16006
16007
16008
16009
16010
16011
16012
16013
16014
16015
16016
16017
16018
16019
16020
16021
16022
16023
16024
16025
16026
16027
16028
16029
16030
16031
16032
16033
16034
16035
16036
16037
16038
16039
16040
16041
16042
16043
16044
16045
16046
16047
16048
16049
16050
16051
16052
16053
16054
16055
16056
16057
16058
16059
16060
16061
16062
16063
16064
16065
16066
16067
16068
16069
16070
16071
16072
16073
16074
16075
16076
16077
16078
16079
16080
16081
16082
16083
16084
16085
16086
16087
16088
16089
16090
16091
16092
16093
16094
16095
16096
16097
16098
16099
16100
16101
16102
16103
16104
16105
16106
16107
16108
16109
16110
16111
16112
16113
16114
16115
16116
16117
16118
16119
16120
16121
16122
16123
16124
16125
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144
16145
16146
16147
16148
16149
16150
16151
16152
16153
16154
16155
16156
16157
16158
16159
16160
16161
16162
16163
16164
16165
16166
16167
16168
16169
16170
16171
16172
16173
16174
16175
16176
16177
16178
16179
16180
16181
16182
16183
16184
16185
16186
16187
16188
16189
16190
16191
16192
16193
16194
16195
16196
16197
16198
16199
16200
16201
16202
16203
16204
16205
16206
16207
16208
16209
16210
16211
16212
16213
16214
16215
16216
16217
16218
16219
16220
16221
16222
16223
16224
16225
16226
16227
16228
16229
16230
16231
16232
16233
16234
16235
16236
16237
16238
16239
16240
16241
16242
16243
16244
16245
16246
16247
16248
16249
16250
16251
16252
16253
16254
16255
16256
16257
16258
16259
16260
16261
16262
16263
16264
16265
16266
16267
16268
16269
16270
16271
16272
16273
16274
16275
16276
16277
16278
16279
16280
16281
16282
16283
16284
16285
16286
16287
16288
16289
16290
16291
16292
16293
16294
16295
16296
16297
16298
16299
16300
16301
16302
16303
16304
16305
16306
22134
22135
22136
22137
22138
22139
22140
22141
22142
22143
22144
22145
22146
22147
22148
22149
22150
22151
22152
22153
22154
22155
22156
22157
22158
22159
22160
22161
22162
22163
22164
22165
22166
22167
22168
22169
22170
22171
22172
22173
22174
22175
22176
22177
22178
22179
22180
22181
22182
22183
22184
22185
22186
22187
22188
22189
22190
22191
22192
22193
22194
22195
22196
22197
22198
22199
22200
22201
22202
22203
22204
22205
22206
22207
22208
22209
22210
22211
22212
22213
22214
22215
22216
22217
22218
22219
22220
22221
22222
22223
22224
22225
22226
22227
22228
22229
22230
22231
22232
22233
22234
22235
22236
22237
22238
22239
22240
22241
22242
22243
22244
22245
22246
22247
22248
22249
22250
22251
22252
22253
22254
22255
22256
22257
22258
22259
22260
22261
22262
22263
22264
22265
22266
22267
22268
22269
22270
22271
22272
22273
22274
22275
22276
22277
22278
22279
22280
22281
22282
22283
22284
22285
22286
22287
22288
22289
22290
22291
22292
22293
22294
22295
22296
22297
22298
22299
22300
22301
22302
22303
22304
22305
22306
22307
22308
22309
22310
22311
22312
22313
22314
22315
22316
22317
22318
22319
22320
22321
22322
22323
22324
22325
22326
22327
22328
22329
22330
22331
22332
22333
22334
22335
22336
22337
22338
22339
22340
22341
22342
22343
22344
22345
22346
22347
22348
22349
22350
22351
22352
22353
22354
22355
22356
22357
22358
22359
22360
22361
22362
22363
22364
22365
22366
22367
22368
22369
22370
22371
22372
22373
22374
22375
22376
22377
22378
22379
22380
22381
22382
22383
22384
22385
22386
22387
22388
22389
22390
22391
22392
22393
22394
22395
22396
22397
22398
22399
22400
22401
22402
22403
22404
22405
22406
22407
22408
22409
22410
22411
22412
22413
22414
22415
22416
22417
22418
22419
22420
22421
22422
22423
22424
22425
22426
22427
22428
22429
22430
22431
22432
22433
22434
22435
22436
22437
22438
22439
22440
22441
22442
22443
22444
22445
22446
22447
22448
22449
22450
22451
22452
22453
22454
22455
22456
22457
22458
22459
22460
22461
22462
22463
22464
22465
22466
22467
22468
22469
22470
22471
22472
22473
22474
22475
22476
22477
22478
22479
22480
22481
22482
22483
22484
22485
22486
22487
22488
22489
22490
22491
22492
22493
22494
22495
22496
22497
22498
22499
22500
22501
22502
22503
22504
22505
22506
22507
22508
22509
28740
28741
28742
28743
28744
28745
28746
28747
28748
28749
28750
28751
28752
28753
28754
28755
28756
28757
28758
28759
28760
28761
28762
28763
28764
28765
28766
28767
28768
28769
28770
28771
28772
28773
28774
28775
28776
28777
28778
28779
28780
28781
28782
28783
28784
28785
28786
28787
28788
28789
28790
28791
28792
28793
28794
28795
28796
28797
28798
28799
28800
28801
28802
28803
28804
28805
28806
28807
28808
28809
28810
28811
28812
28813
28814
28815
28816
28817
28818
28819
28820
28821
28822
28823
28824
28825
28826
28827
28828
28829
28830
28831
28832
28833
28834
28835
28836
28837
28838
28839
28840
28841
28842
28843
28844
28845
28846
28847
28848
28849
28850
28851
28852
28853
28854
28855
28856
28857
28858
28859
28860
28861
28862
28863
28864
28865
28866
28867
28868
28869
28870
28871
28872
28873
28874
28875
28876
28877
28878
28879
28880
28881
28882
28883
28884
28885
28886
28887
28888
28889
28890
28891
28892
28893
28894
28895
28896
28897
28898
28899
28900
28901
28902
28903
28904
28905
28906
28907
28908
28909
28910
28911
28912
28913
28914
28915
28916
28917
28918
28919
28920
28921
28922
28923
28924
28925
28926
28927
28928
28929
28930
28931
28932
28933
28934
28935
28936
28937
28938
28939
28940
28941
28942
28943
28944
28945
28946
28947
28948
28949
28950
28951
28952
28953
28954
28955
28956
28957
28958
28959
28960
28961
28962
28963
28964
28965
28966
28967
28968
28969
28970
28971
28972
28973
28974
28975
28976
28977
28978
28979
28980
28981
28982
28983
28984
28985
28986
28987
28988
28989
28990
28991
28992
28993
28994
28995
28996
28997
28998
28999
29000
29001
29002
29003
29004
29005
29006
29007
29008
29009
29010
29011
29012
29013
29014
29015
29016
29017
29018
29019
29020
29021
29022
29023
29024
29025
29026
29027
29028
29029
29030
29031
29032
29033
29034
29035
29036
29037
29038
29039
29040
29041
29042
29043
29044
29045
29046
29047
29048
29049
29050
29051
29052
29053
29054
29055
29056
29057
29058
29059
29060
29061
29062
29063
29064
29065
29066
29067
29068
29069
29070
29071
29072
29073
29074
29075
29076
29077
29078
29079
29080
29081
29082
29083
29084
29085
29086
29087
29088
29089
29090
29091
29092
29093
29094
29095
29096
29097
29098
29099
29100
29101
29102
29103
29104
29105
29106
29107
29108
29109
29110
29111
29112
29113
29114
29115
29116
29117
29118
29119
29120
29121
29122
29123
29124
29125
29126
29127
29128
29129
29130
29131
29132
29133
29134
29135
29136
29137
29138
29139
29140
29141
29142
29143
29144
29145
29146
29147
29148
29149
29150
29151
29152
29153
29154
29155
29156
29157
29158
29159
29160
29161
29162
29163
29164
29165
29166
29167
29168
29169
29170
29171
29172
29173
29174
29175
29176
29177
29178
29179
29180
29181
29182
29183
29184
29185
29186
29187
29188
29189
29190
29191
29192
29193
29194
29195
29196
29197
29198
29199
29200
29201
29202
29203
29204
29205
29206
29207
29208
29209
29210
29211
29212
29213
29214
29215
29216
29217
29218
29219
29220
29221
29222
29223
29224
29225
29226
29227
29228
29229
29230
29231
29232
29233
29234
29235
29236
29237
29238
29239
29240
29241
29242
29243
29244
29245
29246
29247
29248
29249
29250
29251
29252
29253
29254
29255
29256
29257
29258
29259
29260
29261
29262
29263
29264
29265
29266
29267
29268
29269
29270
29271
29272
29273
29274
29275
29276
29277
29278
29279
29280
29281
29282
29283
29284
29285
29286
29287
29288
29289
29290
29291
29292
29293
29294
29295
29296
29297
29298
29299
29300
29301
29302
29303
29304
29305
29306
29307
29308
29309
29310
29311
29312
29313
29314
29315
29316
29317
29318
29319
29320
29321
29322
29323
29324
29325
29326
29327
29328
29329
29330
29331
29332
29333
29334
29335
29336
29337
29338
29339
29340
29341
29342
29343
29344
29345
29346
29347
29348
29349
29350
29351
29352
29353
29354
29355
29356
29357
29358
29359
29360
29361
29362
29363
29364
29365
29366
29367
29368
29369
29370
29371
29372
29373
29374
29375
29376
29377
29378
29379
29380
29381
29382
29383
29384
29385
29386
29387
29388
29389
29390
29391
29392
29393
29394
29395
29396
29397
29398
29399
29400
29401
29402
29403
29404
29405
29406
29407
29408
29409
29410
29411
29412
29413
29414
29415
29416
29417
29418
29419
29420
29421
29422
29423
29424
29425
29426
29427
29428
29429
29430
29431
29432
29433
29434
29435
29436
29437
29438
29439
29440
29441
29442
29443
29444
29445
29446
29447
29448
29449
29450
29451
29452
29453
29454
29455
29456
29457
29458
29459
29460
29461
29462
29463
29464
29465
29466
29467
29468
29469
29470
29471
29472
29473
29474
29475
29476
29477
29478
29479
29480
29481
29482
29483
29484
29485
29486
29487
29488
29489
29490
29491
29492
29493
29494
29495
29496
29497
29498
29499
29500
29501
29502
29503
29504
29505
29506
29507
29508
29509
29510
29511
29512
29513
29514
29515
29516
29517
29518
29519
29520
29521
29522
29523
29524
29525
29526
29527
29528
29529
29530
29531
29532
29533
29534
29535
29536
29537
29538
29539
29540
29541
29542
29543
29544
29545
29546
29547
29548
29549
29550
29551
29552
29553
29554
29555
29556
29557
29558
29559
29560
29561
29562
29563
29564
29565
29566
29567
29568
29569
29570
29571
29572
29573
29574
29575
29576
29577
29578
29579
29580
29581
29582
29583
29584
29585
29586
29587
29588
29589
29590
29591
29592
29593
29594
29595
29596
29597
29598
29599
29600
29601
29602
29603
29604
29605
29606
29607
29608
29609
29610
29611
29612
29613
29614
29615
29616
29617
29618
29619
29620
29621
29622
29623
29624
29625
29626
29627
29628
29629
29630
29631
29632
29633
29634
29635
29636
29637
29638
29639
29640
29641
29642
29643
29644
29645
29646
29647
29648
29649
29650
29651
29652
29653
29654
29655
29656
29657
29658
29659
29660
29661
29662
29663
29664
29665
29666
29667
29668
29669
29670
29671
29672
29673
29674
29675
29676
29677
29678
29679
29680
29681
29682
29683
29684
29685
29686
29687
29688
29689
29690
29691
29692
29693
29694
29695
29696
29697
29698
29699
29700
29701
29702
29703
29704
29705
29706
29707
29708
29709
29710
29711
29712
29713
29714
29715
29716
29717
29718
29719
29720
29721
29722
29723
29724
29725
29726
29727
29728
29729
29730
29731
29732
29733
29734
29735
29736
29737
29738
29739
29740
29741
29742
29743
29744
29745
29746
29747
29748
29749
29750
29751
29752
29753
29754
29755
29756
29757
29758
29759
29760
29761
29762
29763
29764
29765
29766
29767
29768
29769
29770
29771
29772
29773
29774
29775
29776
29777
29778
29779
29780
29781
29782
29783
29784
29785
29786
29787
29788
29789
29790
29791
29792
29793
29794
29795
29796
29797
29798
29799
29800
29801
29802
29803
29804
29805
29806
29807
29808
29809
29810
29811
29812
29813
29814
29815
29816
29817
29818
29819
29820
29821
29822
29823
29824
29825
29826
29827
29828
29829
29830
29831
29832
29833
29834
29835
29836
29837
29838
29839
29840
29841
29842
29843
29844
29845
29846
29847
29848
29849
29850
29851
29852
29853
29854
29855
29856
29857
29858
29859
29860
29861
29862
29863
29864
29865
29866
29867
29868
29869
29870
29871
29872
29873
29874
29875
29876
29877
29878
29879
29880
29881
29882
29883
29884
29885
29886
29887
29888
29889
29890
29891
29892
29893
29894
29895
29896
29897
29898
29899
29900
29901
29902
29903
29904
29905
29906
29907
29908
29909
29910
29911
29912
29913
29914
29915
29916
29917
29918
29919
29920
29921
29922
29923
29924
29925
29926
29927
29928
29929
29930
29931
29932
29933
29934
29935
29936
29937
29938
29939
29940
29941
29942
29943
29944
29945
29946
29947
29948
29949
29950
29951
29952
29953
29954
29955
29956
29957
29958
29959
29960
29961
29962
29963
29964
29965
29966
29967
29968
29969
29970
29971
29972
29973
29974
29975
29976
29977
29978
29979
29980
29981
29982
29983
29984
29985
29986
29987
29988
29989
29990
29991
29992
29993
29994
29995
29996
29997
29998
29999
30000
30001
30002
30003
30004
30005
30006
30007
30008
30009
30010
30011
30012
30013
30014
30015
30016
30017
30018
30019
30020
30021
30022
30023
30024
30025
30026
30027
30028
30029
30030
30031
30032
30033
30034
30035
30036
30037
30038
30039
30040
30041
30042
30043
30044
30045
30046
30047
30048
30049
30050
30051
30052
30053
30054
30055
30056
30057
30058
30059
30060
30061
30062
30063
30064
30065
30066
30067
30068
30069
30070
30071
30072
30073
30074
30075
30076
30077
30078
30079
30080
30081
30082
30083
30084
30085
30086
30087
30088
30089
30090
30091
30092
30093
30094
30095
30096
30097
30098
30099
30100
30101
30102
30103
30104
30105
30106
30107
30108
30109
30110
30111
30112
30113
30114
30115
30116
30117
30118
30119
30120
30121
30122
30123
30124
30125
30126
30127
30128
30129
30130
30131
30132
30133
30134
30135
30136
30137
30138
30139
30140
30141
30142
30143
30144
30145
30146
30147
30148
30149
30150
30151
30152
30153
30154
30155
30156
30157
30158
30159
30160
30161
30162
30163
30164
30165
30166
30167
30168
30169
30170
30171
30172
30173
30174
30175
30176
30177
30178
30179
30180
30181
30182
30183
30184
30185
30186
30187
30188
30189
30190
30191
30192
30193
30194
30195
30196
30197
30198
30199
30200
30201
30202
30203
30204
30205
30206
30207
30208
30209
30210
30211
30212
30213
30214
30215
30216
30217
30218
30219
30220
30221
30222
30223
30224
30225
30226
30227
30228
30229
30230
30231
30232
30233
30234
30235
30236
30237
30238
30239
30240
30241
30242
30243
30244
30245
30246
30247
30248
30249
30250
30251
30252
30253
30254
30255
30256
30257
30258
30259
30260
30261
30262
30263
30264
30265
30266
30267
30268
30269
30270
30271
30272
30273
30274
30275
30276
30277
30278
30279
30280
30281
30282
30283
30284
30285
30286
30287
30288
30289
30290
30291
30292
30293
30294
30295
30296
30297
30298
30299
30300
30301
30302
30303
30304
30305
30306
30307
30308
30309
30310
30311
30312
30313
30314
30315
30316
30317
30318
30319
30320
30321
30322
30323
30324
30325
30326
30327
30328
30329
30330
30331
30332
30333
30334
30335
30336
30337
30338
30339
30340
30341
30342
30343
30344
30345
30346
30347
30348
30349
30350
30351
30352
30353
30354
30355
30356
30357
30358
30359
30360
30361
30362
30363
30364
30365
30366
30367
30368
30369
30370
30371
30372
30373
30374
30375
30376
30377
30378
30379
30380
30381
30382
30383
30384
30385
30386
30387
30388
30389
30390
30391
30392
30393
30394
30395
30396
30397
30398
30399
30400
30401
30402
30403
30404
30405
30406
30407
30408
30409
30410
30411
30412
30413
30414
30415
30416
30417
30418
30419
30420
30421
30422
30423
30424
30425
30426
30427
30428
30429
30430
30431
30432
30433
30434
30435
30436
30437
30438
30439
30440
30441
30442
30443
30444
30445
30446
30447
30448
30449
30450
30451
30452
30453
30454
30455
30456
30457
30458
30459
30460
30461
30462
30463
30464
30465
30466
30467
30468
30469
30470
30471
30472
30473
30474
30475
30476
30477
30478
30479
30480
30481
30482
30483
30484
30485
30486
30487
30488
30489
30490
30491
30492
30493
30494
30495
30496
30497
30498
30499
30500
30501
30502
30503
30504
30505
30506
30507
30508
30509
30510
30511
30512
30513
30514
30515
30516
30517
30518
30519
30520
30521
30522
30523
30524
30525
30526
30527
30528
30529
30530
30531
30532
30533
30534
30535
30536
30537
30538
30539
30540
30541
30542
30543
30544
30545
30546
30547
30548
30549
30550
30551
30552
30553
30554
30555
30556
30557
30558
30559
30560
30561
30562
30563
30564
30565
30566
30567
30568
30569
30570
30571
30572
30573
30574
30575
30576
30577
30578
30579
30580
30581
30582
30583
30584
30585
30586
30587
30588
30589
30590
30591
30592
30593
30594
30595
30596
30597
30598
30599
30600
30601
30602
30603
30604
30605
30606
30607
30608
30609
30610
30611
30612
30613
30614
30615
30616
30617
30618
30619
30620
30621
30622
30623
30624
30625
30626
30627
30628
30629
30630
30631
30632
30633
30634
30635
30636
30637
30638
30639
30640
30641
30642
30643
30644
30645
30646
30647
30648
30649
30650
30651
30652
30653
30654
30655
30656
30657
30658
30659
30660
30661
30662
30663
30664
30665
30666
30667
30668
30669
30670
30671
30672
30673
30674
30675
30676
30677
30678
30679
30680
30681
30682
30683
30684
30685
30686
30687
30688
30689
30690
30691
30692
30693
30694
30695
30696
30697
30698
30699
30700
30701
30702
30703
30704
30705
30706
30707
30708
30709
30710
30711
30712
30713
30714
30715
30716
30717
30718
30719
30720
30721
30722
30723
30724
30725
30726
30727
30728
30729
30730
30731
30732
30733
30734
30735
30736
30737
30738
30739
30740
30741
30742
30743
30744
30745
30746
30747
30748
30749
30750
30751
30752
30753
30754
30755
30756
30757
30758
30759
30760
30761
30762
30763
30764
30765
30766
30767
30768
30769
30770
30771
30772
30773
30774
30775
30776
30777
30778
30779
30780
30781
30782
30783
30784
30785
30786
30787
30788
30789
30790
30791
30792
30793
30794
30795
30796
30797
30798
30799
30800
30801
30802
30803
30804
30805
30806
30807
30808
30809
30810
30811
30812
30813
30814
30815
30816
30817
30818
30819
30820
30821
30822
30823
30824
30825
30826
30827
30828
30829
30830
30831
30832
30833
30834
30835
30836
30837
30838
30839
30840
30841
30842
30843
30844
30845
30846
30847
30848
30849
30850
30851
30852
30853
30854
30855
30856
30857
30858
30859
30860
30861
30862
30863
30864
30865
30866
30867
30868
30869
30870
30871
30872
30873
30874
30875
30876
30877
30878
30879
30880
30881
30882
30883
30884
30885
30886
30887
30888
30889
30890
30891
30892
30893
30894
30895
30896
30897
30898
30899
30900
30901
30902
30903
30904
30905
30906
30907
30908
30909
30910
30911
30912
30913
30914
30915
30916
30917
30918
30919
30920
30921
30922
30923
30924
30925
30926
30927
30928
30929
30930
30931
30932
30933
30934
30935
30936
30937
30938
30939
30940
30941
30942
30943
30944
30945
30946
30947
30948
30949
30950
30951
30952
30953
30954
30955
30956
30957
30958
30959
30960
30961
30962
30963
30964
30965
30966
30967
30968
30969
30970
30971
30972
30973
30974
30975
30976
30977
30978
30979
30980
30981
30982
30983
30984
30985
30986
30987
30988
30989
30990
30991
30992
30993
30994
30995
30996
30997
30998
30999
31000
31001
31002
31003
31004
31005
31006
31007
31008
31009
31010
31011
31012
31013
31014
31015
31016
31017
31018
31019
31020
31021
31022
31023
31024
31025
31026
31027
31028
31029
31030
31031
31032
31033
31034
31035
31036
31037
31038
31039
31040
31041
42586
42587
42588
42589
42590
42591
42592
42593
42594
42595
42596
42597
42598
42599
42600
42601
42602
42603
42604
42605
42606
42607
42608
42609
42610
42611
42612
42613
42614
42615
42616
42617
42618
42619
42620
42621
42622
42623
42624
42625
42626
42627
42628
42629
42630
42631
42632
42633
42634
42635
42636
42637
42638
42639
42640
42641
42642
42643
42644
42645
42646
42647
42648
42649
42650
42651
42652
42653
42654
42655
42656
42657
42658
42659
42660
42661
42662
42663
42664
42665
42666
42667
42668
42669
42670
42671
42672
42673
42674
42675
42676
42677
42678
42679
42680
42681
42682
42683
42684
42685
42686
42687
42688
42689
42690
42691
42692
42693
42694
42695
42696
42697
42698
42699
42700
42701
42702
42703
42704
42705
42706
42707
42708
42709
42710
42711
42712
42713
42714
42715
42716
42717
42718
42719
42720
42721
42722
42723
42724
42725
42726
42727
42728
42729
42730
42731
42732
42733
42734
42735
42736
42737
42738
42739
42740
42741
42742
42743
42744
42745
42746
42747
42748
42749
42750
42751
42752
42753
42754
42755
42756
42757
42758
42759
42760
42761
42762
42763
42764
42765
42766
42767
42768
42769
42770
42771
42772
42773
42774
42775
42776
42777
42778
42779
42780
42781
42782
42783
42784
42785
42786
42787
42788
42789
42790
42791
42792
42793
42794
42795
42796
42797
42798
42799
42800
42801
42802
42803
42804
42805
42806
42807
42808
42809
42810
42811
42812
42813
42814
42815
42816
42817
42818
42819
42820
42821
42822
42823
42824
42825
42826
42827
42828
42829
42830
42831
42832
42833
42834
42835
42836
42837
42838
42839
42840
42841
42842
42843
42844
45188
45189
45190
45191
45192
45193
45194
45195
45196
45197
45198
45199
45200
45201
45202
45203
45204
45205
45206
45207
45208
45209
45210
45211
45212
45213
45214
45215
45216
45217
45218
45219
45220
45221
45222
45223
45224
45225
45226
45227
45228
45229
45230
45231
45232
45233
45234
45235
45236
45237
45238
45239
45240
45241
45242
45243
45244
45245
45246
45247
45248
45249
45250
45251
45252
45253
45254
45255
45256
45257
45258
45259
45260
45261
45262
45263
45264
45265
45266
45267
45268
45269
45270
45271
45272
45273
45274
45275
45276
45277
45278
45279
45280
45281
45282
45283
45284
45285
45286
45287
45288
45289
45290
45291
45292
45293
45294
45295
45296
45297
45298
45299
45300
45301
45302
45303
45304
45305
45306
45307
45308
45309
45310
45311
45312
45313
45314
45315
45316
45317
45318
45319
45320
45321
45322
45323
45324
45325
45326
45327
45328
45329
45330
45331
45332
45333
45334
45335
45336
45337
45338
45339
45340
45341
45342
45343
45344
45345
45346
45347
45348
45349
45350
45351
45352
45353
45354
45355
45356
45357
45358
45359
45360
45361
45362
45363
45364
45365
45366
45367
45368
45369
45370
45371
45372
45373
45374
45375
45376
45377
45378
45379
45380
45381
45382
45383
45384
45385
45386
45387
45388
45389
45390
45391
45392
45393
45394
45395
45396
45397
45398
45399
45400
45401
45402
45403
45404
45405
45406
45407
45408
45409
45410
45411
45412
45413
45414
45415
45416
45417
45418
45419
45420
45421
45422
45423
45424
45425
45426
45427
45428
45429
45430
45431
45432
45433
45434
45435
45436
45437
45438
45439
45440
45441
45442
45443
45444
45445
45446
45447
45448
45449
45450
45451
45452
45453
45454
45455
45456
45457
45458
45459
45460
45461
45462
45463
45464
45465
45466
45467
45468
45469
45470
45471
45472
45473
45474
45475
45476
45477
45478
45479
45480
45481
45482
45483
45484
45485
45486
45487
45488
45489
45490
45491
45492
45493
45494
45495
45496
45497
45498
45499
45500
45501
45502
45503
45504
45505
45506
45507
45508
45509
45510
45511
45512
45513
45514
45515
45516
45517
45518
45519
45520
45521
45522
45523
45524
45525
45526
45527
45528
45529
45530
45531
45532
45533
45534
45535
45536
45537
45538
45539
45540
45541
45542
45543
45544
45545
45546
45547
45548
45549
45550
45551
45552
45553
45554
45555
45556
45557
45558
45559
45560
45561
45562
45563
45564
45565
45566
45567
45568
45569
45570
45571
45572
45573
45574
45575
45576
45577
45578
45579
45580
45581
45582
45583
45584
45585
45586
45587
45588
45589
45590
45591
45592
45593
45594
45595
45596
45597
45598
45599
45600
45601
45602
45603
45604
45605
45606
45607
45608
45609
45610
45611
45612
45613
45614
45615
45616
45617
45618
45619
45620
45621
45622
45623
45624
45625
45626
45627
45628
45629
45630
45631
45632
45633
45634
45635
45636
45637
45638
45639
45640
45641
45642
45643
45644
45645
45646
45647
45648
45649
45650
45651
45652
45653
45654
45655
45656
45657
45658
45659
45660
45661
45662
45663
45664
45665
45666
45667
45668
45669
45670
45671
45672
45673
45674
45675
45676
45677
45678
45679
45680
45681
45682
45683
45684
45685
45686
45687
45688
45689
45690
45691
45692
45693
45694
45695
45696
45697
45698
45699
45700
45701
45702
45703
45704
45705
45706
45707
45708
45709
45710
45711
45712
45713
45714
45715
45716
45717
45718
45719
45720
45721
45722
45723
45724
45725
45726
45727
45728
45729
45730
45731
45732
45733
45734
45735
45736
45737
45738
45739
45740
45741
45742
45743
45744
45745
45746
45747
45748
45749
45750
45751
45752
45753
45754
45755
45756
45757
45758
45759
45760
45761
45762
45763
45764
45765
45766
45767
45768
45769
45770
45771
45772
45773
45774
45775
45776
45777
45778
45779
45780
45781
45782
45783
45784
45785
45786
45787
45788
45789
45790
45791
45792
45793
45794
45795
45796
45797
45798
45799
45800
45801
45802
45803
45804
45805
45806
45807
45808
45809
45810
45811
45812
45813
45814
45815
45816
45817
45818
45819
45820
45821
45822
45823
45824
45825
45826
45827
45828
45829
45830
45831
45832
45833
45834
45835
45836
45837
45838
45839
45840
45841
45842
45843
45844
45845
45846
45847
45848
45849
45850
45851
45852
45853
45854
45855
45856
45857
45858
45859
45860
45861
45862
45863
45864
45865
45866
45867
45868
45869
45870
45871
45872
45873
45874
45875
45876
45877
45878
45879
45880
45881
45882
45883
45884
45885
45886
45887
45888
45889
45890
45891
45892
45893
45894
45895
45896
45897
45898
45899
45900
45901
45902
45903
45904
45905
45906
45907
45908
45909
45910
45911
45912
45913
45914
45915
45916
45917
45918
45919
45920
45921
45922
45923
45924
45925
45926
45927
45928
45929
45930
45931
45932
45933
45934
45935
45936
45937
45938
45939
45940
45941
45942
45943
45944
45945
45946
45947
45948
45949
45950
45951
45952
45953
45954
45955
45956
45957
45958
45959
45960
45961
45962
45963
45964
45965
45966
45967
45968
45969
45970
45971
45972
45973
45974
45975
45976
45977
45978
45979
45980
45981
45982
45983
45984
45985
45986
45987
45988
45989
45990
45991
45992
45993
45994
45995
45996
45997
45998
45999
46000
46001
46002
46003
46004
46005
46006
46007
46008
46009
46010
46011
46012
46013
46014
46015
46016
46017
46018
46019
46020
46021
46022
46023
46024
46025
46026
46027
46028
46029
46030
46031
46032
46033
46034
46035
46036
46037
46038
46039
46040
46041
46042
46043
46044
46045
46046
46047
46048
46049
46050
46051
46052
46053
46054
46055
46056
46057
46058
46059
46060
46061
46062
46063
46064
46065
46066
46067
46068
46069
46070
46071
46072
46073
46074
46075
46076
46077
46078
46079
46080
46081
46082
46083
46084
46085
46086
46087
46088
46089
46090
46091
46092
46093
46094
46095
46096
46097
46098
46099
46100
46101
46102
46103
46104
46105
46106
46107
46108
46109
46110
46111
46112
46113
46114
46115
46116
46117
46118
46119
46120
46121
46122
46123
46124
46125
46126
46127
46128
46129
46130
46131
46132
46133
46134
46135
46136
46137
46138
46139
46140
46141
46142
46143
46144
46145
46146
46147
46148
46149
46150
46151
46152
46153
46154
46155
46156
46157
46158
46159
46160
46161
46162
46163
46164
46165
46166
46167
46168
46169
46170
46171
46172
46173
46174
46175
46176
46177
46178
46179
46180
46181
46182
46183
46184
46185
46186
46187
46188
46189
46190
46191
46192
46193
46194
46195
46196
46197
46198
46199
46200
46201
46202
46203
46204
46205
46206
46207
46208
46209
46210
46211
46212
46213
46214
46215
46216
46217
46218
46219
46220
46221
46222
46223
46224
46225
46226
46227
46228
46229
46230
46231
46232
46233
46234
46235
46236
46237
46238
46239
46240
46241
46242
46243
46244
46245
46246
46247
46248
46249
46250
46251
46252
46253
46254
46255
46256
46257
46258
46259
46260
46261
46262
46263
46264
46265
46266
46267
46268
46269
46270
46271
46272
46273
46274
46275
46276
46277
46278
46279
46280
   
                                           




























                                                                   
                                  


                               
                                                              
                                                                                   



                              
                                                                                   
 

                                                                             
                                                                                  
 
                                                                                                                                                                                                                                                                                                              
 


                                                                                                                                                                                            
 
                                                                                                             
 
                                                                                                                            
 
                                                                                                                                                                                                                           
 

                                                                                                                 
                                                                                                                                     
 
                                                                                                                                  
 
                                                                                                                
 




                                                                                                                                                               
 





                                                                                           

                                                                             


                                                                                                                                                                                      
 
                                                                                                                                                                                         
 
                                                                                                                                                     
 
                                                                                                                                                                                                   
 
                                                                                                                                                                                                            
 
                                                                                                                                                                                   
 
                                                                                                                                                                             
 
                                                                                                                                                                                                                             
 
                                                                                                                                                                                                         
 
                                                                                                                                                                                              
 
                                                                                                                                                                                                                       
 

                                                                                                                                                                                                
                                                                                                                                                                                                           
 

                                                                                                                                                                                          

                                                                                                                                                                                                                  
                                                                                                                                                                                                  
 
                                                                                                                                                                                                                  
 
                                                                                                                                                              
 
                                                                                                                                                                                    
 
                                                                                                                                                                         
 
                                                                                                                                                                                                                               
 
                                                                                                                                                                                                           
 
                                                                                                                                                                                              
 

                                                                                                                                                 



                               
                                                                                                                                              
 

                                                                                                                                    
                                                                                                                                
 
                                                                                                                                                                                                                                                           
 


                                                                                                                                                                                                     
 









                                                                                                                                                                        

                                                                                                                                        

                                                                                                                                                   

                                                                                                                                                       



                                                                                                                                                                           





                                                                                                                                   

                                                                                                                            

                                                                                                                         
                                                                                                                                                                                


                                                                                                                                                                     

                                                                                                                                                               





                                                                                                                                                                                                    

                                                                                                                                                                     
                                                                                                                                                                                                                     


                                                                                                                                                                         

                                                                                                                                                                                      

                                                                                                                                                                                            



                                                                                                                                                                                                   

                                                                                                                                                                                

                                                                                                                                                                            



                                                                                                                                                                                       
                                                                                                                                                          


                                                                                                                                                                     





                                                                                                                                                                                                                       

                                                                                                                                                                                      

                                                                                                                                                   





















                                                                                                                       
                                                                                  
     
                                     


                               
                                                                                       

                                                   
                                           












                                                                                                                                                     





















                                                                                                                                                               
                                                                                 
     

                                     

     
                                                                           
     

                                                               

     
                                                                                      
     

                                                                     


                                  
                                                                                                                                                           

     
                                                                                                                                                                                                                                                                                                             
     
                                                                                                        


                                              
                                                                                                                                                                                                    





                                                                                 
                                                     


                                                  
                                                                                                                                                                                                  











                                                                                       





                                


                                                                                                                                                                    
                                                                                                                                                                 
     
                                                                  


                               
                                                                                                                                              



                                                                 
                                   












                                                                                                    






























                                                                                                                                                                                           
                                                                                                            











                                                                                         
                                                                                               


                                                             


                               


             
                                                                                                                           











                                                                                              
                                                                                                              











                                                                                                                                                            
                                                                                                                                                                                                                          












                                                                                                                 
                                                                                                                                                                                        





                                                                   


                                     


                                     





                                


                                                                                                                                                          
                                                                                                                











                                                                                             
                                                                                                 


                                                                 


                               


             
                                                                                                                                    

                                      
                             








                                                                                          
                                                                                                                         


                                                                   




                                       
       
             

     
                                                                                                                                 











                                                                                 
                                                                                                                      














                                                                                                                                                 
                                                                                                               











                                                                                            
                                                                                                    


                                                                       


                              


             
                                                                                                                                                    












                                                                                                
                                                                                                                               








                                                           


                                       


                                                                                                                                                      























































                                                                                                                                                              

































































                                                                                                                                                              





















                                                                                                                                                       






















                                                                                                                                                                                     
     
                                                    


                                 
                                                                                                                         



                                                       
                         


                                     
                                                                                                                                        








                                                             


                                       


                                                                                                                                                       
                                                                                                                                                                                        












                                                                                                              
                                                                                                                                                         











                                                                   


                                       


                                                                                                                                                          
                                                                                                                                                    












                                                                                                        
                                                                                                                       








                                                           

                                 
       


                                                                                                                                                      
                                                                                                                                                                                                  

                                                          
                             










                                                                                                                                    
                                                                                                                                             


                                                                   


                                     





                                    
             

     
                                                                                                                                                                                                           

                                                                
                                










                                                                                                                                             
                                                                                                                                                


                                                                         


                                     





                                    
             

     
                                                                                                                                                                                  

                                                         
                                









                                                                                                                    
                                                                                                                                                


                                                                         





                                     



                                       

     
                                                                                                                                                                            












                                                                                                              
                                                                                                                                             














                                                                   
                                                                                                                                                                                                                            
     
                                                                      
                                   

     
                                                                                                                                                              


                                                                         
                                       



                                              
                                                                                                                                                   


                                                                               





                                     



                                       

     
                                                                                                                                                                                                        












                                                                                                                  
                                                                                                                                                                         











                                                                           


                                       


                                                                                                                                                              
                                                                                                                                                                                             













                                                                                                                               
                                                                                                                                           














                                                               
                                                                                                                                                                                                                      













                                                                                                                                     
                                                                                                                                                                      

















                                                                               
































                                                                                                                                                                                               
                                                                                                                                                                                                          

                                                                      
                                       










                                                                                                                                            
                                                                                                                                                       


                                                                                       








                                       
             

     
































                                                                                                                                                                                         



































                                                                                                                                                                                                                 
                                                                                                                                                                                                 












                                                                                                              
                                                                                                                                                                








                                                               


                                       


                                     


                                    


                                                                                                                                                        
                                                                                                                                                                                                                 

                                                        
                           










                                                                                                                                
                                                                                                                                                              


                                                               





                                     


                                       


                                     
             

     
                                                                                                                                                             
     
                                           


                                   
                                                                                                   


                                                           
                         


                                       
                                                                                                                                        








                                                                 


                                       


                                                                                                                                                         
                                                                                                                                                                                   












                                                                                                              
                                                                                                                                                      











                                                                       


                                       


                                                                                                                                                            
                                                                                                                                                                        

                                               
                           









                                                                                                          
                                                                                                                                           


                                                               





                                     



                                       

     
                                                                                                                                                                                                                              

                                                                      
                                     










                                                                                                                                                                
                                                                                                                                                     


                                                                                   





                                     



                                       

     
                                                                                                                                                                                                          












                                                                                                                  
                                                                                                                                                                             











                                                                               


                                       


                                                                                                                                                                
                                                                                                                                                                                             













                                                                                                                               
                                                                                                                                             














                                                                   




























                                                                                                                                                            

















                                                                                                                                                                                                             
                                                                                                                                               
                   
                                                                                                                              




                                                                                          

                                                                                                                                                                                                                                                                                                                        
                                                                        
                                           




                                                                                                                                       
                                             













                                                                                                                                                            




























                                                                                                                                                                                                                                                                                                              
                                                                                                                                 
                   
                                                                                                                           



                                          

                                                                                                                                                                                                                                                                                                          



                                                                                                             

                                                                                                                                             



                               
                                                                              




                                                                                                                                                            
                                                          


       
                                                                                                                                                                                                                                                            
                   
                                                                                                                                                                                                                








                                                                                                         

                                                                                                                                                                                                                                                                                                                                                                                                                                     




                                                                        
                                                     








                                                                                                                                                      
                                                       



                               
                                                                                                                                                                                 








                                                                                                                                                            
                                                                                                                                                                                                      
                   
                                                                                                                                                                  






                                                                                                 

                                                                                                                                                                                                                                                                                                                                                                               


                                                                        
                                   






                                                                                                                                              
                                     













                                                                                                                                                            





































                                                                                                                                                                                                                                                                                                                                                                       





















                                                                                                                                                                                                                                                                                                                          
                                                                                           






























                                                                                                                                                                                                                                                                                                                               
                                                                                                     

































                                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                 






























                                                                                                                                                                                                                                                                                                                              
                                                                                           






























                                                                                                                                                                                                                                                                                                                           
                                                                                                                  




                                                                                                                                                            
                                                  


       





















                                                                                                                                                                                                                                                                                                                  
                                                                                                                        








                                                                                                                                                            





















                                                                                                                                                                                                                                                                                                                             
                                                                                           








                                                                                                                                                            
























                                                                                                                                                                                                                                                                                                                                 
                                                                                                                            








                                                                                                                                                            


































































                                                                                                                                                                                                                                                                                                                                                     






















































































                                                                                                                                                                                                                                                                                                             




























                                                                                                                                                                                                                                                                                                      




























                                                                                                                                                                                                                                                                                                   
                                                                                                                                                                                 
                   
                                                                                                                                               






                                                                                            

                                                                                                                                                                                                                                                                                                                                                          


                                                                        
                         






                                                                                                                                         
                           



                               
                                                                                                                                    

































                                                                                                                                                                                                                                                                                                                                               
                                                                                                                                                  








                                                                                                                                                            
























                                                                                                                                                                                                                                                                                                                                         
                                                                                                                    








                                                                                                                                                            



























                                                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                      




                                                                                                                                                            
                                                  






























                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                      




                                                                                                                                                            
                                                     



























                                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                      




                                                                                                                                                            
                                                     


       
























                                                                                                                                                                                                                                                                                                                                               
                                                                                                                                      








                                                                                                                                                            
                                                                                                                                                                                                                      
                   
                                                                                                                                                                          





                                                                                                     
                                 
                                                       
                                                                                                                                                                                                                                                                                                                                                                                               

                                                                        
                                       






                                                                                                                                                  
                                         




                                         
                                                                                                                                      




                                                                                                                                                            
                                                        



























                                                                                                                                                                                                                                                                                                                                                   
                                                                                                                                                              








                                                                                                                                                            



























                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                      








                                                                                                                                                            



























                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                         








                                                                                                                                                            






























































                                                                                                                                                                                                                                                                                                                                                                             
                                                                                                                                      




                                                                                                                                                            
                                                            


       


































                                                                                                                                                                                                                                                                                                                                                          


































                                                                                                                                                                                                                                                                                                                                                      
























                                                                                                                                                                                                                                                                                                                                               
                                                                                                                                                           




































                                                                                                                                                                                                                                                                                                                                                                 
                                                                                                                                                         




                                                                                                                                                            
                                                


       
                                                                                                                                                           
                   
                                                                                                                                        





                                                                                              

                                                                                                                                                                                                                                                                                                                                    

                                                                        
                         





                                                                                                                                           
                           



                               
                                                                                                                                  

































                                                                                                                                                                                                                                                                                                                                               
                                                                                                                                             








                                                                                                                                                            
























                                                                                                                                                                                                                                                                                                                                           
                                                                                                                                      




                                                                                                                                                            
                                                






























                                                                                                                                                                                                                                                                                                                                                                                                 
                                                                                                                                      




                                                                                                                                                            
                                                          



























                                                                                                                                                                                                                                                                                                                                                   
                                                                                                                                                                








                                                                                                                                                            



























                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                      








                                                                                                                                                            































                                                                                                                                                                                                                                                                                                                             













                                                                                                                                                                                                                                              
                                                                         
                                                                 
                                                                                   
                                                                   
                                                                 




                                                                   
                                             
                                                                   
                                                       

                                                           


                                                                       
                                                         
                                                   

                                                               
                                                       


                                                                     
                                                               

                                                                           
                                                           
                                                                           

                                                                                   
                                                                               
                                                                       



                                                                   


                                                                               
                                                               
                                                                   

















                                                                                                                   
                                                              




                                     



















                                                                                                                                       


                                                                                                                               

       

                                                           





                                    


                                                                                                                         



                      















                                                                                                                                                 
                                                                                                                                                       



                                                        
                                             


                                          




                      















                                                                                                                                 
                                                                                      






                                              

























                                                                                                                               














                                                                                                                       




                                               












































                                                                                                                                 

                                                        

                                                     
                                             


                                          



















                                                                                                                           








                                                   














                                                                                                                             



                                                     
                                                    

                                           



                      


















                                                                                                           
                                                    





                                           














                                                                                                                                 




                                                  



                      


















                                                                                                                     




















































                                                                                                                         
                                           




                      



























































                                                                                                                                     



















                                                                                                                       



















                                                                                                                 















                                                                                                                       
                                                                                         

                                                     
                                                    
                                           

























                                                                                                                             
                                                    
                                           




                      
















                                                                                                                     

                                                     

                                              




                      















                                                                                                                             
                                                                              

                                                     

                                               
                                                 
                                     




















                                                                                                                                   
                                                                                    

                                                     

                                               
                                                 
                                     




















                                                                                                                                   
                                                                        



                                                     
                                                    
                                           




                      




















                                                                                                                             
                                                    





                                           















                                                                                                                                         
                                                                                          



                                                     
                                                    
                                           

























                                                                                                                                     
                                                    


























                                                                                                                         
                                                    
                                           




                      




















                                                                                                                                         
                                                    







                                               











































                                                                                                                                                 
                                                                                          










                                                     



























                                                                                                                                             





























                                                                                                                                     


















                                                                                                                         
                                                    
                                           

                                               

                                               




















                                                                                                                         
                                                                            



                                                     
                                                    
                                           

                                               




















                                                                                                                           
                                                                           

                                                     
                                                    
                                           

























                                                                                                                                 
                                                    
                                           




                      















                                                                                                                         
                                                              



                                                     
                                                    
                                           




















                                                                                                                                             
                                                                                          



                                                     
                                                    
                                           

























                                                                                                                                         
                                                    


























                                                                                                                             
                                                    
                                           




                      

























                                                                                                                                 













                                                                                                                                                                                                                                                                  
                                                                         
                                                                 
                                                                                   
                                                                   
                                                                 




                                                                   
                                             
                                                                   
                                                       

                                                           


                                                                       
                                                         
                                                   

                                                               
                                                       


                                                                     
                                                               

                                                                           
                                                           
                                                                           

                                                                                   
                                                                               
                                                                       



                                                                   


                                                                               
                                                               
                                                                   


















































                                                                                                                                                                 
                                                           


       


















































                                                                                                                                                                 


                                                                                                                                                          

       

                                                           

       
                                                                                                                
                                                                  


                                                                           
                               










                                                                                                 
                                                                           


















                                                                                                                                                                 

                                                                                                                                                            


       




































                                                                                                                                                                                

                                                                     







                                                                   




















                                                                                                                                                                         
                                                                                                                                                  


       



















































                                                                                                                                                                 






























































                                                                                                                                                                 


       

























                                                                                                                                       





                                                                























                                                                                                                                                                 
                                                                                                                                                           







                                                            
                                                                                                               
                                                                  

                                                           






































                                                                                                                                                                 
                                                                                                                                                            






























                                                                                                                                                            





                                                                          



                                                                       

                                                                     







                                                                   


















































                                                                                                                                                                 





                                                                























                                                                                                                                                                 
                                                                                                                                             







                                                          
                                                                                                     
                                                                  

                                                 
                                                                         











                                                                                                 




                                                                       

                                                                      



                                                         


















                                                                                                                                                                 
                                                                                                                                                



                                                            
                                                                                                                                 







                                                 
                                                                                                           
                                                                  

                                                       


















                                                                                                 

                                                                      






















                                                                                                                                                                 
                                                                                                                                             



                                                   

























                                                                                                                                                 





                                                               























                                                                                                                                                                 































                                                                                                                                               

                                                                      


                                                         
























                                                                                                                                                                 


























































































































                                                                                                                                                                 
























































































































































                                                                                                                                                                      


                                                                                                                                                 

       

                                                       

       
                                                                                                               
                                                                  


                                                                   











                                                                                                 
                                                                   


















                                                                                                                                                                 

                                                                                                                                                       


       


                                                                                                                                            

       

                                                    

       
                                                                                                                
                                                                  


                                                             











                                                                                                 
                                                             


















                                                                                                                                                                 

                                                                                                                                                     


       


                                                                                                                                                         

       

                                                       

       
                                                                                                                       
                                                                  


                                                                   











                                                                                                 
                                                                   




                                                                       

                                                                      


                                                         



















                                                                                                                                                                 

                                                                                                                                                               


       


                                                                                                                                                         

       

                                                          

       
                                                                                                                 
                                                                  


                                                                         
                               










                                                                                                 




































































































































































































































































                                                                                                                                                                 









                                                                       

                                                                      


                                                         



















                                                                                                                                                                 
                                                                                                                                                   



                                                                                    


                                                                                                                                             

       

                                                          

       
                                                                                                     
                                                                  

                                                 
                                                                         










                                                                                                 
                                                                         









                                                                       

                                                                      


                                                         



















                                                                                                                                                                 

                                                                                                                                                


       


                                                                                                                                                         

       

                                                                

       
                                                                                                     
                                                                  


                                                                                     










                                                                                                 
                                                                                     









                                                                       

                                                                      


                                                         



















                                                                                                                                                                 

                                                                                                                                                      


       


                                                                                                                                                                             

       

                                                              

       
                                                                                                                             
                                                                  



                                                                                 










                                                                                                 
                                                                                 









                                                                       

                                                                      






















                                                                                                                                                                 

                                                                                                                                                                            


       


                                                                                                                                         

       

                                                        





                                                                                                     
                                                                     










                                                                                                 
                                                                     









                                                                       

                                                                      


                                                         




























































                                                                                                                                                                 

                                                                      







                                                                  
























                                                                                                                                                                 


                                                                                                                                                                       

       

                                                                    

       
                                                                                                           
                                                                  


                                                                                             











                                                                                                 
                                                                                             


































                                                                                                                                                                 

                                                                                                                                                                


       
                                                                                                                                                                 

                                           

       

                                                                    

       
                                                                                                     
                                                                  

                                                 
                                                                                             










                                                                                                 
                                                                                             









                                                                       

                                                                      


                                                         



















                                                                                                                                                                 
                                                                                                                                                          
                                                                                                      


       


                                                                                                                                                               

       

                                                                  

       
                                                                                                       
                                                                  

                                                   
                                                                                         











                                                                                                 
                                                                                         




                                                                       




                                                                   




                                                                      



















                                                                                                                                                                 

                                                                                                                                                          


       


                                                                                                                                                       

       

                                                              

       
                                                                                                       
                                                                  



                                                                                 










                                                                                                 
                                                                                 









                                                                       

                                                                      


                                                         


                                                                           

                                     



















                                                                                                                                                                 

                                                                                                                                                      


       


                                                                                                                                           

       

                                                        

       
                                                                                                       
                                                                  


                                                                     
                               










                                                                                                 
                                                                     




                                                                       




                                                                      









                                                                   



















                                                                                                                                                                 

                                                                                                                                                


       


                                                                                                                                         

       

                                                        

       
                                                                                                     
                                                                  


                                                                     










                                                                                                 
                                                                     














                                                                       




                                                                  



















                                                                                                                                                                 

                                                                                                                                              


       


                                                                                                                                                           

       

                                                         

       
                                                                                                                     
                                                                  



                                                                       










                                                                                                 
                                                                       




                                                                       




































































































































                                                                                                                                                                 

































































                                                                                                                                                                 

                                                                      


                                                         



















                                                                                                                                                                 
                                                                                                                                                        








































                                                                                                                                                                                   

                                                                      


                                                         
























                                                                                                                                                                                



































                                                                                                                                             

                                                                      



























                                                                                                                                                                 


                                                                                                                                                           
       
 

                                                            
       
 












                                                                                                               
           

























                                                                                                                                                                 
           
          
       
 

                                    

       

                                                                                                                                                            




       

                                                                                                                                                                                    
 
                                                                                                                                                                                              


                                                                                                                                       

                                                                                    

     
                                          


                                                                                                                    
                                                













                                                                                        








































































































































































































































































































































































                                                                                                                                                                                            






















































































































                                                                                                                                                      
                            












































                                                                                                                







                                                  



























































































































































                                                                                                                                      
































































































































































































































































































































































































































































































































































































































                                                                                                                                                                                                                                    

                                                                                                                                                                                                            
 


                                                                                                                                       

                                                                                          

     


                                                                                                                    
 













                                                                                        





































                                                                                                       


                                                                                                                                                      
                                                        
                                                                                                               

     
                                    




                                            
                                                               

     

                                             



                         



                                                            




                                                










                                                                                                                







                                        

                                                        


                   
                                                       


                       




                           


                                                  


             
                                                       
                                                 
                                                                          
       



















                                                                                                       
                                                                     

                           


















                                                                                                                        





                                                                                                                      


                                                                                              


       
                                                                                                            
 
                                                                                                                                      








                                                                           










                                                                                                     
                                                                                                                                       


                                            





                               


                                                                                           


       
                                                                                                      

               
                                                                                                                                      
                                                     


               
                                                                                                                                     
                                                     




       

                                                                                                                                                                                                                    
 
                                                                                                                                                                                    


                                                                                                                                       

                                                                                            

     
                                               


                                                                                                                    
                                   















                                                                                        









































                                                                                                       

                                                                                                                                                      
                                                                                                                           
                                                        
                                                                                                                 

     
                                      

     

                                   


                             

     


                                            



                                                                   

     

                                               

     

                         
                          

     
                                         
                          

     
                                                                        
                             


                  
                                
                          

     

                                                                                               
                                  

     
                                                


                            







                                                            
                                             








                                                
                            













                                                                                                                







                                        

                                                          


                   
                                                         


                       

                                                                 


                                                            
                                               







                           







                                                         


             
                                                         















                                                                                              
















                                                                                                       
                                                                       


                            




                                 







                                                                


                            

















                                                                                                                        


                                                                                                


       
                                                                                                                
 
                                                                                                                                        









                                                                           


                                                                                




                                                                                       










                                                                                                     
                                                                                                                                         


                                            
                                     
                                                    
                                      







                                


                                                                                             


       
                                                                                                          

               
                                                                                                                                        




                                                     
                                        
                                    
                                      



               
                                                                                                                                       
                                                     
                                              
                              

                                                 

                                       




       

                                                                                                                                                                                                                                                
 



                                                                                                                                                                                              
                                                                                                                                                                                                           


                                                                                                                                       

                                                                                                   

     



                                                    
                                                     


                                                                                                                    


                                             

                                                          













                                                                                        







                                  

                                        







































                                                                                                       

                                                     


                                                                                                                                                      
                                                                                                                                                 
                                                                                                                           






                                                                                                                                                      

                                                                                                                                                                   
                                                        
                                                                                                                        

     
                                             

     



                                          

                                    

             




                                     
                                                                                             




                                            











                                                                                            
       

                                                                                                     
       

     

                                                      



                         




                              
                                     

     

                                  

     

                                                                          


                  

                                  

     


                                                                                                 

     
                                                  
                   






















































































                                                                                                   


       





                                                                                         
                                                                          


                                                                                            
                                                                                                                                                              



                                                                                                
                                                                                             

















                                                                                                          

                                                            
                      
                            
                           
                
























                                                  


              







                                                   




                                                






                                
                             


                                
 


                                       










                                                                                                                







                                  

                                         
































                                                                         
       
 







                                                              
 



                                                                         
                       
                                                       


                       








                                                                                       




                           



























                                                                               


             
                                                                





                                                                          
                                                                                           


                                































                                                                                                      



                                  









                                                                                                                    
















                                                                                                       
                                                                              

                           

                                   

                          



















                                     
                                                                     

                    







                                                                            


















                                                                                                                        

                                                                                                                                      





                                                                                                                      


                                                                                                       


       
                                                                                                                              
 
                                                                                                                                               








                                                                           
                                 
                                                                                
























                                                                                       



                                                                                    
                   

                                                     



                                                 



                                                                                       







                                                                                       










                                                                                                     
                                                                                                                                                


                                            
















                                                                                                                                           
                                                          
             
                                          


                                 

                                




                                                                





                               


                                                                                                    


       
                                                                                                                        

               
                                                                                                                                               

                                                     
                                      

                           








                                        



                                               











                                                      
                                                          
             
                                          

             
         


                                                       


               
                                                                                                                                              
                                                     
                                              
                              












                                                  



                                                                                                                                                       
             

                                               


                                           
         



                                                         




       

                                                                                                                                                                                                                                                        
 


                                                                                                                                                                                         

                                                                                                                                                                              


                                                                                                                                       

                                                                                                     

     


                                                            
                                                 
                                              


                                                                                                                    

                                       


                                        













                                                                                        





                               



                         





































                                                                                                       

                           


                                                                                                                                                      





                                                                                                                                                 



                                                                                                                                      
                                                        
                                                                                                                          

     





                                               
                                        
                                
                             




                                 

                       




                                            









                                                                                     
                              
                                                         



                                                     

     

                                                        



                         


                            

                       







































































                                                                                                 

     
                                           


                       
                                                                                










































                                                                                            

                                                            























                                                          



                            
                                               










                                            




                                                








                              





                         










                                                                                                                





                                



                           







                                        

                                                                   


                   
                                                                  


                       


























                                                                     

















                                                           




                           



























                                                             


             
                                                                  





                                                                          





























                                                                                                  



















                                                                                        
















                                                                                                       
                                                                                

                           






















                                   















                                  






                                                                


                            

















                                                                                                                        


                                                                                                         


       
                                                                                                                                  
 
                                                                                                                                                 








                                                                           


























                                                                                       

                                                                                
                                                         














                                                                                       










                                                                                                     
                                                                                                                                                  


                                            














                                                       









                                                 





                               


                                                                                                      


       
                                                                                                                            

               
                                                                                                                                                 
                                                     









                                        






                                        








                                        





                                   


               
                                                                                                                                                
                                                     
                                              














                                                              
                              
                                                   







                                                




       

                                                                                                                                                                                                                

                                                                                                                                                                                             
                                                                                                                                                                                           
                                                                                                                                                                                         


                                                                                                                                       

                                                                                           


                                          
                                                    
                                        


                                                                                                                    
                                            

                                            















                                                                                        

                                 

                               












































                                                                                                                                                      


                                                                                                                                                     

                                                                                                                                                 
                                                        
                                                                                                                

     
                                     

     

                                  

                                   


                                     
                                     
                                 




                                            
                                                                 


                                             



                                                                                            


                                         

     

                                              




                              
                              
                            





                                    
                                                                      


















                                                                                                   






































                                                                                                   























                                                                                                 









                                                            







                                                  







                                      







                                                


                                


                              












                                                                                                                

                                  

                                







                                        

                                                         


                   
                                                        











                                                                         








                                                                         








                                                                     




                           











                                                                 




                                                             
                             


             
                                                        















                                                                                                      









                                                                                                      









                                                                                                  
















                                                                                                       
                                                                      








                                     




                                     
                                                                     

                    







                                   
























                                                                                                                        


                                                                                               


       
                                                                                                              
 
                                                                                                                                       
















                                                                                       


                                                                              



                                                                                    
                   

                                                     







                                                                                       







                                                                                       










                                                                                                     
                                                                                                                                        







                                                         



                                                                                                                                           
                                                          
             
                                          




                                 




                                                       





                               


                                                                                            


       
                                                                                                        

               
                                                                                                                                       




                                                     


                                        



                                        


                                                


                                                      
                                                          
             
                                          


             


                                              


               
                                                                                                                                      
                                                     
                                              



                                                  

                              



                                                                                                                                                       
             

                                               



                                           



                                                




       

                                                                                                                                                                                                                        
 
                                                                                                                                                                            


                                                                                                                                       

                                                                                             

     
                                                  


                                                                                                                    
                           













                                                                                        

                        





































                                                                                                       

                           

                                                                                            
                                                                                                                                                      

                                                                                                                                    
                                                        
                                                                                                                  

     
                                       

     
                                    





                                 


                                            
                                                                     


                                                         

     

                                                

     

                         






                                            
                                                                        
















                                                                                           



                                                            







                                                




                                                


                        










                                                                                                                

                          







                                        

                                                           


                   
                                                          


                       








                                                         




                           







                                                  


             
                                                          





                                                                          









                                                                                      
















                                                                                                       
                                                                        

                           






                             






                                                                

















                                                                                                                        


                                                                                                 


       
                                                                                                                  
 
                                                                                                                                         








                                                                           








                                                                                       










                                                                                                     
                                                                                                                                          


                                            




                                                





                               


                                                                                              


       
                                                                                                            

               
                                                                                                                                         
                                                     







                                        


               
                                                                                                                                        
                                                     





                                                    




       



































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































                                                                                                                                                                                                                    

                                                                                                                                                                                            
 
                                                                                                                                                                                             


                                                                                                                                       

                                                                                      

     
                                          


                                                                                                                    
                                            













                                                                                        

                                 










































                                                                                                                                                      


                                                                                                                                                     
                                                                                                           

     
                                

     
                             



                                     

     


                                            
                                                       


                                             

     

                                         

     


                              

     

                                    

     
                                                                 
                                     


                  

                                    

     


                                                                                                   

     
                                                    
                   
                                




                                                            
                        
                            
                             
                
                                        







                                                

                                











                                                                                                                

                                  







                                        

                                                    


                   
                                                   


                       



                                                                         
                       
                                                       







                           







                                                                 


             
                                                   





                                                                          
                                                                                               


                                

                                                                                                      




















                                                                                                       
                                                                 

                           

                                     

                          
                                    


























                                                                                                                        


                                                                                          


       
                                                                                                    
 
                                                                                                                                  








                                                                           
                                   
                                                                                

                                                        














                                                                                                     
                                                                                                                                   


                                            


                                                         







                                


                                                                                       


       
                                                                                              

               
                                                                                                                                  

                                                     
                                        

                           


                                                



               
                                                                                                                                 
                                                     
                                              
                              

                                                  





         

                                                                                                                                                                                                    
 
                                                                                                                                                                            


                                                                                                                                       

                                                                                        

     
                                                  


                                                                                                                    
                           













                                                                                        

                        










































                                                                                                                                                      
                                                                                                                                    

                                                                                                        
                                                                                                             

     
                                  

     
                               
                                 

             
                     




                                            
                                                           

                                                         


       

                                           



                         
                      

     

                                            

     
                                                                   
                     


                  

                            

     


                                                                                           

     
                                            
                   
                        




                                                            
               
                            
                     
                
                                                







                                                

                        











                                                                                                                

                          







                                        

                                                      


                   
                                                     


                       



                                                         
                       
                                       







                           







                                                  


             
                                                     





                                                                          
                                                                               


                                

                                                                                      




















                                                                                                       
                                                                   

                           

                             

                          
                            








                                                                

















                                                                                                                        


                                                                                            


       
                                                                                                        
 
                                                                                                                                    








                                                                           
                          
                                                                                


                                                          














                                                                                                     
                                                                                                                                     


                                            


                                                







                                


                                                                                         


       
                                                                                                  

               
                                                                                                                                    

                                                     
                                
                           
         
                                        

                                  



               
                                                                                                                                   
                                                     
                                              
                              


                                                    





         

                                                                                                                                                                                                                
 
                                                                                                                                                                                             


                                                                                                                                       

                                                                                           

     
                                          


                                                                                                                    
                                            













                                                                                        

                                 










































                                                                                                                                                      
                                                                                                                                                     
                                                                                                                           
                                                        
                                                                                                                

     
                                     

     

                                  

             
                                     




                                            


                                                                 


       

                                              



                         
                              

     

                                    

     

                                                                      


                  

                                    

     


                                                                                                   

     
                                                    
                   
                                




                                                            
                        
                            
                             
                
                                        







                                                

                                











                                                                                                                

                                  







                                        

                                                         


                   
                                                        


                       



                                                                         
                       
                                                       







                           







                                                                 


             
                                                        





                                                                          
                                                                                               


                                

                                                                                                      




















                                                                                                       
                                                                      

                           

                                     

                          
                                    


























                                                                                                                        


                                                                                               


       
                                                                                                              
 
                                                                                                                                       








                                                                           
                                   
                                                                                

                                                        














                                                                                                     
                                                                                                                                        


                                            


                                                         







                                


                                                                                            


       
                                                                                                        

               
                                                                                                                                       

                                                     
                                        

                           


                                                



               
                                                                                                                                      
                                                     
                                              
                              

                                                  





         

                                                                                                                                                                                                                        
 
                                                                                                                                                                                    
                                                                                                                                                                            


                                                                                                                                       

                                                                                             

     

                                                  


                                                                                                                    
                                   
                           













                                                                                        

                            

                        





































                                                                                                       

                           


                                                                                                                                                      
                                                                                                                                            

                                                                                                                                    
                                                                                                        
                                                        
                                                                                                                  

     
                                       

     


                                    


                             
                     




                                            
                                                                     
                                 
                                                         
       

                                                         
       

     

                                                



                         
                          
                      

     
                                        


                          
                                                                        


















                                                                                               

                                            

     

                                                                        


                  

                            

     


                                                                                           

     
                                            
                   
                        


       





                                                            
                                            


              
               
                            
                     
                
                                                


              




                                                


                            

                        
 










                                                                                                                

                              

                          







                                        

                                                           


                   
                                                          


                       








                                                                 



                                                         
                       
                                       


                       




                           












                                                         


             
                                                          





                                                                          









                                                                                              
                                                                               


                                

                                                                                      



                                  
















                                                                                                       
                                                                        

                           







                                  

                             

                          
                            

                    






                                                                


                            

















                                                                                                                        


                                                                                                 


       
                                                                                                                  
 
                                                                                                                                         








                                                                           

                                                                                
                                                      





                                                                                       
                          
                                                                                


                                                          



                                                                                       










                                                                                                     
                                                                                                                                          


                                            




                                                    


                                                

                                





                               


                                                                                              


       
                                                                                                            

               
                                                                                                                                         
                                                     



                                        
                                

                           
                                        


                                      

                                  
         


               
                                                                                                                                        
                                                     
                                              
                              
                                                



                                       


                                                    
         




       

                                                                                                                                                                                                        
 

                                                                                                                                                                                                    


                                                                                                                                       

                                                                                         

     

                                             


                                                                                                                    

                                                   













                                                                                        



                                     










































                                                                                                                                                      



                                                                                                                                                            
                                                        
                                                                                                              

     
                                   

     


                                

             

                                           




                                            





                                                             


       

                                            



                         

                                 

     

                                  

     

                                                                


                  

                                  

     


                                                                                                 

     
                                                  
                   
























                                                                                                      




                                                            
                      
                            
                           
                








                                           







                                                




                                   











                                                                                                                



                                     







                                        

                                                       


                   
                                                      


                       



                                                                     
                       









                                                                               







                           












                                                                       


             
                                                      





                                                                          
                                                                                           


                                











                                                                                                            




















                                                                                                       
                                                                    

                           

                                   

                          








                                        


























                                                                                                                        


                                                                                             


       
                                                                                                          
 
                                                                                                                                     








                                                                           
                                 
                                                                                









                                                                                       














                                                                                                     
                                                                                                                                      


                                            







                                                             







                                


                                                                                          


       
                                                                                                    

               
                                                                                                                                     

                                                     
                                      

                           








                                                   



               
                                                                                                                                    
                                                     
                                              
                              





                                                     





         

                                                                                                                                                                                                                
 




                                                                                                                                                                                         


                                                                                                                                       

                                                                                           

     


                                                            
                                                 
                                              


                                                                                                                    




                                        













                                                                                        









                               





































                                                                                                       

                           


                                                                                                                                                      








                                                                                                                                                 
                                                                                                        
                                                        
                                                                                                                

     
                                     

     



                                           
                                
                             

             




                                 

     


                                            










                                                                         
                                                         


                                                     
       

     

                                              



                         




                            

     

                                             

     

                                                                           


                  

                                

     


                                                                                               

     
                                                
                   
                            
       

     


                                                      
 


                                                                                      

     


                                  
 


                                                                                                 

     


                                                  
       
     
 

                                                   

     


                                                                                   

     


                                  
 







                                                                                                 
       
     
 
                                           
                       

     
                                                                      

                       

     




































































                                                                                            
                                               






















































































































                                                                                                                



























                                                             

































































































































































































                                                                                                                                       
                                                         





























































































































                                                                                                                                        
                                                   















































































































































































































                                                                                                                                                                                                    







                                                                     
































































































































































































































































































































































                                                                                                                                                                                                            







                                                  


             
                                                       





                                                                          





















































































































































                                                                                                                                       

                                                                                                                                                                                                        

                                                                                                                                                                                         


                                                                                                                                       

                                                                                         


                                        


                                                                                                                    
                                        















                                                                                        












































                                                                                                                                                      
                                                        
                                                                                                              

     
                                   

     

                                


                                 




                                            
                                                             


                                         

     

                                            




                            





                                  
                                                                


















                                                                                                 









                                                            







                                                












                                                                                                                







                                        

                                                       


                   
                                                      











                                                                     




                           







                                                             


             
                                                      















                                                                                                  
















                                                                                                       
                                                                    








                                   
























                                                                                                                        


                                                                                             


       
                                                                                                          
 
                                                                                                                                     
















                                                                                       










                                                                                                     
                                                                                                                                      







                                                       





                               


                                                                                          


       
                                                                                                    

               
                                                                                                                                     




                                                     
                                        


                                              


               
                                                                                                                                    
                                                     
                                              



                                                




       

                                                                                                                                                                                                                
 
                                                                                                                                                                                         
                                                                                                                                                                                             


                                                                                                                                       

                                                                                           

     
                                                         
                                                        


                                                                                                                    
                                        
                                            













                                                                                        

                               

                                 










































                                                                                                                                                      

                                                                                                                                                 
                                                                                                                                                     

                                                                                                        
                                                                                                                

     
                                     

     
                                  
                                        
                                       

             
                                 
                                     




                                            
                                                                 


                                                                      

                                                                       


       

                                              



                         
                            
                              





                                                   
                                                                                   


















                                                                                                 

                                                  

     

                                                                                    


                  

                                    

     


                                                                                                   

     
                                                    
                   
                                




                                                            







                                                       
                        
                            
                             
                
                                                      







                                                


                              

                                











                                                                                                                

                                

                                  







                                        

                                                         


                   
                                                        


                       








                                                                     



                                                                         
                       
                                                       







                           












                                                                 


             
                                                        





                                                                          









                                                                                                  
                                                                                               


                                

                                                                                                      



                                  
















                                                                                                       
                                                                      

                           







                                   

                                     

                          
                                    

                    


















                                                                                                                        





                                                                                                                      


                                                                                               


       
                                                                                                              
 
                                                                                                                                       








                                                                           
                                 
                                                                                






                                                                                       
                                   
                                                                                


                                                                










                                                                                       



                                                                                                     
                                                                                                                                        


                                            




                                                       


                                                         

                                





                               


                                                                                            


       
                                                                                                        

               
                                                                                                                                       
                                                     
                                        
                                      

                           
                                        

                           
                                        


                                        

                                          
         


               
                                                                                                                                      
                                                     
                                              
                              



                                                           



                                                          





         

                                                                                                                                                                    

                                                                                                                                                                                         


                                                                                                                                       

                                                                                


                                        


                                                                                                                    
                                        















                                                                                        












































                                                                                                                                                      
                                                        
                                                                                                     

     
                          

     
                       
                       


                                 




                                            
                                           


                                         

     

                                   




                            





                                  
                                                       


















                                                                                                 









                                                            







                                                












                                                                                                                







                                        

                                              


                   
                                             











                                                                     




                           







                                                             


             
                                             















                                                                                                  
















                                                                                                       
                                                           








                                   
























                                                                                                                        


                                                                                    


       
                                                                                        
 
                                                                                                                            
















                                                                                       










                                                                                                     
                                                                                                                             







                                                       





                               


                                                                                 


       
                                                                                  

               
                                                                                                                            




                                                     
                                        


                                              


               
                                                                                                                           
                                                     
                                              



                                                




       

                                                                                                                                                                            
 
                                                                                                                                                                                    
                                                                                                                                                                                         
                                                                                                                                                                                             


                                                                                                                                       

                                                                                  

     
                                          
                                                         
                                                        


                                                                                                                    
                                   
                                        
                                            













                                                                                        

                            

                               

                                 










































                                                                                                                                                      

                                                                                                                                            

                                                                                                                                                 
                                                                                                                                                     

                                                                                                        
                                                                                                       

     
                            

     

                         
                                        
                                       

             
                             
                                 
                                     




                                            



                                                     


                                                                      
                                     
                                                                       


       

                                     



                         
                          
                            
                              

     























                                                                                               



                                                   
                                                                          


















                                                                                                 
                                                  
                              

     
                                                                           
                                     


                  

                                    

     


                                                                                                   

     
                                                    
                   
                                




                                                            







                                        







                                                       
                        
                            
                             
                
                                                      







                                                


                            


                              

                                











                                                                                                                

                              

                                

                                  







                                        

                                                


                   
                                               


                       








                                                                 








                                                                     



                                                                         
                       
                                                       







                           

















                                                                 


             
                                               





                                                                          









                                                                                              









                                                                                                  
                                                                                               


                                

                                                                                                      




















                                                                                                       
                                                             

                           







                                  







                                   

                                     

                          
                                    








                                                                


                            

















                                                                                                                        


                                                                                      


       
                                                                                            
 
                                                                                                                              








                                                                           








                                                                                       








                                                                                       
                                   
                                                                                
                                                                

                                                 














                                                                                                     
                                                                                                                               


                                            




                                                    




                                                       


                                                         







                                


                                                                                   


       
                                                                                      

               
                                                                                                                              

                                                     
                                    

                           
                                      

                           






                                        


                                        

                                          



               
                                                                                                                             
                                                     
                                              
                              




                                            



                                                           
                              
                                                          

                                           
         




       

                                                                                                                                                                                                                




                                                                                                                                                                                         

                                                                                           




































































                                                                                                                                                      
                                                                                                                

     
                                     

     
                                  








                                            
                                                                 




                                         

                                              










                                  
                                                                  

























































                                                                                                                

                                                         


                   
                                                        
















                                                                     







                                                             


             
                                                        
































                                                                                                       
                                                                      

































                                                                                                                        


                                                                                               


       
                                                                                                              
 
                                                                                                                                       



























                                                                                                     
                                                                                                                                        













                                                       


                                                                                            


       
                                                                                                        

               
                                                                                                                                       











                                                     
                                                                                                                                      










                                                     

                                                                                                                                                                                                                        
 
                                                                                                                                                                          


                                                                                                                                       

                                                                                             

     
                                                 


                                                                                                                    
                         













                                                                                        

                       





































                                                                                                       

                           


                                                                                                                                                      
                                                                                                                                  
                                                                                                        
                                                        
                                                                                                                  

     
                                       

     

                                    

             
                   




                                            


                                                                     
       

     

                                                



                         
                     

     

                                           

     

                                                                      


                  

                           

     


                                                                                          

     
                                           
                   
                       
       



                                                            
              
                            
                    
                
                                               


              




                                                

                       
 










                                                                                                                

                         







                                        

                                                           


                   
                                                          


                       



                                                       
                       
                                     


                       




                           







                                                  


             
                                                          





                                                                          
                                                                             


                                

                                                                                    



                                  
















                                                                                                       
                                                                        

                           

                            

                          
                           
       
                    
























                                                                                                                        


                                                                                                 


       
                                                                                                                  
 
                                                                                                                                         








                                                                           
                         
                                                                                


                                                         



                                                                                       










                                                                                                     
                                                                                                                                          


                                            


                                               

                                





                               


                                                                                              


       
                                                                                                            

               
                                                                                                                                         
                                                     
                                        
                               

                           


                                        
         


               
                                                                                                                                        
                                                     
                                              
                              


                                                   
         




       

                                                                                                                                                                                        

                                                                                                                                                                                         
                                                                                                                                                                           


                                                                                                                                       

                                                                                     


                                        
                                


                                                                                                                    

                                        















                                                                                        

                         







































                                                                                                       

                                                 




                                                                                                                                                      

                                                                                                                                      
                                                        
                                                                                                          

     
                               

     


                            


                                 

                         




                                            

                                                     


                                         
                             

     

                                        




                            

                          





                                  
                                                            


















                                                                                                 

























                                                                                            






                                      







                                  







                                                
                
                         
 












                                                                                                                

                           







                                        

                                                   


                   
                                                  











                                                                     








                                                      




                           












                                                             


             
                                                  















                                                                                                  









                                                                                        
















                                                                                                       
                                                                








                                   



                                  


















                                                                                                                        

                                                                                                                                      





                                                                                                                      


                                                                                         


       
                                                                                                  
 
                                                                                                                                 
















                                                                                       







                                                                                       










                                                                                                     
                                                                                                                                  







                                                       


                                               





                               


                                                                                      


       
                                                                                            

               
                                                                                                                                 




                                                     



                                        


                                              


                                      


               
                                                                                                                                
                                                     
                                              



                                                



                                        




       

                                                                                                                                                                                                
 


                                                                                                                                                                                             


                                                                                                                                       

                                                                                       

     


                                                        


                                                                                                                    


                                            













                                                                                        





                                 





































                                                                                                       

                           


                                                                                                                                                      





                                                                                                                                                     
                                                                                                        
                                                        
                                                                                                            

     
                                 

     



                                       

             


                                     

     


                                            












                                                                                       
       

     

                                          



                         


                              

     

                                                              

     
















                                                                     


                  

                                

     


                                                                                               

     
                                                
                   
















































                                                                                                   
       



                                                            
                   
                            
                         
                
















                                                      


              




                                                







                                
 










                                                                                                                





                                  







                                        

                                                     


                   
                                                    


                       



                                                                 
                       


















                                                                         


                       




                           

















                                                                 


             
                                                    





                                                                          
                                                                                       


                                





















                                                                                                      



                                  
















                                                                                                       
                                                                  

                           

                                 

                          
















                                     

                    






                                                                

















                                                                                                                        


                                                                                           


       
                                                                                                      
 
                                                                                                                                   








                                                                           


                                                                              



                                                                                    
                   


                                                 








                                                                                       
                                                                                











                                                                                       



                                                                                       










                                                                                                     
                                                                                                                                    


                                            



                                                                                                                                       
                                                    
             
                                    












                                                         

                                





                               


                                                                                        


       
                                                                                                

               
                                                                                                                                   
                                                     
                                        
                                    

                           









                                                  
                                                    
             
                                    







                                          
         


               
                                                                                                                                  
                                                     
                                              
                              
           



                                                                                                                                                       
             


                                           












                                                          
         




       

                                                                                                                                                                                                
 
                                                                                                                                                                                         


                                                                                                                                       

                                                                                       

     
                                        


                                                                                                                    
                                        













                                                                                        

                               





































                                                                                                       

                           


                                                                                                                                                      

                                                                                                                                                 
                                                        
                                                                                                            

     
                                 

     

                              


                                 




                                            
                                                         


                                         

     

                                          



                         
                            





                                  
                                                              




                                  
                            

     


                                                                                                 

     



                                                  



                                                            







                                      




                                                


                              










                                                                                                                

                                







                                        

                                                     


                   
                                                    


                       








                                                                     




                           







                                                             


             
                                                    





                                                                          









                                                                                                  
















                                                                                                       
                                                                  

                           






                                   
























                                                                                                                        


                                                                                           


       
                                                                                                      
 
                                                                                                                                   








                                                                           







                                                                                       










                                                                                                     
                                                                                                                                    


                                            




                                                       





                               


                                                                                        


       
                                                                                                

               
                                                                                                                                   




                                                     
                                        


                                              


               
                                                                                                                                  
                                                     
                                              



                                                




       

                                                                                                                                                                                                        
 
                                                                                                                                                                                    

                                                                                                                                                                                             


                                                                                                                                       

                                                                                         

     
                                                   
                                                       
                                                        


                                                                                                                    


                                            













                                                                                        





                                 











                                                                                                       
                      
       
 





                                                                               
 

                                      
 



                                                 
 


                                       
 

                                    

       

                           


                                                                                                                                                      
                                                                                                                                            
                                                                                                                               



                                                                                                                                                     
                                                        
                                                                                                              

     
                                   

     

                                  
                                      
                                       




                                     

     


                                            
                                                             
                                 
                                                              




                                                                  
                                                                       
       

     

                                            

     

                         




                              
                                             


                          
                                                                         






















                                                                                               
                                                                             


















                                                                                               
                                                  


                              
                                                                                  
















                                                                                                   

     

                                                            



                            
                                                 














                                                     
                                                      


              




                                                








                                










                                                                                                                





                                  







                                        

                                                       


                   
                                                      


                       


























                                                                         




                           

















                                                                 


             
                                                      





                                                                          





























                                                                                                      
















                                                                                                       
                                                                    

                           






















                                     






                                                                


                            










                                                                                                                        






                                                                                                                      


                                                                                             


       
                                                                                                          
 
                                                                                                                                     








                                                                           
                              


                                                                                















                                                                                       
                                                                





                                                                                       










                                                                                                     
                                                                                                                                      


                                            

                                                    
                                      











                                                         





                               


                                                                                          


       
                                                                                                    

               
                                                                                                                                     
                                                     











                                        
                                      






                                          


               
                                                                                                                                    
                                                     

                                              

                                                     







                                                         
                                                          


                                           




       

                                                                                                                                                                                                
 
                                                                                                                                                                                         
                                                                                                                                                                                  


                                                                                                                                       

                                                                                       


                                        
                                                  


                                                                                                                    

                                        















                                                                                        

                           












































                                                                                                                                                      

                                                                                                                                          
                                                        
                                                                                                            

     
                                 

     


                                 


                                 
                           




                                            
                                                         


                                         


                                                            

     

                                          




                            
                         





                                  
                                                              


















                                                                                                 























                                                                                              









                                                            







                                                







                                                


                           












                                                                                                                

                             







                                        

                                                     


                   
                                                    











                                                                     








                                                               




                           












                                                             


             
                                                    















                                                                                                  









                                                                                            
















                                                                                                       
                                                                  








                                   







                                  






                                                                


                           

















                                                                                                                        


                                                                                           


       
                                                                                                      
 
                                                                                                                                   
















                                                                                       








                                                                                       










                                                                                                     
                                                                                                                                    







                                                       




                                                   





                               


                                                                                        


       
                                                                                                

               
                                                                                                                                   




                                                     



                                        


                                              


                                     


               
                                                                                                                                  
                                                     
                                              



                                                




                                                    




       

                                                                                                                                                                                                        
 




                                                                                                                                                                                             

                                                                                         

     




                                                                                                                    















                                                                                        














































                                                                                                                                                      




                                                                                                                                                     
                                                                                                              

     
                                   

     
                                



                                       






                                            
                                                             







                                                                       

                                            



                         



                              



                                                 
                                                                             






















                                                                                               
                                                                                  




















                                                                                                   




















                                                      
















                                                                                                                











                                        

                                                       


                   
                                                      


                       






















                                                                         












                                                                 


             
                                                      





                                                                          




































                                                                                                       
                                                                    

                           





















                                                                

















                                                                                                                        


                                                                                             


       
                                                                                                          
 
                                                                                                                                     








                                                                           




























                                                                                                     
                                                                                                                                      


                                            















                                                         


                                                                                          


       
                                                                                                    

               
                                                                                                                                     

                                                     
                                    
                           

                                        
                           
         
                                        








                                          
                                                                                                                                    
                                                     
                                              
                              



                                                         
                              








                                                          

                                                                                                                                                                                                                        
 


                                                                                                                                       

                                                                                             

     


                                                                                                                    
 













                                                                                        





































                                                                                                       


                                                                                                                                                      
                                                        
                                                                                                                  

     
                                       




                                            
                                                                     

     

                                                



                         



                                                            




                                                










                                                                                                                







                                        

                                                           


                   
                                                          


                       




                           


                                                  


             
                                                          





                                                                          
















                                                                                                       
                                                                        

                           






                                                                

















                                                                                                                        























































































































































































































































































































































































                                                                                                                                                                                                                                



                                                                                    
                   


                                                     


























                                                                                                                                            
                                                           
             
                                    





























                                                                                                                                           
                                                           
             
                                    










                                                                                                                                          



                                                                                                                                                       
             


                                               







































































































































































































                                                                                                                                                                                                        


       
                                                                                                          
 
                                                                                                                                     








                                                                           










                                                                                                     
                                                                                                                                      


                                            





                               


                                                                                          


       
                                                                                                    

               
                                                                                                                                     
                                                     


               
                                                                                                                                    
                                                     




       

                                                                                                                                                                                                                
 
                                                                                                                                                                                  


                                                                                                                                       

                                                                                           

     
                                                 


                                                                                                                    
                                   













                                                                                        

                            










































                                                                                                                                                      

                                                                                                                                            
                                                                                                                            
                                                        
                                                                                                                

     
                                     

     

                                  

             
                             




                                            
                                                                 
                                 


                                                                                             

                                       


       

                                              



                         
                          

     

                                                              

     
                                                                 
                                                                     

     
                                                
                                 
                                                    
       
                             

     
                                           
                          

     
                                                                         
                             


                  

                                

     


                                                                                               

     
                                                
                   
                            




                                                            
                   
                            
                         
                
                                               







                                                

                            











                                                                                                                

                              







                                        

                                                         


                   
                                                        


                       



                                                                 
                       
                                               







                           







                                                         


             
                                                        





                                                                          
                                                                                       


                                

                                                                                              




















                                                                                                       
                                                                      

                           

                                 

                          
                                


























                                                                                                                        


                                                                                               


       
                                                                                                              
 
                                                                                                                                       








                                                                           


                                                                              



                                                                                    
                   


                                                 



                                             














                                                                                                     
                                                                                                                                        


                                            



                                                                                                                                       
                                                       
             
                                    


                                 







                                


                                                                                            


       
                                                                                                        

               
                                                                                                                                       

                                                     
                                    

                           



                                                  
                                                       
             
                                    

             



               
                                                                                                                                      
                                                     
                                              
                              
           



                                                                                                                                                       
             


                                           


                                       





         

                                                                                                                                                                                                                        



                                                                                                                                       

                                                                                             





























































                                                                                                                                                      
                                                                                                                  

     
                                       




                                            
                                                                     

     

                                                































                                                                                                                

                                                           


                   
                                                          







                           


                                                  


             
                                                          






















                                                                                                       
                                                                        


























                                                                                                                        


                                                                                                 


       
                                                                                                                  
 
                                                                                                                                         



















                                                                                                     
                                                                                                                                          








                                            


                                                                                              


       
                                                                                                            

               
                                                                                                                                         



                                                     
                                                                                                                                        





                                                     

                                                                                                                                                                                                                                




                                                                                                                                                                                  

                                                                                               

     
                                                  
































































                                                                                                                                                      
                                                                                                                             
                                                        
                                                                                                                    

     
                                         

     

                                      







                                            
                                                                         
                                 


                                                                                               




                                       

                                                  










                                                              
                                                                  


                                                                     
                                                 
                                 
                                                     



                             
                                            


                          
                                                                              
























                                                                                               
                                                































                                                                                                                

                                                             


                   
                                                            
















                                                                 







                                                         


             
                                                            
































                                                                                                       
                                                                          

































                                                                                                                        


                                                                                                   


       
                                                                                                                      
 
                                                                                                                                           











                                                                              



                                                                                    
                   


                                                  


















                                                                                                     
                                                                                                                                            






                                                                                                                                       
                                                        
             
                                    










                                 


                                                                                                


       
                                                                                                                

               
                                                                                                                                           








                                                     
                                                        
             
                                    





               
                                                                                                                                          



                                                     



                                                                                                                                                       
             


                                            








                                       

                                                                                                                                                                                            



                                                                                                                                       

                                                                                      




                                                                                                                    
 























































                                                                                                                                                      
                                                                                                           

     
                                




                                            
                                                       

     

                                         































                                                                                                                

                                                    


                   
                                                   







                           


                                                  


             
                                                   






















                                                                                                       
                                                                 


























                                                                                                                        


                                                                                          


       
                                                                                                    
 
                                                                                                                                  



















                                                                                                     
                                                                                                                                   








                                            


                                                                                       


       
                                                                                              

               
                                                                                                                                  



                                                     
                                                                                                                                 





                                                     

                                                                                                                                                                                                    




                                                                                                                                                                                  

                                                                                        

     
                                              


                                                                                                                    
                                   




























































                                                                                                                                                      
                                                                                                                         
                                                        
                                                                                                             

     
                                  

     

                               







                                            
                                                           
                                 


                                                                                       




                                       

                                           










                                                              
                                                              


                                                                     
                                             
                                 
                                                 



                             
                                        


                          
                                                                   
























                                                                                               
                                            































                                                                                                                

                                                      


                   
                                                     
















                                                                 







                                                         


             
                                                     
































                                                                                                       
                                                                   

































                                                                                                                        


                                                                                            


       
                                                                                                        
 
                                                                                                                                    











                                                                              



                                                                                    
                   


                                                 


















                                                                                                     
                                                                                                                                     






                                                                                                                                       
                                                    
             
                                    










                                 


                                                                                         


       
                                                                                                  

               
                                                                                                                                    




                                                     
                                        


                                                  
                                                    
             
                                    





               
                                                                                                                                   
                                                     
                                              

                              



                                                                                                                                                       
             


                                           








                                       

                                                                                                                                                                                



                                                                                                                                       

                                                                                   





























































                                                                                                                                                      
                                                                                                        

     
                             




                                            
                                                 

     

                                      































                                                                                                                

                                                 


                   
                                                







                           


                                                  


             
                                                






















                                                                                                       
                                                              


























                                                                                                                        


                                                                                       


       
                                                                                              
 
                                                                                                                               



















                                                                                                     
                                                                                                                                








                                            


                                                                                    


       
                                                                                        

               
                                                                                                                               



                                                     
                                                                                                                              





                                                     

                                                                                                                                                                                        
 
                                                                                                                                                                                    


                                                                                                                                       

                                                                                     

     
                                               































































                                                                                                                                                      
                                                                                                                           
                                                        
                                                                                                          

     
                               

     

                              







                                            
                                                     
                                 
                                                          


       

                                        






                          
                                         


                          
                                                                 
























                                                                                               
                                             































                                                                                                                

                                                   


                   
                                                  
















                                                                 







                                                         


             
                                                  
































                                                                                                       
                                                                















                                                                


                            

















                                                                                                                        


                                                                                         


       
                                                                                                  
 
                                                                                                                                 









                                                                           


                                                                                















                                                                                                     
                                                                                                                                  




                                                    
                                      







                                


                                                                                      


       
                                                                                            

               
                                                                                                                                 






                                                     
                                      



               
                                                                                                                                


                                                     

                                                 






                                       

                                                                                                                                                                                            
 


                                                                                                                                                                                         


                                                                                                                                       

                                                                                      

     


                                              


                                                                                                                    


                                        













                                                                                        





                               





































                                                                                                       



                                                 


                                                                                                                                                      






                                                                                                                                                 
                                                        
                                                                                                           

     












                                 




                                            









                                                                                

     

                                         



                         

























































































                                                                                                 



                                                            























                                            




                                                






                              
                         
 










                                                                                                                





                                







                                        

                                                    


                   
                                                   


                       


























                                                                     




                           

















                                                             


             
                                                   





                                                                          





























                                                                                                  
















                                                                                                       
                                                                 

                           


















                                   


















                                                                                                                        

                                                                                                                                      





                                                                                                                      


                                                                                          


       
                                                                                                    
 
                                                                                                                                  








                                                                           










                                                                                       



                                                                                    
                   

                                                   















                                                                                       










                                                                                                     
                                                                                                                                   


                                            








                                                                                                                                         
                                                    
             
                                          







                                               





                               


                                                                                       


       
                                                                                              

               
                                                                                                                                  
                                                     
















                                                    
                                                    
             
                                          





                                      


               
                                                                                                                                 
                                                     






                                                



                                                                                                                                                       
             

                                             







                                         




       

                                                                                                                                                                                                    
 


                                                                                                                                                                                             


                                                                                                                                       

                                                                                        

     


                                                         


                                                                                                                    


                                            















                                                                                        



                                 











































                                                                                                                                                      





                                                                                                                                                     
                                                        
                                                                                                             

     
                                  

     



                                        


                             

                                     




                                            
                                                           
                                 










                                                                                                       


       

                                           




                          

                              

     















                                                                      


                          
                                                                           


















                                                                                               















































                                                                                                   





                                                            
















                                                       










                                                





                                












                                                                                                                



                                  







                                        

                                                      


                   
                                                     











                                                                 

















                                                                         




                           

















                                                                 


             
                                                     















                                                                                              



















                                                                                                      
















                                                                                                       
                                                                   








                                 















                                     
























                                                                                                                        


                                                                                            


       
                                                                                                        
 
                                                                                                                                    









                                                                           

                                                                              



                                                                                    
                   


                                                      


                                      




                                                                                       

















                                                                                       










                                                                                                     
                                                                                                                                     




                                                    

                                                                                                                                       
                                                            
             
                                    












                                                         







                                


                                                                                         


       
                                                                                                  

               
                                                                                                                                    




                                                     






                                        
                                    

                                                  
                                                            
             
                                    







                                          



               
                                                                                                                                   
                                                     
                                              
                              
           



                                                                                                                                                       
             


                                                

             

                                       









                                                           




       

                                                                                                                                                                                                        
 
                                                                                                                                                                                         
                                                                                                                                                                                              


                                                                                                                                       

                                                                                         

     
                                        
                                          


                                                                                                                    
                                        
                                             













                                                                                        

                               

                                  





























                                                                                                       









                                       




                                                                                                                                                      

                                                                                                                                                      
                                                        
                                                                                                              

     
                                   

     
                                
                       
                         


                                 
                                     




                                            
                                                             


                                         

                                             
       

     

                                            




                            
                              





                                  
                                                                


















                                                                                                 

                                    

     

                                                                    


                  

                                    

     


                                                                                                   
     
 
                                                    
                   
                                

       
 

                                                            







                                      
                         
                            
                             
                
                                        


              




                                                


                              

                                
 










                                                                                                                

                                

                                  







                                        

                                                       


                   
                                                      


                       








                                                                     



                                                                         
                       
                                                       


                       




                           












                                                                 


             
                                                      





                                                                          









                                                                                                  
                                                                                               


                                

                                                                                                      



                                  
















                                                                                                       
                                                                    

                           







                                   

                                     

                          
                                    

                    
























                                                                                                                        


                                                                                             
       

     
                                                                                                          
 
                                                                                                                                     








                                                                           







                                                                                       



                                                                                



                                                                                       










                                                                                                     
                                                                                                                                      


                                            




                                                       


                                                          

                                





                               


                                                                                          


       
                                                                                                    

               
                                                                                                                                     
                                                     



                                        
                                        

                           
                                        


                                              

                                                
         


               
                                                                                                                                    
                                                     
                                              




                                                

                                                  
         




       

                                                                                                                                                                                                                
 
                                                                                                                                                                                    
                                                                                                                                                                                         

                                                                                                                                                                                             


                                                                                                                                       

                                                                                           

     
                                                
                                                         
                                                   
                                                        


                                                                                                                    

                                        

                                            















                                                                                        

                               


                                 
                                











































                                                                                                                                                      
                                                                                                                            

                                                                                                                                                 

                                                                                                                                               

                                                                                                                                                     
                                                        
                                                                                                                

     
                                     

     

                                  
                                        
                                  
                                       


                             
                                 
                               
                                     




                                            
                                                                 
                                 
                                                           
       


                                                                      


                                                               
                                     
                                                                       
       

     

                                              




                          
                            
                           
                              

     
                                          


                          
                                                                        


















                                                                                               



                                                   
                                                                                   


















                                                                                                 























                                                                                                
                                                  


                              
                                                                                    


















                                                                                                   





                                                            
                                              










                                                       







                                                 



                             
                                                      


              







                                                


                              


                             


                                












                                                                                                                

                                

                               

                                  







                                        

                                                         


                   
                                                        



                                                                 


                                                                 
                       
                                               


                       








                                                                     








                                                                   








                                                                         




                           






















                                                                 


             
                                                        















                                                                                              









                                                                                                  









                                                                                                









                                                                                                      
















                                                                                                       
                                                                      








                                 








                                   







                                  






                                     






                                                                


                            

















                                                                                                                        


                                                                                               


       
                                                                                                              
 
                                                                                                                                       









                                                                           


                                                                                




                                                                                       








                                                                                       









                                                                                       
                                                                                
                                                                





                                                                                       










                                                                                                     
                                                                                                                                        




                                                    
                                      

                                




                                                       




                                                      




                                                         





                               


                                                                                            


       
                                                                                                        

               
                                                                                                                                       




                                                     


                                      
                                     

                           



                                        
                                    
                                      
         


                                        


                                       


                                          


               
                                                                                                                                      
                                                     
                                              
                              

                                                  

                                       





                                                           




                                                     
                                                          


                                           




       

                                                                                                                                                                                        

                                                                                                                                                                                         
                                                                                                                                                                                         


                                                                                                                                       

                                                                                     


                                        
                                        



                                                                                                                    
                                        















                                                                                        

                               












































                                                                                                                                                      

                                                                                                                                                 
                                                        
                                                                                                          

     
                               

     
                            
                       
                       


                                 
                                 




                                            
                                                     


                                         

                                         


       

                                        




                            
                            





                                  
                                                            


















                                                                                                 

                                  

     

                                                            


                  

                                  

     


                                                                                                 

     
                                                  
                   
                              


       









                                                            
                      
                            
                           
                
                                      










                                                

                              













                                                                                                                

                                







                                        

                                                   


                   
                                                  











                                                                     



                                                                     
                       
                                                   







                           












                                                             


             
                                                  















                                                                                                  
                                                                                           


                                

                                                                                                  




















                                                                                                       
                                                                









                                   

                                   

                          
                                  


























                                                                                                                        


                                                                                         


       
                                                                                                  
 
                                                                                                                                 
















                                                                                       
                                 
                                                                                

                                                      














                                                                                                     
                                                                                                                                  







                                                       


                                                       







                                


                                                                                      


       
                                                                                            

               
                                                                                                                                 




                                                     
                                      

                           
                                        


                                              

                                              



               
                                                                                                                                
                                                     
                                              




                                                

                                                





         

                                                                                                                                                                                                
 
                                                                                                                                                                                    
                                                                                                                                                                                         
                                                                                                                                                                                


                                                                                                                                       

                                                                                       

     
                                      
                                                         
                                                  




                                                                                                                    
                               

















                                                                                        

                          











































                                                                                                                                                      
                                                                                                                          

                                                                                                                                                 
                                                                                                                                        
                                                                                                        
                                                        
                                                                                                            

     
                                 

     

                              
                                        
                                 



                                 
                         




                                            
                                                         
                                 
                                     



                                                                      

                                                           
       

     

                                          





                            
                        

     
                                


                          
                                                          






















                                                                                               
                                                                               


















                                                                                                 

                                            

     

                                                                    


                  

                              

     


                                                                                             

     
                                              
                   
                          


       





                                                            
                                    










                                                       
                 
                            
                       
                
                                                


              










                                                

                          
 














                                                                                                                

                            







                                        

                                                     


                   
                                                    




















                                                                     



                                                             
                       
                                           


                       




                           

















                                                             


             
                                                    

























                                                                                                  
                                                                                   


                                

                                                                                          



                                  
















                                                                                                       
                                                                  

















                                   

                               

                          
                              

                    






                                                                

















                                                                                                                        


                                                                                           


       
                                                                                                      
 
                                                                                                                                   









                                                                           

                                                                                













                                                                                       
                            
                                                                                


                                                          



                                                                                       










                                                                                                     
                                                                                                                                    




                                                    
                                            






                                                       


                                                  

                                





                               


                                                                                        


       
                                                                                                

               
                                                                                                                                   







                                                     
                                  
                           
         
                                        
                                    
                                            



                                        

                                    
         


               
                                                                                                                                  
                                                     
                                              
                              
                                              







                                                           


                                                    
         




       

                                                                                                                                                                                                        

                                                                                                                                                                                         

                                                                                                                                                                                              


                                                                                                                                       

                                                                                         


                                        

                                            



                                                                                                                    

                                             















                                                                                        



                                  












































                                                                                                                                                      





























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































                                                                                                                                                                                                                            
                                                                                                                          
                                                        
                                                                                                                 

     
                                      

     
                                   
                       
                            


                                 
                                           




                                            
                                                                   


                                         

                                                   


       

                                               




                            
                                 





                                  
                                                                   


















                                                                                                 

                                       

     

                                                                             


                  

                                       

     


                                                                                                      

     
                                                       
                   
                                   












                                                            
                            
                            
                                
                
                                           










                                                

                                   













                                                                                                                

                                     







                                        

                                                          


                   
                                                         











                                                                     



                                                                               
                       
                                                             














                                                             



                                                                       




                             
                                                         















                                                                                                  
                                                                                                     


                                

                                                                                                            




















                                                                                                       
                                                                       









                                   

                                        

                          
                                       








                                                                

















                                                                                                                        


                                                                                                


       
                                                                                                                
 
                                                                                                                                        
















                                                                                       
                                       
                                                                                

                                                           














                                                                                                     
                                                                                                                                         







                                                       


                                                             







                                


                                                                                             


       
                                                                                                          

               
                                                                                                                                        




                                                     
                                           

                           
                                        


                                              

                                                   



               
                                                                                                                                       
                                                     
                                              




                                                

                                                     





         

                                                                                                                                                                                                                            


                                                                                                                                                                                         
                                                                                                                                                                                             


                                                                                                                                       

                                                                                              



                                                         
                                                        




                                                                                                                    
                                            

















                                                                                        

                                 














































                                                                                                                                                      
                                                                                                                                                     

                                                                                                        
                                                                                                                   

     
                                        

     
                                     

                                        
                                       



                                 
                                     




                                            
                                                                       





                                                                      

                                                                       


       

                                                 





                            
                              





                                                   
                                                                                      






















                                                                                                 
                                                                               


















                                                                                                

                                                  

     

                                                                                       


                  

                                    

     


                                                                                                   

     
                                                    
                   
                                




















                                                            
                        
                            
                             
                
                                                      













                                                

                                















                                                                                                                

                                  







                                        

                                                            


                   
                                                           




















                                                                     



                                                                         
                       
                                                       



















                                                             



                                                                 




                             
                                                           

























                                                                                                  
                                                                                               


                                

                                                                                                      




















                                                                                                       
                                                                         

















                                   

                                     

                          
                                    


























                                                                                                                        


                                                                                                  


       
                                                                                                                    
 
                                                                                                                                          


























                                                                                       
                                   
                                                                                


                                                                














                                                                                                     
                                                                                                                                           












                                                       


                                                         







                                


                                                                                               


       
                                                                                                              

               
                                                                                                                                          







                                                     
                                        








                                        

                                          



               
                                                                                                                                         












                                                           


                                                          





         

                                                                                                                                                                                                        

                                                                                                                                                                                         
                                                                                                                                                                                              


                                                                                                                                       

                                                                                         


                                        
                                          



                                                                                                                    
                                             















                                                                                        

                                  












































                                                                                                                                                      
                                                                                                                                                      
                                                                                                                          
                                                        
                                                                                                              

     
                                   

     
                                
                       
                         


                                 
                                     




                                            
                                                             


                                         

                                             


       

                                            




                            
                              





                                  
                                                                


















                                                                                                 

                                    

     

                                                                    


                  

                                    

     


                                                                                                   

     
                                                    
                   
                                












                                                            
                         
                            
                             
                
                                        










                                                

                                













                                                                                                                

                                  







                                        

                                                       


                   
                                                      











                                                                     



                                                                         
                       
                                                       







                           






                                                             



                                                                 

                             


             
                                                      















                                                                                                  
                                                                                               


                                

                                                                                                      




















                                                                                                       
                                                                    









                                   

                                     

                          
                                    


























                                                                                                                        


                                                                                             


       
                                                                                                          
 
                                                                                                                                     
















                                                                                       
                                    
                                                                                

                                                        














                                                                                                     
                                                                                                                                      







                                                       


                                                          







                                


                                                                                          


       
                                                                                                    

               
                                                                                                                                     




                                                     
                                        

                           
                                        


                                              

                                                



               
                                                                                                                                    
                                                     
                                              




                                                

                                                  





         

                                                                                                                                                                                                                
 
                                                                                                                                                                                         
                                                                                                                                                                                       
                                                                                                                                                                                             


                                                                                                                                       

                                                                                           

     
                                                         
                                                   
                                                        


                                                                                                                    
                                        
                                      
                                            













                                                                                        

                               

                              

                                 







































                                                                                                       


                                                                                                                                                      

                                                                                                                                                 

                                                                                                                                               
                                                                                                                                                     
                                                                                                        
                                                        
                                                                                                                

     
                                     

     
                                  
                                        
                                  
                                       

             
                                 
                               
                                     




                                            
                                                                 


                                                                      


                                                               

                                                                       
       

     

                                              



                         
                            
                           
                              

     

                                                   

     
                                                                                   
                                 


                  

                                  

     


                                                                                                 

     
                                                  
                   
                              
       

     

                                             

     
                                                                            
                               


                  

                                 

     


                                                                                                

     
                                                 
                   
                             


       

                                                  

     

                                                                                    


                  

                                    

     


                                                                                                   

     
                                                    
                   
                                


       

                                                            
                      
                            
                           
                
                                                       


              
                     
                            
                          
                
                                                 


              
                        
                            
                             
                
                                                      


              




                                                


                              


                             

                                
 










                                                                                                                

                                

                               

                                  







                                        

                                                         


                   
                                                        


                       








                                                                     



                                                                   
                       



                                                 



                                                                         
                       
                                                       


                       




                           











                                                             



                                                                 

                             


             
                                                        





                                                                          
                                                                                           


                                

                                                                                                  



                                  
                                                                                         


                                

                                                                                                



                                  
                                                                                               


                                

                                                                                                      



                                  
















                                                                                                       
                                                                      

                           

                                   

                          
                                  
       

                                  

                                  

                          
                                 

                    
                                  

                                     

                          
                                    

                    


















                                                                                                                        





                                                                                                                      


                                                                                               


       
                                                                                                              
 
                                                                                                                                       








                                                                           








                                                                                       
                                
                                                                                






                                                                                       
                                   
                                                                                


                                                                



                                                                                       










                                                                                                     
                                                                                                                                        


                                            




                                                       




                                                      


                                                         

                                





                               


                                                                                            


       
                                                                                                        

               
                                                                                                                                       

                                                     
                                      

                           
                                     

                           
                                        

                           
                                        


                                        


                                       

                                          
         


               
                                                                                                                                      
                                                     
                                              
                              



                                                           




                                                     
                              


                                                          
         




       

                                                                                                                                                                                                                                

                                                                                                                                                                                         

                                                                                                                                                                                              


                                                                                                                                       

                                                                                               


                                        

                                                                



                                                                                                                    

                                             















                                                                                        



                                  












































                                                                                                                                                      
                                                                                                                                                      
                                                                                                                          



                                                                                                                                                    
                                                        
                                                                                                                    

     
                                         

     
                                      
                       

                                               


                                 

                                     




                                            
                                                                         


                                         
















                                                                                                                          
       

     

                                                  




                            

                              





                                  
                                                                      


















                                                                                                 

                                    

     

                                                                          


                  

                                    

     


                                                                                                   

     
                                                    
                   



































                                                                                                   


       









                                                            
                         
                            
                             
                








                                                              


              







                                                




                                
 












                                                                                                                



                                  







                                        

                                                             


                   
                                                            











                                                                     



                                                                         
                       









                                                                         


                       




                           






                                                             








                                                                 
 
                             


             
                                                            















                                                                                                  
                                                                                               


                                











                                                                                                      



                                  
















                                                                                                       
                                                                          









                                   

                                     

                          








                                     

                    






                                                                

















                                                                                                                        


                                                                                                   


       
                                                                                                                      
 
                                                                                                                                           
















                                                                                       
                                    
                                                                                








                                                                                       




                                                                                            
                   



                                                             



                                                 



                                                                                       










                                                                                                     
                                                                                                                                            







                                                       








                                                                                                                                                                                  
                                                                                              
             

                                                   


                                

                                





                               


                                                                                                


       
                                                                                                                

               
                                                                                                                                           




                                                     
                                        

                           



                                        


                                              





                                                      
                                                                                              
             

                                                   

             
         


               
                                                                                                                                          
                                                     
                                              




                                                




                                                  




                                                                                                                                                                                             
             



                                                       


                                           
         




       

                                                                                                                                                                                                                                        
 
                                                                                                                                                                                         
                                                                                                                                                                                       
                                                                                                                                                                                             


                                                                                                                                       

                                                                                                 

     
                                                         
                                                   
                                                        


                                                                                                                    
                                        
                                      
                                            













                                                                                        

                               

                              

                                 







































                                                                                                       


                                                                                                                                                      

                                                                                                                                                 

                                                                                                                                               
                                                                                                                                                     
                                                                                                        
                                                        
                                                                                                                      

     
                                           

     
                                        
                                        
                                  
                                       

             
                                 
                               
                                     




                                            
                                                                             


                                                                      


                                                               

                                                                       

       
 

                                                    



                         
                            
                           
                              

     

                                                   

     
                                                                                         
                                 


                  

                                  

     


                                                                                                 

     
                                                  
                   
                              


       

                                             

     
                                                                                  
                               


                  

                                 

     


                                                                                                

     
                                                 
                   
                             


       

                                                  

     
                                                                                          
                                     


                  

                                    

     


                                                                                                   

     
                                                    
                   
                                


       

                                                            
                      
                            
                           
                
                                                       


              
                     
                            
                          
                
                                                 


              
                        
                            
                             
                
                                                      










                                                


                             

                                
 












                                                                                                                

                               

                                  







                                        

                                                               


                   
                                                              











                                                                     








                                                                   



                                                                         
                       
                                                       


                       




                           











                                                             



                                                                 

                             


             
                                                              





                                                                          
                                                                                           


                                

                                                                                                  



                                  
                                                                                         


                                

                                                                                                



                                  
                                                                                               


                                

                                                                                                      



                                  
















                                                                                                       
                                                                            

                           

                                   

                          
                                  


                                  

                                  

                          
                                 


                                  

                                     

                          
                                    

                    
























                                                                                                                        


                                                                                                     


       
                                                                                                                          
 
                                                                                                                                             








                                                                           
                                 
                                                                                


                                                                 



                                                                                       








                                                                                       
                                   
                                                                                


                                                                



                                                                                       










                                                                                                     
                                                                                                                                              







                                                       




                                                      


                                                         

                                





                               


                                                                                                  


       
                                                                                                                    

               
                                                                                                                                             

                                                     
                                      

                           
                                     

                           
                                        

                           
                                        


                                        


                                       

                                          
         


               
                                                                                                                                            
                                                     
                                              




                                                           




                                                     
                              


                                                          
         




       

                                                                                                                                                                                                                        

                                                                                                                                                                                         
                                                                                                                                                                                              


                                                                                                                                       

                                                                                             


                                        
                                          



                                                                                                                    
                                             















                                                                                        

                                  












































                                                                                                                                                      
                                                                                                                                                      
                                                                                                                          
                                                        
                                                                                                                  

     
                                       

     
                                    
                       
                         


                                 
                                     




                                            
                                                                     


                                         

                                             
       

     

                                                




                            
                              





                                  
                                                                    


















                                                                                                 

                                    

     
                                                                        
                                     


                  

                                    

     


                                                                                                   

     
                                                    
                   
                                


       









                                                            
                         
                            
                             
                
                                        


              







                                                

                                
 












                                                                                                                

                                  







                                        

                                                           


                   
                                                          











                                                                     



                                                                         
                       
                                                       


                       




                           






                                                             



                                                                 

                             


             
                                                          















                                                                                                  
                                                                                               


                                

                                                                                                      



                                  
















                                                                                                       
                                                                        









                                   

                                     

                          
                                    

                    






                                                                

















                                                                                                                        


                                                                                                 


       
                                                                                                                  
 
                                                                                                                                         
















                                                                                       
                                    
                                                                                

                                                        



                                                                                       










                                                                                                     
                                                                                                                                          







                                                       


                                                          

                                





                               


                                                                                              


       
                                                                                                            

               
                                                                                                                                         




                                                     
                                        

                           
                                        


                                              

                                                
         


               
                                                                                                                                        
                                                     
                                              




                                                

                                                  
         




       

                                                                                                                                                                                                                                
 
                                                                                                                                                                                 

                                                                                                                                                                                         
                                                                                                                                                                                             


                                                                                                                                       

                                                                                               

     
                                                            

                                                         
                                                        


                                                                                                                    
                                   

                                        
                                            













                                                                                        

                            



                               

                                 










































                                                                                                                                                      



                                                                                                                                            



                                                                                                                                                 
                                                                                                                                                     
                                                                                                        
                                                        
                                                                                                                    

     
                                         

     

                                           

                                        
                                       

             
                             

                                 
                                     




                                            















                                                                                                                  





                                                                      

                                                                       


       

                                                  



                         
                          

                            
                              

     


































                                                                                               



                                                   
                                                                                       






















                                                                                                 
                                                                                


















                                                                                                

                                                  

     
                                                                                        
                                     


                  

                                    

     


                                                                                                   

     
                                                    
                   
                                


       

                                                            







                                                          















                                                       
                        
                            
                             
                
                                                      







                                                


                            





                              

                                
 










                                                                                                                

                              



                                

                                  







                                        

                                                             


                   
                                                            


                       








                                                                 

















                                                                     



                                                                         
                       
                                                       


                       




                           

                                                  




                                                         















                                                                 


             
                                                            





                                                                          









                                                                                              



















                                                                                                  
                                                                                               


                                

                                                                                                      



                                  
















                                                                                                       
                                                                          

                           







                                  















                                   

                                     

                          
                                    

                    
























                                                                                                                        


                                                                                                   


       
                                                                                                                      
 
                                                                                                                                           








                                                                           


                                                                             




                                                                                        
                   



                                                         







                                                                                       

















                                                                                       
                                   
                                                                                


                                                                



                                                                                       










                                                                                                     
                                                                                                                                            


                                            



                                                                                                                                                                              
                                                                                          
             

                                                   




                                









                                                       


                                                         

                                





                               


                                                                                                


       
                                                                                                                

               
                                                                                                                                           

                                                     
                                    

                           
                                      

                           
                                     

                           






                                                  
                                                                                          
             

                                                   


             





                                        

                                          
         


               
                                                                                                                                          
                                                     
                                              
                              
           




                                                                                                                                                                                             
             



                                                   




                                       



                                                           
                              



                                                     
                              


                                                          
         




       

                                                                                                                                                                                                

                                                                                                                                                                                         
                                                                                                                                                                                              
                                                                                                                                                                                            


                                                                                                                                       

                                                                                       


                                        
                                          
                                         



                                                                                                                    
                                             
                                           















                                                                                        

                                  

                                 












































                                                                                                                                                      
                                                                                                                                                      
                                                                                                                          

                                                                                                                                                    
                                                        
                                                                                                            

     
                                 

     
                              
                       
                         
                        


                                 
                                     
                                   




                                            
                                                         


                                         

                                             
       

                                           
       

     

                                          




                            
                              
                             





                                  
                                                              


















                                                                                                 

                                    

     
                                                                  
                                     


                  

                                    

     


                                                                                                   

     
                                                    
                   
                                


       

                                   

     

                                                                


                  

                                   

     


                                                                                                  

     
                                                   
                   
                               


       









                                                            
                         
                            
                             
                
                                        


              
                        
                            
                            
                
                                       


              







                                                

                                
 

                               
 












                                                                                                                

                                  

                                 







                                        

                                                     


                   
                                                    











                                                                     



                                                                         
                       
                                                       


                       



                                                                       
                       
                                                     


                       




                           











                                                                 



                                                               
 
                             


             
                                                    















                                                                                                  
                                                                                               


                                

                                                                                                      



                                  
                                                                                             


                                

                                                                                                    



                                  
















                                                                                                       
                                                                  









                                   

                                     

                          
                                    

                    
                                  

                                    

                          
                                   

                    
























                                                                                                                        


                                                                                           


       
                                                                                                      
 
                                                                                                                                   
















                                                                                       
                                    
                                                                                

                                                        



                                                                                       



                                                                                



                                                                                       










                                                                                                     
                                                                                                                                    







                                                       


                                                          

                                


                                                         

                                





                               


                                                                                        


       
                                                                                                

               
                                                                                                                                   




                                                     
                                        

                           
                                       


                                        


                                              

                                                
         

                                               
         


               
                                                                                                                                  
                                                     
                                              




                                                

                                                  
         
                              

                                                 
         




       

                                                                                                                                                                                                        


                                                                                                                                                                                         
                                                                                                                                                                                             


                                                                                                                                       

                                                                                         



                                                         
                                                        




                                                                                                                    
                                            

















                                                                                        
                                 


















































                                                                                                                                                      
                                                                                                              

     
                                   

     
                                

                                        
                                       









                                            
                                                             






                                                                      
                                                                       


       

                                            












                                                   
                                                                                 










                                                                                                 

     



                                                  

     



                                             
                                                                          
                               


                  

                                 

     


                                                                                                

     



                                                 

     
                                                  
                              

     
                                                                                  
                                     


                  

                                    

     


                                                                                                   

     
                                                    
                   
                                




                                                            
                      
                            
                           
                
                                                       


              
                     
                            
                          
                







                                                 
                                                      







                                                


                              





                                










                                                                                                                

                                



                                  







                                        

                                                       


                   
                                                      


                       








                                                                     

















                                                                         




                           

















                                                                 


             
                                                      





                                                                          
                                                                                           


                                

                                                                                                  



                                  
                                                                                         


                                











                                                                                                      




















                                                                                                       
                                                                    

                           






                                   















                                     


















                                                                                                                        





                                                                                                                      


                                                                                             


       
                                                                                                          
 
                                                                                                                                     








                                                                           








                                                                                       








                                                                                       
                                   
                                                                                
                                                                





                                                                                       










                                                                                                     
                                                                                                                                      


                                            




                                                       









                                                         





                               


                                                                                          


       
                                                                                                    

               
                                                                                                                                     

                                                     
                                      

                           
                                     

                           
                                        
                           
         
                                        


                                        





                                          


               
                                                                                                                                    
                                                     
                                              
                              



                                                           





                                                     
                                                          


                                           




       

                                                                                                                                                                                                                                

                                                                                                                                                                                         
                                                                                                                                                                                              
                                                                                                                                                                                        


                                                                                                                                       

                                                                                               


                                        
                                          
                                       



                                                                                                                    

                                             















                                                                                        

                                  

                                







































                                                                                                       

                                                       




                                                                                                                                                      
                                                                                                                                                      
                                                                                                                          

                                                                                                                                                   
                                                        
                                                                                                                    

     
                                         

     
                                      
                       

                         


                                 
                                     

                                   




                                            

                                                                         


                                         

                                             
       
                                         

     

                                                  




                            
                              

                                





                                  
                                                                      


















                                                                                                 

                                    
     
 
                                                                          
                                     


                  

                                    

     


                                                                                                   

     
                                                    
                   
                                


       






















                                                                                                  









                                                            
                         
                            
                             
                
                                        


              







                                     







                                                

                                
 


                               












                                                                                                                

                                  

                                 







                                        

                                                             


                   
                                                            











                                                                     



                                                                         
                       
                                                       


                       








                                                                  




                           











                                                                 




                                        
                             


             
                                                            















                                                                                                  
                                                                                               


                                

                                                                                                      



                                  









                                                                                                    
















                                                                                                       
                                                                          









                                   

                                     

                          
                                    

                    



                                  






                                                                











                                                                                                                        

                                                                                                                                      





                                                                                                                      


                                                                                                   


       
                                                                                                                      
 
                                                                                                                                           
















                                                                                       
                                    
                                                                                

                                                        



                                                                                       







                                                                                       










                                                                                                     
                                                                                                                                            







                                                       


                                                          

                                


                                                      





                               


                                                                                                


       
                                                                                                                

               
                                                                                                                                           




                                                     
                                        

                           



                                        


                                              

                                                
         


                                            


               
                                                                                                                                          
                                                     
                                              




                                                

                                                  
         



                                              




       

                                                                                                                                                                                                                                        
 
                                                                                                                                                                                         

                                                                                                                                                                                             
                                                                                                                                                                                         


                                                                                                                                       

                                                                                                 

     
                                                         
                                                   
                                                        
                                                   


                                                                                                                    

                                        

                                            













                                                                                        

                               



                                 

                               







































                                                                                                       


                                                                                                                                                      

                                                                                                                                                 



                                                                                                                                                     

                                                                                                                                                 
                                                        
                                                                                                                      

     
                                           

     
                                        

                                        

                                       

             
                                 

                                     
                                 




                                            
                                                                             


                                                                      



                                                               
                                                                       
       


                                                                

     

                                                    



                         
                            

                              
                            

     

                                                   

     
                                                                                         
                                 


                  

                                  

     


                                                                                                 

     



                                                  

     

                                             

     
                                                                                  
                               


                  

                                 

     


                                                                                                

     
                                                 
                   



                             
                                                  


                              
                                                                                          















                                                                                                   


       























                                                                                                 

                                                            
                      
                            
                           
                
                                                       


              
                     
                            
                          
                







                                                 
                                                      


              







                                                 




                                                


                              





                                


                              










                                                                                                                

                                



                                  

                                







                                        

                                                               


                   
                                                              


                       








                                                                     

















                                                                         








                                                                     




                           
















                                                                 




                                                             
                             


             
                                                              





                                                                          
                                                                                           


                                

                                                                                                  



                                  
                                                                                         


                                











                                                                                                      



                                  









                                                                                                  
















                                                                                                       
                                                                            

                           






                                   















                                     







                                   


















                                                                                                                        




                                                                                                                      
 


                                                                                                     


       
                                                                                                                          
 
                                                                                                                                             








                                                                           








                                                                                       










                                                                                       
                                                                





                                                                                       








                                                                                       










                                                                                                     
                                                                                                                                              


                                            




                                                       









                                                         




                                                       





                               


                                                                                                  


       
                                                                                                                    

               
                                                                                                                                             

                                                     
                                      

                           
                                     

                           
                                        
                           
         
                                      


                                        


                                        





                                          


                                        


               
                                                                                                                                            
                                                     
                                              
                              



                                                           
                              



                                                     
                              
                                                          


                                           




                                                     




       

                                                                                                                                                                                                                                                

                                                                                                                                                                                         
                                                                                                                                                                                                    


                                                                                                                                       

                                                                                                   


                                        
                                             



                                                                                                                    
                                                   















                                                                                        

                                     












































                                                                                                                                                      
                                                                                                                                                            
                                                                                                                          
                                                        
                                                                                                                        

     
                                             

     
                                          
                       
                            


                                 
                                           




                                            
                                                                                 


                                         

                                                   
       

     

                                                      




                            
                                 





                                  
                                                                          


















                                                                                                 

                                       

     

                                                                                    


                  

                                       

     


                                                                                                      

     
                                                       
                   
                                   


       









                                                            
                            
                            
                                
                
                                           


              







                                                

                                   
 












                                                                                                                

                                     







                                        

                                                                 


                   
                                                                











                                                                     



                                                                               
                       
                                                             


                       




                           






                                                             



                                                                       
 
                             


             
                                                                















                                                                                                  
                                                                                                     


                                

                                                                                                            



                                  
















                                                                                                       
                                                                              









                                   

                                        

                          
                                       

                    
























                                                                                                                        


                                                                                                       


       
                                                                                                                              
 
                                                                                                                                               
















                                                                                       
                                       
                                                                                

                                                           



                                                                                       










                                                                                                     
                                                                                                                                                







                                                       


                                                             

                                





                               


                                                                                                    


       
                                                                                                                        

               
                                                                                                                                               




                                                     
                                           

                           
                                        


                                              

                                                   
         


               
                                                                                                                                              
                                                     
                                              




                                                

                                                     
         




       

                                                                                                                                                                                                                                                        
 
                                                                                                                                                                                    

                                                                                                                                                                                         
                                                                                                                                                                                             


                                                                                                                                       

                                                                                                     

     
                                          

                                                         
                                                        


                                                                                                                    
                                   
                                        

                                            













                                                                                        

                            



                               

                                 







































                                                                                                       


                                                                                                                                                      

                                                                                                                                            



                                                                                                                                                 

                                                                                                                                                     
                                                        
                                                                                                                          

     
                                               

     

                                            
                                        
                                  
                                       

             
                                                                       

                                 
                                     




                                            



                                                                                     





                                                                      
                                     
                                                                       
       

     

                                                        



                         
                          

                            
                              

     

































                                                                                                                  



                                                   
                                                                                             






















                                                                                                 
                                                                                      


















                                                                                                
                                                  


                              
                                                                                              


















                                                                                                   

                                                            







                                        















                                                       



                             
                                                      


              




                                                


                            





                              


                                










                                                                                                                

                              



                                

                                  







                                        

                                                                   


                   
                                                                  


                       








                                                                 

















                                                                     








                                                                         




                           

                                                  




                                                         















                                                                 


             
                                                                  





                                                                          









                                                                                              



















                                                                                                  









                                                                                                      
















                                                                                                       
                                                                                

                           







                                                                 














                                   







                                     


















                                                                                                                        





                                                                                                                      


                                                                                                         


       
                                                                                                                                  
 
                                                                                                                                                 








                                                                           







                                                                                       

















                                                                                       

                                                                                
                                                                





                                                                                       










                                                                                                     
                                                                                                                                                  


                                            




                                                    









                                                       




                                                         





                               


                                                                                                      


       
                                                                                                                            

               
                                                                                                                                                 

                                                     
                                    
                           
         
                                      
                           
         
                                     
                           
         






                                            





                                        


                                          


               
                                                                                                                                                
                                                     
                                              
                              



                                              



                                                           
                              



                                                     
                              
                                                          


                                           




       

                                                                                                                                                                                                                                                

                                                                                                                                                                                         

                                                                                                                                                                                                    


                                                                                                                                       

                                                                                                   


                                        

                                             



                                                                                                                    

                                                   















                                                                                        



                                     












































                                                                                                                                                      
                                                                                                                                                            
                                                                                                                          

                                                                                                                                      
                                                        
                                                                                                                        

     
                                             

     
                                          
                       

                            


                                 

                                                                 




                                            
                                                                                 


                                         




                                                                         
       

     

                                                      




                            

                                 





                                  
                                                                          


















                                                                                                 

                                       

     

                                                                                    


                  

                                       

     


                                                                                                      

     
                                                       
                   
                                   


       


                                                             

     





                                                                                                      


                  


                                                                    

     

                             

     








                                                                                            

     









                                                            
                            
                            
                                
                
                                           


              
                
                            
                      
                
                                     


              







                                                

                                   
 

                         
 












                                                                                                                



                                     







                                        

                                                                 


                   
                                                                











                                                                     



                                                                               
                       
                                                             


                       



                                                           
                       
                                         


                       




                           






                                                             



                                                                       
 



                                                   

                             


             
                                                                















                                                                                                  
                                                                                                     


                                

                                                                                                            



                                  
                                                                                 


                                

                                                                                        



                                  
















                                                                                                       
                                                                              









                                   

                                        

                          
                                       

                    
                                  





                                                              
                    
























                                                                                                                        


                                                                                                       


       
                                                                                                                              
 
                                                                                                                                               
















                                                                                       
                                       
                                                                                

                                                           



                                                                                       



                                                                                



                                                                                       










                                                                                                     
                                                                                                                                                







                                                       







                                                             

                                





                               


                                                                                                    


       
                                                                                                                        

               
                                                                                                                                               




                                                     
                                           

                           
                                 


                                        


                                              

                                                   
         

                                         
         


               
                                                                                                                                              
                                                     
                                              




                                                

                                                     
         
                              

                                           
         




       

                                                                                                                                                                                                                                                        
 

                                                                                                                                                                                         
                                                                                                                                                                                             


                                                                                                                                       

                                                                                                     

     

                                                         
                                                        


                                                                                                                    
                                        
                                      
                                            













                                                                                        



                               

                                 







































                                                                                                       


                                                                                                                                                      



                                                                                                                                                 

                                                                                                                                                     
                                                        
                                                                                                                          

     
                                               

     
                                            
                                        
                                  
                                       

             

                                 
                                     




                                            
                                                                                     





                                                                      
                                     
                                                                       
       

     

                                                        



                         

                            
                              

     



                                                   
                                                                                             






















                                                                                                 
                                                                                      


















                                                                                                
                                                  


                              
                                                                                              


















                                                                                                   

                                                            















                                                       



                             
                                                      


              




                                                





                              


                                










                                                                                                                



                                

                                  







                                        

                                                                   


                   
                                                                  


                       

















                                                                     








                                                                         




                           

















                                                                 


             
                                                                  





                                                                          
                                                                                           


                                

                                                                                                  



                                  
                                                                                         


                                

                                                                                                



                                  
                                                                                               


                                

                                                                                                      




















                                                                                                       
                                                                                

                           














                                   







                                     


















                                                                                                                        





                                                                                                                      


                                                                                                         


       
                                                                                                                                  
 
                                                                                                                                                 







                                                                           
                                   

















                                                                                       

                                                                                
                                                                





                                                                                       










                                                                                                     
                                                                                                                                                  


                                            









                                                       




                                                         





                               


                                                                                                      


       
                                                                                                                            

               
                                                                                                                                                 

                                                     
                                      
                           
         
                                     
                           
         
                                        
                           
         
                                        





                                        


                                          


               
                                                                                                                                                
                                                     
                                              
                              



                                                           
                              



                                                     
                              
                                                          


                                           




       

                                                                                                                                                                                                                                        

                                                                                                                                                                                         
                                                                                                                                                                                                    


                                                                                                                                       

                                                                                                 


                                        
                                             



                                                                                                                    
                                                   















                                                                                        

                                     












































                                                                                                                                                      
                                                                                                                                                            
                                                                                                                          
                                                        
                                                                                                                      

     
                                           

     
                                        
                       
                            


                                 
                                           




                                            
                                                                             


                                         

                                                   
       

     

                                                    




                            
                                 





                                  
                                                                        


















                                                                                                 

                                       

     

                                                                                  


                  

                                       

     


                                                                                                      

     
                                                       
                   
                                   


       









                                                            
                            
                            
                                
                
                                           










                                                

                                   













                                                                                                                

                                     







                                        

                                                               


                   
                                                              











                                                                     



                                                                               
                       
                                                             







                           






                                                             



                                                                       

                             


             
                                                              















                                                                                                  
                                                                                                     


                                

                                                                                                            




















                                                                                                       
                                                                            









                                   

                                        

                          
                                       

                    
























                                                                                                                        


                                                                                                     


       
                                                                                                                          
 
                                                                                                                                             
















                                                                                       
                                       
                                                                                

                                                           














                                                                                                     
                                                                                                                                              







                                                       


                                                             

                                





                               


                                                                                                  


       
                                                                                                                    

               
                                                                                                                                             




                                                     
                                           

                           
                                        


                                              

                                                   



               
                                                                                                                                            
                                                     
                                              




                                                

                                                     





         

                                                                                                                                                                                                                                                
 
                                                                                                                                                                                    
                                                                                                                                                                                         

                                                                                                                                                                                             


                                                                                                                                       

                                                                                                   

     
                                      
                                                         
                                                   
                                                        


                                                                                                                    
                                   
                                        
                                      
                                            













                                                                                        

                            

                               


                                 
                                










































                                                                                                                                                      

                                                                                                                                            

                                                                                                                                                 

                                                                                                                                               
                                                                                                                                                     

                                                                                                        
                                                                                                                        

     
                                             

     

                                          
                                        
                                  
                                       

             
                             
                                 
                               
                                     




                                            



                                                                                 


                                                                      


                                                               
                                     
                                                                       


       

                                                      



                         
                          
                            
                           
                              























                                                                                               

     

                                                   

     
                                                                                           
                                 


                  

                                  

     


                                                                                                 

     
                                                  
                   
                              


       

                                             

     
                                                                                    
                               


                  

                                 

     


                                                                                                

     
                                                 
                   
                             


       
                                                  
                              

     
                                                                                            
                                     


                  

                                    

     


                                                                                                   

     
                                                    
                   
                                




                                                            







                                    
                      
                            
                           
                
                                                       


              
                     
                            
                          
                
                                                 


              
                        
                            
                             
                
                                                      







                                                


                            


                              


                             

                                











                                                                                                                

                              

                                

                               

                                  







                                        

                                                                 


                   
                                                                


                       








                                                                 








                                                                     








                                                                   



                                                                         
                       
                                                       







                           

                                                  




                                                         














                                                                 
                             


             
                                                                





                                                                          









                                                                                              
                                                                                           


                                

                                                                                                  



                                  
                                                                                         


                                

                                                                                                



                                  
                                                                                               


                                

                                                                                                      




















                                                                                                       
                                                                              

                           







                                  

                                   

                          
                                  


                                  

                                  

                          
                                 


                                  

                                     

                          
                                    


























                                                                                                                        


                                                                                                       


       
                                                                                                                              
 
                                                                                                                                               








                                                                           







                                                                                       








                                                                                       









                                                                                       
                                                                                
                                                                

                                                 














                                                                                                     
                                                                                                                                                


                                            




                                                    




                                                       




                                                      


                                                         







                                


                                                                                                    


       
                                                                                                                        

               
                                                                                                                                               

                                                     
                                    

                           
                                      

                           
                                     

                           
                                        


                                        


                                            


                                        


                                       

                                          



               
                                                                                                                                              
                                                     
                                              
                              



                                              



                                                           
                              



                                                     
                              
                                                          

                                           





         

                                                                                                                                                                                                                        

                                                                                                                                                                                         
                                                                                                                                                                                                    


                                                                                                                                       

                                                                                             


                                        
                                             



                                                                                                                    
                                                   















                                                                                        

                                     












































                                                                                                                                                      
                                                                                                                                                            
                                                                                                                          
                                                        
                                                                                                                  

     
                                       

     
                                    
                       
                            


                                 
                                           




                                            
                                                                     


                                         

                                                   


       

                                                




                            
                                 





                                  
                                                                    


















                                                                                                 

                                       

     
                                                                              
                                           


                  

                                       

     


                                                                                                      

     
                                                       
                   
                                   












                                                            
                            
                            
                                
                
                                           










                                                

                                   













                                                                                                                

                                     







                                        

                                                           


                   
                                                          











                                                                     



                                                                               
                       
                                                             







                           












                                                                       


             
                                                          


                                                                          












                                                                                                  
                                                                                                     


                                

                                                                                                            




















                                                                                                       
                                                                        









                                   

                                        

                          
                                       

                    


















                                                                                                                        





                                                                                                                      


                                                                                                 


       
                                                                                                                  
 
                                                                                                                                         
















                                                                                       
                                       
                                                                                

                                                           














                                                                                                     
                                                                                                                                          







                                                       


                                                             

                                





                               


                                                                                              


       
                                                                                                            

               
                                                                                                                                         




                                                     
                                           

                           
                                        


                                              

                                                   



               
                                                                                                                                        
                                                     
                                              




                                                

                                                     





         

                                                                                                                                                                                                                                
 
                                                                                                                                                                                    


                                                                                                                                                                                             
                                                                                                                                                                            


                                                                                                                                       

                                                                                               

     
                                      

                                                         
                                                        
                                                      


                                                                                                                    
                                   

                                        

                                            













                                                                                        

                            





                                 

                        










































                                                                                                                                                      

                                                                                                                                            





                                                                                                                                                     

                                                                                                                                    
                                                        
                                                                                                                    

     
                                         

     
                                      
                     

                                        

                                       

             
                             


                                     
                     




                                            
                                                                         


                                     






                                                                      
                                                                       
       


                                                             

     

                                                  



                         
                          


                              
                      





                                
                                                                  
















                                                                                               





                                                   
                                                                                       






















                                                                                                 
                                                                                


















                                                                                                
                                                  


                              
                                                                                        


















                                                                                                   























                                                                                           

                                                            







                                    



















                                                       
                                                      


              







                                                    




                                                


                            








                                


                        










                                                                                                                

                              





                                  

                          







                                        

                                                             


                   
                                                            


                       








                                                                 


























                                                                         








                                                         




                           





















                                                                 




                                                 
                             


             
                                                            





                                                                          









                                                                                              





























                                                                                                      









                                                                                      
















                                                                                                       
                                                                          

                           







                                  






















                                     







                                  
























                                                                                                                        


                                                                                                   


       
                                                                                                                      
 
                                                                                                                                           








                                                                           







                                                                                       



















                                                                                       
                                                                





                                                                                       








                                                                                       










                                                                                                     
                                                                                                                                            


                                            




                                                    














                                                         




                                                





                               


                                                                                                


       
                                                                                                                

               
                                                                                                                                           

                                                     
                                    

                           
                                      

                           
                                     

                           
                                        

                           



                                        


                                            








                                          


                                  


               
                                                                                                                                          
                                                     
                                              
                              



                                              



                                                           
                              



                                                     
                              
                                                          


                                           




                                                        


































































































































































































































































                                                                                                                                                                                                












                                                             



































                                                                                                  










                                                                                                       
                                                                  
                           


                                   

                          
                                  


                                  


































                                                                                                                        


                                                                                           


       
                                                                                                      
 
                                                                                                                                   
















                                                                                       
                              


















                                                                                                     
                                                                                                                                    


















                                                       


                                                                                        


       
                                                                                                

               
                                                                                                                                   




                                                     
                                    
                           
         
                                        








                                              
                                                                                                                                  
                                                     
                                              













                                                

                                                                                                                                                                                                        
 
                                                                                                                                                                                    
                                                                                                                                                                                         
                                                                                                                                                                                             
                                                                                                                                                                                         
                                                                                                                                                                                       


                                                                                                                                       

                                                                                         

     
                                      
                                                         
                                                        
                                                   
                                                   


                                                                                                                    
                                   
                                        
                                            

                                        













                                                                                        

                            

                               
                                 
                                

                               

                              










































                                                                                                                                                      

                                                                                                                                            

                                                                                                                                                 

                                                                                                                                                     

                                                                                                                                                 

                                                                                                                                               
                                                        
                                                                                                              

     
                                   

     

                                
                                        
                                       

                                  

             
                             
                                 
                                     
                                 
                               




                                            



                                                             


                                                                      
                                     
                                                                       
       


                                                                


                                                               

     

                                            



                         
                          
                            
                              
                            
                           

     

                                

     

                                                            


                  

                                

     


                                                                                               

     
                                                
                   
                            


       

                                                   

     

                                                                                 


                  

                                  

     


                                                                                                 

     
                                                  
                   
                              


       
                                                  


                              
                                                                                  















                                                                                                   


       























                                                                                                 























                                                                                                

                                                            
                   
                            
                         
                
                                    


              
                      
                            
                           
                
                                                       






                             
                                                      


              







                                                 







                                                 




                                                


                            


                              


                                


                              


                             










                                                                                                                

                              

                                

                                  

                                

                               







                                        

                                                       


                   
                                                      


                       








                                                                 








                                                                     








                                                                         








                                                                     








                                                                   




                           



























                                                                 


             
                                                      





                                                                          
                                                                                       


                                

                                                                                              



                                  
                                                                                           


                                

                                                                                                  




                                                                                               


                                

                                                                                                      



                                  









                                                                                                  









                                                                                                
















                                                                                                       
                                                                    

                           

                                 

                          
                                


                                  

                                   

                          
                                  







                                     

                    







                                   







                                  
























                                                                                                                        


                                                                                             


       
                                                                                                          
 
                                                                                                                                     








                                                                           



                                                                                



                                                                                       
                                 
                                                                                


                                                                 



                                                                                       
                                   
                                                                                
                                                                





                                                                                       








                                                                                       








                                                                                       










                                                                                                     
                                                                                                                                      


                                            




                                                    




                                                       




                                                         




                                                       




                                                      





                               


                                                                                          


       
                                                                                                    

               
                                                                                                                                     

                                                     
                                    

                           
                                      

                           

                                        
         


                                      



                                        


                                            


                                        


                                          


                                        


                                       


               
                                                                                                                                    
                                                     
                                              
                              



                                              



                                                           
                              
                                                          


                                           




                                                     




                                                     




       

                                                                                                                                                                                                

                                                                                                                                                                                         

                                                                                                                                                                                         


                                                                                                                                       

                                                                                       


                                        

                                            


                                                                                                                    


                                        















                                                                                        



                               












































                                                                                                                                                      



                                                                                                                                                 
                                                        
                                                                                                            

     
                                 

     



                              


                                 

                                 




                                            
                                                         


                                         





                                                       

     

                                          




                            

                            





                                  
                                                              


















                                                                                                 















































                                                                                                 









                                                            















                                          







                                                





                              












                                                                                                                



                                







                                        

                                                     


                   
                                                    







                                                                     
                                                   


                       

















                                                                     




                           

















                                                             


             
                                                    















                                                                                                  



















                                                                                                  
















                                                                                                       
                                                                  








                                   















                                   






                                                                


                            

















                                                                                                                        


                                                                                           


       
                                                                                                      
 
                                                                                                                                   
















                                                                                       
















                                                                                       










                                                                                                     
                                                                                                                                    







                                                       









                                                       





                               


                                                                                        


       
                                                                                                

               
                                                                                                                                   




                                                     






                                        


                                              





                                              


               
                                                                                                                                  
                                                     
                                              



                                                








                                                




       

                                                                                                                                                                                                        
 
                                                                                                                                                                                         

                                                                                                                                                                                             
                                                                                                                                                                                         


                                                                                                                                       

                                                                                         

     
                                                         
                                                   
                                                        
                                                   


                                                                                                                    
                                        
                                      

                                            













                                                                                        

                               


                                 
                                

                               







































                                                                                                       


                                                                                                                                                      

                                                                                                                                                 

                                                                                                                                               
                                                                                                                                                     
                                                                                                        

                                                                                                                                                 
                                                        
                                                                                                              

     
                                   

     
                                
                                        
                                  
                                       
                                  

             
                                 
                               
                                     
                                 




                                            
                                                             


                                                                      


                                                               
                                     
                                                                       
       


                                                                

     

                                            



                         
                            
                           
                              
                            

     

                                                   

     

                                                                                 


                  

                                  

     


                                                                                                 

     
                                                  
                   
                              
       

     

                                             

     

                                                                          


                  

                                 

     


                                                                                                

     
                                                 
                   
                             


       
                                                  
                              

     
                                                                                  
                                     


                  

                                    

     


                                                                                                   

     
                                                    
                   
                                


       























                                                                                                 

                                                            
                      
                            
                           
                
                                                       


              
                     
                            
                          
                
                                                 


              
                        
                            
                             
                
                                                      


              







                                                 




                                                


                              


                             

                                
 


                              










                                                                                                                

                                

                               

                                  

                                







                                        

                                                       


                   
                                                      


                       








                                                                     








                                                                   



                                                                         
                       
                                                       


                       








                                                                     




                           






















                                                                 


             
                                                      





                                                                          
                                                                                           


                                

                                                                                                  



                                  
                                                                                         


                                

                                                                                                



                                  
                                                                                               


                                

                                                                                                      



                                  









                                                                                                  
















                                                                                                       
                                                                    

                           

                                   

                          
                                  
       

                                  

                                  

                          
                                 

                    


                                     

                          
                                    

                    







                                   


















                                                                                                                        





                                                                                                                      


                                                                                             


       
                                                                                                          
 
                                                                                                                                     








                                                                           








                                                                                       









                                                                                       
                                                                                
                                                                

                                                 



                                                                                       








                                                                                       










                                                                                                     
                                                                                                                                      


                                            




                                                       




                                                      


                                                         

                                




                                                       





                               


                                                                                          


       
                                                                                                    

               
                                                                                                                                     

                                                     
                                      

                           
                                     

                           
                                        

                           



                                        


                                        


                                       

                                          
         


                                        


               
                                                                                                                                    
                                                     
                                              
                              



                                                           




                                                     
                              
                                                          

                                           
         




                                                     




       

                                                                                                                                                                                                    

                                                                                                                                                                                         
                                                                                                                                                                           


                                                                                                                                       

                                                                                        


                                        
                                


                                                                                                                    
                                        
                             















                                                                                        

                         







































                                                                                                       




































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































                                                                                                                                                                                                                




                                                                                                                                                      

                                                                                                                                                 
                                                        
                                                                                                                

     
                                     

     
                                  
                       
                       


                                 
                                 




                                            
                                                                 


                                         


                                         

     

                                              




                            
                            





                                  
                                                                  


















                                                                                                 

                                  

     

                                                                  


                  

                                  

     


                                                                                                 

     



                                                  

     









                                                            
                      
                            
                           
                
                                      


              







                                                

                              
 












                                                                                                                

                                







                                        

                                                         


                   
                                                        











                                                                     



                                                                     
                       
                                                   


                       




                           






                                                             



                                                             

                             


             
                                                        















                                                                                                  
                                                                                           


                                

                                                                                                  



                                  
















                                                                                                       
                                                                      








                                   
                                  





                                   
                    
























                                                                                                                        


                                                                                               


       
                                                                                                              
 
                                                                                                                                       
















                                                                                       



                                                                                



                                                                                       










                                                                                                     
                                                                                                                                        


                                            


                                                       

                                




                                                       





                               


                                                                                            


       
                                                                                                        

               
                                                                                                                                       




                                                     
                                      


                                        


                                              

                                              
         


               
                                                                                                                                      
                                                     
                                              



                                                
                              

                                                
         




       

                                                                                                                                                                                                                        
 
                                                                                                                                                                                    
                                                                                                                                                                                         

                                                                                                                                                                                             


                                                                                                                                       

                                                                                             

     
                                           
                                                         
                                                   
                                                        



                                                                                                                    
                                        

                                            

















                                                                                        


                                 
                                











































                                                                                                                                                      
                                                                                                                       

                                                                                                                                                 

                                                                                                                                               

                                                                                                                                                     
                                                        
                                                                                                                  

     
                                       

     

                                    
                                        
                                  
                                       



                                 
                               
                                     




                                            
                                                                     
                                 
                                                      



                                                                      


                                                               
                                     
                                                                       
       

     

                                                





                            
                           
                              

     
                                     


                          
                                                                     






















                                                                                               
                                                                                     


















                                                                                                 























                                                                                                
                                                  


                              
                                                                                      


















                                                                                                   





                                                            
                                         










                                                       







                                                 



                             
                                                      


              










                                                


                             


                                














                                                                                                                

                               

                                  







                                        

                                                           


                   
                                                          




















                                                                     








                                                                   








                                                                         




                           











                                                             




                                                           





                                                                 


             
                                                          

























                                                                                                  









                                                                                                









                                                                                                      
















                                                                                                       
                                                                        
















                                   
                                  







                                  






                                     






                                                                


                            

















                                                                                                                        


                                                                                                 


       
                                                                                                                  
 
                                                                                                                                         









                                                                           


                                                                                













                                                                                       









                                                                                       
                                                                                
                                                                





                                                                                       










                                                                                                     
                                                                                                                                          




                                                    
                                      






                                                       




                                                      




                                                         





                               


                                                                                              


       
                                                                                                            

               
                                                                                                                                         




                                                     


                                      
                                     
                           
         



                                        
                                    
                                      



                                        


                                       


                                          


               
                                                                                                                                        
                                                     
                                              
                              

                                             






                                                           
                              




                                                     
                                                          


                                           




       

                                                                                                                                                                                                

                                                                                                                                                                                         
                                                                                                                                                                                         


                                                                                                                                       

                                                                                       


                                        
                                        



                                                                                                                    
                                        















                                                                                        

                               












































                                                                                                                                                      
                                                                                                                                                 

                                                                                                                          
                                                                                                            

     
                                 

     
                              
                       
                       


                                 
                                 




                                            
                                                         


                                         

                                         


       

                                          




                            
                            





                                  
                                                              


















                                                                                                 

                                  

     
                                                              
                                 


                  

                                  

     


                                                                                                 

     
                                                  
                   
                              












                                                            
                      
                            
                           
                
                                      










                                                

                              













                                                                                                                

                                







                                        

                                                     


                   
                                                    











                                                                     



                                                                     
                       
                                                   







                           












                                                             


             
                                                    















                                                                                                  
                                                                                           


                                

                                                                                                  




















                                                                                                       
                                                                  









                                   

                                   

                          
                                  


























                                                                                                                        


                                                                                           


       
                                                                                                      
 
                                                                                                                                   
















                                                                                       
                                 
                                                                                

                                                      














                                                                                                     
                                                                                                                                    







                                                       


                                                       







                                


                                                                                        


       
                                                                                                

               
                                                                                                                                   




                                                     
                                      





                                              

                                              



               
                                                                                                                                  






                                                     

                                                





         

                                                                                                                                                                                                        
 

                                                                                                                                                                                         
                                                                                                                                                                                             


                                                                                                                                       

                                                                                         

     

                                                         
                                                        


                                                                                                                    
                                        

                                            













                                                                                        



                               

                                 










































                                                                                                                                                      



                                                                                                                                                 

                                                                                                                                                     
                                                        
                                                                                                              

     
                                   

     
                                
                                        
                                  
                                       

             

                                 
                                     




                                            
                                                             





                                                                      
                                     
                                                                       
       

     

                                            



                         

                            
                              

     



                                                   
                                                                                 






















                                                                                                 
                                                                          


















                                                                                                
                                                  


                              
                                                                                  


















                                                                                                   

                                                            















                                                       



                             
                                                      


              




                                                





                              


                                










                                                                                                                



                                

                                  







                                        

                                                       


                   
                                                      


                       

















                                                                     








                                                                         




                           

                                                  















                                                                 


             
                                                      





                                                                          



















                                                                                                  









                                                                                                      
















                                                                                                       
                                                                    

                           














                                   







                                     






                                                                

















                                                                                                                        


                                                                                             


       
                                                                                                          
 
                                                                                                                                     








                                                                           

















                                                                                       

                                                                                
                                                                





                                                                                       










                                                                                                     
                                                                                                                                      


                                            









                                                       




                                                         





                               


                                                                                          


       
                                                                                                    

               
                                                                                                                                     

                                                     
                                      
                           

                                     
                           
         
                                        
                           
         
                                        





                                        


                                          


               
                                                                                                                                    
                                                     
                                              
                              



                                                           
                              



                                                     
                              
                                                          


                                           




       

                                                                                                                                                                                                                                        

                                                                                                                                                                                         
                                                                                                                                                                                         
                                                                                                                                                                                         


                                                                                                                                       

                                                                                                 


                                        
                                        
                                                                  



                                                                                                                    

                                           















                                                                                        

                               

                                












































                                                                                                                                                      
                                                                                                                                                 
                                                                                                                          



                                                                                                                                                    
                                                        
                                                                                                                      

     
                                           

     
                                        
                       

                                                 


                                 
                                 
                                     




                                            
                                                                             


                                         

                                         
       














                                                                                                                              

     

                                                    




                            
                            
                              





                                  
                                                                        


















                                                                                                 

                                  

     
                                                                        
                                 


                  

                                  

     


                                                                                                 

     
                                                  
                   
                              


       


































                                                                                                    









                                                            
                      
                            
                           
                
                                      


              







                                                                







                                                

                              
 


                                












                                                                                                                

                                

                                  







                                        

                                                               


                   
                                                              











                                                                     



                                                                     
                       
                                                   


                       








                                                                         




                           











                                                             




                                                                 
                             


             
                                                              















                                                                                                  
                                                                                           


                                

                                                                                                  



                                  









                                                                                                      
















                                                                                                       
                                                                            









                                   

                                   

                          
                                  

                    







                                     
























                                                                                                                        


                                                                                                     


       
                                                                                                                          
 
                                                                                                                                             
















                                                                                       
                                 
                                                                                

                                                      



                                                                                       




















                                                                                              










                                                                                                     
                                                                                                                                              







                                                       


                                                       

                                












                                                                                                                                                                                  





                               


                                                                                                  


       
                                                                                                                    

               
                                                                                                                                             




                                                     
                                      

                           



                                        


                                              

                                              
         









                                                                                                


               
                                                                                                                                            
                                                     
                                              




                                                

                                                
         















                                                                                                                                                                                             




       

                                                                                                                                                                                                                                                
 

                                                                                                                                                                                         
                                                                                                                                                                                             


                                                                                                                                       

                                                                                                   

     

                                                         
                                                        


                                                                                                                    
                                        

                                            













                                                                                        



                               

                                 










































                                                                                                                                                      



                                                                                                                                                 

                                                                                                                                                     
                                                        
                                                                                                                        

     
                                             

     
                                          
                                        
                                  
                                       

             

                                 
                                     




                                            
                                                                                 





                                                                      
                                     
                                                                       
       

     

                                                      



                         

                            
                              





                                                   
                                                                                           






















                                                                                                 
                                                                                    


















                                                                                                
                                                  


                              
                                                                                            


















                                                                                                   

                                                            















                                                       



                             
                                                      


              




                                                





                              


                                










                                                                                                                



                                

                                  







                                        

                                                                 


                   
                                                                


                       

















                                                                     








                                                                         




                           

















                                                                 


             
                                                                





                                                                          
                                                                                           


                                

                                                                                                  



                                  
                                                                                         


                                

                                                                                                



                                  
                                                                                               


                                

                                                                                                      




















                                                                                                       
                                                                              

                           














                                   







                                     
























                                                                                                                        


                                                                                                       


       
                                                                                                                              
 
                                                                                                                                               








                                                                           

















                                                                                       

                                                                                
                                                                





                                                                                       










                                                                                                     
                                                                                                                                                


                                            









                                                       




                                                         





                               


                                                                                                    


       
                                                                                                                        

               
                                                                                                                                               

                                                     
                                      

                           
                                     

                           
                                        


                                        





                                        


                                          


               
                                                                                                                                              


                                                     



                                                           
                              



                                                     
                              
                                                          


                                           




       

                                                                                                                                                                                                                                





                                                                                                                                                                                         

                                                                                               







                                                                                                                    
                                        

































































                                                                                                                                                      
                                                                                                                    

     
                                         

     
                                      
                       
                       








                                            
                                                                         







                                         

                                                  











                                  
                                                                      






















                                                                                                 
                                                                      






































































                                                                                                                

                                                             


                   
                                                            

























                                                                     











                                                             
                             


             
                                                            










































                                                                                                       
                                                                          









































                                                                                                                        


                                                                                                   


       
                                                                                                                      
 
                                                                                                                                           



































                                                                                                     
                                                                                                                                            


















                                                       


                                                                                                


       
                                                                                                                

               
                                                                                                                                           







                                                     
                                        








                                              
                                                                                                                                          
                                                     
                                              












                                                

                                                                                                                                                                                                                                        
 
                                                                                                                                                                                 

                                                                                                                                                                                         
                                                                                                                                                                                             


                                                                                                                                       

                                                                                                 

     
                                                              

                                                         
                                                        


                                                                                                                    
                                   
                                        

                                            













                                                                                        

                            



                               

                                 







































                                                                                                       


                                                                                                                                                      



                                                                                                                                            



                                                                                                                                                 

                                                                                                                                                     
                                                        
                                                                                                                      

     
                                           

     

                                             
                                        
                                  
                                       

             
                             

                                 
                                     




                                            















                                                                                                                      





                                                                      
                                     
                                                                       
       

     

                                                    



                         
                          

                            
                              

     


































                                                                                               



                                                   
                                                                                         






















                                                                                                 
                                                                                  


















                                                                                                
                                                  


                              
                                                                                          


















                                                                                                   

                                                            







                                                            















                                                       



                             
                                                      


              




                                                


                            





                              


                                










                                                                                                                

                              



                                

                                  







                                        

                                                               


                   
                                                              


                       








                                                                 

















                                                                     








                                                                         




                           

                                                  




                                                         















                                                                 


             
                                                              





                                                                          









                                                                                              
                                                                                           


                                

                                                                                                  



                                  
                                                                                         


                                

                                                                                                



                                  
                                                                                               


                                

                                                                                                      




















                                                                                                       
                                                                            

                           







                                  














                                   







                                     


















                                                                                                                        





                                                                                                                      


                                                                                                     


       
                                                                                                                          
 
                                                                                                                                             








                                                                           




















                                                                                          

















                                                                                       

                                                                                
                                                                





                                                                                       










                                                                                                     
                                                                                                                                              


                                            












                                                                                                                                                                              









                                                       




                                                         





                               


                                                                                                  


       
                                                                                                                    

               
                                                                                                                                             

                                                     
                                    

                           
                                      

                           
                                     

                           













                                                                                            





                                        


                                          


               
                                                                                                                                            
                                                     
                                              
                              















                                                                                                                                                                                             



                                                           
                              



                                                     
                              
                                                          


                                           




       

                                                                                                                                                                                                        


                                                                                                                                                                                         
                                                                                                                                                                                            


                                                                                                                                       

                                                                                         



                                        
                                         



                                                                                                                    

                                           

















                                                                                        

                                 














































                                                                                                                                                      

                                                                                                                                                    
                                                        
                                                                                                              

     
                                   

     
                                
                       

                        



                                 
                                   




                                            
                                                             





                                         


                                           

     

                                            





                            
                             





                                  
                                                                






















                                                                                                 
                                                                


















                                                                                                 























                                                                                                  

















                                                            







                                       










                                                


                               














                                                                                                                

                                 







                                        

                                                       


                   
                                                      




















                                                                     








                                                                       




                           











                                                             




                                                               
                             


             
                                                      

























                                                                                                  









                                                                                                    
















                                                                                                       
                                                                    
















                                   







                                    
























                                                                                                                        


                                                                                             


       
                                                                                                          
 
                                                                                                                                     
























                                                                                       







                                                                                       










                                                                                                     
                                                                                                                                      












                                                       




                                                         





                               


                                                                                          


       
                                                                                                    

               
                                                                                                                                     







                                                     



                                        





                                              


                                               


               
                                                                                                                                    
                                                     
                                              







                                                



                                                 




       

                                                                                                                                                                                                                
 

                                                                                                                                                                                         
                                                                                                                                                                                             


                                                                                                                                       

                                                                                           

     

                                                         
                                                        


                                                                                                                    
                                        

                                            













                                                                                        



                               

                                 







































                                                                                                       


                                                                                                                                                      



                                                                                                                                                 

                                                                                                                                                     
                                                        
                                                                                                                

     
                                     

     
                                  
                                        
                                  
                                       

             

                                 
                                     




                                            
                                                                 





                                                                      
                                     
                                                                       
       

     

                                              



                         

                            


                              



                                                   
                                                                                   






















                                                                                                 
                                                                            


















                                                                                                
                                                  


                              
                                                                                    


















                                                                                                   

                                                            















                                                       



                             
                                                      


              




                                                





                              


                                










                                                                                                                



                                

                                  







                                        

                                                         


                   
                                                        


                       

















                                                                     








                                                                         




                           

                                                  















                                                                 


             
                                                        





                                                                          



















                                                                                                  









                                                                                                      
















                                                                                                       
                                                                      

                           














                                   







                                     


















                                                                                                                        





                                                                                                                      


                                                                                               


       
                                                                                                              
 
                                                                                                                                       








                                                                           

















                                                                                       

                                                                                
                                                                





                                                                                       










                                                                                                     
                                                                                                                                        


                                            









                                                       




                                                         





                               


                                                                                            


       
                                                                                                        

               
                                                                                                                                       

                                                     
                                      
                           

                                     
                           
         
                                        
                           
         
                                        





                                        


                                          


               
                                                                                                                                      
                                                     
                                              
                              



                                                           
                              



                                                     
                              
                                                          


                                           




       

                                                                                                                                                                                                                

                                                                                                                                                                                         


                                                                                                                                       

                                                                                           


                                        


                                                                                                                    
                                        















                                                                                        












































                                                                                                                                                      
                                                        
                                                                                                                

     
                                     

     

                                  


                                 




                                            
                                                                 


                                         

     

                                              




                            





                                  
                                                                  


















                                                                                                 









                                                            







                                                












                                                                                                                







                                        

                                                         


                   
                                                        











                                                                     




                           






                                                             
                             


             
                                                        















                                                                                                  
















                                                                                                       
                                                                      








                                   
























                                                                                                                        


                                                                                               


       
                                                                                                              
 
                                                                                                                                       
















                                                                                       










                                                                                                     
                                                                                                                                        







                                                       




                               
 


                                                                                            


       
                                                                                                        

               
                                                                                                                                       




                                                     
                                        


                                              


               
                                                                                                                                      
                                                     
                                              



                                                




       

                                                                                                                                                                                                                        
 
                                                                                                                                                                                    
                                                                                                                                                                                         
                                                                                                                                                                                             


                                                                                                                                       

                                                                                             

     
                                              
                                                         
                                                        


                                                                                                                    
                                   
                                        
                                            













                                                                                        

                            

                               
                                 
                                










































                                                                                                                                                      

                                                                                                                                            

                                                                                                                                                 

                                                                                                                                                     
                                                        
                                                                                                                  

     
                                       

     

                                    
                                        
                                       

             
                             
                                 
                                     




                                            



                                                                     


                                                                      
                                     
                                                                       
       

     

                                                



                         
                          
                            
                              

     

                                        

     

                                                                        


                  

                                

     


                                                                                               

     
                                                
                   
                            


       

                                                   

     

                                                                                     


                  

                                  

     


                                                                                                 

     
                                                  
                   
                              


       
                                                  


                              
                                                                                      


















                                                                                                   

                                                            
                   
                            
                         
                
                                            


              
                      
                            
                           
                
                                                       


              



                             
                                                      


              




                                                


                            


                              


                                










                                                                                                                

                              

                                

                                  







                                        

                                                           


                   
                                                          


                       








                                                                 








                                                                     








                                                                         




                           

                                                  




                                                         




                                                             





                                                                 


             
                                                          





                                                                          
                                                                                       


                                

                                                                                              



                                  
                                                                                           


                                

                                                                                                  



                                  
                                                                                               


                                

                                                                                                      




















                                                                                                       
                                                                        

                           

                                 

                          
                                


                                  

                                   

                          
                                  

                    







                                     






                                                                


                            

















                                                                                                                        


                                                                                                 


       
                                                                                                                  
 
                                                                                                                                         








                                                                           
                              
                                                                                


                                                      



                                                                                       
                                 
                                                                                


                                                                 



                                                                                       
                                   
                                                                                
                                                                





                                                                                       










                                                                                                     
                                                                                                                                          


                                            




                                                    




                                                       




                                                         





                               


                                                                                              


       
                                                                                                            

               
                                                                                                                                         

                                                     
                                    

                           
                                      

                           
                                        


                                        


                                      


                                        


                                          


               
                                                                                                                                        


                                                     




                                                



                                                           
                              
                                                          


                                           





       
/**
 * Autogenerated by Thrift Compiler (0.9.3)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package org.openslx.bwlp.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 org.apache.thrift.async.AsyncMethodCallback;
import org.apache.thrift.server.AbstractNonblockingServer.*;
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 javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-11-23")
public class SatelliteServer {

  public interface Iface {

    public long getVersion(long clientVersion) throws org.apache.thrift.TException;

    public String getSupportedFeatures() throws org.apache.thrift.TException;

    public SatelliteConfig getConfiguration() throws org.apache.thrift.TException;

    public TransferInformation requestImageVersionUpload(String userToken, String imageBaseId, long fileSize, List<ByteBuffer> blockHashes, ByteBuffer machineDescription) throws TTransferRejectedException, TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException;

    public void updateBlockHashes(String uploadToken, List<ByteBuffer> blockHashes, String userToken) throws TInvalidTokenException, org.apache.thrift.TException;

    public UploadOptions setUploadOptions(String userToken, String uploadToken, UploadOptions options) throws TAuthorizationException, TInvalidTokenException, org.apache.thrift.TException;

    public void cancelUpload(String uploadToken) throws TInvalidTokenException, org.apache.thrift.TException;

    public TransferStatus queryUploadStatus(String uploadToken) throws TInvalidTokenException, org.apache.thrift.TException;

    public TransferInformation requestDownload(String userToken, String imageVersionId) throws TTransferRejectedException, TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException;

    public void cancelDownload(String downloadToken) throws TInvalidTokenException, org.apache.thrift.TException;

    public void isAuthenticated(String userToken) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;

    public WhoamiInfo whoami(String userToken) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;

    public void invalidateSession(String userToken) throws TInvalidTokenException, org.apache.thrift.TException;

    public List<UserInfo> getUserList(String userToken, int page) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;

    public SatelliteUserConfig getUserConfig(String userToken) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;

    public void setUserConfig(String userToken, SatelliteUserConfig config) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;

    public List<OperatingSystem> getOperatingSystems() throws org.apache.thrift.TException;

    public List<Virtualizer> getVirtualizers() throws org.apache.thrift.TException;

    public List<Organization> getAllOrganizations() throws org.apache.thrift.TException;

    public List<Location> getLocations() throws org.apache.thrift.TException;

    public SatelliteStatus getStatus() throws org.apache.thrift.TException;

    public List<ImageSummaryRead> getImageList(String userToken, List<String> tagSearch, int page) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;

    public ImageDetailsRead getImageDetails(String userToken, String imageBaseId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;

    public String createImage(String userToken, String imageName) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;

    public void updateImageBase(String userToken, String imageBaseId, ImageBaseWrite image) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;

    public void updateImageVersion(String userToken, String imageVersionId, ImageVersionWrite image) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;

    public void deleteImageVersion(String userToken, String imageVersionId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;

    public void deleteImageBase(String userToken, String imageBaseId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;

    public void writeImagePermissions(String userToken, String imageBaseId, Map<String,ImagePermissions> permissions) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;

    public Map<String,ImagePermissions> getImagePermissions(String userToken, String imageBaseId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;

    public void setImageOwner(String userToken, String imageBaseId, String newOwnerId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;

    public void setImageVersionExpiry(String userToken, String imageBaseId, long expireTime) throws TAuthorizationException, TNotFoundException, TInvocationException, TInvalidDateParam, org.apache.thrift.TException;

    public ByteBuffer getImageVersionVirtConfig(String userToken, String imageVersionId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;

    public void setImageVersionVirtConfig(String userToken, String imageVersionId, ByteBuffer meta) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;

    public String requestImageReplication(String userToken, String imageVersionId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;

    public String publishImageVersion(String userToken, String imageVersionId) throws TAuthorizationException, TNotFoundException, TInvocationException, TTransferRejectedException, org.apache.thrift.TException;

    public String createLecture(String userToken, LectureWrite lecture) throws TAuthorizationException, TInvocationException, TInvalidDateParam, TNotFoundException, org.apache.thrift.TException;

    public void updateLecture(String userToken, String lectureId, LectureWrite lecture) throws TAuthorizationException, TNotFoundException, TInvocationException, TInvalidDateParam, org.apache.thrift.TException;

    public List<LectureSummary> getLectureList(String userToken, int page) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;

    public LectureRead getLectureDetails(String userToken, String lectureId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;

    public void deleteLecture(String userToken, String lectureId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;

    public void writeLecturePermissions(String userToken, String lectureId, Map<String,LecturePermissions> permissions) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;

    public Map<String,LecturePermissions> getLecturePermissions(String userToken, String lectureId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;

    public void setLectureOwner(String userToken, String lectureId, String newOwnerId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;

    public PredefinedData getPredefinedData(String userToken) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;

  }

  public interface AsyncIface {

    public void getVersion(long clientVersion, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void getSupportedFeatures(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void getConfiguration(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void requestImageVersionUpload(String userToken, String imageBaseId, long fileSize, List<ByteBuffer> blockHashes, ByteBuffer machineDescription, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void updateBlockHashes(String uploadToken, List<ByteBuffer> blockHashes, String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void setUploadOptions(String userToken, String uploadToken, UploadOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void cancelUpload(String uploadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void queryUploadStatus(String uploadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void requestDownload(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void cancelDownload(String downloadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void isAuthenticated(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void whoami(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void invalidateSession(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void getUserList(String userToken, int page, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void getUserConfig(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void setUserConfig(String userToken, SatelliteUserConfig config, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void getOperatingSystems(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void getVirtualizers(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void getAllOrganizations(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void getLocations(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void getStatus(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void getImageList(String userToken, List<String> tagSearch, int page, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void getImageDetails(String userToken, String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void createImage(String userToken, String imageName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void updateImageBase(String userToken, String imageBaseId, ImageBaseWrite image, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void updateImageVersion(String userToken, String imageVersionId, ImageVersionWrite image, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void deleteImageVersion(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void deleteImageBase(String userToken, String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void writeImagePermissions(String userToken, String imageBaseId, Map<String,ImagePermissions> permissions, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void getImagePermissions(String userToken, String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void setImageOwner(String userToken, String imageBaseId, String newOwnerId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void setImageVersionExpiry(String userToken, String imageBaseId, long expireTime, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void getImageVersionVirtConfig(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void setImageVersionVirtConfig(String userToken, String imageVersionId, ByteBuffer meta, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void requestImageReplication(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void publishImageVersion(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void createLecture(String userToken, LectureWrite lecture, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void updateLecture(String userToken, String lectureId, LectureWrite lecture, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void getLectureList(String userToken, int page, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void getLectureDetails(String userToken, String lectureId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void deleteLecture(String userToken, String lectureId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void writeLecturePermissions(String userToken, String lectureId, Map<String,LecturePermissions> permissions, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void getLecturePermissions(String userToken, String lectureId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void setLectureOwner(String userToken, String lectureId, String newOwnerId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void getPredefinedData(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

  }

  public static class Client extends org.apache.thrift.TServiceClient implements Iface {
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
      public Factory() {}
      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
        return new Client(prot);
      }
      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
        return new Client(iprot, oprot);
      }
    }

    public Client(org.apache.thrift.protocol.TProtocol prot)
    {
      super(prot, prot);
    }

    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
      super(iprot, oprot);
    }

    public long getVersion(long clientVersion) throws org.apache.thrift.TException
    {
      send_getVersion(clientVersion);
      return recv_getVersion();
    }

    public void send_getVersion(long clientVersion) throws org.apache.thrift.TException
    {
      getVersion_args args = new getVersion_args();
      args.setClientVersion(clientVersion);
      sendBase("getVersion", args);
    }

    public long recv_getVersion() throws org.apache.thrift.TException
    {
      getVersion_result result = new getVersion_result();
      receiveBase(result, "getVersion");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getVersion failed: unknown result");
    }

    public String getSupportedFeatures() throws org.apache.thrift.TException
    {
      send_getSupportedFeatures();
      return recv_getSupportedFeatures();
    }

    public void send_getSupportedFeatures() throws org.apache.thrift.TException
    {
      getSupportedFeatures_args args = new getSupportedFeatures_args();
      sendBase("getSupportedFeatures", args);
    }

    public String recv_getSupportedFeatures() throws org.apache.thrift.TException
    {
      getSupportedFeatures_result result = new getSupportedFeatures_result();
      receiveBase(result, "getSupportedFeatures");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSupportedFeatures failed: unknown result");
    }

    public SatelliteConfig getConfiguration() throws org.apache.thrift.TException
    {
      send_getConfiguration();
      return recv_getConfiguration();
    }

    public void send_getConfiguration() throws org.apache.thrift.TException
    {
      getConfiguration_args args = new getConfiguration_args();
      sendBase("getConfiguration", args);
    }

    public SatelliteConfig recv_getConfiguration() throws org.apache.thrift.TException
    {
      getConfiguration_result result = new getConfiguration_result();
      receiveBase(result, "getConfiguration");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getConfiguration failed: unknown result");
    }

    public TransferInformation requestImageVersionUpload(String userToken, String imageBaseId, long fileSize, List<ByteBuffer> blockHashes, ByteBuffer machineDescription) throws TTransferRejectedException, TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException
    {
      send_requestImageVersionUpload(userToken, imageBaseId, fileSize, blockHashes, machineDescription);
      return recv_requestImageVersionUpload();
    }

    public void send_requestImageVersionUpload(String userToken, String imageBaseId, long fileSize, List<ByteBuffer> blockHashes, ByteBuffer machineDescription) throws org.apache.thrift.TException
    {
      requestImageVersionUpload_args args = new requestImageVersionUpload_args();
      args.setUserToken(userToken);
      args.setImageBaseId(imageBaseId);
      args.setFileSize(fileSize);
      args.setBlockHashes(blockHashes);
      args.setMachineDescription(machineDescription);
      sendBase("requestImageVersionUpload", args);
    }

    public TransferInformation recv_requestImageVersionUpload() throws TTransferRejectedException, TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException
    {
      requestImageVersionUpload_result result = new requestImageVersionUpload_result();
      receiveBase(result, "requestImageVersionUpload");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.rejection != null) {
        throw result.rejection;
      }
      if (result.authError != null) {
        throw result.authError;
      }
      if (result.ffff != null) {
        throw result.ffff;
      }
      if (result.sdf != null) {
        throw result.sdf;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "requestImageVersionUpload failed: unknown result");
    }

    public void updateBlockHashes(String uploadToken, List<ByteBuffer> blockHashes, String userToken) throws TInvalidTokenException, org.apache.thrift.TException
    {
      send_updateBlockHashes(uploadToken, blockHashes, userToken);
      recv_updateBlockHashes();
    }

    public void send_updateBlockHashes(String uploadToken, List<ByteBuffer> blockHashes, String userToken) throws org.apache.thrift.TException
    {
      updateBlockHashes_args args = new updateBlockHashes_args();
      args.setUploadToken(uploadToken);
      args.setBlockHashes(blockHashes);
      args.setUserToken(userToken);
      sendBase("updateBlockHashes", args);
    }

    public void recv_updateBlockHashes() throws TInvalidTokenException, org.apache.thrift.TException
    {
      updateBlockHashes_result result = new updateBlockHashes_result();
      receiveBase(result, "updateBlockHashes");
      if (result.ex1 != null) {
        throw result.ex1;
      }
      return;
    }

    public UploadOptions setUploadOptions(String userToken, String uploadToken, UploadOptions options) throws TAuthorizationException, TInvalidTokenException, org.apache.thrift.TException
    {
      send_setUploadOptions(userToken, uploadToken, options);
      return recv_setUploadOptions();
    }

    public void send_setUploadOptions(String userToken, String uploadToken, UploadOptions options) throws org.apache.thrift.TException
    {
      setUploadOptions_args args = new setUploadOptions_args();
      args.setUserToken(userToken);
      args.setUploadToken(uploadToken);
      args.setOptions(options);
      sendBase("setUploadOptions", args);
    }

    public UploadOptions recv_setUploadOptions() throws TAuthorizationException, TInvalidTokenException, org.apache.thrift.TException
    {
      setUploadOptions_result result = new setUploadOptions_result();
      receiveBase(result, "setUploadOptions");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.frootloops != null) {
        throw result.frootloops;
      }
      if (result.imcyborgbutthatsok != null) {
        throw result.imcyborgbutthatsok;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "setUploadOptions failed: unknown result");
    }

    public void cancelUpload(String uploadToken) throws TInvalidTokenException, org.apache.thrift.TException
    {
      send_cancelUpload(uploadToken);
      recv_cancelUpload();
    }

    public void send_cancelUpload(String uploadToken) throws org.apache.thrift.TException
    {
      cancelUpload_args args = new cancelUpload_args();
      args.setUploadToken(uploadToken);
      sendBase("cancelUpload", args);
    }

    public void recv_cancelUpload() throws TInvalidTokenException, org.apache.thrift.TException
    {
      cancelUpload_result result = new cancelUpload_result();
      receiveBase(result, "cancelUpload");
      if (result.ex1 != null) {
        throw result.ex1;
      }
      return;
    }

    public TransferStatus queryUploadStatus(String uploadToken) throws TInvalidTokenException, org.apache.thrift.TException
    {
      send_queryUploadStatus(uploadToken);
      return recv_queryUploadStatus();
    }

    public void send_queryUploadStatus(String uploadToken) throws org.apache.thrift.TException
    {
      queryUploadStatus_args args = new queryUploadStatus_args();
      args.setUploadToken(uploadToken);
      sendBase("queryUploadStatus", args);
    }

    public TransferStatus recv_queryUploadStatus() throws TInvalidTokenException, org.apache.thrift.TException
    {
      queryUploadStatus_result result = new queryUploadStatus_result();
      receiveBase(result, "queryUploadStatus");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ex1 != null) {
        throw result.ex1;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "queryUploadStatus failed: unknown result");
    }

    public TransferInformation requestDownload(String userToken, String imageVersionId) throws TTransferRejectedException, TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException
    {
      send_requestDownload(userToken, imageVersionId);
      return recv_requestDownload();
    }

    public void send_requestDownload(String userToken, String imageVersionId) throws org.apache.thrift.TException
    {
      requestDownload_args args = new requestDownload_args();
      args.setUserToken(userToken);
      args.setImageVersionId(imageVersionId);
      sendBase("requestDownload", args);
    }

    public TransferInformation recv_requestDownload() throws TTransferRejectedException, TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException
    {
      requestDownload_result result = new requestDownload_result();
      receiveBase(result, "requestDownload");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.rejection != null) {
        throw result.rejection;
      }
      if (result.authError != null) {
        throw result.authError;
      }
      if (result.ffff != null) {
        throw result.ffff;
      }
      if (result.sdf != null) {
        throw result.sdf;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "requestDownload failed: unknown result");
    }

    public void cancelDownload(String downloadToken) throws TInvalidTokenException, org.apache.thrift.TException
    {
      send_cancelDownload(downloadToken);
      recv_cancelDownload();
    }

    public void send_cancelDownload(String downloadToken) throws org.apache.thrift.TException
    {
      cancelDownload_args args = new cancelDownload_args();
      args.setDownloadToken(downloadToken);
      sendBase("cancelDownload", args);
    }

    public void recv_cancelDownload() throws TInvalidTokenException, org.apache.thrift.TException
    {
      cancelDownload_result result = new cancelDownload_result();
      receiveBase(result, "cancelDownload");
      if (result.ex1 != null) {
        throw result.ex1;
      }
      return;
    }

    public void isAuthenticated(String userToken) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
    {
      send_isAuthenticated(userToken);
      recv_isAuthenticated();
    }

    public void send_isAuthenticated(String userToken) throws org.apache.thrift.TException
    {
      isAuthenticated_args args = new isAuthenticated_args();
      args.setUserToken(userToken);
      sendBase("isAuthenticated", args);
    }

    public void recv_isAuthenticated() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
    {
      isAuthenticated_result result = new isAuthenticated_result();
      receiveBase(result, "isAuthenticated");
      if (result.authError != null) {
        throw result.authError;
      }
      if (result.serverError != null) {
        throw result.serverError;
      }
      return;
    }

    public WhoamiInfo whoami(String userToken) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
    {
      send_whoami(userToken);
      return recv_whoami();
    }

    public void send_whoami(String userToken) throws org.apache.thrift.TException
    {
      whoami_args args = new whoami_args();
      args.setUserToken(userToken);
      sendBase("whoami", args);
    }

    public WhoamiInfo recv_whoami() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
    {
      whoami_result result = new whoami_result();
      receiveBase(result, "whoami");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.authError != null) {
        throw result.authError;
      }
      if (result.serverError != null) {
        throw result.serverError;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "whoami failed: unknown result");
    }

    public void invalidateSession(String userToken) throws TInvalidTokenException, org.apache.thrift.TException
    {
      send_invalidateSession(userToken);
      recv_invalidateSession();
    }

    public void send_invalidateSession(String userToken) throws org.apache.thrift.TException
    {
      invalidateSession_args args = new invalidateSession_args();
      args.setUserToken(userToken);
      sendBase("invalidateSession", args);
    }

    public void recv_invalidateSession() throws TInvalidTokenException, org.apache.thrift.TException
    {
      invalidateSession_result result = new invalidateSession_result();
      receiveBase(result, "invalidateSession");
      if (result.ex != null) {
        throw result.ex;
      }
      return;
    }

    public List<UserInfo> getUserList(String userToken, int page) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
    {
      send_getUserList(userToken, page);
      return recv_getUserList();
    }

    public void send_getUserList(String userToken, int page) throws org.apache.thrift.TException
    {
      getUserList_args args = new getUserList_args();
      args.setUserToken(userToken);
      args.setPage(page);
      sendBase("getUserList", args);
    }

    public List<UserInfo> recv_getUserList() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
    {
      getUserList_result result = new getUserList_result();
      receiveBase(result, "getUserList");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.failure != null) {
        throw result.failure;
      }
      if (result.serverError != null) {
        throw result.serverError;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUserList failed: unknown result");
    }

    public SatelliteUserConfig getUserConfig(String userToken) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
    {
      send_getUserConfig(userToken);
      return recv_getUserConfig();
    }

    public void send_getUserConfig(String userToken) throws org.apache.thrift.TException
    {
      getUserConfig_args args = new getUserConfig_args();
      args.setUserToken(userToken);
      sendBase("getUserConfig", args);
    }

    public SatelliteUserConfig recv_getUserConfig() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
    {
      getUserConfig_result result = new getUserConfig_result();
      receiveBase(result, "getUserConfig");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.failure != null) {
        throw result.failure;
      }
      if (result.serverError != null) {
        throw result.serverError;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUserConfig failed: unknown result");
    }

    public void setUserConfig(String userToken, SatelliteUserConfig config) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
    {
      send_setUserConfig(userToken, config);
      recv_setUserConfig();
    }

    public void send_setUserConfig(String userToken, SatelliteUserConfig config) throws org.apache.thrift.TException
    {
      setUserConfig_args args = new setUserConfig_args();
      args.setUserToken(userToken);
      args.setConfig(config);
      sendBase("setUserConfig", args);
    }

    public void recv_setUserConfig() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
    {
      setUserConfig_result result = new setUserConfig_result();
      receiveBase(result, "setUserConfig");
      if (result.failure != null) {
        throw result.failure;
      }
      if (result.serverError != null) {
        throw result.serverError;
      }
      return;
    }

    public List<OperatingSystem> getOperatingSystems() throws org.apache.thrift.TException
    {
      send_getOperatingSystems();
      return recv_getOperatingSystems();
    }

    public void send_getOperatingSystems() throws org.apache.thrift.TException
    {
      getOperatingSystems_args args = new getOperatingSystems_args();
      sendBase("getOperatingSystems", args);
    }

    public List<OperatingSystem> recv_getOperatingSystems() throws org.apache.thrift.TException
    {
      getOperatingSystems_result result = new getOperatingSystems_result();
      receiveBase(result, "getOperatingSystems");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getOperatingSystems failed: unknown result");
    }

    public List<Virtualizer> getVirtualizers() throws org.apache.thrift.TException
    {
      send_getVirtualizers();
      return recv_getVirtualizers();
    }

    public void send_getVirtualizers() throws org.apache.thrift.TException
    {
      getVirtualizers_args args = new getVirtualizers_args();
      sendBase("getVirtualizers", args);
    }

    public List<Virtualizer> recv_getVirtualizers() throws org.apache.thrift.TException
    {
      getVirtualizers_result result = new getVirtualizers_result();
      receiveBase(result, "getVirtualizers");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getVirtualizers failed: unknown result");
    }

    public List<Organization> getAllOrganizations() throws org.apache.thrift.TException
    {
      send_getAllOrganizations();
      return recv_getAllOrganizations();
    }

    public void send_getAllOrganizations() throws org.apache.thrift.TException
    {
      getAllOrganizations_args args = new getAllOrganizations_args();
      sendBase("getAllOrganizations", args);
    }

    public List<Organization> recv_getAllOrganizations() throws org.apache.thrift.TException
    {
      getAllOrganizations_result result = new getAllOrganizations_result();
      receiveBase(result, "getAllOrganizations");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllOrganizations failed: unknown result");
    }

    public List<Location> getLocations() throws org.apache.thrift.TException
    {
      send_getLocations();
      return recv_getLocations();
    }

    public void send_getLocations() throws org.apache.thrift.TException
    {
      getLocations_args args = new getLocations_args();
      sendBase("getLocations", args);
    }

    public List<Location> recv_getLocations() throws org.apache.thrift.TException
    {
      getLocations_result result = new getLocations_result();
      receiveBase(result, "getLocations");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLocations failed: unknown result");
    }

    public SatelliteStatus getStatus() throws org.apache.thrift.TException
    {
      send_getStatus();
      return recv_getStatus();
    }

    public void send_getStatus() throws org.apache.thrift.TException
    {
      getStatus_args args = new getStatus_args();
      sendBase("getStatus", args);
    }

    public SatelliteStatus recv_getStatus() throws org.apache.thrift.TException
    {
      getStatus_result result = new getStatus_result();
      receiveBase(result, "getStatus");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getStatus failed: unknown result");
    }

    public List<ImageSummaryRead> getImageList(String userToken, List<String> tagSearch, int page) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
    {
      send_getImageList(userToken, tagSearch, page);
      return recv_getImageList();
    }

    public void send_getImageList(String userToken, List<String> tagSearch, int page) throws org.apache.thrift.TException
    {
      getImageList_args args = new getImageList_args();
      args.setUserToken(userToken);
      args.setTagSearch(tagSearch);
      args.setPage(page);
      sendBase("getImageList", args);
    }

    public List<ImageSummaryRead> recv_getImageList() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
    {
      getImageList_result result = new getImageList_result();
      receiveBase(result, "getImageList");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.authError != null) {
        throw result.authError;
      }
      if (result.serverError != null) {
        throw result.serverError;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getImageList failed: unknown result");
    }

    public ImageDetailsRead getImageDetails(String userToken, String imageBaseId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
    {
      send_getImageDetails(userToken, imageBaseId);
      return recv_getImageDetails();
    }

    public void send_getImageDetails(String userToken, String imageBaseId) throws org.apache.thrift.TException
    {
      getImageDetails_args args = new getImageDetails_args();
      args.setUserToken(userToken);
      args.setImageBaseId(imageBaseId);
      sendBase("getImageDetails", args);
    }

    public ImageDetailsRead recv_getImageDetails() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
    {
      getImageDetails_result result = new getImageDetails_result();
      receiveBase(result, "getImageDetails");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.authError != null) {
        throw result.authError;
      }
      if (result.notFound != null) {
        throw result.notFound;
      }
      if (result.serverError != null) {
        throw result.serverError;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getImageDetails failed: unknown result");
    }

    public String createImage(String userToken, String imageName) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
    {
      send_createImage(userToken, imageName);
      return recv_createImage();
    }

    public void send_createImage(String userToken, String imageName) throws org.apache.thrift.TException
    {
      createImage_args args = new createImage_args();
      args.setUserToken(userToken);
      args.setImageName(imageName);
      sendBase("createImage", args);
    }

    public String recv_createImage() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
    {
      createImage_result result = new createImage_result();
      receiveBase(result, "createImage");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.authError != null) {
        throw result.authError;
      }
      if (result.error != null) {
        throw result.error;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createImage failed: unknown result");
    }

    public void updateImageBase(String userToken, String imageBaseId, ImageBaseWrite image) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
    {
      send_updateImageBase(userToken, imageBaseId, image);
      recv_updateImageBase();
    }

    public void send_updateImageBase(String userToken, String imageBaseId, ImageBaseWrite image) throws org.apache.thrift.TException
    {
      updateImageBase_args args = new updateImageBase_args();
      args.setUserToken(userToken);
      args.setImageBaseId(imageBaseId);
      args.setImage(image);
      sendBase("updateImageBase", args);
    }

    public void recv_updateImageBase() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
    {
      updateImageBase_result result = new updateImageBase_result();
      receiveBase(result, "updateImageBase");
      if (result.authError != null) {
        throw result.authError;
      }
      if (result.notFound != null) {
        throw result.notFound;
      }
      if (result.imgError != null) {
        throw result.imgError;
      }
      return;
    }

    public void updateImageVersion(String userToken, String imageVersionId, ImageVersionWrite image) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
    {
      send_updateImageVersion(userToken, imageVersionId, image);
      recv_updateImageVersion();
    }

    public void send_updateImageVersion(String userToken, String imageVersionId, ImageVersionWrite image) throws org.apache.thrift.TException
    {
      updateImageVersion_args args = new updateImageVersion_args();
      args.setUserToken(userToken);
      args.setImageVersionId(imageVersionId);
      args.setImage(image);
      sendBase("updateImageVersion", args);
    }

    public void recv_updateImageVersion() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
    {
      updateImageVersion_result result = new updateImageVersion_result();
      receiveBase(result, "updateImageVersion");
      if (result.authError != null) {
        throw result.authError;
      }
      if (result.notFound != null) {
        throw result.notFound;
      }
      if (result.imgError != null) {
        throw result.imgError;
      }
      return;
    }

    public void deleteImageVersion(String userToken, String imageVersionId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
    {
      send_deleteImageVersion(userToken, imageVersionId);
      recv_deleteImageVersion();
    }

    public void send_deleteImageVersion(String userToken, String imageVersionId) throws org.apache.thrift.TException
    {
      deleteImageVersion_args args = new deleteImageVersion_args();
      args.setUserToken(userToken);
      args.setImageVersionId(imageVersionId);
      sendBase("deleteImageVersion", args);
    }

    public void recv_deleteImageVersion() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
    {
      deleteImageVersion_result result = new deleteImageVersion_result();
      receiveBase(result, "deleteImageVersion");
      if (result.authError != null) {
        throw result.authError;
      }
      if (result.notFound != null) {
        throw result.notFound;
      }
      if (result.serverError != null) {
        throw result.serverError;
      }
      return;
    }

    public void deleteImageBase(String userToken, String imageBaseId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
    {
      send_deleteImageBase(userToken, imageBaseId);
      recv_deleteImageBase();
    }

    public void send_deleteImageBase(String userToken, String imageBaseId) throws org.apache.thrift.TException
    {
      deleteImageBase_args args = new deleteImageBase_args();
      args.setUserToken(userToken);
      args.setImageBaseId(imageBaseId);
      sendBase("deleteImageBase", args);
    }

    public void recv_deleteImageBase() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
    {
      deleteImageBase_result result = new deleteImageBase_result();
      receiveBase(result, "deleteImageBase");
      if (result.authError != null) {
        throw result.authError;
      }
      if (result.notFound != null) {
        throw result.notFound;
      }
      if (result.serverError != null) {
        throw result.serverError;
      }
      return;
    }

    public void writeImagePermissions(String userToken, String imageBaseId, Map<String,ImagePermissions> permissions) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
    {
      send_writeImagePermissions(userToken, imageBaseId, permissions);
      recv_writeImagePermissions();
    }

    public void send_writeImagePermissions(String userToken, String imageBaseId, Map<String,ImagePermissions> permissions) throws org.apache.thrift.TException
    {
      writeImagePermissions_args args = new writeImagePermissions_args();
      args.setUserToken(userToken);
      args.setImageBaseId(imageBaseId);
      args.setPermissions(permissions);
      sendBase("writeImagePermissions", args);
    }

    public void recv_writeImagePermissions() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
    {
      writeImagePermissions_result result = new writeImagePermissions_result();
      receiveBase(result, "writeImagePermissions");
      if (result.authError != null) {
        throw result.authError;
      }
      if (result.notFound != null) {
        throw result.notFound;
      }
      if (result.serverError != null) {
        throw result.serverError;
      }
      return;
    }

    public Map<String,ImagePermissions> getImagePermissions(String userToken, String imageBaseId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
    {
      send_getImagePermissions(userToken, imageBaseId);
      return recv_getImagePermissions();
    }

    public void send_getImagePermissions(String userToken, String imageBaseId) throws org.apache.thrift.TException
    {
      getImagePermissions_args args = new getImagePermissions_args();
      args.setUserToken(userToken);
      args.setImageBaseId(imageBaseId);
      sendBase("getImagePermissions", args);
    }

    public Map<String,ImagePermissions> recv_getImagePermissions() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
    {
      getImagePermissions_result result = new getImagePermissions_result();
      receiveBase(result, "getImagePermissions");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.authError != null) {
        throw result.authError;
      }
      if (result.notFound != null) {
        throw result.notFound;
      }
      if (result.serverError != null) {
        throw result.serverError;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getImagePermissions failed: unknown result");
    }

    public void setImageOwner(String userToken, String imageBaseId, String newOwnerId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
    {
      send_setImageOwner(userToken, imageBaseId, newOwnerId);
      recv_setImageOwner();
    }

    public void send_setImageOwner(String userToken, String imageBaseId, String newOwnerId) throws org.apache.thrift.TException
    {
      setImageOwner_args args = new setImageOwner_args();
      args.setUserToken(userToken);
      args.setImageBaseId(imageBaseId);
      args.setNewOwnerId(newOwnerId);
      sendBase("setImageOwner", args);
    }

    public void recv_setImageOwner() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
    {
      setImageOwner_result result = new setImageOwner_result();
      receiveBase(result, "setImageOwner");
      if (result.authError != null) {
        throw result.authError;
      }
      if (result.notFound != null) {
        throw result.notFound;
      }
      if (result.serverError != null) {
        throw result.serverError;
      }
      return;
    }

    public void setImageVersionExpiry(String userToken, String imageBaseId, long expireTime) throws TAuthorizationException, TNotFoundException, TInvocationException, TInvalidDateParam, org.apache.thrift.TException
    {
      send_setImageVersionExpiry(userToken, imageBaseId, expireTime);
      recv_setImageVersionExpiry();
    }

    public void send_setImageVersionExpiry(String userToken, String imageBaseId, long expireTime) throws org.apache.thrift.TException
    {
      setImageVersionExpiry_args args = new setImageVersionExpiry_args();
      args.setUserToken(userToken);
      args.setImageBaseId(imageBaseId);
      args.setExpireTime(expireTime);
      sendBase("setImageVersionExpiry", args);
    }

    public void recv_setImageVersionExpiry() throws TAuthorizationException, TNotFoundException, TInvocationException, TInvalidDateParam, org.apache.thrift.TException
    {
      setImageVersionExpiry_result result = new setImageVersionExpiry_result();
      receiveBase(result, "setImageVersionExpiry");
      if (result.authError != null) {
        throw result.authError;
      }
      if (result.notFound != null) {
        throw result.notFound;
      }
      if (result.serverError != null) {
        throw result.serverError;
      }
      if (result.dateError != null) {
        throw result.dateError;
      }
      return;
    }

    public ByteBuffer getImageVersionVirtConfig(String userToken, String imageVersionId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
    {
      send_getImageVersionVirtConfig(userToken, imageVersionId);
      return recv_getImageVersionVirtConfig();
    }

    public void send_getImageVersionVirtConfig(String userToken, String imageVersionId) throws org.apache.thrift.TException
    {
      getImageVersionVirtConfig_args args = new getImageVersionVirtConfig_args();
      args.setUserToken(userToken);
      args.setImageVersionId(imageVersionId);
      sendBase("getImageVersionVirtConfig", args);
    }

    public ByteBuffer recv_getImageVersionVirtConfig() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
    {
      getImageVersionVirtConfig_result result = new getImageVersionVirtConfig_result();
      receiveBase(result, "getImageVersionVirtConfig");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.authError != null) {
        throw result.authError;
      }
      if (result.notFound != null) {
        throw result.notFound;
      }
      if (result.serverError != null) {
        throw result.serverError;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getImageVersionVirtConfig failed: unknown result");
    }

    public void setImageVersionVirtConfig(String userToken, String imageVersionId, ByteBuffer meta) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
    {
      send_setImageVersionVirtConfig(userToken, imageVersionId, meta);
      recv_setImageVersionVirtConfig();
    }

    public void send_setImageVersionVirtConfig(String userToken, String imageVersionId, ByteBuffer meta) throws org.apache.thrift.TException
    {
      setImageVersionVirtConfig_args args = new setImageVersionVirtConfig_args();
      args.setUserToken(userToken);
      args.setImageVersionId(imageVersionId);
      args.setMeta(meta);
      sendBase("setImageVersionVirtConfig", args);
    }

    public void recv_setImageVersionVirtConfig() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
    {
      setImageVersionVirtConfig_result result = new setImageVersionVirtConfig_result();
      receiveBase(result, "setImageVersionVirtConfig");
      if (result.authError != null) {
        throw result.authError;
      }
      if (result.notFound != null) {
        throw result.notFound;
      }
      if (result.serverError != null) {
        throw result.serverError;
      }
      return;
    }

    public String requestImageReplication(String userToken, String imageVersionId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
    {
      send_requestImageReplication(userToken, imageVersionId);
      return recv_requestImageReplication();
    }

    public void send_requestImageReplication(String userToken, String imageVersionId) throws org.apache.thrift.TException
    {
      requestImageReplication_args args = new requestImageReplication_args();
      args.setUserToken(userToken);
      args.setImageVersionId(imageVersionId);
      sendBase("requestImageReplication", args);
    }

    public String recv_requestImageReplication() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
    {
      requestImageReplication_result result = new requestImageReplication_result();
      receiveBase(result, "requestImageReplication");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.authError != null) {
        throw result.authError;
      }
      if (result.notFound != null) {
        throw result.notFound;
      }
      if (result.serverError != null) {
        throw result.serverError;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "requestImageReplication failed: unknown result");
    }

    public String publishImageVersion(String userToken, String imageVersionId) throws TAuthorizationException, TNotFoundException, TInvocationException, TTransferRejectedException, org.apache.thrift.TException
    {
      send_publishImageVersion(userToken, imageVersionId);
      return recv_publishImageVersion();
    }

    public void send_publishImageVersion(String userToken, String imageVersionId) throws org.apache.thrift.TException
    {
      publishImageVersion_args args = new publishImageVersion_args();
      args.setUserToken(userToken);
      args.setImageVersionId(imageVersionId);
      sendBase("publishImageVersion", args);
    }

    public String recv_publishImageVersion() throws TAuthorizationException, TNotFoundException, TInvocationException, TTransferRejectedException, org.apache.thrift.TException
    {
      publishImageVersion_result result = new publishImageVersion_result();
      receiveBase(result, "publishImageVersion");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.authError != null) {
        throw result.authError;
      }
      if (result.notFound != null) {
        throw result.notFound;
      }
      if (result.serverError != null) {
        throw result.serverError;
      }
      if (result.tre != null) {
        throw result.tre;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "publishImageVersion failed: unknown result");
    }

    public String createLecture(String userToken, LectureWrite lecture) throws TAuthorizationException, TInvocationException, TInvalidDateParam, TNotFoundException, org.apache.thrift.TException
    {
      send_createLecture(userToken, lecture);
      return recv_createLecture();
    }

    public void send_createLecture(String userToken, LectureWrite lecture) throws org.apache.thrift.TException
    {
      createLecture_args args = new createLecture_args();
      args.setUserToken(userToken);
      args.setLecture(lecture);
      sendBase("createLecture", args);
    }

    public String recv_createLecture() throws TAuthorizationException, TInvocationException, TInvalidDateParam, TNotFoundException, org.apache.thrift.TException
    {
      createLecture_result result = new createLecture_result();
      receiveBase(result, "createLecture");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.authError != null) {
        throw result.authError;
      }
      if (result.serverError != null) {
        throw result.serverError;
      }
      if (result.dateError != null) {
        throw result.dateError;
      }
      if (result.notFound != null) {
        throw result.notFound;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createLecture failed: unknown result");
    }

    public void updateLecture(String userToken, String lectureId, LectureWrite lecture) throws TAuthorizationException, TNotFoundException, TInvocationException, TInvalidDateParam, org.apache.thrift.TException
    {
      send_updateLecture(userToken, lectureId, lecture);
      recv_updateLecture();
    }

    public void send_updateLecture(String userToken, String lectureId, LectureWrite lecture) throws org.apache.thrift.TException
    {
      updateLecture_args args = new updateLecture_args();
      args.setUserToken(userToken);
      args.setLectureId(lectureId);
      args.setLecture(lecture);
      sendBase("updateLecture", args);
    }

    public void recv_updateLecture() throws TAuthorizationException, TNotFoundException, TInvocationException, TInvalidDateParam, org.apache.thrift.TException
    {
      updateLecture_result result = new updateLecture_result();
      receiveBase(result, "updateLecture");
      if (result.authError != null) {
        throw result.authError;
      }
      if (result.notFound != null) {
        throw result.notFound;
      }
      if (result.serverError != null) {
        throw result.serverError;
      }
      if (result.dateError != null) {
        throw result.dateError;
      }
      return;
    }

    public List<LectureSummary> getLectureList(String userToken, int page) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
    {
      send_getLectureList(userToken, page);
      return recv_getLectureList();
    }

    public void send_getLectureList(String userToken, int page) throws org.apache.thrift.TException
    {
      getLectureList_args args = new getLectureList_args();
      args.setUserToken(userToken);
      args.setPage(page);
      sendBase("getLectureList", args);
    }

    public List<LectureSummary> recv_getLectureList() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
    {
      getLectureList_result result = new getLectureList_result();
      receiveBase(result, "getLectureList");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.authError != null) {
        throw result.authError;
      }
      if (result.serverError != null) {
        throw result.serverError;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLectureList failed: unknown result");
    }

    public LectureRead getLectureDetails(String userToken, String lectureId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
    {
      send_getLectureDetails(userToken, lectureId);
      return recv_getLectureDetails();
    }

    public void send_getLectureDetails(String userToken, String lectureId) throws org.apache.thrift.TException
    {
      getLectureDetails_args args = new getLectureDetails_args();
      args.setUserToken(userToken);
      args.setLectureId(lectureId);
      sendBase("getLectureDetails", args);
    }

    public LectureRead recv_getLectureDetails() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
    {
      getLectureDetails_result result = new getLectureDetails_result();
      receiveBase(result, "getLectureDetails");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.authError != null) {
        throw result.authError;
      }
      if (result.notFound != null) {
        throw result.notFound;
      }
      if (result.serverError != null) {
        throw result.serverError;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLectureDetails failed: unknown result");
    }

    public void deleteLecture(String userToken, String lectureId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
    {
      send_deleteLecture(userToken, lectureId);
      recv_deleteLecture();
    }

    public void send_deleteLecture(String userToken, String lectureId) throws org.apache.thrift.TException
    {
      deleteLecture_args args = new deleteLecture_args();
      args.setUserToken(userToken);
      args.setLectureId(lectureId);
      sendBase("deleteLecture", args);
    }

    public void recv_deleteLecture() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
    {
      deleteLecture_result result = new deleteLecture_result();
      receiveBase(result, "deleteLecture");
      if (result.authError != null) {
        throw result.authError;
      }
      if (result.notFound != null) {
        throw result.notFound;
      }
      if (result.serverError != null) {
        throw result.serverError;
      }
      return;
    }

    public void writeLecturePermissions(String userToken, String lectureId, Map<String,LecturePermissions> permissions) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
    {
      send_writeLecturePermissions(userToken, lectureId, permissions);
      recv_writeLecturePermissions();
    }

    public void send_writeLecturePermissions(String userToken, String lectureId, Map<String,LecturePermissions> permissions) throws org.apache.thrift.TException
    {
      writeLecturePermissions_args args = new writeLecturePermissions_args();
      args.setUserToken(userToken);
      args.setLectureId(lectureId);
      args.setPermissions(permissions);
      sendBase("writeLecturePermissions", args);
    }

    public void recv_writeLecturePermissions() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
    {
      writeLecturePermissions_result result = new writeLecturePermissions_result();
      receiveBase(result, "writeLecturePermissions");
      if (result.authError != null) {
        throw result.authError;
      }
      if (result.notFound != null) {
        throw result.notFound;
      }
      if (result.serverError != null) {
        throw result.serverError;
      }
      return;
    }

    public Map<String,LecturePermissions> getLecturePermissions(String userToken, String lectureId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
    {
      send_getLecturePermissions(userToken, lectureId);
      return recv_getLecturePermissions();
    }

    public void send_getLecturePermissions(String userToken, String lectureId) throws org.apache.thrift.TException
    {
      getLecturePermissions_args args = new getLecturePermissions_args();
      args.setUserToken(userToken);
      args.setLectureId(lectureId);
      sendBase("getLecturePermissions", args);
    }

    public Map<String,LecturePermissions> recv_getLecturePermissions() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
    {
      getLecturePermissions_result result = new getLecturePermissions_result();
      receiveBase(result, "getLecturePermissions");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.authError != null) {
        throw result.authError;
      }
      if (result.notFound != null) {
        throw result.notFound;
      }
      if (result.serverError != null) {
        throw result.serverError;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLecturePermissions failed: unknown result");
    }

    public void setLectureOwner(String userToken, String lectureId, String newOwnerId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
    {
      send_setLectureOwner(userToken, lectureId, newOwnerId);
      recv_setLectureOwner();
    }

    public void send_setLectureOwner(String userToken, String lectureId, String newOwnerId) throws org.apache.thrift.TException
    {
      setLectureOwner_args args = new setLectureOwner_args();
      args.setUserToken(userToken);
      args.setLectureId(lectureId);
      args.setNewOwnerId(newOwnerId);
      sendBase("setLectureOwner", args);
    }

    public void recv_setLectureOwner() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
    {
      setLectureOwner_result result = new setLectureOwner_result();
      receiveBase(result, "setLectureOwner");
      if (result.authError != null) {
        throw result.authError;
      }
      if (result.notFound != null) {
        throw result.notFound;
      }
      if (result.serverError != null) {
        throw result.serverError;
      }
      return;
    }

    public PredefinedData getPredefinedData(String userToken) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
    {
      send_getPredefinedData(userToken);
      return recv_getPredefinedData();
    }

    public void send_getPredefinedData(String userToken) throws org.apache.thrift.TException
    {
      getPredefinedData_args args = new getPredefinedData_args();
      args.setUserToken(userToken);
      sendBase("getPredefinedData", args);
    }

    public PredefinedData recv_getPredefinedData() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
    {
      getPredefinedData_result result = new getPredefinedData_result();
      receiveBase(result, "getPredefinedData");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.authError != null) {
        throw result.authError;
      }
      if (result.serverError != null) {
        throw result.serverError;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPredefinedData failed: unknown result");
    }

  }
  public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
      private org.apache.thrift.async.TAsyncClientManager clientManager;
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
        this.clientManager = clientManager;
        this.protocolFactory = protocolFactory;
      }
      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
        return new AsyncClient(protocolFactory, clientManager, transport);
      }
    }

    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
      super(protocolFactory, clientManager, transport);
    }

    public void getVersion(long clientVersion, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getVersion_call method_call = new getVersion_call(clientVersion, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getVersion_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long clientVersion;
      public getVersion_call(long clientVersion, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.clientVersion = clientVersion;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getVersion", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getVersion_args args = new getVersion_args();
        args.setClientVersion(clientVersion);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public long getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getVersion();
      }
    }

    public void getSupportedFeatures(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getSupportedFeatures_call method_call = new getSupportedFeatures_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getSupportedFeatures_call extends org.apache.thrift.async.TAsyncMethodCall {
      public getSupportedFeatures_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSupportedFeatures", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getSupportedFeatures_args args = new getSupportedFeatures_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public String getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getSupportedFeatures();
      }
    }

    public void getConfiguration(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getConfiguration_call method_call = new getConfiguration_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getConfiguration_call extends org.apache.thrift.async.TAsyncMethodCall {
      public getConfiguration_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getConfiguration", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getConfiguration_args args = new getConfiguration_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public SatelliteConfig getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getConfiguration();
      }
    }

    public void requestImageVersionUpload(String userToken, String imageBaseId, long fileSize, List<ByteBuffer> blockHashes, ByteBuffer machineDescription, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      requestImageVersionUpload_call method_call = new requestImageVersionUpload_call(userToken, imageBaseId, fileSize, blockHashes, machineDescription, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class requestImageVersionUpload_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String userToken;
      private String imageBaseId;
      private long fileSize;
      private List<ByteBuffer> blockHashes;
      private ByteBuffer machineDescription;
      public requestImageVersionUpload_call(String userToken, String imageBaseId, long fileSize, List<ByteBuffer> blockHashes, ByteBuffer machineDescription, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userToken = userToken;
        this.imageBaseId = imageBaseId;
        this.fileSize = fileSize;
        this.blockHashes = blockHashes;
        this.machineDescription = machineDescription;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("requestImageVersionUpload", org.apache.thrift.protocol.TMessageType.CALL, 0));
        requestImageVersionUpload_args args = new requestImageVersionUpload_args();
        args.setUserToken(userToken);
        args.setImageBaseId(imageBaseId);
        args.setFileSize(fileSize);
        args.setBlockHashes(blockHashes);
        args.setMachineDescription(machineDescription);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public TransferInformation getResult() throws TTransferRejectedException, TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_requestImageVersionUpload();
      }
    }

    public void updateBlockHashes(String uploadToken, List<ByteBuffer> blockHashes, String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      updateBlockHashes_call method_call = new updateBlockHashes_call(uploadToken, blockHashes, userToken, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class updateBlockHashes_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String uploadToken;
      private List<ByteBuffer> blockHashes;
      private String userToken;
      public updateBlockHashes_call(String uploadToken, List<ByteBuffer> blockHashes, String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.uploadToken = uploadToken;
        this.blockHashes = blockHashes;
        this.userToken = userToken;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateBlockHashes", org.apache.thrift.protocol.TMessageType.CALL, 0));
        updateBlockHashes_args args = new updateBlockHashes_args();
        args.setUploadToken(uploadToken);
        args.setBlockHashes(blockHashes);
        args.setUserToken(userToken);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws TInvalidTokenException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_updateBlockHashes();
      }
    }

    public void setUploadOptions(String userToken, String uploadToken, UploadOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      setUploadOptions_call method_call = new setUploadOptions_call(userToken, uploadToken, options, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class setUploadOptions_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String userToken;
      private String uploadToken;
      private UploadOptions options;
      public setUploadOptions_call(String userToken, String uploadToken, UploadOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userToken = userToken;
        this.uploadToken = uploadToken;
        this.options = options;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setUploadOptions", org.apache.thrift.protocol.TMessageType.CALL, 0));
        setUploadOptions_args args = new setUploadOptions_args();
        args.setUserToken(userToken);
        args.setUploadToken(uploadToken);
        args.setOptions(options);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public UploadOptions getResult() throws TAuthorizationException, TInvalidTokenException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_setUploadOptions();
      }
    }

    public void cancelUpload(String uploadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      cancelUpload_call method_call = new cancelUpload_call(uploadToken, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class cancelUpload_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String uploadToken;
      public cancelUpload_call(String uploadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.uploadToken = uploadToken;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("cancelUpload", org.apache.thrift.protocol.TMessageType.CALL, 0));
        cancelUpload_args args = new cancelUpload_args();
        args.setUploadToken(uploadToken);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws TInvalidTokenException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_cancelUpload();
      }
    }

    public void queryUploadStatus(String uploadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      queryUploadStatus_call method_call = new queryUploadStatus_call(uploadToken, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class queryUploadStatus_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String uploadToken;
      public queryUploadStatus_call(String uploadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.uploadToken = uploadToken;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("queryUploadStatus", org.apache.thrift.protocol.TMessageType.CALL, 0));
        queryUploadStatus_args args = new queryUploadStatus_args();
        args.setUploadToken(uploadToken);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public TransferStatus getResult() throws TInvalidTokenException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_queryUploadStatus();
      }
    }

    public void requestDownload(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      requestDownload_call method_call = new requestDownload_call(userToken, imageVersionId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class requestDownload_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String userToken;
      private String imageVersionId;
      public requestDownload_call(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userToken = userToken;
        this.imageVersionId = imageVersionId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("requestDownload", org.apache.thrift.protocol.TMessageType.CALL, 0));
        requestDownload_args args = new requestDownload_args();
        args.setUserToken(userToken);
        args.setImageVersionId(imageVersionId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public TransferInformation getResult() throws TTransferRejectedException, TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_requestDownload();
      }
    }

    public void cancelDownload(String downloadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      cancelDownload_call method_call = new cancelDownload_call(downloadToken, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class cancelDownload_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String downloadToken;
      public cancelDownload_call(String downloadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.downloadToken = downloadToken;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("cancelDownload", org.apache.thrift.protocol.TMessageType.CALL, 0));
        cancelDownload_args args = new cancelDownload_args();
        args.setDownloadToken(downloadToken);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws TInvalidTokenException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_cancelDownload();
      }
    }

    public void isAuthenticated(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      isAuthenticated_call method_call = new isAuthenticated_call(userToken, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class isAuthenticated_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String userToken;
      public isAuthenticated_call(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userToken = userToken;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isAuthenticated", org.apache.thrift.protocol.TMessageType.CALL, 0));
        isAuthenticated_args args = new isAuthenticated_args();
        args.setUserToken(userToken);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_isAuthenticated();
      }
    }

    public void whoami(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      whoami_call method_call = new whoami_call(userToken, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class whoami_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String userToken;
      public whoami_call(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userToken = userToken;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("whoami", org.apache.thrift.protocol.TMessageType.CALL, 0));
        whoami_args args = new whoami_args();
        args.setUserToken(userToken);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public WhoamiInfo getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_whoami();
      }
    }

    public void invalidateSession(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      invalidateSession_call method_call = new invalidateSession_call(userToken, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class invalidateSession_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String userToken;
      public invalidateSession_call(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userToken = userToken;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("invalidateSession", org.apache.thrift.protocol.TMessageType.CALL, 0));
        invalidateSession_args args = new invalidateSession_args();
        args.setUserToken(userToken);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws TInvalidTokenException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_invalidateSession();
      }
    }

    public void getUserList(String userToken, int page, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getUserList_call method_call = new getUserList_call(userToken, page, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getUserList_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String userToken;
      private int page;
      public getUserList_call(String userToken, int page, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userToken = userToken;
        this.page = page;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUserList", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getUserList_args args = new getUserList_args();
        args.setUserToken(userToken);
        args.setPage(page);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<UserInfo> getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getUserList();
      }
    }

    public void getUserConfig(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getUserConfig_call method_call = new getUserConfig_call(userToken, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getUserConfig_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String userToken;
      public getUserConfig_call(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userToken = userToken;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUserConfig", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getUserConfig_args args = new getUserConfig_args();
        args.setUserToken(userToken);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public SatelliteUserConfig getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getUserConfig();
      }
    }

    public void setUserConfig(String userToken, SatelliteUserConfig config, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      setUserConfig_call method_call = new setUserConfig_call(userToken, config, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class setUserConfig_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String userToken;
      private SatelliteUserConfig config;
      public setUserConfig_call(String userToken, SatelliteUserConfig config, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userToken = userToken;
        this.config = config;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setUserConfig", org.apache.thrift.protocol.TMessageType.CALL, 0));
        setUserConfig_args args = new setUserConfig_args();
        args.setUserToken(userToken);
        args.setConfig(config);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_setUserConfig();
      }
    }

    public void getOperatingSystems(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getOperatingSystems_call method_call = new getOperatingSystems_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getOperatingSystems_call extends org.apache.thrift.async.TAsyncMethodCall {
      public getOperatingSystems_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getOperatingSystems", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getOperatingSystems_args args = new getOperatingSystems_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<OperatingSystem> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getOperatingSystems();
      }
    }

    public void getVirtualizers(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getVirtualizers_call method_call = new getVirtualizers_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getVirtualizers_call extends org.apache.thrift.async.TAsyncMethodCall {
      public getVirtualizers_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getVirtualizers", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getVirtualizers_args args = new getVirtualizers_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<Virtualizer> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getVirtualizers();
      }
    }

    public void getAllOrganizations(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getAllOrganizations_call method_call = new getAllOrganizations_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getAllOrganizations_call extends org.apache.thrift.async.TAsyncMethodCall {
      public getAllOrganizations_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllOrganizations", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getAllOrganizations_args args = new getAllOrganizations_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<Organization> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getAllOrganizations();
      }
    }

    public void getLocations(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getLocations_call method_call = new getLocations_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getLocations_call extends org.apache.thrift.async.TAsyncMethodCall {
      public getLocations_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getLocations", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getLocations_args args = new getLocations_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<Location> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getLocations();
      }
    }

    public void getStatus(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getStatus_call method_call = new getStatus_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getStatus_call extends org.apache.thrift.async.TAsyncMethodCall {
      public getStatus_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getStatus", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getStatus_args args = new getStatus_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public SatelliteStatus getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getStatus();
      }
    }

    public void getImageList(String userToken, List<String> tagSearch, int page, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getImageList_call method_call = new getImageList_call(userToken, tagSearch, page, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getImageList_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String userToken;
      private List<String> tagSearch;
      private int page;
      public getImageList_call(String userToken, List<String> tagSearch, int page, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userToken = userToken;
        this.tagSearch = tagSearch;
        this.page = page;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getImageList", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getImageList_args args = new getImageList_args();
        args.setUserToken(userToken);
        args.setTagSearch(tagSearch);
        args.setPage(page);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<ImageSummaryRead> getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getImageList();
      }
    }

    public void getImageDetails(String userToken, String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getImageDetails_call method_call = new getImageDetails_call(userToken, imageBaseId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getImageDetails_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String userToken;
      private String imageBaseId;
      public getImageDetails_call(String userToken, String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userToken = userToken;
        this.imageBaseId = imageBaseId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getImageDetails", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getImageDetails_args args = new getImageDetails_args();
        args.setUserToken(userToken);
        args.setImageBaseId(imageBaseId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public ImageDetailsRead getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getImageDetails();
      }
    }

    public void createImage(String userToken, String imageName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      createImage_call method_call = new createImage_call(userToken, imageName, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class createImage_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String userToken;
      private String imageName;
      public createImage_call(String userToken, String imageName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userToken = userToken;
        this.imageName = imageName;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createImage", org.apache.thrift.protocol.TMessageType.CALL, 0));
        createImage_args args = new createImage_args();
        args.setUserToken(userToken);
        args.setImageName(imageName);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public String getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_createImage();
      }
    }

    public void updateImageBase(String userToken, String imageBaseId, ImageBaseWrite image, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      updateImageBase_call method_call = new updateImageBase_call(userToken, imageBaseId, image, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class updateImageBase_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String userToken;
      private String imageBaseId;
      private ImageBaseWrite image;
      public updateImageBase_call(String userToken, String imageBaseId, ImageBaseWrite image, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userToken = userToken;
        this.imageBaseId = imageBaseId;
        this.image = image;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateImageBase", org.apache.thrift.protocol.TMessageType.CALL, 0));
        updateImageBase_args args = new updateImageBase_args();
        args.setUserToken(userToken);
        args.setImageBaseId(imageBaseId);
        args.setImage(image);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_updateImageBase();
      }
    }

    public void updateImageVersion(String userToken, String imageVersionId, ImageVersionWrite image, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      updateImageVersion_call method_call = new updateImageVersion_call(userToken, imageVersionId, image, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class updateImageVersion_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String userToken;
      private String imageVersionId;
      private ImageVersionWrite image;
      public updateImageVersion_call(String userToken, String imageVersionId, ImageVersionWrite image, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userToken = userToken;
        this.imageVersionId = imageVersionId;
        this.image = image;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateImageVersion", org.apache.thrift.protocol.TMessageType.CALL, 0));
        updateImageVersion_args args = new updateImageVersion_args();
        args.setUserToken(userToken);
        args.setImageVersionId(imageVersionId);
        args.setImage(image);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_updateImageVersion();
      }
    }

    public void deleteImageVersion(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      deleteImageVersion_call method_call = new deleteImageVersion_call(userToken, imageVersionId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class deleteImageVersion_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String userToken;
      private String imageVersionId;
      public deleteImageVersion_call(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userToken = userToken;
        this.imageVersionId = imageVersionId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteImageVersion", org.apache.thrift.protocol.TMessageType.CALL, 0));
        deleteImageVersion_args args = new deleteImageVersion_args();
        args.setUserToken(userToken);
        args.setImageVersionId(imageVersionId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_deleteImageVersion();
      }
    }

    public void deleteImageBase(String userToken, String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      deleteImageBase_call method_call = new deleteImageBase_call(userToken, imageBaseId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class deleteImageBase_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String userToken;
      private String imageBaseId;
      public deleteImageBase_call(String userToken, String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userToken = userToken;
        this.imageBaseId = imageBaseId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteImageBase", org.apache.thrift.protocol.TMessageType.CALL, 0));
        deleteImageBase_args args = new deleteImageBase_args();
        args.setUserToken(userToken);
        args.setImageBaseId(imageBaseId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_deleteImageBase();
      }
    }

    public void writeImagePermissions(String userToken, String imageBaseId, Map<String,ImagePermissions> permissions, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      writeImagePermissions_call method_call = new writeImagePermissions_call(userToken, imageBaseId, permissions, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class writeImagePermissions_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String userToken;
      private String imageBaseId;
      private Map<String,ImagePermissions> permissions;
      public writeImagePermissions_call(String userToken, String imageBaseId, Map<String,ImagePermissions> permissions, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userToken = userToken;
        this.imageBaseId = imageBaseId;
        this.permissions = permissions;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("writeImagePermissions", org.apache.thrift.protocol.TMessageType.CALL, 0));
        writeImagePermissions_args args = new writeImagePermissions_args();
        args.setUserToken(userToken);
        args.setImageBaseId(imageBaseId);
        args.setPermissions(permissions);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_writeImagePermissions();
      }
    }

    public void getImagePermissions(String userToken, String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getImagePermissions_call method_call = new getImagePermissions_call(userToken, imageBaseId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getImagePermissions_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String userToken;
      private String imageBaseId;
      public getImagePermissions_call(String userToken, String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userToken = userToken;
        this.imageBaseId = imageBaseId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getImagePermissions", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getImagePermissions_args args = new getImagePermissions_args();
        args.setUserToken(userToken);
        args.setImageBaseId(imageBaseId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Map<String,ImagePermissions> getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getImagePermissions();
      }
    }

    public void setImageOwner(String userToken, String imageBaseId, String newOwnerId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      setImageOwner_call method_call = new setImageOwner_call(userToken, imageBaseId, newOwnerId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class setImageOwner_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String userToken;
      private String imageBaseId;
      private String newOwnerId;
      public setImageOwner_call(String userToken, String imageBaseId, String newOwnerId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userToken = userToken;
        this.imageBaseId = imageBaseId;
        this.newOwnerId = newOwnerId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setImageOwner", org.apache.thrift.protocol.TMessageType.CALL, 0));
        setImageOwner_args args = new setImageOwner_args();
        args.setUserToken(userToken);
        args.setImageBaseId(imageBaseId);
        args.setNewOwnerId(newOwnerId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_setImageOwner();
      }
    }

    public void setImageVersionExpiry(String userToken, String imageBaseId, long expireTime, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      setImageVersionExpiry_call method_call = new setImageVersionExpiry_call(userToken, imageBaseId, expireTime, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class setImageVersionExpiry_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String userToken;
      private String imageBaseId;
      private long expireTime;
      public setImageVersionExpiry_call(String userToken, String imageBaseId, long expireTime, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userToken = userToken;
        this.imageBaseId = imageBaseId;
        this.expireTime = expireTime;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setImageVersionExpiry", org.apache.thrift.protocol.TMessageType.CALL, 0));
        setImageVersionExpiry_args args = new setImageVersionExpiry_args();
        args.setUserToken(userToken);
        args.setImageBaseId(imageBaseId);
        args.setExpireTime(expireTime);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, TInvalidDateParam, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_setImageVersionExpiry();
      }
    }

    public void getImageVersionVirtConfig(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getImageVersionVirtConfig_call method_call = new getImageVersionVirtConfig_call(userToken, imageVersionId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getImageVersionVirtConfig_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String userToken;
      private String imageVersionId;
      public getImageVersionVirtConfig_call(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userToken = userToken;
        this.imageVersionId = imageVersionId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getImageVersionVirtConfig", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getImageVersionVirtConfig_args args = new getImageVersionVirtConfig_args();
        args.setUserToken(userToken);
        args.setImageVersionId(imageVersionId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public ByteBuffer getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getImageVersionVirtConfig();
      }
    }

    public void setImageVersionVirtConfig(String userToken, String imageVersionId, ByteBuffer meta, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      setImageVersionVirtConfig_call method_call = new setImageVersionVirtConfig_call(userToken, imageVersionId, meta, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class setImageVersionVirtConfig_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String userToken;
      private String imageVersionId;
      private ByteBuffer meta;
      public setImageVersionVirtConfig_call(String userToken, String imageVersionId, ByteBuffer meta, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userToken = userToken;
        this.imageVersionId = imageVersionId;
        this.meta = meta;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setImageVersionVirtConfig", org.apache.thrift.protocol.TMessageType.CALL, 0));
        setImageVersionVirtConfig_args args = new setImageVersionVirtConfig_args();
        args.setUserToken(userToken);
        args.setImageVersionId(imageVersionId);
        args.setMeta(meta);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_setImageVersionVirtConfig();
      }
    }

    public void requestImageReplication(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      requestImageReplication_call method_call = new requestImageReplication_call(userToken, imageVersionId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class requestImageReplication_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String userToken;
      private String imageVersionId;
      public requestImageReplication_call(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userToken = userToken;
        this.imageVersionId = imageVersionId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("requestImageReplication", org.apache.thrift.protocol.TMessageType.CALL, 0));
        requestImageReplication_args args = new requestImageReplication_args();
        args.setUserToken(userToken);
        args.setImageVersionId(imageVersionId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public String getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_requestImageReplication();
      }
    }

    public void publishImageVersion(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      publishImageVersion_call method_call = new publishImageVersion_call(userToken, imageVersionId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class publishImageVersion_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String userToken;
      private String imageVersionId;
      public publishImageVersion_call(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userToken = userToken;
        this.imageVersionId = imageVersionId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("publishImageVersion", org.apache.thrift.protocol.TMessageType.CALL, 0));
        publishImageVersion_args args = new publishImageVersion_args();
        args.setUserToken(userToken);
        args.setImageVersionId(imageVersionId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public String getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, TTransferRejectedException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_publishImageVersion();
      }
    }

    public void createLecture(String userToken, LectureWrite lecture, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      createLecture_call method_call = new createLecture_call(userToken, lecture, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class createLecture_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String userToken;
      private LectureWrite lecture;
      public createLecture_call(String userToken, LectureWrite lecture, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userToken = userToken;
        this.lecture = lecture;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createLecture", org.apache.thrift.protocol.TMessageType.CALL, 0));
        createLecture_args args = new createLecture_args();
        args.setUserToken(userToken);
        args.setLecture(lecture);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public String getResult() throws TAuthorizationException, TInvocationException, TInvalidDateParam, TNotFoundException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_createLecture();
      }
    }

    public void updateLecture(String userToken, String lectureId, LectureWrite lecture, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      updateLecture_call method_call = new updateLecture_call(userToken, lectureId, lecture, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class updateLecture_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String userToken;
      private String lectureId;
      private LectureWrite lecture;
      public updateLecture_call(String userToken, String lectureId, LectureWrite lecture, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userToken = userToken;
        this.lectureId = lectureId;
        this.lecture = lecture;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateLecture", org.apache.thrift.protocol.TMessageType.CALL, 0));
        updateLecture_args args = new updateLecture_args();
        args.setUserToken(userToken);
        args.setLectureId(lectureId);
        args.setLecture(lecture);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, TInvalidDateParam, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_updateLecture();
      }
    }

    public void getLectureList(String userToken, int page, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getLectureList_call method_call = new getLectureList_call(userToken, page, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getLectureList_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String userToken;
      private int page;
      public getLectureList_call(String userToken, int page, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userToken = userToken;
        this.page = page;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getLectureList", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getLectureList_args args = new getLectureList_args();
        args.setUserToken(userToken);
        args.setPage(page);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<LectureSummary> getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getLectureList();
      }
    }

    public void getLectureDetails(String userToken, String lectureId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getLectureDetails_call method_call = new getLectureDetails_call(userToken, lectureId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getLectureDetails_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String userToken;
      private String lectureId;
      public getLectureDetails_call(String userToken, String lectureId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userToken = userToken;
        this.lectureId = lectureId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getLectureDetails", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getLectureDetails_args args = new getLectureDetails_args();
        args.setUserToken(userToken);
        args.setLectureId(lectureId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public LectureRead getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getLectureDetails();
      }
    }

    public void deleteLecture(String userToken, String lectureId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      deleteLecture_call method_call = new deleteLecture_call(userToken, lectureId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class deleteLecture_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String userToken;
      private String lectureId;
      public deleteLecture_call(String userToken, String lectureId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userToken = userToken;
        this.lectureId = lectureId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteLecture", org.apache.thrift.protocol.TMessageType.CALL, 0));
        deleteLecture_args args = new deleteLecture_args();
        args.setUserToken(userToken);
        args.setLectureId(lectureId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_deleteLecture();
      }
    }

    public void writeLecturePermissions(String userToken, String lectureId, Map<String,LecturePermissions> permissions, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      writeLecturePermissions_call method_call = new writeLecturePermissions_call(userToken, lectureId, permissions, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class writeLecturePermissions_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String userToken;
      private String lectureId;
      private Map<String,LecturePermissions> permissions;
      public writeLecturePermissions_call(String userToken, String lectureId, Map<String,LecturePermissions> permissions, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userToken = userToken;
        this.lectureId = lectureId;
        this.permissions = permissions;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("writeLecturePermissions", org.apache.thrift.protocol.TMessageType.CALL, 0));
        writeLecturePermissions_args args = new writeLecturePermissions_args();
        args.setUserToken(userToken);
        args.setLectureId(lectureId);
        args.setPermissions(permissions);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_writeLecturePermissions();
      }
    }

    public void getLecturePermissions(String userToken, String lectureId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getLecturePermissions_call method_call = new getLecturePermissions_call(userToken, lectureId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getLecturePermissions_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String userToken;
      private String lectureId;
      public getLecturePermissions_call(String userToken, String lectureId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userToken = userToken;
        this.lectureId = lectureId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getLecturePermissions", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getLecturePermissions_args args = new getLecturePermissions_args();
        args.setUserToken(userToken);
        args.setLectureId(lectureId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Map<String,LecturePermissions> getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getLecturePermissions();
      }
    }

    public void setLectureOwner(String userToken, String lectureId, String newOwnerId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      setLectureOwner_call method_call = new setLectureOwner_call(userToken, lectureId, newOwnerId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class setLectureOwner_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String userToken;
      private String lectureId;
      private String newOwnerId;
      public setLectureOwner_call(String userToken, String lectureId, String newOwnerId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userToken = userToken;
        this.lectureId = lectureId;
        this.newOwnerId = newOwnerId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setLectureOwner", org.apache.thrift.protocol.TMessageType.CALL, 0));
        setLectureOwner_args args = new setLectureOwner_args();
        args.setUserToken(userToken);
        args.setLectureId(lectureId);
        args.setNewOwnerId(newOwnerId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_setLectureOwner();
      }
    }

    public void getPredefinedData(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getPredefinedData_call method_call = new getPredefinedData_call(userToken, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getPredefinedData_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String userToken;
      public getPredefinedData_call(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.userToken = userToken;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPredefinedData", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getPredefinedData_args args = new getPredefinedData_args();
        args.setUserToken(userToken);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public PredefinedData getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getPredefinedData();
      }
    }

  }

  public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
    public Processor(I iface) {
      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
    }

    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
      super(iface, getProcessMap(processMap));
    }

    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) {
      processMap.put("getVersion", new getVersion());
      processMap.put("getSupportedFeatures", new getSupportedFeatures());
      processMap.put("getConfiguration", new getConfiguration());
      processMap.put("requestImageVersionUpload", new requestImageVersionUpload());
      processMap.put("updateBlockHashes", new updateBlockHashes());
      processMap.put("setUploadOptions", new setUploadOptions());
      processMap.put("cancelUpload", new cancelUpload());
      processMap.put("queryUploadStatus", new queryUploadStatus());
      processMap.put("requestDownload", new requestDownload());
      processMap.put("cancelDownload", new cancelDownload());
      processMap.put("isAuthenticated", new isAuthenticated());
      processMap.put("whoami", new whoami());
      processMap.put("invalidateSession", new invalidateSession());
      processMap.put("getUserList", new getUserList());
      processMap.put("getUserConfig", new getUserConfig());
      processMap.put("setUserConfig", new setUserConfig());
      processMap.put("getOperatingSystems", new getOperatingSystems());
      processMap.put("getVirtualizers", new getVirtualizers());
      processMap.put("getAllOrganizations", new getAllOrganizations());
      processMap.put("getLocations", new getLocations());
      processMap.put("getStatus", new getStatus());
      processMap.put("getImageList", new getImageList());
      processMap.put("getImageDetails", new getImageDetails());
      processMap.put("createImage", new createImage());
      processMap.put("updateImageBase", new updateImageBase());
      processMap.put("updateImageVersion", new updateImageVersion());
      processMap.put("deleteImageVersion", new deleteImageVersion());
      processMap.put("deleteImageBase", new deleteImageBase());
      processMap.put("writeImagePermissions", new writeImagePermissions());
      processMap.put("getImagePermissions", new getImagePermissions());
      processMap.put("setImageOwner", new setImageOwner());
      processMap.put("setImageVersionExpiry", new setImageVersionExpiry());
      processMap.put("getImageVersionVirtConfig", new getImageVersionVirtConfig());
      processMap.put("setImageVersionVirtConfig", new setImageVersionVirtConfig());
      processMap.put("requestImageReplication", new requestImageReplication());
      processMap.put("publishImageVersion", new publishImageVersion());
      processMap.put("createLecture", new createLecture());
      processMap.put("updateLecture", new updateLecture());
      processMap.put("getLectureList", new getLectureList());
      processMap.put("getLectureDetails", new getLectureDetails());
      processMap.put("deleteLecture", new deleteLecture());
      processMap.put("writeLecturePermissions", new writeLecturePermissions());
      processMap.put("getLecturePermissions", new getLecturePermissions());
      processMap.put("setLectureOwner", new setLectureOwner());
      processMap.put("getPredefinedData", new getPredefinedData());
      return processMap;
    }

    public static class getVersion<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getVersion_args> {
      public getVersion() {
        super("getVersion");
      }

      public getVersion_args getEmptyArgsInstance() {
        return new getVersion_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public getVersion_result getResult(I iface, getVersion_args args) throws org.apache.thrift.TException {
        getVersion_result result = new getVersion_result();
        result.success = iface.getVersion(args.clientVersion);
        result.setSuccessIsSet(true);
        return result;
      }
    }

    public static class getSupportedFeatures<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSupportedFeatures_args> {
      public getSupportedFeatures() {
        super("getSupportedFeatures");
      }

      public getSupportedFeatures_args getEmptyArgsInstance() {
        return new getSupportedFeatures_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public getSupportedFeatures_result getResult(I iface, getSupportedFeatures_args args) throws org.apache.thrift.TException {
        getSupportedFeatures_result result = new getSupportedFeatures_result();
        result.success = iface.getSupportedFeatures();
        return result;
      }
    }

    public static class getConfiguration<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getConfiguration_args> {
      public getConfiguration() {
        super("getConfiguration");
      }

      public getConfiguration_args getEmptyArgsInstance() {
        return new getConfiguration_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public getConfiguration_result getResult(I iface, getConfiguration_args args) throws org.apache.thrift.TException {
        getConfiguration_result result = new getConfiguration_result();
        result.success = iface.getConfiguration();
        return result;
      }
    }

    public static class requestImageVersionUpload<I extends Iface> extends org.apache.thrift.ProcessFunction<I, requestImageVersionUpload_args> {
      public requestImageVersionUpload() {
        super("requestImageVersionUpload");
      }

      public requestImageVersionUpload_args getEmptyArgsInstance() {
        return new requestImageVersionUpload_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public requestImageVersionUpload_result getResult(I iface, requestImageVersionUpload_args args) throws org.apache.thrift.TException {
        requestImageVersionUpload_result result = new requestImageVersionUpload_result();
        try {
          result.success = iface.requestImageVersionUpload(args.userToken, args.imageBaseId, args.fileSize, args.blockHashes, args.machineDescription);
        } catch (TTransferRejectedException rejection) {
          result.rejection = rejection;
        } catch (TAuthorizationException authError) {
          result.authError = authError;
        } catch (TInvocationException ffff) {
          result.ffff = ffff;
        } catch (TNotFoundException sdf) {
          result.sdf = sdf;
        }
        return result;
      }
    }

    public static class updateBlockHashes<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateBlockHashes_args> {
      public updateBlockHashes() {
        super("updateBlockHashes");
      }

      public updateBlockHashes_args getEmptyArgsInstance() {
        return new updateBlockHashes_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public updateBlockHashes_result getResult(I iface, updateBlockHashes_args args) throws org.apache.thrift.TException {
        updateBlockHashes_result result = new updateBlockHashes_result();
        try {
          iface.updateBlockHashes(args.uploadToken, args.blockHashes, args.userToken);
        } catch (TInvalidTokenException ex1) {
          result.ex1 = ex1;
        }
        return result;
      }
    }

    public static class setUploadOptions<I extends Iface> extends org.apache.thrift.ProcessFunction<I, setUploadOptions_args> {
      public setUploadOptions() {
        super("setUploadOptions");
      }

      public setUploadOptions_args getEmptyArgsInstance() {
        return new setUploadOptions_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public setUploadOptions_result getResult(I iface, setUploadOptions_args args) throws org.apache.thrift.TException {
        setUploadOptions_result result = new setUploadOptions_result();
        try {
          result.success = iface.setUploadOptions(args.userToken, args.uploadToken, args.options);
        } catch (TAuthorizationException frootloops) {
          result.frootloops = frootloops;
        } catch (TInvalidTokenException imcyborgbutthatsok) {
          result.imcyborgbutthatsok = imcyborgbutthatsok;
        }
        return result;
      }
    }

    public static class cancelUpload<I extends Iface> extends org.apache.thrift.ProcessFunction<I, cancelUpload_args> {
      public cancelUpload() {
        super("cancelUpload");
      }

      public cancelUpload_args getEmptyArgsInstance() {
        return new cancelUpload_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public cancelUpload_result getResult(I iface, cancelUpload_args args) throws org.apache.thrift.TException {
        cancelUpload_result result = new cancelUpload_result();
        try {
          iface.cancelUpload(args.uploadToken);
        } catch (TInvalidTokenException ex1) {
          result.ex1 = ex1;
        }
        return result;
      }
    }

    public static class queryUploadStatus<I extends Iface> extends org.apache.thrift.ProcessFunction<I, queryUploadStatus_args> {
      public queryUploadStatus() {
        super("queryUploadStatus");
      }

      public queryUploadStatus_args getEmptyArgsInstance() {
        return new queryUploadStatus_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public queryUploadStatus_result getResult(I iface, queryUploadStatus_args args) throws org.apache.thrift.TException {
        queryUploadStatus_result result = new queryUploadStatus_result();
        try {
          result.success = iface.queryUploadStatus(args.uploadToken);
        } catch (TInvalidTokenException ex1) {
          result.ex1 = ex1;
        }
        return result;
      }
    }

    public static class requestDownload<I extends Iface> extends org.apache.thrift.ProcessFunction<I, requestDownload_args> {
      public requestDownload() {
        super("requestDownload");
      }

      public requestDownload_args getEmptyArgsInstance() {
        return new requestDownload_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public requestDownload_result getResult(I iface, requestDownload_args args) throws org.apache.thrift.TException {
        requestDownload_result result = new requestDownload_result();
        try {
          result.success = iface.requestDownload(args.userToken, args.imageVersionId);
        } catch (TTransferRejectedException rejection) {
          result.rejection = rejection;
        } catch (TAuthorizationException authError) {
          result.authError = authError;
        } catch (TInvocationException ffff) {
          result.ffff = ffff;
        } catch (TNotFoundException sdf) {
          result.sdf = sdf;
        }
        return result;
      }
    }

    public static class cancelDownload<I extends Iface> extends org.apache.thrift.ProcessFunction<I, cancelDownload_args> {
      public cancelDownload() {
        super("cancelDownload");
      }

      public cancelDownload_args getEmptyArgsInstance() {
        return new cancelDownload_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public cancelDownload_result getResult(I iface, cancelDownload_args args) throws org.apache.thrift.TException {
        cancelDownload_result result = new cancelDownload_result();
        try {
          iface.cancelDownload(args.downloadToken);
        } catch (TInvalidTokenException ex1) {
          result.ex1 = ex1;
        }
        return result;
      }
    }

    public static class isAuthenticated<I extends Iface> extends org.apache.thrift.ProcessFunction<I, isAuthenticated_args> {
      public isAuthenticated() {
        super("isAuthenticated");
      }

      public isAuthenticated_args getEmptyArgsInstance() {
        return new isAuthenticated_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public isAuthenticated_result getResult(I iface, isAuthenticated_args args) throws org.apache.thrift.TException {
        isAuthenticated_result result = new isAuthenticated_result();
        try {
          iface.isAuthenticated(args.userToken);
        } catch (TAuthorizationException authError) {
          result.authError = authError;
        } catch (TInvocationException serverError) {
          result.serverError = serverError;
        }
        return result;
      }
    }

    public static class whoami<I extends Iface> extends org.apache.thrift.ProcessFunction<I, whoami_args> {
      public whoami() {
        super("whoami");
      }

      public whoami_args getEmptyArgsInstance() {
        return new whoami_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public whoami_result getResult(I iface, whoami_args args) throws org.apache.thrift.TException {
        whoami_result result = new whoami_result();
        try {
          result.success = iface.whoami(args.userToken);
        } catch (TAuthorizationException authError) {
          result.authError = authError;
        } catch (TInvocationException serverError) {
          result.serverError = serverError;
        }
        return result;
      }
    }

    public static class invalidateSession<I extends Iface> extends org.apache.thrift.ProcessFunction<I, invalidateSession_args> {
      public invalidateSession() {
        super("invalidateSession");
      }

      public invalidateSession_args getEmptyArgsInstance() {
        return new invalidateSession_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public invalidateSession_result getResult(I iface, invalidateSession_args args) throws org.apache.thrift.TException {
        invalidateSession_result result = new invalidateSession_result();
        try {
          iface.invalidateSession(args.userToken);
        } catch (TInvalidTokenException ex) {
          result.ex = ex;
        }
        return result;
      }
    }

    public static class getUserList<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getUserList_args> {
      public getUserList() {
        super("getUserList");
      }

      public getUserList_args getEmptyArgsInstance() {
        return new getUserList_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public getUserList_result getResult(I iface, getUserList_args args) throws org.apache.thrift.TException {
        getUserList_result result = new getUserList_result();
        try {
          result.success = iface.getUserList(args.userToken, args.page);
        } catch (TAuthorizationException failure) {
          result.failure = failure;
        } catch (TInvocationException serverError) {
          result.serverError = serverError;
        }
        return result;
      }
    }

    public static class getUserConfig<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getUserConfig_args> {
      public getUserConfig() {
        super("getUserConfig");
      }

      public getUserConfig_args getEmptyArgsInstance() {
        return new getUserConfig_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public getUserConfig_result getResult(I iface, getUserConfig_args args) throws org.apache.thrift.TException {
        getUserConfig_result result = new getUserConfig_result();
        try {
          result.success = iface.getUserConfig(args.userToken);
        } catch (TAuthorizationException failure) {
          result.failure = failure;
        } catch (TInvocationException serverError) {
          result.serverError = serverError;
        }
        return result;
      }
    }

    public static class setUserConfig<I extends Iface> extends org.apache.thrift.ProcessFunction<I, setUserConfig_args> {
      public setUserConfig() {
        super("setUserConfig");
      }

      public setUserConfig_args getEmptyArgsInstance() {
        return new setUserConfig_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public setUserConfig_result getResult(I iface, setUserConfig_args args) throws org.apache.thrift.TException {
        setUserConfig_result result = new setUserConfig_result();
        try {
          iface.setUserConfig(args.userToken, args.config);
        } catch (TAuthorizationException failure) {
          result.failure = failure;
        } catch (TInvocationException serverError) {
          result.serverError = serverError;
        }
        return result;
      }
    }

    public static class getOperatingSystems<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getOperatingSystems_args> {
      public getOperatingSystems() {
        super("getOperatingSystems");
      }

      public getOperatingSystems_args getEmptyArgsInstance() {
        return new getOperatingSystems_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public getOperatingSystems_result getResult(I iface, getOperatingSystems_args args) throws org.apache.thrift.TException {
        getOperatingSystems_result result = new getOperatingSystems_result();
        result.success = iface.getOperatingSystems();
        return result;
      }
    }

    public static class getVirtualizers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getVirtualizers_args> {
      public getVirtualizers() {
        super("getVirtualizers");
      }

      public getVirtualizers_args getEmptyArgsInstance() {
        return new getVirtualizers_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public getVirtualizers_result getResult(I iface, getVirtualizers_args args) throws org.apache.thrift.TException {
        getVirtualizers_result result = new getVirtualizers_result();
        result.success = iface.getVirtualizers();
        return result;
      }
    }

    public static class getAllOrganizations<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllOrganizations_args> {
      public getAllOrganizations() {
        super("getAllOrganizations");
      }

      public getAllOrganizations_args getEmptyArgsInstance() {
        return new getAllOrganizations_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public getAllOrganizations_result getResult(I iface, getAllOrganizations_args args) throws org.apache.thrift.TException {
        getAllOrganizations_result result = new getAllOrganizations_result();
        result.success = iface.getAllOrganizations();
        return result;
      }
    }

    public static class getLocations<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getLocations_args> {
      public getLocations() {
        super("getLocations");
      }

      public getLocations_args getEmptyArgsInstance() {
        return new getLocations_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public getLocations_result getResult(I iface, getLocations_args args) throws org.apache.thrift.TException {
        getLocations_result result = new getLocations_result();
        result.success = iface.getLocations();
        return result;
      }
    }

    public static class getStatus<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getStatus_args> {
      public getStatus() {
        super("getStatus");
      }

      public getStatus_args getEmptyArgsInstance() {
        return new getStatus_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public getStatus_result getResult(I iface, getStatus_args args) throws org.apache.thrift.TException {
        getStatus_result result = new getStatus_result();
        result.success = iface.getStatus();
        return result;
      }
    }

    public static class getImageList<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getImageList_args> {
      public getImageList() {
        super("getImageList");
      }

      public getImageList_args getEmptyArgsInstance() {
        return new getImageList_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public getImageList_result getResult(I iface, getImageList_args args) throws org.apache.thrift.TException {
        getImageList_result result = new getImageList_result();
        try {
          result.success = iface.getImageList(args.userToken, args.tagSearch, args.page);
        } catch (TAuthorizationException authError) {
          result.authError = authError;
        } catch (TInvocationException serverError) {
          result.serverError = serverError;
        }
        return result;
      }
    }

    public static class getImageDetails<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getImageDetails_args> {
      public getImageDetails() {
        super("getImageDetails");
      }

      public getImageDetails_args getEmptyArgsInstance() {
        return new getImageDetails_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public getImageDetails_result getResult(I iface, getImageDetails_args args) throws org.apache.thrift.TException {
        getImageDetails_result result = new getImageDetails_result();
        try {
          result.success = iface.getImageDetails(args.userToken, args.imageBaseId);
        } catch (TAuthorizationException authError) {
          result.authError = authError;
        } catch (TNotFoundException notFound) {
          result.notFound = notFound;
        } catch (TInvocationException serverError) {
          result.serverError = serverError;
        }
        return result;
      }
    }

    public static class createImage<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createImage_args> {
      public createImage() {
        super("createImage");
      }

      public createImage_args getEmptyArgsInstance() {
        return new createImage_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public createImage_result getResult(I iface, createImage_args args) throws org.apache.thrift.TException {
        createImage_result result = new createImage_result();
        try {
          result.success = iface.createImage(args.userToken, args.imageName);
        } catch (TAuthorizationException authError) {
          result.authError = authError;
        } catch (TInvocationException error) {
          result.error = error;
        }
        return result;
      }
    }

    public static class updateImageBase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateImageBase_args> {
      public updateImageBase() {
        super("updateImageBase");
      }

      public updateImageBase_args getEmptyArgsInstance() {
        return new updateImageBase_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public updateImageBase_result getResult(I iface, updateImageBase_args args) throws org.apache.thrift.TException {
        updateImageBase_result result = new updateImageBase_result();
        try {
          iface.updateImageBase(args.userToken, args.imageBaseId, args.image);
        } catch (TAuthorizationException authError) {
          result.authError = authError;
        } catch (TNotFoundException notFound) {
          result.notFound = notFound;
        } catch (TInvocationException imgError) {
          result.imgError = imgError;
        }
        return result;
      }
    }

    public static class updateImageVersion<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateImageVersion_args> {
      public updateImageVersion() {
        super("updateImageVersion");
      }

      public updateImageVersion_args getEmptyArgsInstance() {
        return new updateImageVersion_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public updateImageVersion_result getResult(I iface, updateImageVersion_args args) throws org.apache.thrift.TException {
        updateImageVersion_result result = new updateImageVersion_result();
        try {
          iface.updateImageVersion(args.userToken, args.imageVersionId, args.image);
        } catch (TAuthorizationException authError) {
          result.authError = authError;
        } catch (TNotFoundException notFound) {
          result.notFound = notFound;
        } catch (TInvocationException imgError) {
          result.imgError = imgError;
        }
        return result;
      }
    }

    public static class deleteImageVersion<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteImageVersion_args> {
      public deleteImageVersion() {
        super("deleteImageVersion");
      }

      public deleteImageVersion_args getEmptyArgsInstance() {
        return new deleteImageVersion_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public deleteImageVersion_result getResult(I iface, deleteImageVersion_args args) throws org.apache.thrift.TException {
        deleteImageVersion_result result = new deleteImageVersion_result();
        try {
          iface.deleteImageVersion(args.userToken, args.imageVersionId);
        } catch (TAuthorizationException authError) {
          result.authError = authError;
        } catch (TNotFoundException notFound) {
          result.notFound = notFound;
        } catch (TInvocationException serverError) {
          result.serverError = serverError;
        }
        return result;
      }
    }

    public static class deleteImageBase<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteImageBase_args> {
      public deleteImageBase() {
        super("deleteImageBase");
      }

      public deleteImageBase_args getEmptyArgsInstance() {
        return new deleteImageBase_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public deleteImageBase_result getResult(I iface, deleteImageBase_args args) throws org.apache.thrift.TException {
        deleteImageBase_result result = new deleteImageBase_result();
        try {
          iface.deleteImageBase(args.userToken, args.imageBaseId);
        } catch (TAuthorizationException authError) {
          result.authError = authError;
        } catch (TNotFoundException notFound) {
          result.notFound = notFound;
        } catch (TInvocationException serverError) {
          result.serverError = serverError;
        }
        return result;
      }
    }

    public static class writeImagePermissions<I extends Iface> extends org.apache.thrift.ProcessFunction<I, writeImagePermissions_args> {
      public writeImagePermissions() {
        super("writeImagePermissions");
      }

      public writeImagePermissions_args getEmptyArgsInstance() {
        return new writeImagePermissions_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public writeImagePermissions_result getResult(I iface, writeImagePermissions_args args) throws org.apache.thrift.TException {
        writeImagePermissions_result result = new writeImagePermissions_result();
        try {
          iface.writeImagePermissions(args.userToken, args.imageBaseId, args.permissions);
        } catch (TAuthorizationException authError) {
          result.authError = authError;
        } catch (TNotFoundException notFound) {
          result.notFound = notFound;
        } catch (TInvocationException serverError) {
          result.serverError = serverError;
        }
        return result;
      }
    }

    public static class getImagePermissions<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getImagePermissions_args> {
      public getImagePermissions() {
        super("getImagePermissions");
      }

      public getImagePermissions_args getEmptyArgsInstance() {
        return new getImagePermissions_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public getImagePermissions_result getResult(I iface, getImagePermissions_args args) throws org.apache.thrift.TException {
        getImagePermissions_result result = new getImagePermissions_result();
        try {
          result.success = iface.getImagePermissions(args.userToken, args.imageBaseId);
        } catch (TAuthorizationException authError) {
          result.authError = authError;
        } catch (TNotFoundException notFound) {
          result.notFound = notFound;
        } catch (TInvocationException serverError) {
          result.serverError = serverError;
        }
        return result;
      }
    }

    public static class setImageOwner<I extends Iface> extends org.apache.thrift.ProcessFunction<I, setImageOwner_args> {
      public setImageOwner() {
        super("setImageOwner");
      }

      public setImageOwner_args getEmptyArgsInstance() {
        return new setImageOwner_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public setImageOwner_result getResult(I iface, setImageOwner_args args) throws org.apache.thrift.TException {
        setImageOwner_result result = new setImageOwner_result();
        try {
          iface.setImageOwner(args.userToken, args.imageBaseId, args.newOwnerId);
        } catch (TAuthorizationException authError) {
          result.authError = authError;
        } catch (TNotFoundException notFound) {
          result.notFound = notFound;
        } catch (TInvocationException serverError) {
          result.serverError = serverError;
        }
        return result;
      }
    }

    public static class setImageVersionExpiry<I extends Iface> extends org.apache.thrift.ProcessFunction<I, setImageVersionExpiry_args> {
      public setImageVersionExpiry() {
        super("setImageVersionExpiry");
      }

      public setImageVersionExpiry_args getEmptyArgsInstance() {
        return new setImageVersionExpiry_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public setImageVersionExpiry_result getResult(I iface, setImageVersionExpiry_args args) throws org.apache.thrift.TException {
        setImageVersionExpiry_result result = new setImageVersionExpiry_result();
        try {
          iface.setImageVersionExpiry(args.userToken, args.imageBaseId, args.expireTime);
        } catch (TAuthorizationException authError) {
          result.authError = authError;
        } catch (TNotFoundException notFound) {
          result.notFound = notFound;
        } catch (TInvocationException serverError) {
          result.serverError = serverError;
        } catch (TInvalidDateParam dateError) {
          result.dateError = dateError;
        }
        return result;
      }
    }

    public static class getImageVersionVirtConfig<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getImageVersionVirtConfig_args> {
      public getImageVersionVirtConfig() {
        super("getImageVersionVirtConfig");
      }

      public getImageVersionVirtConfig_args getEmptyArgsInstance() {
        return new getImageVersionVirtConfig_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public getImageVersionVirtConfig_result getResult(I iface, getImageVersionVirtConfig_args args) throws org.apache.thrift.TException {
        getImageVersionVirtConfig_result result = new getImageVersionVirtConfig_result();
        try {
          result.success = iface.getImageVersionVirtConfig(args.userToken, args.imageVersionId);
        } catch (TAuthorizationException authError) {
          result.authError = authError;
        } catch (TNotFoundException notFound) {
          result.notFound = notFound;
        } catch (TInvocationException serverError) {
          result.serverError = serverError;
        }
        return result;
      }
    }

    public static class setImageVersionVirtConfig<I extends Iface> extends org.apache.thrift.ProcessFunction<I, setImageVersionVirtConfig_args> {
      public setImageVersionVirtConfig() {
        super("setImageVersionVirtConfig");
      }

      public setImageVersionVirtConfig_args getEmptyArgsInstance() {
        return new setImageVersionVirtConfig_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public setImageVersionVirtConfig_result getResult(I iface, setImageVersionVirtConfig_args args) throws org.apache.thrift.TException {
        setImageVersionVirtConfig_result result = new setImageVersionVirtConfig_result();
        try {
          iface.setImageVersionVirtConfig(args.userToken, args.imageVersionId, args.meta);
        } catch (TAuthorizationException authError) {
          result.authError = authError;
        } catch (TNotFoundException notFound) {
          result.notFound = notFound;
        } catch (TInvocationException serverError) {
          result.serverError = serverError;
        }
        return result;
      }
    }

    public static class requestImageReplication<I extends Iface> extends org.apache.thrift.ProcessFunction<I, requestImageReplication_args> {
      public requestImageReplication() {
        super("requestImageReplication");
      }

      public requestImageReplication_args getEmptyArgsInstance() {
        return new requestImageReplication_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public requestImageReplication_result getResult(I iface, requestImageReplication_args args) throws org.apache.thrift.TException {
        requestImageReplication_result result = new requestImageReplication_result();
        try {
          result.success = iface.requestImageReplication(args.userToken, args.imageVersionId);
        } catch (TAuthorizationException authError) {
          result.authError = authError;
        } catch (TNotFoundException notFound) {
          result.notFound = notFound;
        } catch (TInvocationException serverError) {
          result.serverError = serverError;
        }
        return result;
      }
    }

    public static class publishImageVersion<I extends Iface> extends org.apache.thrift.ProcessFunction<I, publishImageVersion_args> {
      public publishImageVersion() {
        super("publishImageVersion");
      }

      public publishImageVersion_args getEmptyArgsInstance() {
        return new publishImageVersion_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public publishImageVersion_result getResult(I iface, publishImageVersion_args args) throws org.apache.thrift.TException {
        publishImageVersion_result result = new publishImageVersion_result();
        try {
          result.success = iface.publishImageVersion(args.userToken, args.imageVersionId);
        } catch (TAuthorizationException authError) {
          result.authError = authError;
        } catch (TNotFoundException notFound) {
          result.notFound = notFound;
        } catch (TInvocationException serverError) {
          result.serverError = serverError;
        } catch (TTransferRejectedException tre) {
          result.tre = tre;
        }
        return result;
      }
    }

    public static class createLecture<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createLecture_args> {
      public createLecture() {
        super("createLecture");
      }

      public createLecture_args getEmptyArgsInstance() {
        return new createLecture_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public createLecture_result getResult(I iface, createLecture_args args) throws org.apache.thrift.TException {
        createLecture_result result = new createLecture_result();
        try {
          result.success = iface.createLecture(args.userToken, args.lecture);
        } catch (TAuthorizationException authError) {
          result.authError = authError;
        } catch (TInvocationException serverError) {
          result.serverError = serverError;
        } catch (TInvalidDateParam dateError) {
          result.dateError = dateError;
        } catch (TNotFoundException notFound) {
          result.notFound = notFound;
        }
        return result;
      }
    }

    public static class updateLecture<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateLecture_args> {
      public updateLecture() {
        super("updateLecture");
      }

      public updateLecture_args getEmptyArgsInstance() {
        return new updateLecture_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public updateLecture_result getResult(I iface, updateLecture_args args) throws org.apache.thrift.TException {
        updateLecture_result result = new updateLecture_result();
        try {
          iface.updateLecture(args.userToken, args.lectureId, args.lecture);
        } catch (TAuthorizationException authError) {
          result.authError = authError;
        } catch (TNotFoundException notFound) {
          result.notFound = notFound;
        } catch (TInvocationException serverError) {
          result.serverError = serverError;
        } catch (TInvalidDateParam dateError) {
          result.dateError = dateError;
        }
        return result;
      }
    }

    public static class getLectureList<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getLectureList_args> {
      public getLectureList() {
        super("getLectureList");
      }

      public getLectureList_args getEmptyArgsInstance() {
        return new getLectureList_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public getLectureList_result getResult(I iface, getLectureList_args args) throws org.apache.thrift.TException {
        getLectureList_result result = new getLectureList_result();
        try {
          result.success = iface.getLectureList(args.userToken, args.page);
        } catch (TAuthorizationException authError) {
          result.authError = authError;
        } catch (TInvocationException serverError) {
          result.serverError = serverError;
        }
        return result;
      }
    }

    public static class getLectureDetails<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getLectureDetails_args> {
      public getLectureDetails() {
        super("getLectureDetails");
      }

      public getLectureDetails_args getEmptyArgsInstance() {
        return new getLectureDetails_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public getLectureDetails_result getResult(I iface, getLectureDetails_args args) throws org.apache.thrift.TException {
        getLectureDetails_result result = new getLectureDetails_result();
        try {
          result.success = iface.getLectureDetails(args.userToken, args.lectureId);
        } catch (TAuthorizationException authError) {
          result.authError = authError;
        } catch (TNotFoundException notFound) {
          result.notFound = notFound;
        } catch (TInvocationException serverError) {
          result.serverError = serverError;
        }
        return result;
      }
    }

    public static class deleteLecture<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteLecture_args> {
      public deleteLecture() {
        super("deleteLecture");
      }

      public deleteLecture_args getEmptyArgsInstance() {
        return new deleteLecture_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public deleteLecture_result getResult(I iface, deleteLecture_args args) throws org.apache.thrift.TException {
        deleteLecture_result result = new deleteLecture_result();
        try {
          iface.deleteLecture(args.userToken, args.lectureId);
        } catch (TAuthorizationException authError) {
          result.authError = authError;
        } catch (TNotFoundException notFound) {
          result.notFound = notFound;
        } catch (TInvocationException serverError) {
          result.serverError = serverError;
        }
        return result;
      }
    }

    public static class writeLecturePermissions<I extends Iface> extends org.apache.thrift.ProcessFunction<I, writeLecturePermissions_args> {
      public writeLecturePermissions() {
        super("writeLecturePermissions");
      }

      public writeLecturePermissions_args getEmptyArgsInstance() {
        return new writeLecturePermissions_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public writeLecturePermissions_result getResult(I iface, writeLecturePermissions_args args) throws org.apache.thrift.TException {
        writeLecturePermissions_result result = new writeLecturePermissions_result();
        try {
          iface.writeLecturePermissions(args.userToken, args.lectureId, args.permissions);
        } catch (TAuthorizationException authError) {
          result.authError = authError;
        } catch (TNotFoundException notFound) {
          result.notFound = notFound;
        } catch (TInvocationException serverError) {
          result.serverError = serverError;
        }
        return result;
      }
    }

    public static class getLecturePermissions<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getLecturePermissions_args> {
      public getLecturePermissions() {
        super("getLecturePermissions");
      }

      public getLecturePermissions_args getEmptyArgsInstance() {
        return new getLecturePermissions_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public getLecturePermissions_result getResult(I iface, getLecturePermissions_args args) throws org.apache.thrift.TException {
        getLecturePermissions_result result = new getLecturePermissions_result();
        try {
          result.success = iface.getLecturePermissions(args.userToken, args.lectureId);
        } catch (TAuthorizationException authError) {
          result.authError = authError;
        } catch (TNotFoundException notFound) {
          result.notFound = notFound;
        } catch (TInvocationException serverError) {
          result.serverError = serverError;
        }
        return result;
      }
    }

    public static class setLectureOwner<I extends Iface> extends org.apache.thrift.ProcessFunction<I, setLectureOwner_args> {
      public setLectureOwner() {
        super("setLectureOwner");
      }

      public setLectureOwner_args getEmptyArgsInstance() {
        return new setLectureOwner_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public setLectureOwner_result getResult(I iface, setLectureOwner_args args) throws org.apache.thrift.TException {
        setLectureOwner_result result = new setLectureOwner_result();
        try {
          iface.setLectureOwner(args.userToken, args.lectureId, args.newOwnerId);
        } catch (TAuthorizationException authError) {
          result.authError = authError;
        } catch (TNotFoundException notFound) {
          result.notFound = notFound;
        } catch (TInvocationException serverError) {
          result.serverError = serverError;
        }
        return result;
      }
    }

    public static class getPredefinedData<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPredefinedData_args> {
      public getPredefinedData() {
        super("getPredefinedData");
      }

      public getPredefinedData_args getEmptyArgsInstance() {
        return new getPredefinedData_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public getPredefinedData_result getResult(I iface, getPredefinedData_args args) throws org.apache.thrift.TException {
        getPredefinedData_result result = new getPredefinedData_result();
        try {
          result.success = iface.getPredefinedData(args.userToken);
        } catch (TAuthorizationException authError) {
          result.authError = authError;
        } catch (TInvocationException serverError) {
          result.serverError = serverError;
        }
        return result;
      }
    }

  }

  public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
    private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
    public AsyncProcessor(I iface) {
      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
    }

    protected AsyncProcessor(I iface, Map<String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase, ?>> processMap) {
      super(iface, getProcessMap(processMap));
    }

    private static <I extends AsyncIface> Map<String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase,?>> getProcessMap(Map<String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase, ?>> processMap) {
      processMap.put("getVersion", new getVersion());
      processMap.put("getSupportedFeatures", new getSupportedFeatures());
      processMap.put("getConfiguration", new getConfiguration());
      processMap.put("requestImageVersionUpload", new requestImageVersionUpload());
      processMap.put("updateBlockHashes", new updateBlockHashes());
      processMap.put("setUploadOptions", new setUploadOptions());
      processMap.put("cancelUpload", new cancelUpload());
      processMap.put("queryUploadStatus", new queryUploadStatus());
      processMap.put("requestDownload", new requestDownload());
      processMap.put("cancelDownload", new cancelDownload());
      processMap.put("isAuthenticated", new isAuthenticated());
      processMap.put("whoami", new whoami());
      processMap.put("invalidateSession", new invalidateSession());
      processMap.put("getUserList", new getUserList());
      processMap.put("getUserConfig", new getUserConfig());
      processMap.put("setUserConfig", new setUserConfig());
      processMap.put("getOperatingSystems", new getOperatingSystems());
      processMap.put("getVirtualizers", new getVirtualizers());
      processMap.put("getAllOrganizations", new getAllOrganizations());
      processMap.put("getLocations", new getLocations());
      processMap.put("getStatus", new getStatus());
      processMap.put("getImageList", new getImageList());
      processMap.put("getImageDetails", new getImageDetails());
      processMap.put("createImage", new createImage());
      processMap.put("updateImageBase", new updateImageBase());
      processMap.put("updateImageVersion", new updateImageVersion());
      processMap.put("deleteImageVersion", new deleteImageVersion());
      processMap.put("deleteImageBase", new deleteImageBase());
      processMap.put("writeImagePermissions", new writeImagePermissions());
      processMap.put("getImagePermissions", new getImagePermissions());
      processMap.put("setImageOwner", new setImageOwner());
      processMap.put("setImageVersionExpiry", new setImageVersionExpiry());
      processMap.put("getImageVersionVirtConfig", new getImageVersionVirtConfig());
      processMap.put("setImageVersionVirtConfig", new setImageVersionVirtConfig());
      processMap.put("requestImageReplication", new requestImageReplication());
      processMap.put("publishImageVersion", new publishImageVersion());
      processMap.put("createLecture", new createLecture());
      processMap.put("updateLecture", new updateLecture());
      processMap.put("getLectureList", new getLectureList());
      processMap.put("getLectureDetails", new getLectureDetails());
      processMap.put("deleteLecture", new deleteLecture());
      processMap.put("writeLecturePermissions", new writeLecturePermissions());
      processMap.put("getLecturePermissions", new getLecturePermissions());
      processMap.put("setLectureOwner", new setLectureOwner());
      processMap.put("getPredefinedData", new getPredefinedData());
      return processMap;
    }

    public static class getVersion<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getVersion_args, Long> {
      public getVersion() {
        super("getVersion");
      }

      public getVersion_args getEmptyArgsInstance() {
        return new getVersion_args();
      }

      public AsyncMethodCallback<Long> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<Long>() { 
          public void onComplete(Long o) {
            getVersion_result result = new getVersion_result();
            result.success = o;
            result.setSuccessIsSet(true);
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            getVersion_result result = new getVersion_result();
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, getVersion_args args, org.apache.thrift.async.AsyncMethodCallback<Long> resultHandler) throws TException {
        iface.getVersion(args.clientVersion,resultHandler);
      }
    }

    public static class getSupportedFeatures<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getSupportedFeatures_args, String> {
      public getSupportedFeatures() {
        super("getSupportedFeatures");
      }

      public getSupportedFeatures_args getEmptyArgsInstance() {
        return new getSupportedFeatures_args();
      }

      public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<String>() { 
          public void onComplete(String o) {
            getSupportedFeatures_result result = new getSupportedFeatures_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            getSupportedFeatures_result result = new getSupportedFeatures_result();
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, getSupportedFeatures_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
        iface.getSupportedFeatures(resultHandler);
      }
    }

    public static class getConfiguration<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getConfiguration_args, SatelliteConfig> {
      public getConfiguration() {
        super("getConfiguration");
      }

      public getConfiguration_args getEmptyArgsInstance() {
        return new getConfiguration_args();
      }

      public AsyncMethodCallback<SatelliteConfig> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<SatelliteConfig>() { 
          public void onComplete(SatelliteConfig o) {
            getConfiguration_result result = new getConfiguration_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            getConfiguration_result result = new getConfiguration_result();
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, getConfiguration_args args, org.apache.thrift.async.AsyncMethodCallback<SatelliteConfig> resultHandler) throws TException {
        iface.getConfiguration(resultHandler);
      }
    }

    public static class requestImageVersionUpload<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, requestImageVersionUpload_args, TransferInformation> {
      public requestImageVersionUpload() {
        super("requestImageVersionUpload");
      }

      public requestImageVersionUpload_args getEmptyArgsInstance() {
        return new requestImageVersionUpload_args();
      }

      public AsyncMethodCallback<TransferInformation> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<TransferInformation>() { 
          public void onComplete(TransferInformation o) {
            requestImageVersionUpload_result result = new requestImageVersionUpload_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            requestImageVersionUpload_result result = new requestImageVersionUpload_result();
            if (e instanceof TTransferRejectedException) {
                        result.rejection = (TTransferRejectedException) e;
                        result.setRejectionIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TAuthorizationException) {
                        result.authError = (TAuthorizationException) e;
                        result.setAuthErrorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TInvocationException) {
                        result.ffff = (TInvocationException) e;
                        result.setFfffIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TNotFoundException) {
                        result.sdf = (TNotFoundException) e;
                        result.setSdfIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, requestImageVersionUpload_args args, org.apache.thrift.async.AsyncMethodCallback<TransferInformation> resultHandler) throws TException {
        iface.requestImageVersionUpload(args.userToken, args.imageBaseId, args.fileSize, args.blockHashes, args.machineDescription,resultHandler);
      }
    }

    public static class updateBlockHashes<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateBlockHashes_args, Void> {
      public updateBlockHashes() {
        super("updateBlockHashes");
      }

      public updateBlockHashes_args getEmptyArgsInstance() {
        return new updateBlockHashes_args();
      }

      public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            updateBlockHashes_result result = new updateBlockHashes_result();
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            updateBlockHashes_result result = new updateBlockHashes_result();
            if (e instanceof TInvalidTokenException) {
                        result.ex1 = (TInvalidTokenException) e;
                        result.setEx1IsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, updateBlockHashes_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
        iface.updateBlockHashes(args.uploadToken, args.blockHashes, args.userToken,resultHandler);
      }
    }

    public static class setUploadOptions<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, setUploadOptions_args, UploadOptions> {
      public setUploadOptions() {
        super("setUploadOptions");
      }

      public setUploadOptions_args getEmptyArgsInstance() {
        return new setUploadOptions_args();
      }

      public AsyncMethodCallback<UploadOptions> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<UploadOptions>() { 
          public void onComplete(UploadOptions o) {
            setUploadOptions_result result = new setUploadOptions_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            setUploadOptions_result result = new setUploadOptions_result();
            if (e instanceof TAuthorizationException) {
                        result.frootloops = (TAuthorizationException) e;
                        result.setFrootloopsIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TInvalidTokenException) {
                        result.imcyborgbutthatsok = (TInvalidTokenException) e;
                        result.setImcyborgbutthatsokIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, setUploadOptions_args args, org.apache.thrift.async.AsyncMethodCallback<UploadOptions> resultHandler) throws TException {
        iface.setUploadOptions(args.userToken, args.uploadToken, args.options,resultHandler);
      }
    }

    public static class cancelUpload<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, cancelUpload_args, Void> {
      public cancelUpload() {
        super("cancelUpload");
      }

      public cancelUpload_args getEmptyArgsInstance() {
        return new cancelUpload_args();
      }

      public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            cancelUpload_result result = new cancelUpload_result();
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            cancelUpload_result result = new cancelUpload_result();
            if (e instanceof TInvalidTokenException) {
                        result.ex1 = (TInvalidTokenException) e;
                        result.setEx1IsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, cancelUpload_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
        iface.cancelUpload(args.uploadToken,resultHandler);
      }
    }

    public static class queryUploadStatus<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, queryUploadStatus_args, TransferStatus> {
      public queryUploadStatus() {
        super("queryUploadStatus");
      }

      public queryUploadStatus_args getEmptyArgsInstance() {
        return new queryUploadStatus_args();
      }

      public AsyncMethodCallback<TransferStatus> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<TransferStatus>() { 
          public void onComplete(TransferStatus o) {
            queryUploadStatus_result result = new queryUploadStatus_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            queryUploadStatus_result result = new queryUploadStatus_result();
            if (e instanceof TInvalidTokenException) {
                        result.ex1 = (TInvalidTokenException) e;
                        result.setEx1IsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, queryUploadStatus_args args, org.apache.thrift.async.AsyncMethodCallback<TransferStatus> resultHandler) throws TException {
        iface.queryUploadStatus(args.uploadToken,resultHandler);
      }
    }

    public static class requestDownload<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, requestDownload_args, TransferInformation> {
      public requestDownload() {
        super("requestDownload");
      }

      public requestDownload_args getEmptyArgsInstance() {
        return new requestDownload_args();
      }

      public AsyncMethodCallback<TransferInformation> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<TransferInformation>() { 
          public void onComplete(TransferInformation o) {
            requestDownload_result result = new requestDownload_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            requestDownload_result result = new requestDownload_result();
            if (e instanceof TTransferRejectedException) {
                        result.rejection = (TTransferRejectedException) e;
                        result.setRejectionIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TAuthorizationException) {
                        result.authError = (TAuthorizationException) e;
                        result.setAuthErrorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TInvocationException) {
                        result.ffff = (TInvocationException) e;
                        result.setFfffIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TNotFoundException) {
                        result.sdf = (TNotFoundException) e;
                        result.setSdfIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, requestDownload_args args, org.apache.thrift.async.AsyncMethodCallback<TransferInformation> resultHandler) throws TException {
        iface.requestDownload(args.userToken, args.imageVersionId,resultHandler);
      }
    }

    public static class cancelDownload<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, cancelDownload_args, Void> {
      public cancelDownload() {
        super("cancelDownload");
      }

      public cancelDownload_args getEmptyArgsInstance() {
        return new cancelDownload_args();
      }

      public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            cancelDownload_result result = new cancelDownload_result();
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            cancelDownload_result result = new cancelDownload_result();
            if (e instanceof TInvalidTokenException) {
                        result.ex1 = (TInvalidTokenException) e;
                        result.setEx1IsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, cancelDownload_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
        iface.cancelDownload(args.downloadToken,resultHandler);
      }
    }

    public static class isAuthenticated<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, isAuthenticated_args, Void> {
      public isAuthenticated() {
        super("isAuthenticated");
      }

      public isAuthenticated_args getEmptyArgsInstance() {
        return new isAuthenticated_args();
      }

      public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            isAuthenticated_result result = new isAuthenticated_result();
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            isAuthenticated_result result = new isAuthenticated_result();
            if (e instanceof TAuthorizationException) {
                        result.authError = (TAuthorizationException) e;
                        result.setAuthErrorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TInvocationException) {
                        result.serverError = (TInvocationException) e;
                        result.setServerErrorIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, isAuthenticated_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
        iface.isAuthenticated(args.userToken,resultHandler);
      }
    }

    public static class whoami<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, whoami_args, WhoamiInfo> {
      public whoami() {
        super("whoami");
      }

      public whoami_args getEmptyArgsInstance() {
        return new whoami_args();
      }

      public AsyncMethodCallback<WhoamiInfo> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<WhoamiInfo>() { 
          public void onComplete(WhoamiInfo o) {
            whoami_result result = new whoami_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            whoami_result result = new whoami_result();
            if (e instanceof TAuthorizationException) {
                        result.authError = (TAuthorizationException) e;
                        result.setAuthErrorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TInvocationException) {
                        result.serverError = (TInvocationException) e;
                        result.setServerErrorIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, whoami_args args, org.apache.thrift.async.AsyncMethodCallback<WhoamiInfo> resultHandler) throws TException {
        iface.whoami(args.userToken,resultHandler);
      }
    }

    public static class invalidateSession<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, invalidateSession_args, Void> {
      public invalidateSession() {
        super("invalidateSession");
      }

      public invalidateSession_args getEmptyArgsInstance() {
        return new invalidateSession_args();
      }

      public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            invalidateSession_result result = new invalidateSession_result();
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            invalidateSession_result result = new invalidateSession_result();
            if (e instanceof TInvalidTokenException) {
                        result.ex = (TInvalidTokenException) e;
                        result.setExIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, invalidateSession_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
        iface.invalidateSession(args.userToken,resultHandler);
      }
    }

    public static class getUserList<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUserList_args, List<UserInfo>> {
      public getUserList() {
        super("getUserList");
      }

      public getUserList_args getEmptyArgsInstance() {
        return new getUserList_args();
      }

      public AsyncMethodCallback<List<UserInfo>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<List<UserInfo>>() { 
          public void onComplete(List<UserInfo> o) {
            getUserList_result result = new getUserList_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            getUserList_result result = new getUserList_result();
            if (e instanceof TAuthorizationException) {
                        result.failure = (TAuthorizationException) e;
                        result.setFailureIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TInvocationException) {
                        result.serverError = (TInvocationException) e;
                        result.setServerErrorIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, getUserList_args args, org.apache.thrift.async.AsyncMethodCallback<List<UserInfo>> resultHandler) throws TException {
        iface.getUserList(args.userToken, args.page,resultHandler);
      }
    }

    public static class getUserConfig<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUserConfig_args, SatelliteUserConfig> {
      public getUserConfig() {
        super("getUserConfig");
      }

      public getUserConfig_args getEmptyArgsInstance() {
        return new getUserConfig_args();
      }

      public AsyncMethodCallback<SatelliteUserConfig> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<SatelliteUserConfig>() { 
          public void onComplete(SatelliteUserConfig o) {
            getUserConfig_result result = new getUserConfig_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            getUserConfig_result result = new getUserConfig_result();
            if (e instanceof TAuthorizationException) {
                        result.failure = (TAuthorizationException) e;
                        result.setFailureIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TInvocationException) {
                        result.serverError = (TInvocationException) e;
                        result.setServerErrorIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, getUserConfig_args args, org.apache.thrift.async.AsyncMethodCallback<SatelliteUserConfig> resultHandler) throws TException {
        iface.getUserConfig(args.userToken,resultHandler);
      }
    }

    public static class setUserConfig<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, setUserConfig_args, Void> {
      public setUserConfig() {
        super("setUserConfig");
      }

      public setUserConfig_args getEmptyArgsInstance() {
        return new setUserConfig_args();
      }

      public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            setUserConfig_result result = new setUserConfig_result();
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            setUserConfig_result result = new setUserConfig_result();
            if (e instanceof TAuthorizationException) {
                        result.failure = (TAuthorizationException) e;
                        result.setFailureIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TInvocationException) {
                        result.serverError = (TInvocationException) e;
                        result.setServerErrorIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, setUserConfig_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
        iface.setUserConfig(args.userToken, args.config,resultHandler);
      }
    }

    public static class getOperatingSystems<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getOperatingSystems_args, List<OperatingSystem>> {
      public getOperatingSystems() {
        super("getOperatingSystems");
      }

      public getOperatingSystems_args getEmptyArgsInstance() {
        return new getOperatingSystems_args();
      }

      public AsyncMethodCallback<List<OperatingSystem>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<List<OperatingSystem>>() { 
          public void onComplete(List<OperatingSystem> o) {
            getOperatingSystems_result result = new getOperatingSystems_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            getOperatingSystems_result result = new getOperatingSystems_result();
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, getOperatingSystems_args args, org.apache.thrift.async.AsyncMethodCallback<List<OperatingSystem>> resultHandler) throws TException {
        iface.getOperatingSystems(resultHandler);
      }
    }

    public static class getVirtualizers<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getVirtualizers_args, List<Virtualizer>> {
      public getVirtualizers() {
        super("getVirtualizers");
      }

      public getVirtualizers_args getEmptyArgsInstance() {
        return new getVirtualizers_args();
      }

      public AsyncMethodCallback<List<Virtualizer>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<List<Virtualizer>>() { 
          public void onComplete(List<Virtualizer> o) {
            getVirtualizers_result result = new getVirtualizers_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            getVirtualizers_result result = new getVirtualizers_result();
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, getVirtualizers_args args, org.apache.thrift.async.AsyncMethodCallback<List<Virtualizer>> resultHandler) throws TException {
        iface.getVirtualizers(resultHandler);
      }
    }

    public static class getAllOrganizations<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllOrganizations_args, List<Organization>> {
      public getAllOrganizations() {
        super("getAllOrganizations");
      }

      public getAllOrganizations_args getEmptyArgsInstance() {
        return new getAllOrganizations_args();
      }

      public AsyncMethodCallback<List<Organization>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<List<Organization>>() { 
          public void onComplete(List<Organization> o) {
            getAllOrganizations_result result = new getAllOrganizations_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            getAllOrganizations_result result = new getAllOrganizations_result();
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, getAllOrganizations_args args, org.apache.thrift.async.AsyncMethodCallback<List<Organization>> resultHandler) throws TException {
        iface.getAllOrganizations(resultHandler);
      }
    }

    public static class getLocations<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getLocations_args, List<Location>> {
      public getLocations() {
        super("getLocations");
      }

      public getLocations_args getEmptyArgsInstance() {
        return new getLocations_args();
      }

      public AsyncMethodCallback<List<Location>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<List<Location>>() { 
          public void onComplete(List<Location> o) {
            getLocations_result result = new getLocations_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            getLocations_result result = new getLocations_result();
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, getLocations_args args, org.apache.thrift.async.AsyncMethodCallback<List<Location>> resultHandler) throws TException {
        iface.getLocations(resultHandler);
      }
    }

    public static class getStatus<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getStatus_args, SatelliteStatus> {
      public getStatus() {
        super("getStatus");
      }

      public getStatus_args getEmptyArgsInstance() {
        return new getStatus_args();
      }

      public AsyncMethodCallback<SatelliteStatus> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<SatelliteStatus>() { 
          public void onComplete(SatelliteStatus o) {
            getStatus_result result = new getStatus_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            getStatus_result result = new getStatus_result();
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, getStatus_args args, org.apache.thrift.async.AsyncMethodCallback<SatelliteStatus> resultHandler) throws TException {
        iface.getStatus(resultHandler);
      }
    }

    public static class getImageList<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getImageList_args, List<ImageSummaryRead>> {
      public getImageList() {
        super("getImageList");
      }

      public getImageList_args getEmptyArgsInstance() {
        return new getImageList_args();
      }

      public AsyncMethodCallback<List<ImageSummaryRead>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<List<ImageSummaryRead>>() { 
          public void onComplete(List<ImageSummaryRead> o) {
            getImageList_result result = new getImageList_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            getImageList_result result = new getImageList_result();
            if (e instanceof TAuthorizationException) {
                        result.authError = (TAuthorizationException) e;
                        result.setAuthErrorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TInvocationException) {
                        result.serverError = (TInvocationException) e;
                        result.setServerErrorIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, getImageList_args args, org.apache.thrift.async.AsyncMethodCallback<List<ImageSummaryRead>> resultHandler) throws TException {
        iface.getImageList(args.userToken, args.tagSearch, args.page,resultHandler);
      }
    }

    public static class getImageDetails<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getImageDetails_args, ImageDetailsRead> {
      public getImageDetails() {
        super("getImageDetails");
      }

      public getImageDetails_args getEmptyArgsInstance() {
        return new getImageDetails_args();
      }

      public AsyncMethodCallback<ImageDetailsRead> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<ImageDetailsRead>() { 
          public void onComplete(ImageDetailsRead o) {
            getImageDetails_result result = new getImageDetails_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            getImageDetails_result result = new getImageDetails_result();
            if (e instanceof TAuthorizationException) {
                        result.authError = (TAuthorizationException) e;
                        result.setAuthErrorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TNotFoundException) {
                        result.notFound = (TNotFoundException) e;
                        result.setNotFoundIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TInvocationException) {
                        result.serverError = (TInvocationException) e;
                        result.setServerErrorIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, getImageDetails_args args, org.apache.thrift.async.AsyncMethodCallback<ImageDetailsRead> resultHandler) throws TException {
        iface.getImageDetails(args.userToken, args.imageBaseId,resultHandler);
      }
    }

    public static class createImage<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, createImage_args, String> {
      public createImage() {
        super("createImage");
      }

      public createImage_args getEmptyArgsInstance() {
        return new createImage_args();
      }

      public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<String>() { 
          public void onComplete(String o) {
            createImage_result result = new createImage_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            createImage_result result = new createImage_result();
            if (e instanceof TAuthorizationException) {
                        result.authError = (TAuthorizationException) e;
                        result.setAuthErrorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TInvocationException) {
                        result.error = (TInvocationException) e;
                        result.setErrorIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, createImage_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
        iface.createImage(args.userToken, args.imageName,resultHandler);
      }
    }

    public static class updateImageBase<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateImageBase_args, Void> {
      public updateImageBase() {
        super("updateImageBase");
      }

      public updateImageBase_args getEmptyArgsInstance() {
        return new updateImageBase_args();
      }

      public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            updateImageBase_result result = new updateImageBase_result();
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            updateImageBase_result result = new updateImageBase_result();
            if (e instanceof TAuthorizationException) {
                        result.authError = (TAuthorizationException) e;
                        result.setAuthErrorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TNotFoundException) {
                        result.notFound = (TNotFoundException) e;
                        result.setNotFoundIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TInvocationException) {
                        result.imgError = (TInvocationException) e;
                        result.setImgErrorIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, updateImageBase_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
        iface.updateImageBase(args.userToken, args.imageBaseId, args.image,resultHandler);
      }
    }

    public static class updateImageVersion<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateImageVersion_args, Void> {
      public updateImageVersion() {
        super("updateImageVersion");
      }

      public updateImageVersion_args getEmptyArgsInstance() {
        return new updateImageVersion_args();
      }

      public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            updateImageVersion_result result = new updateImageVersion_result();
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            updateImageVersion_result result = new updateImageVersion_result();
            if (e instanceof TAuthorizationException) {
                        result.authError = (TAuthorizationException) e;
                        result.setAuthErrorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TNotFoundException) {
                        result.notFound = (TNotFoundException) e;
                        result.setNotFoundIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TInvocationException) {
                        result.imgError = (TInvocationException) e;
                        result.setImgErrorIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, updateImageVersion_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
        iface.updateImageVersion(args.userToken, args.imageVersionId, args.image,resultHandler);
      }
    }

    public static class deleteImageVersion<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteImageVersion_args, Void> {
      public deleteImageVersion() {
        super("deleteImageVersion");
      }

      public deleteImageVersion_args getEmptyArgsInstance() {
        return new deleteImageVersion_args();
      }

      public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            deleteImageVersion_result result = new deleteImageVersion_result();
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            deleteImageVersion_result result = new deleteImageVersion_result();
            if (e instanceof TAuthorizationException) {
                        result.authError = (TAuthorizationException) e;
                        result.setAuthErrorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TNotFoundException) {
                        result.notFound = (TNotFoundException) e;
                        result.setNotFoundIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TInvocationException) {
                        result.serverError = (TInvocationException) e;
                        result.setServerErrorIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, deleteImageVersion_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
        iface.deleteImageVersion(args.userToken, args.imageVersionId,resultHandler);
      }
    }

    public static class deleteImageBase<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteImageBase_args, Void> {
      public deleteImageBase() {
        super("deleteImageBase");
      }

      public deleteImageBase_args getEmptyArgsInstance() {
        return new deleteImageBase_args();
      }

      public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            deleteImageBase_result result = new deleteImageBase_result();
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            deleteImageBase_result result = new deleteImageBase_result();
            if (e instanceof TAuthorizationException) {
                        result.authError = (TAuthorizationException) e;
                        result.setAuthErrorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TNotFoundException) {
                        result.notFound = (TNotFoundException) e;
                        result.setNotFoundIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TInvocationException) {
                        result.serverError = (TInvocationException) e;
                        result.setServerErrorIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, deleteImageBase_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
        iface.deleteImageBase(args.userToken, args.imageBaseId,resultHandler);
      }
    }

    public static class writeImagePermissions<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, writeImagePermissions_args, Void> {
      public writeImagePermissions() {
        super("writeImagePermissions");
      }

      public writeImagePermissions_args getEmptyArgsInstance() {
        return new writeImagePermissions_args();
      }

      public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            writeImagePermissions_result result = new writeImagePermissions_result();
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            writeImagePermissions_result result = new writeImagePermissions_result();
            if (e instanceof TAuthorizationException) {
                        result.authError = (TAuthorizationException) e;
                        result.setAuthErrorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TNotFoundException) {
                        result.notFound = (TNotFoundException) e;
                        result.setNotFoundIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TInvocationException) {
                        result.serverError = (TInvocationException) e;
                        result.setServerErrorIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, writeImagePermissions_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
        iface.writeImagePermissions(args.userToken, args.imageBaseId, args.permissions,resultHandler);
      }
    }

    public static class getImagePermissions<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getImagePermissions_args, Map<String,ImagePermissions>> {
      public getImagePermissions() {
        super("getImagePermissions");
      }

      public getImagePermissions_args getEmptyArgsInstance() {
        return new getImagePermissions_args();
      }

      public AsyncMethodCallback<Map<String,ImagePermissions>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<Map<String,ImagePermissions>>() { 
          public void onComplete(Map<String,ImagePermissions> o) {
            getImagePermissions_result result = new getImagePermissions_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            getImagePermissions_result result = new getImagePermissions_result();
            if (e instanceof TAuthorizationException) {
                        result.authError = (TAuthorizationException) e;
                        result.setAuthErrorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TNotFoundException) {
                        result.notFound = (TNotFoundException) e;
                        result.setNotFoundIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TInvocationException) {
                        result.serverError = (TInvocationException) e;
                        result.setServerErrorIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, getImagePermissions_args args, org.apache.thrift.async.AsyncMethodCallback<Map<String,ImagePermissions>> resultHandler) throws TException {
        iface.getImagePermissions(args.userToken, args.imageBaseId,resultHandler);
      }
    }

    public static class setImageOwner<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, setImageOwner_args, Void> {
      public setImageOwner() {
        super("setImageOwner");
      }

      public setImageOwner_args getEmptyArgsInstance() {
        return new setImageOwner_args();
      }

      public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            setImageOwner_result result = new setImageOwner_result();
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            setImageOwner_result result = new setImageOwner_result();
            if (e instanceof TAuthorizationException) {
                        result.authError = (TAuthorizationException) e;
                        result.setAuthErrorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TNotFoundException) {
                        result.notFound = (TNotFoundException) e;
                        result.setNotFoundIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TInvocationException) {
                        result.serverError = (TInvocationException) e;
                        result.setServerErrorIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, setImageOwner_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
        iface.setImageOwner(args.userToken, args.imageBaseId, args.newOwnerId,resultHandler);
      }
    }

    public static class setImageVersionExpiry<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, setImageVersionExpiry_args, Void> {
      public setImageVersionExpiry() {
        super("setImageVersionExpiry");
      }

      public setImageVersionExpiry_args getEmptyArgsInstance() {
        return new setImageVersionExpiry_args();
      }

      public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            setImageVersionExpiry_result result = new setImageVersionExpiry_result();
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            setImageVersionExpiry_result result = new setImageVersionExpiry_result();
            if (e instanceof TAuthorizationException) {
                        result.authError = (TAuthorizationException) e;
                        result.setAuthErrorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TNotFoundException) {
                        result.notFound = (TNotFoundException) e;
                        result.setNotFoundIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TInvocationException) {
                        result.serverError = (TInvocationException) e;
                        result.setServerErrorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TInvalidDateParam) {
                        result.dateError = (TInvalidDateParam) e;
                        result.setDateErrorIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, setImageVersionExpiry_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
        iface.setImageVersionExpiry(args.userToken, args.imageBaseId, args.expireTime,resultHandler);
      }
    }

    public static class getImageVersionVirtConfig<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getImageVersionVirtConfig_args, ByteBuffer> {
      public getImageVersionVirtConfig() {
        super("getImageVersionVirtConfig");
      }

      public getImageVersionVirtConfig_args getEmptyArgsInstance() {
        return new getImageVersionVirtConfig_args();
      }

      public AsyncMethodCallback<ByteBuffer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<ByteBuffer>() { 
          public void onComplete(ByteBuffer o) {
            getImageVersionVirtConfig_result result = new getImageVersionVirtConfig_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            getImageVersionVirtConfig_result result = new getImageVersionVirtConfig_result();
            if (e instanceof TAuthorizationException) {
                        result.authError = (TAuthorizationException) e;
                        result.setAuthErrorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TNotFoundException) {
                        result.notFound = (TNotFoundException) e;
                        result.setNotFoundIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TInvocationException) {
                        result.serverError = (TInvocationException) e;
                        result.setServerErrorIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, getImageVersionVirtConfig_args args, org.apache.thrift.async.AsyncMethodCallback<ByteBuffer> resultHandler) throws TException {
        iface.getImageVersionVirtConfig(args.userToken, args.imageVersionId,resultHandler);
      }
    }

    public static class setImageVersionVirtConfig<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, setImageVersionVirtConfig_args, Void> {
      public setImageVersionVirtConfig() {
        super("setImageVersionVirtConfig");
      }

      public setImageVersionVirtConfig_args getEmptyArgsInstance() {
        return new setImageVersionVirtConfig_args();
      }

      public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            setImageVersionVirtConfig_result result = new setImageVersionVirtConfig_result();
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            setImageVersionVirtConfig_result result = new setImageVersionVirtConfig_result();
            if (e instanceof TAuthorizationException) {
                        result.authError = (TAuthorizationException) e;
                        result.setAuthErrorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TNotFoundException) {
                        result.notFound = (TNotFoundException) e;
                        result.setNotFoundIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TInvocationException) {
                        result.serverError = (TInvocationException) e;
                        result.setServerErrorIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, setImageVersionVirtConfig_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
        iface.setImageVersionVirtConfig(args.userToken, args.imageVersionId, args.meta,resultHandler);
      }
    }

    public static class requestImageReplication<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, requestImageReplication_args, String> {
      public requestImageReplication() {
        super("requestImageReplication");
      }

      public requestImageReplication_args getEmptyArgsInstance() {
        return new requestImageReplication_args();
      }

      public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<String>() { 
          public void onComplete(String o) {
            requestImageReplication_result result = new requestImageReplication_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            requestImageReplication_result result = new requestImageReplication_result();
            if (e instanceof TAuthorizationException) {
                        result.authError = (TAuthorizationException) e;
                        result.setAuthErrorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TNotFoundException) {
                        result.notFound = (TNotFoundException) e;
                        result.setNotFoundIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TInvocationException) {
                        result.serverError = (TInvocationException) e;
                        result.setServerErrorIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, requestImageReplication_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
        iface.requestImageReplication(args.userToken, args.imageVersionId,resultHandler);
      }
    }

    public static class publishImageVersion<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, publishImageVersion_args, String> {
      public publishImageVersion() {
        super("publishImageVersion");
      }

      public publishImageVersion_args getEmptyArgsInstance() {
        return new publishImageVersion_args();
      }

      public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<String>() { 
          public void onComplete(String o) {
            publishImageVersion_result result = new publishImageVersion_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            publishImageVersion_result result = new publishImageVersion_result();
            if (e instanceof TAuthorizationException) {
                        result.authError = (TAuthorizationException) e;
                        result.setAuthErrorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TNotFoundException) {
                        result.notFound = (TNotFoundException) e;
                        result.setNotFoundIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TInvocationException) {
                        result.serverError = (TInvocationException) e;
                        result.setServerErrorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TTransferRejectedException) {
                        result.tre = (TTransferRejectedException) e;
                        result.setTreIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, publishImageVersion_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
        iface.publishImageVersion(args.userToken, args.imageVersionId,resultHandler);
      }
    }

    public static class createLecture<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, createLecture_args, String> {
      public createLecture() {
        super("createLecture");
      }

      public createLecture_args getEmptyArgsInstance() {
        return new createLecture_args();
      }

      public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<String>() { 
          public void onComplete(String o) {
            createLecture_result result = new createLecture_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            createLecture_result result = new createLecture_result();
            if (e instanceof TAuthorizationException) {
                        result.authError = (TAuthorizationException) e;
                        result.setAuthErrorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TInvocationException) {
                        result.serverError = (TInvocationException) e;
                        result.setServerErrorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TInvalidDateParam) {
                        result.dateError = (TInvalidDateParam) e;
                        result.setDateErrorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TNotFoundException) {
                        result.notFound = (TNotFoundException) e;
                        result.setNotFoundIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, createLecture_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
        iface.createLecture(args.userToken, args.lecture,resultHandler);
      }
    }

    public static class updateLecture<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateLecture_args, Void> {
      public updateLecture() {
        super("updateLecture");
      }

      public updateLecture_args getEmptyArgsInstance() {
        return new updateLecture_args();
      }

      public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            updateLecture_result result = new updateLecture_result();
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            updateLecture_result result = new updateLecture_result();
            if (e instanceof TAuthorizationException) {
                        result.authError = (TAuthorizationException) e;
                        result.setAuthErrorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TNotFoundException) {
                        result.notFound = (TNotFoundException) e;
                        result.setNotFoundIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TInvocationException) {
                        result.serverError = (TInvocationException) e;
                        result.setServerErrorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TInvalidDateParam) {
                        result.dateError = (TInvalidDateParam) e;
                        result.setDateErrorIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, updateLecture_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
        iface.updateLecture(args.userToken, args.lectureId, args.lecture,resultHandler);
      }
    }

    public static class getLectureList<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getLectureList_args, List<LectureSummary>> {
      public getLectureList() {
        super("getLectureList");
      }

      public getLectureList_args getEmptyArgsInstance() {
        return new getLectureList_args();
      }

      public AsyncMethodCallback<List<LectureSummary>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<List<LectureSummary>>() { 
          public void onComplete(List<LectureSummary> o) {
            getLectureList_result result = new getLectureList_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            getLectureList_result result = new getLectureList_result();
            if (e instanceof TAuthorizationException) {
                        result.authError = (TAuthorizationException) e;
                        result.setAuthErrorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TInvocationException) {
                        result.serverError = (TInvocationException) e;
                        result.setServerErrorIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, getLectureList_args args, org.apache.thrift.async.AsyncMethodCallback<List<LectureSummary>> resultHandler) throws TException {
        iface.getLectureList(args.userToken, args.page,resultHandler);
      }
    }

    public static class getLectureDetails<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getLectureDetails_args, LectureRead> {
      public getLectureDetails() {
        super("getLectureDetails");
      }

      public getLectureDetails_args getEmptyArgsInstance() {
        return new getLectureDetails_args();
      }

      public AsyncMethodCallback<LectureRead> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<LectureRead>() { 
          public void onComplete(LectureRead o) {
            getLectureDetails_result result = new getLectureDetails_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            getLectureDetails_result result = new getLectureDetails_result();
            if (e instanceof TAuthorizationException) {
                        result.authError = (TAuthorizationException) e;
                        result.setAuthErrorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TNotFoundException) {
                        result.notFound = (TNotFoundException) e;
                        result.setNotFoundIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TInvocationException) {
                        result.serverError = (TInvocationException) e;
                        result.setServerErrorIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, getLectureDetails_args args, org.apache.thrift.async.AsyncMethodCallback<LectureRead> resultHandler) throws TException {
        iface.getLectureDetails(args.userToken, args.lectureId,resultHandler);
      }
    }

    public static class deleteLecture<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteLecture_args, Void> {
      public deleteLecture() {
        super("deleteLecture");
      }

      public deleteLecture_args getEmptyArgsInstance() {
        return new deleteLecture_args();
      }

      public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            deleteLecture_result result = new deleteLecture_result();
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            deleteLecture_result result = new deleteLecture_result();
            if (e instanceof TAuthorizationException) {
                        result.authError = (TAuthorizationException) e;
                        result.setAuthErrorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TNotFoundException) {
                        result.notFound = (TNotFoundException) e;
                        result.setNotFoundIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TInvocationException) {
                        result.serverError = (TInvocationException) e;
                        result.setServerErrorIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, deleteLecture_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
        iface.deleteLecture(args.userToken, args.lectureId,resultHandler);
      }
    }

    public static class writeLecturePermissions<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, writeLecturePermissions_args, Void> {
      public writeLecturePermissions() {
        super("writeLecturePermissions");
      }

      public writeLecturePermissions_args getEmptyArgsInstance() {
        return new writeLecturePermissions_args();
      }

      public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            writeLecturePermissions_result result = new writeLecturePermissions_result();
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            writeLecturePermissions_result result = new writeLecturePermissions_result();
            if (e instanceof TAuthorizationException) {
                        result.authError = (TAuthorizationException) e;
                        result.setAuthErrorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TNotFoundException) {
                        result.notFound = (TNotFoundException) e;
                        result.setNotFoundIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TInvocationException) {
                        result.serverError = (TInvocationException) e;
                        result.setServerErrorIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, writeLecturePermissions_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
        iface.writeLecturePermissions(args.userToken, args.lectureId, args.permissions,resultHandler);
      }
    }

    public static class getLecturePermissions<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getLecturePermissions_args, Map<String,LecturePermissions>> {
      public getLecturePermissions() {
        super("getLecturePermissions");
      }

      public getLecturePermissions_args getEmptyArgsInstance() {
        return new getLecturePermissions_args();
      }

      public AsyncMethodCallback<Map<String,LecturePermissions>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<Map<String,LecturePermissions>>() { 
          public void onComplete(Map<String,LecturePermissions> o) {
            getLecturePermissions_result result = new getLecturePermissions_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            getLecturePermissions_result result = new getLecturePermissions_result();
            if (e instanceof TAuthorizationException) {
                        result.authError = (TAuthorizationException) e;
                        result.setAuthErrorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TNotFoundException) {
                        result.notFound = (TNotFoundException) e;
                        result.setNotFoundIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TInvocationException) {
                        result.serverError = (TInvocationException) e;
                        result.setServerErrorIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, getLecturePermissions_args args, org.apache.thrift.async.AsyncMethodCallback<Map<String,LecturePermissions>> resultHandler) throws TException {
        iface.getLecturePermissions(args.userToken, args.lectureId,resultHandler);
      }
    }

    public static class setLectureOwner<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, setLectureOwner_args, Void> {
      public setLectureOwner() {
        super("setLectureOwner");
      }

      public setLectureOwner_args getEmptyArgsInstance() {
        return new setLectureOwner_args();
      }

      public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            setLectureOwner_result result = new setLectureOwner_result();
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            setLectureOwner_result result = new setLectureOwner_result();
            if (e instanceof TAuthorizationException) {
                        result.authError = (TAuthorizationException) e;
                        result.setAuthErrorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TNotFoundException) {
                        result.notFound = (TNotFoundException) e;
                        result.setNotFoundIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TInvocationException) {
                        result.serverError = (TInvocationException) e;
                        result.setServerErrorIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, setLectureOwner_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
        iface.setLectureOwner(args.userToken, args.lectureId, args.newOwnerId,resultHandler);
      }
    }

    public static class getPredefinedData<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getPredefinedData_args, PredefinedData> {
      public getPredefinedData() {
        super("getPredefinedData");
      }

      public getPredefinedData_args getEmptyArgsInstance() {
        return new getPredefinedData_args();
      }

      public AsyncMethodCallback<PredefinedData> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<PredefinedData>() { 
          public void onComplete(PredefinedData o) {
            getPredefinedData_result result = new getPredefinedData_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            getPredefinedData_result result = new getPredefinedData_result();
            if (e instanceof TAuthorizationException) {
                        result.authError = (TAuthorizationException) e;
                        result.setAuthErrorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TInvocationException) {
                        result.serverError = (TInvocationException) e;
                        result.setServerErrorIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, getPredefinedData_args args, org.apache.thrift.async.AsyncMethodCallback<PredefinedData> resultHandler) throws TException {
        iface.getPredefinedData(args.userToken,resultHandler);
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField CLIENT_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("clientVersion", org.apache.thrift.protocol.TType.I64, (short)1);

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

    public long clientVersion; // 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 {
      CLIENT_VERSION((short)1, "clientVersion");

      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: // CLIENT_VERSION
            return CLIENT_VERSION;
          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 __CLIENTVERSION_ISSET_ID = 0;
    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.CLIENT_VERSION, new org.apache.thrift.meta_data.FieldMetaData("clientVersion", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64          , "int")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getVersion_args.class, metaDataMap);
    }

    public getVersion_args() {
    }

    public getVersion_args(
      long clientVersion)
    {
      this();
      this.clientVersion = clientVersion;
      setClientVersionIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getVersion_args(getVersion_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.clientVersion = other.clientVersion;
    }

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

    @Override
    public void clear() {
      setClientVersionIsSet(false);
      this.clientVersion = 0;
    }

    public long getClientVersion() {
      return this.clientVersion;
    }

    public getVersion_args setClientVersion(long clientVersion) {
      this.clientVersion = clientVersion;
      setClientVersionIsSet(true);
      return this;
    }

    public void unsetClientVersion() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CLIENTVERSION_ISSET_ID);
    }

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

    public void setClientVersionIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CLIENTVERSION_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CLIENT_VERSION:
        if (value == null) {
          unsetClientVersion();
        } else {
          setClientVersion((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CLIENT_VERSION:
        return getClientVersion();

      }
      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 CLIENT_VERSION:
        return isSetClientVersion();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_clientVersion = true;
      boolean that_present_clientVersion = true;
      if (this_present_clientVersion || that_present_clientVersion) {
        if (!(this_present_clientVersion && that_present_clientVersion))
          return false;
        if (this.clientVersion != that.clientVersion)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_clientVersion = true;
      list.add(present_clientVersion);
      if (present_clientVersion)
        list.add(clientVersion);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetClientVersion()).compareTo(other.isSetClientVersion());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetClientVersion()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.clientVersion, other.clientVersion);
        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("getVersion_args(");
      boolean first = true;

      sb.append("clientVersion:");
      sb.append(this.clientVersion);
      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 getVersion_argsStandardSchemeFactory implements SchemeFactory {
      public getVersion_argsStandardScheme getScheme() {
        return new getVersion_argsStandardScheme();
      }
    }

    private static class getVersion_argsStandardScheme extends StandardScheme<getVersion_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getVersion_args 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: // CLIENT_VERSION
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.clientVersion = iprot.readI64();
                struct.setClientVersionIsSet(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, getVersion_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(CLIENT_VERSION_FIELD_DESC);
        oprot.writeI64(struct.clientVersion);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getVersion_argsTupleSchemeFactory implements SchemeFactory {
      public getVersion_argsTupleScheme getScheme() {
        return new getVersion_argsTupleScheme();
      }
    }

    private static class getVersion_argsTupleScheme extends TupleScheme<getVersion_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getVersion_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetClientVersion()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetClientVersion()) {
          oprot.writeI64(struct.clientVersion);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getVersion_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.clientVersion = iprot.readI64();
          struct.setClientVersionIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0);

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

    public long success; // 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 {
      SUCCESS((short)0, "success");

      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 0: // SUCCESS
            return SUCCESS;
          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 __SUCCESS_ISSET_ID = 0;
    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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64          , "int")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getVersion_result.class, metaDataMap);
    }

    public getVersion_result() {
    }

    public getVersion_result(
      long success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getVersion_result(getVersion_result other) {
      __isset_bitfield = other.__isset_bitfield;
      this.success = other.success;
    }

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

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = 0;
    }

    public long getSuccess() {
      return this.success;
    }

    public getVersion_result setSuccess(long success) {
      this.success = success;
      setSuccessIsSet(true);
      return this;
    }

    public void unsetSuccess() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
    }

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

    public void setSuccessIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      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 SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_success = true;
      list.add(present_success);
      if (present_success)
        list.add(success);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        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("getVersion_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      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 getVersion_resultStandardSchemeFactory implements SchemeFactory {
      public getVersion_resultStandardScheme getScheme() {
        return new getVersion_resultStandardScheme();
      }
    }

    private static class getVersion_resultStandardScheme extends StandardScheme<getVersion_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getVersion_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.success = iprot.readI64();
                struct.setSuccessIsSet(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, getVersion_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.isSetSuccess()) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          oprot.writeI64(struct.success);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getVersion_resultTupleSchemeFactory implements SchemeFactory {
      public getVersion_resultTupleScheme getScheme() {
        return new getVersion_resultTupleScheme();
      }
    }

    private static class getVersion_resultTupleScheme extends TupleScheme<getVersion_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getVersion_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSuccess()) {
          oprot.writeI64(struct.success);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getVersion_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.success = iprot.readI64();
          struct.setSuccessIsSet(true);
        }
      }
    }

  }

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


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


    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

      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) {
          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;
      }
    }
    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);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSupportedFeatures_args.class, metaDataMap);
    }

    public getSupportedFeatures_args() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getSupportedFeatures_args(getSupportedFeatures_args other) {
    }

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

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      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) {
      }
      throw new IllegalStateException();
    }

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

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

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      return list.hashCode();
    }

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

      int lastComparison = 0;

      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("getSupportedFeatures_args(");
      boolean first = true;

      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 {
        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 getSupportedFeatures_argsStandardSchemeFactory implements SchemeFactory {
      public getSupportedFeatures_argsStandardScheme getScheme() {
        return new getSupportedFeatures_argsStandardScheme();
      }
    }

    private static class getSupportedFeatures_argsStandardScheme extends StandardScheme<getSupportedFeatures_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getSupportedFeatures_args 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) {
            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, getSupportedFeatures_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getSupportedFeatures_argsTupleSchemeFactory implements SchemeFactory {
      public getSupportedFeatures_argsTupleScheme getScheme() {
        return new getSupportedFeatures_argsTupleScheme();
      }
    }

    private static class getSupportedFeatures_argsTupleScheme extends TupleScheme<getSupportedFeatures_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getSupportedFeatures_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getSupportedFeatures_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);

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

    public String success; // 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 {
      SUCCESS((short)0, "success");

      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 0: // SUCCESS
            return SUCCESS;
          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
    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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSupportedFeatures_result.class, metaDataMap);
    }

    public getSupportedFeatures_result() {
    }

    public getSupportedFeatures_result(
      String success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getSupportedFeatures_result(getSupportedFeatures_result other) {
      if (other.isSetSuccess()) {
        this.success = other.success;
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
    }

    public String getSuccess() {
      return this.success;
    }

    public getSupportedFeatures_result setSuccess(String success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

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

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      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 SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        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("getSupportedFeatures_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      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 {
        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 getSupportedFeatures_resultStandardSchemeFactory implements SchemeFactory {
      public getSupportedFeatures_resultStandardScheme getScheme() {
        return new getSupportedFeatures_resultStandardScheme();
      }
    }

    private static class getSupportedFeatures_resultStandardScheme extends StandardScheme<getSupportedFeatures_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getSupportedFeatures_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.success = iprot.readString();
                struct.setSuccessIsSet(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, getSupportedFeatures_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          oprot.writeString(struct.success);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getSupportedFeatures_resultTupleSchemeFactory implements SchemeFactory {
      public getSupportedFeatures_resultTupleScheme getScheme() {
        return new getSupportedFeatures_resultTupleScheme();
      }
    }

    private static class getSupportedFeatures_resultTupleScheme extends TupleScheme<getSupportedFeatures_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getSupportedFeatures_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSuccess()) {
          oprot.writeString(struct.success);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getSupportedFeatures_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.success = iprot.readString();
          struct.setSuccessIsSet(true);
        }
      }
    }

  }

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


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


    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

      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) {
          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;
      }
    }
    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);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getConfiguration_args.class, metaDataMap);
    }

    public getConfiguration_args() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getConfiguration_args(getConfiguration_args other) {
    }

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

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      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) {
      }
      throw new IllegalStateException();
    }

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

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

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      return list.hashCode();
    }

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

      int lastComparison = 0;

      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("getConfiguration_args(");
      boolean first = true;

      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 {
        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 getConfiguration_argsStandardSchemeFactory implements SchemeFactory {
      public getConfiguration_argsStandardScheme getScheme() {
        return new getConfiguration_argsStandardScheme();
      }
    }

    private static class getConfiguration_argsStandardScheme extends StandardScheme<getConfiguration_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getConfiguration_args 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) {
            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, getConfiguration_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getConfiguration_argsTupleSchemeFactory implements SchemeFactory {
      public getConfiguration_argsTupleScheme getScheme() {
        return new getConfiguration_argsTupleScheme();
      }
    }

    private static class getConfiguration_argsTupleScheme extends TupleScheme<getConfiguration_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getConfiguration_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getConfiguration_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);

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

    public SatelliteConfig success; // 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 {
      SUCCESS((short)0, "success");

      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 0: // SUCCESS
            return SUCCESS;
          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
    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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SatelliteConfig.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getConfiguration_result.class, metaDataMap);
    }

    public getConfiguration_result() {
    }

    public getConfiguration_result(
      SatelliteConfig success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getConfiguration_result(getConfiguration_result other) {
      if (other.isSetSuccess()) {
        this.success = new SatelliteConfig(other.success);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
    }

    public SatelliteConfig getSuccess() {
      return this.success;
    }

    public getConfiguration_result setSuccess(SatelliteConfig success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

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

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((SatelliteConfig)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      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 SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        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("getConfiguration_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (success != null) {
        success.validate();
      }
    }

    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 {
        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 getConfiguration_resultStandardSchemeFactory implements SchemeFactory {
      public getConfiguration_resultStandardScheme getScheme() {
        return new getConfiguration_resultStandardScheme();
      }
    }

    private static class getConfiguration_resultStandardScheme extends StandardScheme<getConfiguration_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getConfiguration_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new SatelliteConfig();
                struct.success.read(iprot);
                struct.setSuccessIsSet(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, getConfiguration_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getConfiguration_resultTupleSchemeFactory implements SchemeFactory {
      public getConfiguration_resultTupleScheme getScheme() {
        return new getConfiguration_resultTupleScheme();
      }
    }

    private static class getConfiguration_resultTupleScheme extends TupleScheme<getConfiguration_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getConfiguration_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getConfiguration_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.success = new SatelliteConfig();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField IMAGE_BASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageBaseId", org.apache.thrift.protocol.TType.STRING, (short)2);
    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)3);
    private static final org.apache.thrift.protocol.TField BLOCK_HASHES_FIELD_DESC = new org.apache.thrift.protocol.TField("blockHashes", org.apache.thrift.protocol.TType.LIST, (short)4);
    private static final org.apache.thrift.protocol.TField MACHINE_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("machineDescription", org.apache.thrift.protocol.TType.STRING, (short)5);

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

    public String userToken; // required
    public String imageBaseId; // required
    public long fileSize; // required
    public List<ByteBuffer> blockHashes; // required
    public ByteBuffer machineDescription; // 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 {
      USER_TOKEN((short)1, "userToken"),
      IMAGE_BASE_ID((short)2, "imageBaseId"),
      FILE_SIZE((short)3, "fileSize"),
      BLOCK_HASHES((short)4, "blockHashes"),
      MACHINE_DESCRIPTION((short)5, "machineDescription");

      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: // USER_TOKEN
            return USER_TOKEN;
          case 2: // IMAGE_BASE_ID
            return IMAGE_BASE_ID;
          case 3: // FILE_SIZE
            return FILE_SIZE;
          case 4: // BLOCK_HASHES
            return BLOCK_HASHES;
          case 5: // MACHINE_DESCRIPTION
            return MACHINE_DESCRIPTION;
          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 __FILESIZE_ISSET_ID = 0;
    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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "Token")));
      tmpMap.put(_Fields.IMAGE_BASE_ID, new org.apache.thrift.meta_data.FieldMetaData("imageBaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "UUID")));
      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)));
      tmpMap.put(_Fields.BLOCK_HASHES, new org.apache.thrift.meta_data.FieldMetaData("blockHashes", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING              , true))));
      tmpMap.put(_Fields.MACHINE_DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("machineDescription", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , true)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestImageVersionUpload_args.class, metaDataMap);
    }

    public requestImageVersionUpload_args() {
    }

    public requestImageVersionUpload_args(
      String userToken,
      String imageBaseId,
      long fileSize,
      List<ByteBuffer> blockHashes,
      ByteBuffer machineDescription)
    {
      this();
      this.userToken = userToken;
      this.imageBaseId = imageBaseId;
      this.fileSize = fileSize;
      setFileSizeIsSet(true);
      this.blockHashes = blockHashes;
      this.machineDescription = org.apache.thrift.TBaseHelper.copyBinary(machineDescription);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public requestImageVersionUpload_args(requestImageVersionUpload_args other) {
      __isset_bitfield = other.__isset_bitfield;
      if (other.isSetUserToken()) {
        this.userToken = other.userToken;
      }
      if (other.isSetImageBaseId()) {
        this.imageBaseId = other.imageBaseId;
      }
      this.fileSize = other.fileSize;
      if (other.isSetBlockHashes()) {
        List<ByteBuffer> __this__blockHashes = new ArrayList<ByteBuffer>(other.blockHashes);
        this.blockHashes = __this__blockHashes;
      }
      if (other.isSetMachineDescription()) {
        this.machineDescription = org.apache.thrift.TBaseHelper.copyBinary(other.machineDescription);
      }
    }

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

    @Override
    public void clear() {
      this.userToken = null;
      this.imageBaseId = null;
      setFileSizeIsSet(false);
      this.fileSize = 0;
      this.blockHashes = null;
      this.machineDescription = null;
    }

    public String getUserToken() {
      return this.userToken;
    }

    public requestImageVersionUpload_args setUserToken(String userToken) {
      this.userToken = userToken;
      return this;
    }

    public void unsetUserToken() {
      this.userToken = null;
    }

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

    public void setUserTokenIsSet(boolean value) {
      if (!value) {
        this.userToken = null;
      }
    }

    public String getImageBaseId() {
      return this.imageBaseId;
    }

    public requestImageVersionUpload_args setImageBaseId(String imageBaseId) {
      this.imageBaseId = imageBaseId;
      return this;
    }

    public void unsetImageBaseId() {
      this.imageBaseId = null;
    }

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

    public void setImageBaseIdIsSet(boolean value) {
      if (!value) {
        this.imageBaseId = null;
      }
    }

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

    public requestImageVersionUpload_args 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 int getBlockHashesSize() {
      return (this.blockHashes == null) ? 0 : this.blockHashes.size();
    }

    public java.util.Iterator<ByteBuffer> getBlockHashesIterator() {
      return (this.blockHashes == null) ? null : this.blockHashes.iterator();
    }

    public void addToBlockHashes(ByteBuffer elem) {
      if (this.blockHashes == null) {
        this.blockHashes = new ArrayList<ByteBuffer>();
      }
      this.blockHashes.add(elem);
    }

    public List<ByteBuffer> getBlockHashes() {
      return this.blockHashes;
    }

    public requestImageVersionUpload_args setBlockHashes(List<ByteBuffer> blockHashes) {
      this.blockHashes = blockHashes;
      return this;
    }

    public void unsetBlockHashes() {
      this.blockHashes = null;
    }

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

    public void setBlockHashesIsSet(boolean value) {
      if (!value) {
        this.blockHashes = null;
      }
    }

    public byte[] getMachineDescription() {
      setMachineDescription(org.apache.thrift.TBaseHelper.rightSize(machineDescription));
      return machineDescription == null ? null : machineDescription.array();
    }

    public ByteBuffer bufferForMachineDescription() {
      return org.apache.thrift.TBaseHelper.copyBinary(machineDescription);
    }

    public requestImageVersionUpload_args setMachineDescription(byte[] machineDescription) {
      this.machineDescription = machineDescription == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(machineDescription, machineDescription.length));
      return this;
    }

    public requestImageVersionUpload_args setMachineDescription(ByteBuffer machineDescription) {
      this.machineDescription = org.apache.thrift.TBaseHelper.copyBinary(machineDescription);
      return this;
    }

    public void unsetMachineDescription() {
      this.machineDescription = null;
    }

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

    public void setMachineDescriptionIsSet(boolean value) {
      if (!value) {
        this.machineDescription = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_TOKEN:
        if (value == null) {
          unsetUserToken();
        } else {
          setUserToken((String)value);
        }
        break;

      case IMAGE_BASE_ID:
        if (value == null) {
          unsetImageBaseId();
        } else {
          setImageBaseId((String)value);
        }
        break;

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

      case BLOCK_HASHES:
        if (value == null) {
          unsetBlockHashes();
        } else {
          setBlockHashes((List<ByteBuffer>)value);
        }
        break;

      case MACHINE_DESCRIPTION:
        if (value == null) {
          unsetMachineDescription();
        } else {
          setMachineDescription((ByteBuffer)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_TOKEN:
        return getUserToken();

      case IMAGE_BASE_ID:
        return getImageBaseId();

      case FILE_SIZE:
        return getFileSize();

      case BLOCK_HASHES:
        return getBlockHashes();

      case MACHINE_DESCRIPTION:
        return getMachineDescription();

      }
      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 USER_TOKEN:
        return isSetUserToken();
      case IMAGE_BASE_ID:
        return isSetImageBaseId();
      case FILE_SIZE:
        return isSetFileSize();
      case BLOCK_HASHES:
        return isSetBlockHashes();
      case MACHINE_DESCRIPTION:
        return isSetMachineDescription();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_userToken = true && this.isSetUserToken();
      boolean that_present_userToken = true && that.isSetUserToken();
      if (this_present_userToken || that_present_userToken) {
        if (!(this_present_userToken && that_present_userToken))
          return false;
        if (!this.userToken.equals(that.userToken))
          return false;
      }

      boolean this_present_imageBaseId = true && this.isSetImageBaseId();
      boolean that_present_imageBaseId = true && that.isSetImageBaseId();
      if (this_present_imageBaseId || that_present_imageBaseId) {
        if (!(this_present_imageBaseId && that_present_imageBaseId))
          return false;
        if (!this.imageBaseId.equals(that.imageBaseId))
          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;
      }

      boolean this_present_blockHashes = true && this.isSetBlockHashes();
      boolean that_present_blockHashes = true && that.isSetBlockHashes();
      if (this_present_blockHashes || that_present_blockHashes) {
        if (!(this_present_blockHashes && that_present_blockHashes))
          return false;
        if (!this.blockHashes.equals(that.blockHashes))
          return false;
      }

      boolean this_present_machineDescription = true && this.isSetMachineDescription();
      boolean that_present_machineDescription = true && that.isSetMachineDescription();
      if (this_present_machineDescription || that_present_machineDescription) {
        if (!(this_present_machineDescription && that_present_machineDescription))
          return false;
        if (!this.machineDescription.equals(that.machineDescription))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_userToken = true && (isSetUserToken());
      list.add(present_userToken);
      if (present_userToken)
        list.add(userToken);

      boolean present_imageBaseId = true && (isSetImageBaseId());
      list.add(present_imageBaseId);
      if (present_imageBaseId)
        list.add(imageBaseId);

      boolean present_fileSize = true;
      list.add(present_fileSize);
      if (present_fileSize)
        list.add(fileSize);

      boolean present_blockHashes = true && (isSetBlockHashes());
      list.add(present_blockHashes);
      if (present_blockHashes)
        list.add(blockHashes);

      boolean present_machineDescription = true && (isSetMachineDescription());
      list.add(present_machineDescription);
      if (present_machineDescription)
        list.add(machineDescription);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserToken()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetImageBaseId()).compareTo(other.isSetImageBaseId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetImageBaseId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageBaseId, other.imageBaseId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetFileSize()).compareTo(other.isSetFileSize());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetFileSize()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileSize, other.fileSize);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetBlockHashes()).compareTo(other.isSetBlockHashes());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetBlockHashes()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockHashes, other.blockHashes);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetMachineDescription()).compareTo(other.isSetMachineDescription());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMachineDescription()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.machineDescription, other.machineDescription);
        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("requestImageVersionUpload_args(");
      boolean first = true;

      sb.append("userToken:");
      if (this.userToken == null) {
        sb.append("null");
      } else {
        sb.append(this.userToken);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("imageBaseId:");
      if (this.imageBaseId == null) {
        sb.append("null");
      } else {
        sb.append(this.imageBaseId);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("fileSize:");
      sb.append(this.fileSize);
      first = false;
      if (!first) sb.append(", ");
      sb.append("blockHashes:");
      if (this.blockHashes == null) {
        sb.append("null");
      } else {
        org.apache.thrift.TBaseHelper.toString(this.blockHashes, sb);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("machineDescription:");
      if (this.machineDescription == null) {
        sb.append("null");
      } else {
        org.apache.thrift.TBaseHelper.toString(this.machineDescription, sb);
      }
      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 requestImageVersionUpload_argsStandardSchemeFactory implements SchemeFactory {
      public requestImageVersionUpload_argsStandardScheme getScheme() {
        return new requestImageVersionUpload_argsStandardScheme();
      }
    }

    private static class requestImageVersionUpload_argsStandardScheme extends StandardScheme<requestImageVersionUpload_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, requestImageVersionUpload_args 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: // USER_TOKEN
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.userToken = iprot.readString();
                struct.setUserTokenIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // IMAGE_BASE_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.imageBaseId = iprot.readString();
                struct.setImageBaseIdIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // 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;
            case 4: // BLOCK_HASHES
              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                {
                  org.apache.thrift.protocol.TList _list218 = iprot.readListBegin();
                  struct.blockHashes = new ArrayList<ByteBuffer>(_list218.size);
                  ByteBuffer _elem219;
                  for (int _i220 = 0; _i220 < _list218.size; ++_i220)
                  {
                    _elem219 = iprot.readBinary();
                    struct.blockHashes.add(_elem219);
                  }
                  iprot.readListEnd();
                }
                struct.setBlockHashesIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 5: // MACHINE_DESCRIPTION
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.machineDescription = iprot.readBinary();
                struct.setMachineDescriptionIsSet(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, requestImageVersionUpload_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.userToken != null) {
          oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
          oprot.writeString(struct.userToken);
          oprot.writeFieldEnd();
        }
        if (struct.imageBaseId != null) {
          oprot.writeFieldBegin(IMAGE_BASE_ID_FIELD_DESC);
          oprot.writeString(struct.imageBaseId);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldBegin(FILE_SIZE_FIELD_DESC);
        oprot.writeI64(struct.fileSize);
        oprot.writeFieldEnd();
        if (struct.blockHashes != null) {
          oprot.writeFieldBegin(BLOCK_HASHES_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.blockHashes.size()));
            for (ByteBuffer _iter221 : struct.blockHashes)
            {
              oprot.writeBinary(_iter221);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.machineDescription != null) {
          oprot.writeFieldBegin(MACHINE_DESCRIPTION_FIELD_DESC);
          oprot.writeBinary(struct.machineDescription);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class requestImageVersionUpload_argsTupleSchemeFactory implements SchemeFactory {
      public requestImageVersionUpload_argsTupleScheme getScheme() {
        return new requestImageVersionUpload_argsTupleScheme();
      }
    }

    private static class requestImageVersionUpload_argsTupleScheme extends TupleScheme<requestImageVersionUpload_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, requestImageVersionUpload_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetUserToken()) {
          optionals.set(0);
        }
        if (struct.isSetImageBaseId()) {
          optionals.set(1);
        }
        if (struct.isSetFileSize()) {
          optionals.set(2);
        }
        if (struct.isSetBlockHashes()) {
          optionals.set(3);
        }
        if (struct.isSetMachineDescription()) {
          optionals.set(4);
        }
        oprot.writeBitSet(optionals, 5);
        if (struct.isSetUserToken()) {
          oprot.writeString(struct.userToken);
        }
        if (struct.isSetImageBaseId()) {
          oprot.writeString(struct.imageBaseId);
        }
        if (struct.isSetFileSize()) {
          oprot.writeI64(struct.fileSize);
        }
        if (struct.isSetBlockHashes()) {
          {
            oprot.writeI32(struct.blockHashes.size());
            for (ByteBuffer _iter222 : struct.blockHashes)
            {
              oprot.writeBinary(_iter222);
            }
          }
        }
        if (struct.isSetMachineDescription()) {
          oprot.writeBinary(struct.machineDescription);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, requestImageVersionUpload_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(5);
        if (incoming.get(0)) {
          struct.userToken = iprot.readString();
          struct.setUserTokenIsSet(true);
        }
        if (incoming.get(1)) {
          struct.imageBaseId = iprot.readString();
          struct.setImageBaseIdIsSet(true);
        }
        if (incoming.get(2)) {
          struct.fileSize = iprot.readI64();
          struct.setFileSizeIsSet(true);
        }
        if (incoming.get(3)) {
          {
            org.apache.thrift.protocol.TList _list223 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
            struct.blockHashes = new ArrayList<ByteBuffer>(_list223.size);
            ByteBuffer _elem224;
            for (int _i225 = 0; _i225 < _list223.size; ++_i225)
            {
              _elem224 = iprot.readBinary();
              struct.blockHashes.add(_elem224);
            }
          }
          struct.setBlockHashesIsSet(true);
        }
        if (incoming.get(4)) {
          struct.machineDescription = iprot.readBinary();
          struct.setMachineDescriptionIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField REJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("rejection", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField FFFF_FIELD_DESC = new org.apache.thrift.protocol.TField("ffff", org.apache.thrift.protocol.TType.STRUCT, (short)3);
    private static final org.apache.thrift.protocol.TField SDF_FIELD_DESC = new org.apache.thrift.protocol.TField("sdf", org.apache.thrift.protocol.TType.STRUCT, (short)4);

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

    public TransferInformation success; // required
    public TTransferRejectedException rejection; // required
    public TAuthorizationException authError; // required
    public TInvocationException ffff; // required
    public TNotFoundException sdf; // 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 {
      SUCCESS((short)0, "success"),
      REJECTION((short)1, "rejection"),
      AUTH_ERROR((short)2, "authError"),
      FFFF((short)3, "ffff"),
      SDF((short)4, "sdf");

      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 0: // SUCCESS
            return SUCCESS;
          case 1: // REJECTION
            return REJECTION;
          case 2: // AUTH_ERROR
            return AUTH_ERROR;
          case 3: // FFFF
            return FFFF;
          case 4: // SDF
            return SDF;
          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
    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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TransferInformation.class)));
      tmpMap.put(_Fields.REJECTION, new org.apache.thrift.meta_data.FieldMetaData("rejection", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.FFFF, new org.apache.thrift.meta_data.FieldMetaData("ffff", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.SDF, new org.apache.thrift.meta_data.FieldMetaData("sdf", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestImageVersionUpload_result.class, metaDataMap);
    }

    public requestImageVersionUpload_result() {
    }

    public requestImageVersionUpload_result(
      TransferInformation success,
      TTransferRejectedException rejection,
      TAuthorizationException authError,
      TInvocationException ffff,
      TNotFoundException sdf)
    {
      this();
      this.success = success;
      this.rejection = rejection;
      this.authError = authError;
      this.ffff = ffff;
      this.sdf = sdf;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public requestImageVersionUpload_result(requestImageVersionUpload_result other) {
      if (other.isSetSuccess()) {
        this.success = new TransferInformation(other.success);
      }
      if (other.isSetRejection()) {
        this.rejection = new TTransferRejectedException(other.rejection);
      }
      if (other.isSetAuthError()) {
        this.authError = new TAuthorizationException(other.authError);
      }
      if (other.isSetFfff()) {
        this.ffff = new TInvocationException(other.ffff);
      }
      if (other.isSetSdf()) {
        this.sdf = new TNotFoundException(other.sdf);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.rejection = null;
      this.authError = null;
      this.ffff = null;
      this.sdf = null;
    }

    public TransferInformation getSuccess() {
      return this.success;
    }

    public requestImageVersionUpload_result setSuccess(TransferInformation success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

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

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public TTransferRejectedException getRejection() {
      return this.rejection;
    }

    public requestImageVersionUpload_result setRejection(TTransferRejectedException rejection) {
      this.rejection = rejection;
      return this;
    }

    public void unsetRejection() {
      this.rejection = null;
    }

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

    public void setRejectionIsSet(boolean value) {
      if (!value) {
        this.rejection = null;
      }
    }

    public TAuthorizationException getAuthError() {
      return this.authError;
    }

    public requestImageVersionUpload_result setAuthError(TAuthorizationException authError) {
      this.authError = authError;
      return this;
    }

    public void unsetAuthError() {
      this.authError = null;
    }

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

    public void setAuthErrorIsSet(boolean value) {
      if (!value) {
        this.authError = null;
      }
    }

    public TInvocationException getFfff() {
      return this.ffff;
    }

    public requestImageVersionUpload_result setFfff(TInvocationException ffff) {
      this.ffff = ffff;
      return this;
    }

    public void unsetFfff() {
      this.ffff = null;
    }

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

    public void setFfffIsSet(boolean value) {
      if (!value) {
        this.ffff = null;
      }
    }

    public TNotFoundException getSdf() {
      return this.sdf;
    }

    public requestImageVersionUpload_result setSdf(TNotFoundException sdf) {
      this.sdf = sdf;
      return this;
    }

    public void unsetSdf() {
      this.sdf = null;
    }

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

    public void setSdfIsSet(boolean value) {
      if (!value) {
        this.sdf = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((TransferInformation)value);
        }
        break;

      case REJECTION:
        if (value == null) {
          unsetRejection();
        } else {
          setRejection((TTransferRejectedException)value);
        }
        break;

      case AUTH_ERROR:
        if (value == null) {
          unsetAuthError();
        } else {
          setAuthError((TAuthorizationException)value);
        }
        break;

      case FFFF:
        if (value == null) {
          unsetFfff();
        } else {
          setFfff((TInvocationException)value);
        }
        break;

      case SDF:
        if (value == null) {
          unsetSdf();
        } else {
          setSdf((TNotFoundException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case REJECTION:
        return getRejection();

      case AUTH_ERROR:
        return getAuthError();

      case FFFF:
        return getFfff();

      case SDF:
        return getSdf();

      }
      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 SUCCESS:
        return isSetSuccess();
      case REJECTION:
        return isSetRejection();
      case AUTH_ERROR:
        return isSetAuthError();
      case FFFF:
        return isSetFfff();
      case SDF:
        return isSetSdf();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_rejection = true && this.isSetRejection();
      boolean that_present_rejection = true && that.isSetRejection();
      if (this_present_rejection || that_present_rejection) {
        if (!(this_present_rejection && that_present_rejection))
          return false;
        if (!this.rejection.equals(that.rejection))
          return false;
      }

      boolean this_present_authError = true && this.isSetAuthError();
      boolean that_present_authError = true && that.isSetAuthError();
      if (this_present_authError || that_present_authError) {
        if (!(this_present_authError && that_present_authError))
          return false;
        if (!this.authError.equals(that.authError))
          return false;
      }

      boolean this_present_ffff = true && this.isSetFfff();
      boolean that_present_ffff = true && that.isSetFfff();
      if (this_present_ffff || that_present_ffff) {
        if (!(this_present_ffff && that_present_ffff))
          return false;
        if (!this.ffff.equals(that.ffff))
          return false;
      }

      boolean this_present_sdf = true && this.isSetSdf();
      boolean that_present_sdf = true && that.isSetSdf();
      if (this_present_sdf || that_present_sdf) {
        if (!(this_present_sdf && that_present_sdf))
          return false;
        if (!this.sdf.equals(that.sdf))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_rejection = true && (isSetRejection());
      list.add(present_rejection);
      if (present_rejection)
        list.add(rejection);

      boolean present_authError = true && (isSetAuthError());
      list.add(present_authError);
      if (present_authError)
        list.add(authError);

      boolean present_ffff = true && (isSetFfff());
      list.add(present_ffff);
      if (present_ffff)
        list.add(ffff);

      boolean present_sdf = true && (isSetSdf());
      list.add(present_sdf);
      if (present_sdf)
        list.add(sdf);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetRejection()).compareTo(other.isSetRejection());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRejection()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rejection, other.rejection);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetFfff()).compareTo(other.isSetFfff());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetFfff()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ffff, other.ffff);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSdf()).compareTo(other.isSetSdf());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSdf()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sdf, other.sdf);
        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("requestImageVersionUpload_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("rejection:");
      if (this.rejection == null) {
        sb.append("null");
      } else {
        sb.append(this.rejection);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("authError:");
      if (this.authError == null) {
        sb.append("null");
      } else {
        sb.append(this.authError);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ffff:");
      if (this.ffff == null) {
        sb.append("null");
      } else {
        sb.append(this.ffff);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("sdf:");
      if (this.sdf == null) {
        sb.append("null");
      } else {
        sb.append(this.sdf);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (success != null) {
        success.validate();
      }
    }

    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 {
        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 requestImageVersionUpload_resultStandardSchemeFactory implements SchemeFactory {
      public requestImageVersionUpload_resultStandardScheme getScheme() {
        return new requestImageVersionUpload_resultStandardScheme();
      }
    }

    private static class requestImageVersionUpload_resultStandardScheme extends StandardScheme<requestImageVersionUpload_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, requestImageVersionUpload_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new TransferInformation();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // REJECTION
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.rejection = new TTransferRejectedException();
                struct.rejection.read(iprot);
                struct.setRejectionIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // AUTH_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.authError = new TAuthorizationException();
                struct.authError.read(iprot);
                struct.setAuthErrorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // FFFF
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ffff = new TInvocationException();
                struct.ffff.read(iprot);
                struct.setFfffIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 4: // SDF
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.sdf = new TNotFoundException();
                struct.sdf.read(iprot);
                struct.setSdfIsSet(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, requestImageVersionUpload_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.rejection != null) {
          oprot.writeFieldBegin(REJECTION_FIELD_DESC);
          struct.rejection.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.authError != null) {
          oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC);
          struct.authError.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.ffff != null) {
          oprot.writeFieldBegin(FFFF_FIELD_DESC);
          struct.ffff.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.sdf != null) {
          oprot.writeFieldBegin(SDF_FIELD_DESC);
          struct.sdf.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class requestImageVersionUpload_resultTupleSchemeFactory implements SchemeFactory {
      public requestImageVersionUpload_resultTupleScheme getScheme() {
        return new requestImageVersionUpload_resultTupleScheme();
      }
    }

    private static class requestImageVersionUpload_resultTupleScheme extends TupleScheme<requestImageVersionUpload_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, requestImageVersionUpload_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetRejection()) {
          optionals.set(1);
        }
        if (struct.isSetAuthError()) {
          optionals.set(2);
        }
        if (struct.isSetFfff()) {
          optionals.set(3);
        }
        if (struct.isSetSdf()) {
          optionals.set(4);
        }
        oprot.writeBitSet(optionals, 5);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetRejection()) {
          struct.rejection.write(oprot);
        }
        if (struct.isSetAuthError()) {
          struct.authError.write(oprot);
        }
        if (struct.isSetFfff()) {
          struct.ffff.write(oprot);
        }
        if (struct.isSetSdf()) {
          struct.sdf.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, requestImageVersionUpload_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(5);
        if (incoming.get(0)) {
          struct.success = new TransferInformation();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.rejection = new TTransferRejectedException();
          struct.rejection.read(iprot);
          struct.setRejectionIsSet(true);
        }
        if (incoming.get(2)) {
          struct.authError = new TAuthorizationException();
          struct.authError.read(iprot);
          struct.setAuthErrorIsSet(true);
        }
        if (incoming.get(3)) {
          struct.ffff = new TInvocationException();
          struct.ffff.read(iprot);
          struct.setFfffIsSet(true);
        }
        if (incoming.get(4)) {
          struct.sdf = new TNotFoundException();
          struct.sdf.read(iprot);
          struct.setSdfIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField UPLOAD_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("uploadToken", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField BLOCK_HASHES_FIELD_DESC = new org.apache.thrift.protocol.TField("blockHashes", org.apache.thrift.protocol.TType.LIST, (short)2);
    private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)3);

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

    public String uploadToken; // required
    public List<ByteBuffer> blockHashes; // required
    public String userToken; // 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 {
      UPLOAD_TOKEN((short)1, "uploadToken"),
      BLOCK_HASHES((short)2, "blockHashes"),
      USER_TOKEN((short)3, "userToken");

      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: // UPLOAD_TOKEN
            return UPLOAD_TOKEN;
          case 2: // BLOCK_HASHES
            return BLOCK_HASHES;
          case 3: // USER_TOKEN
            return USER_TOKEN;
          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
    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.UPLOAD_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("uploadToken", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "Token")));
      tmpMap.put(_Fields.BLOCK_HASHES, new org.apache.thrift.meta_data.FieldMetaData("blockHashes", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING              , true))));
      tmpMap.put(_Fields.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "Token")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateBlockHashes_args.class, metaDataMap);
    }

    public updateBlockHashes_args() {
    }

    public updateBlockHashes_args(
      String uploadToken,
      List<ByteBuffer> blockHashes,
      String userToken)
    {
      this();
      this.uploadToken = uploadToken;
      this.blockHashes = blockHashes;
      this.userToken = userToken;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updateBlockHashes_args(updateBlockHashes_args other) {
      if (other.isSetUploadToken()) {
        this.uploadToken = other.uploadToken;
      }
      if (other.isSetBlockHashes()) {
        List<ByteBuffer> __this__blockHashes = new ArrayList<ByteBuffer>(other.blockHashes);
        this.blockHashes = __this__blockHashes;
      }
      if (other.isSetUserToken()) {
        this.userToken = other.userToken;
      }
    }

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

    @Override
    public void clear() {
      this.uploadToken = null;
      this.blockHashes = null;
      this.userToken = null;
    }

    public String getUploadToken() {
      return this.uploadToken;
    }

    public updateBlockHashes_args setUploadToken(String uploadToken) {
      this.uploadToken = uploadToken;
      return this;
    }

    public void unsetUploadToken() {
      this.uploadToken = null;
    }

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

    public void setUploadTokenIsSet(boolean value) {
      if (!value) {
        this.uploadToken = null;
      }
    }

    public int getBlockHashesSize() {
      return (this.blockHashes == null) ? 0 : this.blockHashes.size();
    }

    public java.util.Iterator<ByteBuffer> getBlockHashesIterator() {
      return (this.blockHashes == null) ? null : this.blockHashes.iterator();
    }

    public void addToBlockHashes(ByteBuffer elem) {
      if (this.blockHashes == null) {
        this.blockHashes = new ArrayList<ByteBuffer>();
      }
      this.blockHashes.add(elem);
    }

    public List<ByteBuffer> getBlockHashes() {
      return this.blockHashes;
    }

    public updateBlockHashes_args setBlockHashes(List<ByteBuffer> blockHashes) {
      this.blockHashes = blockHashes;
      return this;
    }

    public void unsetBlockHashes() {
      this.blockHashes = null;
    }

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

    public void setBlockHashesIsSet(boolean value) {
      if (!value) {
        this.blockHashes = null;
      }
    }

    public String getUserToken() {
      return this.userToken;
    }

    public updateBlockHashes_args setUserToken(String userToken) {
      this.userToken = userToken;
      return this;
    }

    public void unsetUserToken() {
      this.userToken = null;
    }

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

    public void setUserTokenIsSet(boolean value) {
      if (!value) {
        this.userToken = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case UPLOAD_TOKEN:
        if (value == null) {
          unsetUploadToken();
        } else {
          setUploadToken((String)value);
        }
        break;

      case BLOCK_HASHES:
        if (value == null) {
          unsetBlockHashes();
        } else {
          setBlockHashes((List<ByteBuffer>)value);
        }
        break;

      case USER_TOKEN:
        if (value == null) {
          unsetUserToken();
        } else {
          setUserToken((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case UPLOAD_TOKEN:
        return getUploadToken();

      case BLOCK_HASHES:
        return getBlockHashes();

      case USER_TOKEN:
        return getUserToken();

      }
      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 UPLOAD_TOKEN:
        return isSetUploadToken();
      case BLOCK_HASHES:
        return isSetBlockHashes();
      case USER_TOKEN:
        return isSetUserToken();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_uploadToken = true && this.isSetUploadToken();
      boolean that_present_uploadToken = true && that.isSetUploadToken();
      if (this_present_uploadToken || that_present_uploadToken) {
        if (!(this_present_uploadToken && that_present_uploadToken))
          return false;
        if (!this.uploadToken.equals(that.uploadToken))
          return false;
      }

      boolean this_present_blockHashes = true && this.isSetBlockHashes();
      boolean that_present_blockHashes = true && that.isSetBlockHashes();
      if (this_present_blockHashes || that_present_blockHashes) {
        if (!(this_present_blockHashes && that_present_blockHashes))
          return false;
        if (!this.blockHashes.equals(that.blockHashes))
          return false;
      }

      boolean this_present_userToken = true && this.isSetUserToken();
      boolean that_present_userToken = true && that.isSetUserToken();
      if (this_present_userToken || that_present_userToken) {
        if (!(this_present_userToken && that_present_userToken))
          return false;
        if (!this.userToken.equals(that.userToken))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_uploadToken = true && (isSetUploadToken());
      list.add(present_uploadToken);
      if (present_uploadToken)
        list.add(uploadToken);

      boolean present_blockHashes = true && (isSetBlockHashes());
      list.add(present_blockHashes);
      if (present_blockHashes)
        list.add(blockHashes);

      boolean present_userToken = true && (isSetUserToken());
      list.add(present_userToken);
      if (present_userToken)
        list.add(userToken);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetUploadToken()).compareTo(other.isSetUploadToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUploadToken()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uploadToken, other.uploadToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetBlockHashes()).compareTo(other.isSetBlockHashes());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetBlockHashes()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockHashes, other.blockHashes);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserToken()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken);
        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("updateBlockHashes_args(");
      boolean first = true;

      sb.append("uploadToken:");
      if (this.uploadToken == null) {
        sb.append("null");
      } else {
        sb.append(this.uploadToken);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("blockHashes:");
      if (this.blockHashes == null) {
        sb.append("null");
      } else {
        org.apache.thrift.TBaseHelper.toString(this.blockHashes, sb);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("userToken:");
      if (this.userToken == null) {
        sb.append("null");
      } else {
        sb.append(this.userToken);
      }
      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 {
        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 updateBlockHashes_argsStandardSchemeFactory implements SchemeFactory {
      public updateBlockHashes_argsStandardScheme getScheme() {
        return new updateBlockHashes_argsStandardScheme();
      }
    }

    private static class updateBlockHashes_argsStandardScheme extends StandardScheme<updateBlockHashes_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, updateBlockHashes_args 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: // UPLOAD_TOKEN
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.uploadToken = iprot.readString();
                struct.setUploadTokenIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // BLOCK_HASHES
              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                {
                  org.apache.thrift.protocol.TList _list226 = iprot.readListBegin();
                  struct.blockHashes = new ArrayList<ByteBuffer>(_list226.size);
                  ByteBuffer _elem227;
                  for (int _i228 = 0; _i228 < _list226.size; ++_i228)
                  {
                    _elem227 = iprot.readBinary();
                    struct.blockHashes.add(_elem227);
                  }
                  iprot.readListEnd();
                }
                struct.setBlockHashesIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // USER_TOKEN
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.userToken = iprot.readString();
                struct.setUserTokenIsSet(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, updateBlockHashes_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.uploadToken != null) {
          oprot.writeFieldBegin(UPLOAD_TOKEN_FIELD_DESC);
          oprot.writeString(struct.uploadToken);
          oprot.writeFieldEnd();
        }
        if (struct.blockHashes != null) {
          oprot.writeFieldBegin(BLOCK_HASHES_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.blockHashes.size()));
            for (ByteBuffer _iter229 : struct.blockHashes)
            {
              oprot.writeBinary(_iter229);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.userToken != null) {
          oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
          oprot.writeString(struct.userToken);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class updateBlockHashes_argsTupleSchemeFactory implements SchemeFactory {
      public updateBlockHashes_argsTupleScheme getScheme() {
        return new updateBlockHashes_argsTupleScheme();
      }
    }

    private static class updateBlockHashes_argsTupleScheme extends TupleScheme<updateBlockHashes_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, updateBlockHashes_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetUploadToken()) {
          optionals.set(0);
        }
        if (struct.isSetBlockHashes()) {
          optionals.set(1);
        }
        if (struct.isSetUserToken()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetUploadToken()) {
          oprot.writeString(struct.uploadToken);
        }
        if (struct.isSetBlockHashes()) {
          {
            oprot.writeI32(struct.blockHashes.size());
            for (ByteBuffer _iter230 : struct.blockHashes)
            {
              oprot.writeBinary(_iter230);
            }
          }
        }
        if (struct.isSetUserToken()) {
          oprot.writeString(struct.userToken);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, updateBlockHashes_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.uploadToken = iprot.readString();
          struct.setUploadTokenIsSet(true);
        }
        if (incoming.get(1)) {
          {
            org.apache.thrift.protocol.TList _list231 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
            struct.blockHashes = new ArrayList<ByteBuffer>(_list231.size);
            ByteBuffer _elem232;
            for (int _i233 = 0; _i233 < _list231.size; ++_i233)
            {
              _elem232 = iprot.readBinary();
              struct.blockHashes.add(_elem232);
            }
          }
          struct.setBlockHashesIsSet(true);
        }
        if (incoming.get(2)) {
          struct.userToken = iprot.readString();
          struct.setUserTokenIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1);

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

    public TInvalidTokenException ex1; // 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 {
      EX1((short)1, "ex1");

      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: // EX1
            return EX1;
          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
    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.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateBlockHashes_result.class, metaDataMap);
    }

    public updateBlockHashes_result() {
    }

    public updateBlockHashes_result(
      TInvalidTokenException ex1)
    {
      this();
      this.ex1 = ex1;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updateBlockHashes_result(updateBlockHashes_result other) {
      if (other.isSetEx1()) {
        this.ex1 = new TInvalidTokenException(other.ex1);
      }
    }

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

    @Override
    public void clear() {
      this.ex1 = null;
    }

    public TInvalidTokenException getEx1() {
      return this.ex1;
    }

    public updateBlockHashes_result setEx1(TInvalidTokenException ex1) {
      this.ex1 = ex1;
      return this;
    }

    public void unsetEx1() {
      this.ex1 = null;
    }

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

    public void setEx1IsSet(boolean value) {
      if (!value) {
        this.ex1 = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case EX1:
        if (value == null) {
          unsetEx1();
        } else {
          setEx1((TInvalidTokenException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case EX1:
        return getEx1();

      }
      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 EX1:
        return isSetEx1();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_ex1 = true && this.isSetEx1();
      boolean that_present_ex1 = true && that.isSetEx1();
      if (this_present_ex1 || that_present_ex1) {
        if (!(this_present_ex1 && that_present_ex1))
          return false;
        if (!this.ex1.equals(that.ex1))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_ex1 = true && (isSetEx1());
      list.add(present_ex1);
      if (present_ex1)
        list.add(ex1);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1);
        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("updateBlockHashes_result(");
      boolean first = true;

      sb.append("ex1:");
      if (this.ex1 == null) {
        sb.append("null");
      } else {
        sb.append(this.ex1);
      }
      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 {
        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 updateBlockHashes_resultStandardSchemeFactory implements SchemeFactory {
      public updateBlockHashes_resultStandardScheme getScheme() {
        return new updateBlockHashes_resultStandardScheme();
      }
    }

    private static class updateBlockHashes_resultStandardScheme extends StandardScheme<updateBlockHashes_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, updateBlockHashes_result 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: // EX1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ex1 = new TInvalidTokenException();
                struct.ex1.read(iprot);
                struct.setEx1IsSet(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, updateBlockHashes_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.ex1 != null) {
          oprot.writeFieldBegin(EX1_FIELD_DESC);
          struct.ex1.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class updateBlockHashes_resultTupleSchemeFactory implements SchemeFactory {
      public updateBlockHashes_resultTupleScheme getScheme() {
        return new updateBlockHashes_resultTupleScheme();
      }
    }

    private static class updateBlockHashes_resultTupleScheme extends TupleScheme<updateBlockHashes_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, updateBlockHashes_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetEx1()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetEx1()) {
          struct.ex1.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, updateBlockHashes_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.ex1 = new TInvalidTokenException();
          struct.ex1.read(iprot);
          struct.setEx1IsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField UPLOAD_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("uploadToken", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("options", org.apache.thrift.protocol.TType.STRUCT, (short)3);

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

    public String userToken; // required
    public String uploadToken; // required
    public UploadOptions options; // 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 {
      USER_TOKEN((short)1, "userToken"),
      UPLOAD_TOKEN((short)2, "uploadToken"),
      OPTIONS((short)3, "options");

      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: // USER_TOKEN
            return USER_TOKEN;
          case 2: // UPLOAD_TOKEN
            return UPLOAD_TOKEN;
          case 3: // OPTIONS
            return OPTIONS;
          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
    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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "Token")));
      tmpMap.put(_Fields.UPLOAD_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("uploadToken", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "Token")));
      tmpMap.put(_Fields.OPTIONS, new org.apache.thrift.meta_data.FieldMetaData("options", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UploadOptions.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setUploadOptions_args.class, metaDataMap);
    }

    public setUploadOptions_args() {
    }

    public setUploadOptions_args(
      String userToken,
      String uploadToken,
      UploadOptions options)
    {
      this();
      this.userToken = userToken;
      this.uploadToken = uploadToken;
      this.options = options;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public setUploadOptions_args(setUploadOptions_args other) {
      if (other.isSetUserToken()) {
        this.userToken = other.userToken;
      }
      if (other.isSetUploadToken()) {
        this.uploadToken = other.uploadToken;
      }
      if (other.isSetOptions()) {
        this.options = new UploadOptions(other.options);
      }
    }

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

    @Override
    public void clear() {
      this.userToken = null;
      this.uploadToken = null;
      this.options = null;
    }

    public String getUserToken() {
      return this.userToken;
    }

    public setUploadOptions_args setUserToken(String userToken) {
      this.userToken = userToken;
      return this;
    }

    public void unsetUserToken() {
      this.userToken = null;
    }

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

    public void setUserTokenIsSet(boolean value) {
      if (!value) {
        this.userToken = null;
      }
    }

    public String getUploadToken() {
      return this.uploadToken;
    }

    public setUploadOptions_args setUploadToken(String uploadToken) {
      this.uploadToken = uploadToken;
      return this;
    }

    public void unsetUploadToken() {
      this.uploadToken = null;
    }

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

    public void setUploadTokenIsSet(boolean value) {
      if (!value) {
        this.uploadToken = null;
      }
    }

    public UploadOptions getOptions() {
      return this.options;
    }

    public setUploadOptions_args setOptions(UploadOptions options) {
      this.options = options;
      return this;
    }

    public void unsetOptions() {
      this.options = null;
    }

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

    public void setOptionsIsSet(boolean value) {
      if (!value) {
        this.options = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_TOKEN:
        if (value == null) {
          unsetUserToken();
        } else {
          setUserToken((String)value);
        }
        break;

      case UPLOAD_TOKEN:
        if (value == null) {
          unsetUploadToken();
        } else {
          setUploadToken((String)value);
        }
        break;

      case OPTIONS:
        if (value == null) {
          unsetOptions();
        } else {
          setOptions((UploadOptions)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_TOKEN:
        return getUserToken();

      case UPLOAD_TOKEN:
        return getUploadToken();

      case OPTIONS:
        return getOptions();

      }
      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 USER_TOKEN:
        return isSetUserToken();
      case UPLOAD_TOKEN:
        return isSetUploadToken();
      case OPTIONS:
        return isSetOptions();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_userToken = true && this.isSetUserToken();
      boolean that_present_userToken = true && that.isSetUserToken();
      if (this_present_userToken || that_present_userToken) {
        if (!(this_present_userToken && that_present_userToken))
          return false;
        if (!this.userToken.equals(that.userToken))
          return false;
      }

      boolean this_present_uploadToken = true && this.isSetUploadToken();
      boolean that_present_uploadToken = true && that.isSetUploadToken();
      if (this_present_uploadToken || that_present_uploadToken) {
        if (!(this_present_uploadToken && that_present_uploadToken))
          return false;
        if (!this.uploadToken.equals(that.uploadToken))
          return false;
      }

      boolean this_present_options = true && this.isSetOptions();
      boolean that_present_options = true && that.isSetOptions();
      if (this_present_options || that_present_options) {
        if (!(this_present_options && that_present_options))
          return false;
        if (!this.options.equals(that.options))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_userToken = true && (isSetUserToken());
      list.add(present_userToken);
      if (present_userToken)
        list.add(userToken);

      boolean present_uploadToken = true && (isSetUploadToken());
      list.add(present_uploadToken);
      if (present_uploadToken)
        list.add(uploadToken);

      boolean present_options = true && (isSetOptions());
      list.add(present_options);
      if (present_options)
        list.add(options);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserToken()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUploadToken()).compareTo(other.isSetUploadToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUploadToken()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uploadToken, other.uploadToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetOptions()).compareTo(other.isSetOptions());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetOptions()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.options, other.options);
        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("setUploadOptions_args(");
      boolean first = true;

      sb.append("userToken:");
      if (this.userToken == null) {
        sb.append("null");
      } else {
        sb.append(this.userToken);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("uploadToken:");
      if (this.uploadToken == null) {
        sb.append("null");
      } else {
        sb.append(this.uploadToken);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("options:");
      if (this.options == null) {
        sb.append("null");
      } else {
        sb.append(this.options);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (options != null) {
        options.validate();
      }
    }

    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 {
        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 setUploadOptions_argsStandardSchemeFactory implements SchemeFactory {
      public setUploadOptions_argsStandardScheme getScheme() {
        return new setUploadOptions_argsStandardScheme();
      }
    }

    private static class setUploadOptions_argsStandardScheme extends StandardScheme<setUploadOptions_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, setUploadOptions_args 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: // USER_TOKEN
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.userToken = iprot.readString();
                struct.setUserTokenIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // UPLOAD_TOKEN
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.uploadToken = iprot.readString();
                struct.setUploadTokenIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // OPTIONS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.options = new UploadOptions();
                struct.options.read(iprot);
                struct.setOptionsIsSet(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, setUploadOptions_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.userToken != null) {
          oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
          oprot.writeString(struct.userToken);
          oprot.writeFieldEnd();
        }
        if (struct.uploadToken != null) {
          oprot.writeFieldBegin(UPLOAD_TOKEN_FIELD_DESC);
          oprot.writeString(struct.uploadToken);
          oprot.writeFieldEnd();
        }
        if (struct.options != null) {
          oprot.writeFieldBegin(OPTIONS_FIELD_DESC);
          struct.options.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class setUploadOptions_argsTupleSchemeFactory implements SchemeFactory {
      public setUploadOptions_argsTupleScheme getScheme() {
        return new setUploadOptions_argsTupleScheme();
      }
    }

    private static class setUploadOptions_argsTupleScheme extends TupleScheme<setUploadOptions_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, setUploadOptions_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetUserToken()) {
          optionals.set(0);
        }
        if (struct.isSetUploadToken()) {
          optionals.set(1);
        }
        if (struct.isSetOptions()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetUserToken()) {
          oprot.writeString(struct.userToken);
        }
        if (struct.isSetUploadToken()) {
          oprot.writeString(struct.uploadToken);
        }
        if (struct.isSetOptions()) {
          struct.options.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, setUploadOptions_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.userToken = iprot.readString();
          struct.setUserTokenIsSet(true);
        }
        if (incoming.get(1)) {
          struct.uploadToken = iprot.readString();
          struct.setUploadTokenIsSet(true);
        }
        if (incoming.get(2)) {
          struct.options = new UploadOptions();
          struct.options.read(iprot);
          struct.setOptionsIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField FROOTLOOPS_FIELD_DESC = new org.apache.thrift.protocol.TField("frootloops", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField IMCYBORGBUTTHATSOK_FIELD_DESC = new org.apache.thrift.protocol.TField("imcyborgbutthatsok", org.apache.thrift.protocol.TType.STRUCT, (short)2);

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

    public UploadOptions success; // required
    public TAuthorizationException frootloops; // required
    public TInvalidTokenException imcyborgbutthatsok; // 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 {
      SUCCESS((short)0, "success"),
      FROOTLOOPS((short)1, "frootloops"),
      IMCYBORGBUTTHATSOK((short)2, "imcyborgbutthatsok");

      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 0: // SUCCESS
            return SUCCESS;
          case 1: // FROOTLOOPS
            return FROOTLOOPS;
          case 2: // IMCYBORGBUTTHATSOK
            return IMCYBORGBUTTHATSOK;
          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
    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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UploadOptions.class)));
      tmpMap.put(_Fields.FROOTLOOPS, new org.apache.thrift.meta_data.FieldMetaData("frootloops", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.IMCYBORGBUTTHATSOK, new org.apache.thrift.meta_data.FieldMetaData("imcyborgbutthatsok", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setUploadOptions_result.class, metaDataMap);
    }

    public setUploadOptions_result() {
    }

    public setUploadOptions_result(
      UploadOptions success,
      TAuthorizationException frootloops,
      TInvalidTokenException imcyborgbutthatsok)
    {
      this();
      this.success = success;
      this.frootloops = frootloops;
      this.imcyborgbutthatsok = imcyborgbutthatsok;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public setUploadOptions_result(setUploadOptions_result other) {
      if (other.isSetSuccess()) {
        this.success = new UploadOptions(other.success);
      }
      if (other.isSetFrootloops()) {
        this.frootloops = new TAuthorizationException(other.frootloops);
      }
      if (other.isSetImcyborgbutthatsok()) {
        this.imcyborgbutthatsok = new TInvalidTokenException(other.imcyborgbutthatsok);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.frootloops = null;
      this.imcyborgbutthatsok = null;
    }

    public UploadOptions getSuccess() {
      return this.success;
    }

    public setUploadOptions_result setSuccess(UploadOptions success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

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

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public TAuthorizationException getFrootloops() {
      return this.frootloops;
    }

    public setUploadOptions_result setFrootloops(TAuthorizationException frootloops) {
      this.frootloops = frootloops;
      return this;
    }

    public void unsetFrootloops() {
      this.frootloops = null;
    }

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

    public void setFrootloopsIsSet(boolean value) {
      if (!value) {
        this.frootloops = null;
      }
    }

    public TInvalidTokenException getImcyborgbutthatsok() {
      return this.imcyborgbutthatsok;
    }

    public setUploadOptions_result setImcyborgbutthatsok(TInvalidTokenException imcyborgbutthatsok) {
      this.imcyborgbutthatsok = imcyborgbutthatsok;
      return this;
    }

    public void unsetImcyborgbutthatsok() {
      this.imcyborgbutthatsok = null;
    }

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

    public void setImcyborgbutthatsokIsSet(boolean value) {
      if (!value) {
        this.imcyborgbutthatsok = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((UploadOptions)value);
        }
        break;

      case FROOTLOOPS:
        if (value == null) {
          unsetFrootloops();
        } else {
          setFrootloops((TAuthorizationException)value);
        }
        break;

      case IMCYBORGBUTTHATSOK:
        if (value == null) {
          unsetImcyborgbutthatsok();
        } else {
          setImcyborgbutthatsok((TInvalidTokenException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case FROOTLOOPS:
        return getFrootloops();

      case IMCYBORGBUTTHATSOK:
        return getImcyborgbutthatsok();

      }
      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 SUCCESS:
        return isSetSuccess();
      case FROOTLOOPS:
        return isSetFrootloops();
      case IMCYBORGBUTTHATSOK:
        return isSetImcyborgbutthatsok();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_frootloops = true && this.isSetFrootloops();
      boolean that_present_frootloops = true && that.isSetFrootloops();
      if (this_present_frootloops || that_present_frootloops) {
        if (!(this_present_frootloops && that_present_frootloops))
          return false;
        if (!this.frootloops.equals(that.frootloops))
          return false;
      }

      boolean this_present_imcyborgbutthatsok = true && this.isSetImcyborgbutthatsok();
      boolean that_present_imcyborgbutthatsok = true && that.isSetImcyborgbutthatsok();
      if (this_present_imcyborgbutthatsok || that_present_imcyborgbutthatsok) {
        if (!(this_present_imcyborgbutthatsok && that_present_imcyborgbutthatsok))
          return false;
        if (!this.imcyborgbutthatsok.equals(that.imcyborgbutthatsok))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_frootloops = true && (isSetFrootloops());
      list.add(present_frootloops);
      if (present_frootloops)
        list.add(frootloops);

      boolean present_imcyborgbutthatsok = true && (isSetImcyborgbutthatsok());
      list.add(present_imcyborgbutthatsok);
      if (present_imcyborgbutthatsok)
        list.add(imcyborgbutthatsok);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetFrootloops()).compareTo(other.isSetFrootloops());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetFrootloops()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.frootloops, other.frootloops);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetImcyborgbutthatsok()).compareTo(other.isSetImcyborgbutthatsok());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetImcyborgbutthatsok()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imcyborgbutthatsok, other.imcyborgbutthatsok);
        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("setUploadOptions_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("frootloops:");
      if (this.frootloops == null) {
        sb.append("null");
      } else {
        sb.append(this.frootloops);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("imcyborgbutthatsok:");
      if (this.imcyborgbutthatsok == null) {
        sb.append("null");
      } else {
        sb.append(this.imcyborgbutthatsok);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (success != null) {
        success.validate();
      }
    }

    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 {
        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 setUploadOptions_resultStandardSchemeFactory implements SchemeFactory {
      public setUploadOptions_resultStandardScheme getScheme() {
        return new setUploadOptions_resultStandardScheme();
      }
    }

    private static class setUploadOptions_resultStandardScheme extends StandardScheme<setUploadOptions_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, setUploadOptions_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new UploadOptions();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // FROOTLOOPS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.frootloops = new TAuthorizationException();
                struct.frootloops.read(iprot);
                struct.setFrootloopsIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // IMCYBORGBUTTHATSOK
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.imcyborgbutthatsok = new TInvalidTokenException();
                struct.imcyborgbutthatsok.read(iprot);
                struct.setImcyborgbutthatsokIsSet(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, setUploadOptions_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.frootloops != null) {
          oprot.writeFieldBegin(FROOTLOOPS_FIELD_DESC);
          struct.frootloops.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.imcyborgbutthatsok != null) {
          oprot.writeFieldBegin(IMCYBORGBUTTHATSOK_FIELD_DESC);
          struct.imcyborgbutthatsok.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class setUploadOptions_resultTupleSchemeFactory implements SchemeFactory {
      public setUploadOptions_resultTupleScheme getScheme() {
        return new setUploadOptions_resultTupleScheme();
      }
    }

    private static class setUploadOptions_resultTupleScheme extends TupleScheme<setUploadOptions_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, setUploadOptions_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetFrootloops()) {
          optionals.set(1);
        }
        if (struct.isSetImcyborgbutthatsok()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetFrootloops()) {
          struct.frootloops.write(oprot);
        }
        if (struct.isSetImcyborgbutthatsok()) {
          struct.imcyborgbutthatsok.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, setUploadOptions_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.success = new UploadOptions();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.frootloops = new TAuthorizationException();
          struct.frootloops.read(iprot);
          struct.setFrootloopsIsSet(true);
        }
        if (incoming.get(2)) {
          struct.imcyborgbutthatsok = new TInvalidTokenException();
          struct.imcyborgbutthatsok.read(iprot);
          struct.setImcyborgbutthatsokIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField UPLOAD_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("uploadToken", org.apache.thrift.protocol.TType.STRING, (short)1);

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

    public String uploadToken; // 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 {
      UPLOAD_TOKEN((short)1, "uploadToken");

      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: // UPLOAD_TOKEN
            return UPLOAD_TOKEN;
          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
    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.UPLOAD_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("uploadToken", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "Token")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelUpload_args.class, metaDataMap);
    }

    public cancelUpload_args() {
    }

    public cancelUpload_args(
      String uploadToken)
    {
      this();
      this.uploadToken = uploadToken;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public cancelUpload_args(cancelUpload_args other) {
      if (other.isSetUploadToken()) {
        this.uploadToken = other.uploadToken;
      }
    }

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

    @Override
    public void clear() {
      this.uploadToken = null;
    }

    public String getUploadToken() {
      return this.uploadToken;
    }

    public cancelUpload_args setUploadToken(String uploadToken) {
      this.uploadToken = uploadToken;
      return this;
    }

    public void unsetUploadToken() {
      this.uploadToken = null;
    }

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

    public void setUploadTokenIsSet(boolean value) {
      if (!value) {
        this.uploadToken = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case UPLOAD_TOKEN:
        if (value == null) {
          unsetUploadToken();
        } else {
          setUploadToken((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case UPLOAD_TOKEN:
        return getUploadToken();

      }
      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 UPLOAD_TOKEN:
        return isSetUploadToken();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_uploadToken = true && this.isSetUploadToken();
      boolean that_present_uploadToken = true && that.isSetUploadToken();
      if (this_present_uploadToken || that_present_uploadToken) {
        if (!(this_present_uploadToken && that_present_uploadToken))
          return false;
        if (!this.uploadToken.equals(that.uploadToken))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_uploadToken = true && (isSetUploadToken());
      list.add(present_uploadToken);
      if (present_uploadToken)
        list.add(uploadToken);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetUploadToken()).compareTo(other.isSetUploadToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUploadToken()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uploadToken, other.uploadToken);
        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("cancelUpload_args(");
      boolean first = true;

      sb.append("uploadToken:");
      if (this.uploadToken == null) {
        sb.append("null");
      } else {
        sb.append(this.uploadToken);
      }
      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 {
        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 cancelUpload_argsStandardSchemeFactory implements SchemeFactory {
      public cancelUpload_argsStandardScheme getScheme() {
        return new cancelUpload_argsStandardScheme();
      }
    }

    private static class cancelUpload_argsStandardScheme extends StandardScheme<cancelUpload_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, cancelUpload_args 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: // UPLOAD_TOKEN
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.uploadToken = iprot.readString();
                struct.setUploadTokenIsSet(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, cancelUpload_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.uploadToken != null) {
          oprot.writeFieldBegin(UPLOAD_TOKEN_FIELD_DESC);
          oprot.writeString(struct.uploadToken);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class cancelUpload_argsTupleSchemeFactory implements SchemeFactory {
      public cancelUpload_argsTupleScheme getScheme() {
        return new cancelUpload_argsTupleScheme();
      }
    }

    private static class cancelUpload_argsTupleScheme extends TupleScheme<cancelUpload_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, cancelUpload_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetUploadToken()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetUploadToken()) {
          oprot.writeString(struct.uploadToken);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, cancelUpload_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.uploadToken = iprot.readString();
          struct.setUploadTokenIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1);

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

    public TInvalidTokenException ex1; // 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 {
      EX1((short)1, "ex1");

      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: // EX1
            return EX1;
          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
    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.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelUpload_result.class, metaDataMap);
    }

    public cancelUpload_result() {
    }

    public cancelUpload_result(
      TInvalidTokenException ex1)
    {
      this();
      this.ex1 = ex1;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public cancelUpload_result(cancelUpload_result other) {
      if (other.isSetEx1()) {
        this.ex1 = new TInvalidTokenException(other.ex1);
      }
    }

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

    @Override
    public void clear() {
      this.ex1 = null;
    }

    public TInvalidTokenException getEx1() {
      return this.ex1;
    }

    public cancelUpload_result setEx1(TInvalidTokenException ex1) {
      this.ex1 = ex1;
      return this;
    }

    public void unsetEx1() {
      this.ex1 = null;
    }

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

    public void setEx1IsSet(boolean value) {
      if (!value) {
        this.ex1 = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case EX1:
        if (value == null) {
          unsetEx1();
        } else {
          setEx1((TInvalidTokenException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case EX1:
        return getEx1();

      }
      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 EX1:
        return isSetEx1();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_ex1 = true && this.isSetEx1();
      boolean that_present_ex1 = true && that.isSetEx1();
      if (this_present_ex1 || that_present_ex1) {
        if (!(this_present_ex1 && that_present_ex1))
          return false;
        if (!this.ex1.equals(that.ex1))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_ex1 = true && (isSetEx1());
      list.add(present_ex1);
      if (present_ex1)
        list.add(ex1);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1);
        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("cancelUpload_result(");
      boolean first = true;

      sb.append("ex1:");
      if (this.ex1 == null) {
        sb.append("null");
      } else {
        sb.append(this.ex1);
      }
      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 {
        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 cancelUpload_resultStandardSchemeFactory implements SchemeFactory {
      public cancelUpload_resultStandardScheme getScheme() {
        return new cancelUpload_resultStandardScheme();
      }
    }

    private static class cancelUpload_resultStandardScheme extends StandardScheme<cancelUpload_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, cancelUpload_result 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: // EX1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ex1 = new TInvalidTokenException();
                struct.ex1.read(iprot);
                struct.setEx1IsSet(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, cancelUpload_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.ex1 != null) {
          oprot.writeFieldBegin(EX1_FIELD_DESC);
          struct.ex1.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class cancelUpload_resultTupleSchemeFactory implements SchemeFactory {
      public cancelUpload_resultTupleScheme getScheme() {
        return new cancelUpload_resultTupleScheme();
      }
    }

    private static class cancelUpload_resultTupleScheme extends TupleScheme<cancelUpload_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, cancelUpload_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetEx1()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetEx1()) {
          struct.ex1.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, cancelUpload_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.ex1 = new TInvalidTokenException();
          struct.ex1.read(iprot);
          struct.setEx1IsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField UPLOAD_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("uploadToken", org.apache.thrift.protocol.TType.STRING, (short)1);

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

    public String uploadToken; // 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 {
      UPLOAD_TOKEN((short)1, "uploadToken");

      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: // UPLOAD_TOKEN
            return UPLOAD_TOKEN;
          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
    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.UPLOAD_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("uploadToken", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "Token")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(queryUploadStatus_args.class, metaDataMap);
    }

    public queryUploadStatus_args() {
    }

    public queryUploadStatus_args(
      String uploadToken)
    {
      this();
      this.uploadToken = uploadToken;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public queryUploadStatus_args(queryUploadStatus_args other) {
      if (other.isSetUploadToken()) {
        this.uploadToken = other.uploadToken;
      }
    }

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

    @Override
    public void clear() {
      this.uploadToken = null;
    }

    public String getUploadToken() {
      return this.uploadToken;
    }

    public queryUploadStatus_args setUploadToken(String uploadToken) {
      this.uploadToken = uploadToken;
      return this;
    }

    public void unsetUploadToken() {
      this.uploadToken = null;
    }

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

    public void setUploadTokenIsSet(boolean value) {
      if (!value) {
        this.uploadToken = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case UPLOAD_TOKEN:
        if (value == null) {
          unsetUploadToken();
        } else {
          setUploadToken((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case UPLOAD_TOKEN:
        return getUploadToken();

      }
      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 UPLOAD_TOKEN:
        return isSetUploadToken();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_uploadToken = true && this.isSetUploadToken();
      boolean that_present_uploadToken = true && that.isSetUploadToken();
      if (this_present_uploadToken || that_present_uploadToken) {
        if (!(this_present_uploadToken && that_present_uploadToken))
          return false;
        if (!this.uploadToken.equals(that.uploadToken))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_uploadToken = true && (isSetUploadToken());
      list.add(present_uploadToken);
      if (present_uploadToken)
        list.add(uploadToken);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetUploadToken()).compareTo(other.isSetUploadToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUploadToken()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uploadToken, other.uploadToken);
        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("queryUploadStatus_args(");
      boolean first = true;

      sb.append("uploadToken:");
      if (this.uploadToken == null) {
        sb.append("null");
      } else {
        sb.append(this.uploadToken);
      }
      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 {
        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 queryUploadStatus_argsStandardSchemeFactory implements SchemeFactory {
      public queryUploadStatus_argsStandardScheme getScheme() {
        return new queryUploadStatus_argsStandardScheme();
      }
    }

    private static class queryUploadStatus_argsStandardScheme extends StandardScheme<queryUploadStatus_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, queryUploadStatus_args 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: // UPLOAD_TOKEN
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.uploadToken = iprot.readString();
                struct.setUploadTokenIsSet(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, queryUploadStatus_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.uploadToken != null) {
          oprot.writeFieldBegin(UPLOAD_TOKEN_FIELD_DESC);
          oprot.writeString(struct.uploadToken);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class queryUploadStatus_argsTupleSchemeFactory implements SchemeFactory {
      public queryUploadStatus_argsTupleScheme getScheme() {
        return new queryUploadStatus_argsTupleScheme();
      }
    }

    private static class queryUploadStatus_argsTupleScheme extends TupleScheme<queryUploadStatus_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, queryUploadStatus_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetUploadToken()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetUploadToken()) {
          oprot.writeString(struct.uploadToken);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, queryUploadStatus_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.uploadToken = iprot.readString();
          struct.setUploadTokenIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1);

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

    public TransferStatus success; // required
    public TInvalidTokenException ex1; // 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 {
      SUCCESS((short)0, "success"),
      EX1((short)1, "ex1");

      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 0: // SUCCESS
            return SUCCESS;
          case 1: // EX1
            return EX1;
          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
    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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TransferStatus.class)));
      tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(queryUploadStatus_result.class, metaDataMap);
    }

    public queryUploadStatus_result() {
    }

    public queryUploadStatus_result(
      TransferStatus success,
      TInvalidTokenException ex1)
    {
      this();
      this.success = success;
      this.ex1 = ex1;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public queryUploadStatus_result(queryUploadStatus_result other) {
      if (other.isSetSuccess()) {
        this.success = new TransferStatus(other.success);
      }
      if (other.isSetEx1()) {
        this.ex1 = new TInvalidTokenException(other.ex1);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.ex1 = null;
    }

    public TransferStatus getSuccess() {
      return this.success;
    }

    public queryUploadStatus_result setSuccess(TransferStatus success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

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

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public TInvalidTokenException getEx1() {
      return this.ex1;
    }

    public queryUploadStatus_result setEx1(TInvalidTokenException ex1) {
      this.ex1 = ex1;
      return this;
    }

    public void unsetEx1() {
      this.ex1 = null;
    }

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

    public void setEx1IsSet(boolean value) {
      if (!value) {
        this.ex1 = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((TransferStatus)value);
        }
        break;

      case EX1:
        if (value == null) {
          unsetEx1();
        } else {
          setEx1((TInvalidTokenException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case EX1:
        return getEx1();

      }
      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 SUCCESS:
        return isSetSuccess();
      case EX1:
        return isSetEx1();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_ex1 = true && this.isSetEx1();
      boolean that_present_ex1 = true && that.isSetEx1();
      if (this_present_ex1 || that_present_ex1) {
        if (!(this_present_ex1 && that_present_ex1))
          return false;
        if (!this.ex1.equals(that.ex1))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_ex1 = true && (isSetEx1());
      list.add(present_ex1);
      if (present_ex1)
        list.add(ex1);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1);
        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("queryUploadStatus_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ex1:");
      if (this.ex1 == null) {
        sb.append("null");
      } else {
        sb.append(this.ex1);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (success != null) {
        success.validate();
      }
    }

    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 {
        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 queryUploadStatus_resultStandardSchemeFactory implements SchemeFactory {
      public queryUploadStatus_resultStandardScheme getScheme() {
        return new queryUploadStatus_resultStandardScheme();
      }
    }

    private static class queryUploadStatus_resultStandardScheme extends StandardScheme<queryUploadStatus_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, queryUploadStatus_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new TransferStatus();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // EX1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ex1 = new TInvalidTokenException();
                struct.ex1.read(iprot);
                struct.setEx1IsSet(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, queryUploadStatus_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.ex1 != null) {
          oprot.writeFieldBegin(EX1_FIELD_DESC);
          struct.ex1.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class queryUploadStatus_resultTupleSchemeFactory implements SchemeFactory {
      public queryUploadStatus_resultTupleScheme getScheme() {
        return new queryUploadStatus_resultTupleScheme();
      }
    }

    private static class queryUploadStatus_resultTupleScheme extends TupleScheme<queryUploadStatus_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, queryUploadStatus_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetEx1()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetEx1()) {
          struct.ex1.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, queryUploadStatus_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new TransferStatus();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.ex1 = new TInvalidTokenException();
          struct.ex1.read(iprot);
          struct.setEx1IsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField IMAGE_VERSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageVersionId", org.apache.thrift.protocol.TType.STRING, (short)2);

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

    public String userToken; // required
    public String imageVersionId; // 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 {
      USER_TOKEN((short)1, "userToken"),
      IMAGE_VERSION_ID((short)2, "imageVersionId");

      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: // USER_TOKEN
            return USER_TOKEN;
          case 2: // IMAGE_VERSION_ID
            return IMAGE_VERSION_ID;
          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
    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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "Token")));
      tmpMap.put(_Fields.IMAGE_VERSION_ID, new org.apache.thrift.meta_data.FieldMetaData("imageVersionId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "UUID")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestDownload_args.class, metaDataMap);
    }

    public requestDownload_args() {
    }

    public requestDownload_args(
      String userToken,
      String imageVersionId)
    {
      this();
      this.userToken = userToken;
      this.imageVersionId = imageVersionId;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public requestDownload_args(requestDownload_args other) {
      if (other.isSetUserToken()) {
        this.userToken = other.userToken;
      }
      if (other.isSetImageVersionId()) {
        this.imageVersionId = other.imageVersionId;
      }
    }

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

    @Override
    public void clear() {
      this.userToken = null;
      this.imageVersionId = null;
    }

    public String getUserToken() {
      return this.userToken;
    }

    public requestDownload_args setUserToken(String userToken) {
      this.userToken = userToken;
      return this;
    }

    public void unsetUserToken() {
      this.userToken = null;
    }

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

    public void setUserTokenIsSet(boolean value) {
      if (!value) {
        this.userToken = null;
      }
    }

    public String getImageVersionId() {
      return this.imageVersionId;
    }

    public requestDownload_args setImageVersionId(String imageVersionId) {
      this.imageVersionId = imageVersionId;
      return this;
    }

    public void unsetImageVersionId() {
      this.imageVersionId = null;
    }

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

    public void setImageVersionIdIsSet(boolean value) {
      if (!value) {
        this.imageVersionId = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_TOKEN:
        if (value == null) {
          unsetUserToken();
        } else {
          setUserToken((String)value);
        }
        break;

      case IMAGE_VERSION_ID:
        if (value == null) {
          unsetImageVersionId();
        } else {
          setImageVersionId((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_TOKEN:
        return getUserToken();

      case IMAGE_VERSION_ID:
        return getImageVersionId();

      }
      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 USER_TOKEN:
        return isSetUserToken();
      case IMAGE_VERSION_ID:
        return isSetImageVersionId();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_userToken = true && this.isSetUserToken();
      boolean that_present_userToken = true && that.isSetUserToken();
      if (this_present_userToken || that_present_userToken) {
        if (!(this_present_userToken && that_present_userToken))
          return false;
        if (!this.userToken.equals(that.userToken))
          return false;
      }

      boolean this_present_imageVersionId = true && this.isSetImageVersionId();
      boolean that_present_imageVersionId = true && that.isSetImageVersionId();
      if (this_present_imageVersionId || that_present_imageVersionId) {
        if (!(this_present_imageVersionId && that_present_imageVersionId))
          return false;
        if (!this.imageVersionId.equals(that.imageVersionId))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_userToken = true && (isSetUserToken());
      list.add(present_userToken);
      if (present_userToken)
        list.add(userToken);

      boolean present_imageVersionId = true && (isSetImageVersionId());
      list.add(present_imageVersionId);
      if (present_imageVersionId)
        list.add(imageVersionId);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserToken()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetImageVersionId()).compareTo(other.isSetImageVersionId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetImageVersionId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageVersionId, other.imageVersionId);
        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("requestDownload_args(");
      boolean first = true;

      sb.append("userToken:");
      if (this.userToken == null) {
        sb.append("null");
      } else {
        sb.append(this.userToken);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("imageVersionId:");
      if (this.imageVersionId == null) {
        sb.append("null");
      } else {
        sb.append(this.imageVersionId);
      }
      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 {
        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 requestDownload_argsStandardSchemeFactory implements SchemeFactory {
      public requestDownload_argsStandardScheme getScheme() {
        return new requestDownload_argsStandardScheme();
      }
    }

    private static class requestDownload_argsStandardScheme extends StandardScheme<requestDownload_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, requestDownload_args 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: // USER_TOKEN
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.userToken = iprot.readString();
                struct.setUserTokenIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // IMAGE_VERSION_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.imageVersionId = iprot.readString();
                struct.setImageVersionIdIsSet(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, requestDownload_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.userToken != null) {
          oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
          oprot.writeString(struct.userToken);
          oprot.writeFieldEnd();
        }
        if (struct.imageVersionId != null) {
          oprot.writeFieldBegin(IMAGE_VERSION_ID_FIELD_DESC);
          oprot.writeString(struct.imageVersionId);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class requestDownload_argsTupleSchemeFactory implements SchemeFactory {
      public requestDownload_argsTupleScheme getScheme() {
        return new requestDownload_argsTupleScheme();
      }
    }

    private static class requestDownload_argsTupleScheme extends TupleScheme<requestDownload_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, requestDownload_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetUserToken()) {
          optionals.set(0);
        }
        if (struct.isSetImageVersionId()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetUserToken()) {
          oprot.writeString(struct.userToken);
        }
        if (struct.isSetImageVersionId()) {
          oprot.writeString(struct.imageVersionId);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, requestDownload_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.userToken = iprot.readString();
          struct.setUserTokenIsSet(true);
        }
        if (incoming.get(1)) {
          struct.imageVersionId = iprot.readString();
          struct.setImageVersionIdIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField REJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("rejection", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField FFFF_FIELD_DESC = new org.apache.thrift.protocol.TField("ffff", org.apache.thrift.protocol.TType.STRUCT, (short)3);
    private static final org.apache.thrift.protocol.TField SDF_FIELD_DESC = new org.apache.thrift.protocol.TField("sdf", org.apache.thrift.protocol.TType.STRUCT, (short)4);

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

    public TransferInformation success; // required
    public TTransferRejectedException rejection; // required
    public TAuthorizationException authError; // required
    public TInvocationException ffff; // required
    public TNotFoundException sdf; // 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 {
      SUCCESS((short)0, "success"),
      REJECTION((short)1, "rejection"),
      AUTH_ERROR((short)2, "authError"),
      FFFF((short)3, "ffff"),
      SDF((short)4, "sdf");

      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 0: // SUCCESS
            return SUCCESS;
          case 1: // REJECTION
            return REJECTION;
          case 2: // AUTH_ERROR
            return AUTH_ERROR;
          case 3: // FFFF
            return FFFF;
          case 4: // SDF
            return SDF;
          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
    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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TransferInformation.class)));
      tmpMap.put(_Fields.REJECTION, new org.apache.thrift.meta_data.FieldMetaData("rejection", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.FFFF, new org.apache.thrift.meta_data.FieldMetaData("ffff", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.SDF, new org.apache.thrift.meta_data.FieldMetaData("sdf", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestDownload_result.class, metaDataMap);
    }

    public requestDownload_result() {
    }

    public requestDownload_result(
      TransferInformation success,
      TTransferRejectedException rejection,
      TAuthorizationException authError,
      TInvocationException ffff,
      TNotFoundException sdf)
    {
      this();
      this.success = success;
      this.rejection = rejection;
      this.authError = authError;
      this.ffff = ffff;
      this.sdf = sdf;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public requestDownload_result(requestDownload_result other) {
      if (other.isSetSuccess()) {
        this.success = new TransferInformation(other.success);
      }
      if (other.isSetRejection()) {
        this.rejection = new TTransferRejectedException(other.rejection);
      }
      if (other.isSetAuthError()) {
        this.authError = new TAuthorizationException(other.authError);
      }
      if (other.isSetFfff()) {
        this.ffff = new TInvocationException(other.ffff);
      }
      if (other.isSetSdf()) {
        this.sdf = new TNotFoundException(other.sdf);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.rejection = null;
      this.authError = null;
      this.ffff = null;
      this.sdf = null;
    }

    public TransferInformation getSuccess() {
      return this.success;
    }

    public requestDownload_result setSuccess(TransferInformation success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

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

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public TTransferRejectedException getRejection() {
      return this.rejection;
    }

    public requestDownload_result setRejection(TTransferRejectedException rejection) {
      this.rejection = rejection;
      return this;
    }

    public void unsetRejection() {
      this.rejection = null;
    }

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

    public void setRejectionIsSet(boolean value) {
      if (!value) {
        this.rejection = null;
      }
    }

    public TAuthorizationException getAuthError() {
      return this.authError;
    }

    public requestDownload_result setAuthError(TAuthorizationException authError) {
      this.authError = authError;
      return this;
    }

    public void unsetAuthError() {
      this.authError = null;
    }

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

    public void setAuthErrorIsSet(boolean value) {
      if (!value) {
        this.authError = null;
      }
    }

    public TInvocationException getFfff() {
      return this.ffff;
    }

    public requestDownload_result setFfff(TInvocationException ffff) {
      this.ffff = ffff;
      return this;
    }

    public void unsetFfff() {
      this.ffff = null;
    }

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

    public void setFfffIsSet(boolean value) {
      if (!value) {
        this.ffff = null;
      }
    }

    public TNotFoundException getSdf() {
      return this.sdf;
    }

    public requestDownload_result setSdf(TNotFoundException sdf) {
      this.sdf = sdf;
      return this;
    }

    public void unsetSdf() {
      this.sdf = null;
    }

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

    public void setSdfIsSet(boolean value) {
      if (!value) {
        this.sdf = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((TransferInformation)value);
        }
        break;

      case REJECTION:
        if (value == null) {
          unsetRejection();
        } else {
          setRejection((TTransferRejectedException)value);
        }
        break;

      case AUTH_ERROR:
        if (value == null) {
          unsetAuthError();
        } else {
          setAuthError((TAuthorizationException)value);
        }
        break;

      case FFFF:
        if (value == null) {
          unsetFfff();
        } else {
          setFfff((TInvocationException)value);
        }
        break;

      case SDF:
        if (value == null) {
          unsetSdf();
        } else {
          setSdf((TNotFoundException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case REJECTION:
        return getRejection();

      case AUTH_ERROR:
        return getAuthError();

      case FFFF:
        return getFfff();

      case SDF:
        return getSdf();

      }
      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 SUCCESS:
        return isSetSuccess();
      case REJECTION:
        return isSetRejection();
      case AUTH_ERROR:
        return isSetAuthError();
      case FFFF:
        return isSetFfff();
      case SDF:
        return isSetSdf();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_rejection = true && this.isSetRejection();
      boolean that_present_rejection = true && that.isSetRejection();
      if (this_present_rejection || that_present_rejection) {
        if (!(this_present_rejection && that_present_rejection))
          return false;
        if (!this.rejection.equals(that.rejection))
          return false;
      }

      boolean this_present_authError = true && this.isSetAuthError();
      boolean that_present_authError = true && that.isSetAuthError();
      if (this_present_authError || that_present_authError) {
        if (!(this_present_authError && that_present_authError))
          return false;
        if (!this.authError.equals(that.authError))
          return false;
      }

      boolean this_present_ffff = true && this.isSetFfff();
      boolean that_present_ffff = true && that.isSetFfff();
      if (this_present_ffff || that_present_ffff) {
        if (!(this_present_ffff && that_present_ffff))
          return false;
        if (!this.ffff.equals(that.ffff))
          return false;
      }

      boolean this_present_sdf = true && this.isSetSdf();
      boolean that_present_sdf = true && that.isSetSdf();
      if (this_present_sdf || that_present_sdf) {
        if (!(this_present_sdf && that_present_sdf))
          return false;
        if (!this.sdf.equals(that.sdf))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_rejection = true && (isSetRejection());
      list.add(present_rejection);
      if (present_rejection)
        list.add(rejection);

      boolean present_authError = true && (isSetAuthError());
      list.add(present_authError);
      if (present_authError)
        list.add(authError);

      boolean present_ffff = true && (isSetFfff());
      list.add(present_ffff);
      if (present_ffff)
        list.add(ffff);

      boolean present_sdf = true && (isSetSdf());
      list.add(present_sdf);
      if (present_sdf)
        list.add(sdf);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetRejection()).compareTo(other.isSetRejection());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRejection()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rejection, other.rejection);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetFfff()).compareTo(other.isSetFfff());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetFfff()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ffff, other.ffff);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSdf()).compareTo(other.isSetSdf());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSdf()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sdf, other.sdf);
        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("requestDownload_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("rejection:");
      if (this.rejection == null) {
        sb.append("null");
      } else {
        sb.append(this.rejection);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("authError:");
      if (this.authError == null) {
        sb.append("null");
      } else {
        sb.append(this.authError);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ffff:");
      if (this.ffff == null) {
        sb.append("null");
      } else {
        sb.append(this.ffff);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("sdf:");
      if (this.sdf == null) {
        sb.append("null");
      } else {
        sb.append(this.sdf);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (success != null) {
        success.validate();
      }
    }

    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 {
        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 requestDownload_resultStandardSchemeFactory implements SchemeFactory {
      public requestDownload_resultStandardScheme getScheme() {
        return new requestDownload_resultStandardScheme();
      }
    }

    private static class requestDownload_resultStandardScheme extends StandardScheme<requestDownload_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, requestDownload_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new TransferInformation();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // REJECTION
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.rejection = new TTransferRejectedException();
                struct.rejection.read(iprot);
                struct.setRejectionIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // AUTH_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.authError = new TAuthorizationException();
                struct.authError.read(iprot);
                struct.setAuthErrorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // FFFF
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ffff = new TInvocationException();
                struct.ffff.read(iprot);
                struct.setFfffIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 4: // SDF
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.sdf = new TNotFoundException();
                struct.sdf.read(iprot);
                struct.setSdfIsSet(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, requestDownload_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.rejection != null) {
          oprot.writeFieldBegin(REJECTION_FIELD_DESC);
          struct.rejection.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.authError != null) {
          oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC);
          struct.authError.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.ffff != null) {
          oprot.writeFieldBegin(FFFF_FIELD_DESC);
          struct.ffff.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.sdf != null) {
          oprot.writeFieldBegin(SDF_FIELD_DESC);
          struct.sdf.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class requestDownload_resultTupleSchemeFactory implements SchemeFactory {
      public requestDownload_resultTupleScheme getScheme() {
        return new requestDownload_resultTupleScheme();
      }
    }

    private static class requestDownload_resultTupleScheme extends TupleScheme<requestDownload_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, requestDownload_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetRejection()) {
          optionals.set(1);
        }
        if (struct.isSetAuthError()) {
          optionals.set(2);
        }
        if (struct.isSetFfff()) {
          optionals.set(3);
        }
        if (struct.isSetSdf()) {
          optionals.set(4);
        }
        oprot.writeBitSet(optionals, 5);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetRejection()) {
          struct.rejection.write(oprot);
        }
        if (struct.isSetAuthError()) {
          struct.authError.write(oprot);
        }
        if (struct.isSetFfff()) {
          struct.ffff.write(oprot);
        }
        if (struct.isSetSdf()) {
          struct.sdf.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, requestDownload_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(5);
        if (incoming.get(0)) {
          struct.success = new TransferInformation();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.rejection = new TTransferRejectedException();
          struct.rejection.read(iprot);
          struct.setRejectionIsSet(true);
        }
        if (incoming.get(2)) {
          struct.authError = new TAuthorizationException();
          struct.authError.read(iprot);
          struct.setAuthErrorIsSet(true);
        }
        if (incoming.get(3)) {
          struct.ffff = new TInvocationException();
          struct.ffff.read(iprot);
          struct.setFfffIsSet(true);
        }
        if (incoming.get(4)) {
          struct.sdf = new TNotFoundException();
          struct.sdf.read(iprot);
          struct.setSdfIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField DOWNLOAD_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("downloadToken", org.apache.thrift.protocol.TType.STRING, (short)1);

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

    public String downloadToken; // 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 {
      DOWNLOAD_TOKEN((short)1, "downloadToken");

      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: // DOWNLOAD_TOKEN
            return DOWNLOAD_TOKEN;
          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
    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.DOWNLOAD_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("downloadToken", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelDownload_args.class, metaDataMap);
    }

    public cancelDownload_args() {
    }

    public cancelDownload_args(
      String downloadToken)
    {
      this();
      this.downloadToken = downloadToken;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public cancelDownload_args(cancelDownload_args other) {
      if (other.isSetDownloadToken()) {
        this.downloadToken = other.downloadToken;
      }
    }

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

    @Override
    public void clear() {
      this.downloadToken = null;
    }

    public String getDownloadToken() {
      return this.downloadToken;
    }

    public cancelDownload_args setDownloadToken(String downloadToken) {
      this.downloadToken = downloadToken;
      return this;
    }

    public void unsetDownloadToken() {
      this.downloadToken = null;
    }

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

    public void setDownloadTokenIsSet(boolean value) {
      if (!value) {
        this.downloadToken = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case DOWNLOAD_TOKEN:
        if (value == null) {
          unsetDownloadToken();
        } else {
          setDownloadToken((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case DOWNLOAD_TOKEN:
        return getDownloadToken();

      }
      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 DOWNLOAD_TOKEN:
        return isSetDownloadToken();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_downloadToken = true && this.isSetDownloadToken();
      boolean that_present_downloadToken = true && that.isSetDownloadToken();
      if (this_present_downloadToken || that_present_downloadToken) {
        if (!(this_present_downloadToken && that_present_downloadToken))
          return false;
        if (!this.downloadToken.equals(that.downloadToken))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_downloadToken = true && (isSetDownloadToken());
      list.add(present_downloadToken);
      if (present_downloadToken)
        list.add(downloadToken);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetDownloadToken()).compareTo(other.isSetDownloadToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetDownloadToken()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.downloadToken, other.downloadToken);
        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("cancelDownload_args(");
      boolean first = true;

      sb.append("downloadToken:");
      if (this.downloadToken == null) {
        sb.append("null");
      } else {
        sb.append(this.downloadToken);
      }
      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 {
        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 cancelDownload_argsStandardSchemeFactory implements SchemeFactory {
      public cancelDownload_argsStandardScheme getScheme() {
        return new cancelDownload_argsStandardScheme();
      }
    }

    private static class cancelDownload_argsStandardScheme extends StandardScheme<cancelDownload_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, cancelDownload_args 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: // DOWNLOAD_TOKEN
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.downloadToken = iprot.readString();
                struct.setDownloadTokenIsSet(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, cancelDownload_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.downloadToken != null) {
          oprot.writeFieldBegin(DOWNLOAD_TOKEN_FIELD_DESC);
          oprot.writeString(struct.downloadToken);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class cancelDownload_argsTupleSchemeFactory implements SchemeFactory {
      public cancelDownload_argsTupleScheme getScheme() {
        return new cancelDownload_argsTupleScheme();
      }
    }

    private static class cancelDownload_argsTupleScheme extends TupleScheme<cancelDownload_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, cancelDownload_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetDownloadToken()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetDownloadToken()) {
          oprot.writeString(struct.downloadToken);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, cancelDownload_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.downloadToken = iprot.readString();
          struct.setDownloadTokenIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1);

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

    public TInvalidTokenException ex1; // 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 {
      EX1((short)1, "ex1");

      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: // EX1
            return EX1;
          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
    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.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelDownload_result.class, metaDataMap);
    }

    public cancelDownload_result() {
    }

    public cancelDownload_result(
      TInvalidTokenException ex1)
    {
      this();
      this.ex1 = ex1;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public cancelDownload_result(cancelDownload_result other) {
      if (other.isSetEx1()) {
        this.ex1 = new TInvalidTokenException(other.ex1);
      }
    }

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

    @Override
    public void clear() {
      this.ex1 = null;
    }

    public TInvalidTokenException getEx1() {
      return this.ex1;
    }

    public cancelDownload_result setEx1(TInvalidTokenException ex1) {
      this.ex1 = ex1;
      return this;
    }

    public void unsetEx1() {
      this.ex1 = null;
    }

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

    public void setEx1IsSet(boolean value) {
      if (!value) {
        this.ex1 = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case EX1:
        if (value == null) {
          unsetEx1();
        } else {
          setEx1((TInvalidTokenException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case EX1:
        return getEx1();

      }
      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 EX1:
        return isSetEx1();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_ex1 = true && this.isSetEx1();
      boolean that_present_ex1 = true && that.isSetEx1();
      if (this_present_ex1 || that_present_ex1) {
        if (!(this_present_ex1 && that_present_ex1))
          return false;
        if (!this.ex1.equals(that.ex1))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_ex1 = true && (isSetEx1());
      list.add(present_ex1);
      if (present_ex1)
        list.add(ex1);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1);
        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("cancelDownload_result(");
      boolean first = true;

      sb.append("ex1:");
      if (this.ex1 == null) {
        sb.append("null");
      } else {
        sb.append(this.ex1);
      }
      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 {
        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 cancelDownload_resultStandardSchemeFactory implements SchemeFactory {
      public cancelDownload_resultStandardScheme getScheme() {
        return new cancelDownload_resultStandardScheme();
      }
    }

    private static class cancelDownload_resultStandardScheme extends StandardScheme<cancelDownload_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, cancelDownload_result 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: // EX1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ex1 = new TInvalidTokenException();
                struct.ex1.read(iprot);
                struct.setEx1IsSet(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, cancelDownload_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.ex1 != null) {
          oprot.writeFieldBegin(EX1_FIELD_DESC);
          struct.ex1.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class cancelDownload_resultTupleSchemeFactory implements SchemeFactory {
      public cancelDownload_resultTupleScheme getScheme() {
        return new cancelDownload_resultTupleScheme();
      }
    }

    private static class cancelDownload_resultTupleScheme extends TupleScheme<cancelDownload_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, cancelDownload_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetEx1()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetEx1()) {
          struct.ex1.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, cancelDownload_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.ex1 = new TInvalidTokenException();
          struct.ex1.read(iprot);
          struct.setEx1IsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);

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

    public String userToken; // 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 {
      USER_TOKEN((short)1, "userToken");

      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: // USER_TOKEN
            return USER_TOKEN;
          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
    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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "Token")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isAuthenticated_args.class, metaDataMap);
    }

    public isAuthenticated_args() {
    }

    public isAuthenticated_args(
      String userToken)
    {
      this();
      this.userToken = userToken;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public isAuthenticated_args(isAuthenticated_args other) {
      if (other.isSetUserToken()) {
        this.userToken = other.userToken;
      }
    }

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

    @Override
    public void clear() {
      this.userToken = null;
    }

    public String getUserToken() {
      return this.userToken;
    }

    public isAuthenticated_args setUserToken(String userToken) {
      this.userToken = userToken;
      return this;
    }

    public void unsetUserToken() {
      this.userToken = null;
    }

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

    public void setUserTokenIsSet(boolean value) {
      if (!value) {
        this.userToken = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_TOKEN:
        if (value == null) {
          unsetUserToken();
        } else {
          setUserToken((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_TOKEN:
        return getUserToken();

      }
      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 USER_TOKEN:
        return isSetUserToken();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_userToken = true && this.isSetUserToken();
      boolean that_present_userToken = true && that.isSetUserToken();
      if (this_present_userToken || that_present_userToken) {
        if (!(this_present_userToken && that_present_userToken))
          return false;
        if (!this.userToken.equals(that.userToken))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_userToken = true && (isSetUserToken());
      list.add(present_userToken);
      if (present_userToken)
        list.add(userToken);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserToken()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken);
        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("isAuthenticated_args(");
      boolean first = true;

      sb.append("userToken:");
      if (this.userToken == null) {
        sb.append("null");
      } else {
        sb.append(this.userToken);
      }
      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 {
        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 isAuthenticated_argsStandardSchemeFactory implements SchemeFactory {
      public isAuthenticated_argsStandardScheme getScheme() {
        return new isAuthenticated_argsStandardScheme();
      }
    }

    private static class isAuthenticated_argsStandardScheme extends StandardScheme<isAuthenticated_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, isAuthenticated_args 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: // USER_TOKEN
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.userToken = iprot.readString();
                struct.setUserTokenIsSet(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, isAuthenticated_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.userToken != null) {
          oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
          oprot.writeString(struct.userToken);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class isAuthenticated_argsTupleSchemeFactory implements SchemeFactory {
      public isAuthenticated_argsTupleScheme getScheme() {
        return new isAuthenticated_argsTupleScheme();
      }
    }

    private static class isAuthenticated_argsTupleScheme extends TupleScheme<isAuthenticated_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, isAuthenticated_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetUserToken()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetUserToken()) {
          oprot.writeString(struct.userToken);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, isAuthenticated_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.userToken = iprot.readString();
          struct.setUserTokenIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)2);

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

    public TAuthorizationException authError; // required
    public TInvocationException serverError; // 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 {
      AUTH_ERROR((short)1, "authError"),
      SERVER_ERROR((short)2, "serverError");

      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: // AUTH_ERROR
            return AUTH_ERROR;
          case 2: // SERVER_ERROR
            return SERVER_ERROR;
          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
    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.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isAuthenticated_result.class, metaDataMap);
    }

    public isAuthenticated_result() {
    }

    public isAuthenticated_result(
      TAuthorizationException authError,
      TInvocationException serverError)
    {
      this();
      this.authError = authError;
      this.serverError = serverError;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public isAuthenticated_result(isAuthenticated_result other) {
      if (other.isSetAuthError()) {
        this.authError = new TAuthorizationException(other.authError);
      }
      if (other.isSetServerError()) {
        this.serverError = new TInvocationException(other.serverError);
      }
    }

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

    @Override
    public void clear() {
      this.authError = null;
      this.serverError = null;
    }

    public TAuthorizationException getAuthError() {
      return this.authError;
    }

    public isAuthenticated_result setAuthError(TAuthorizationException authError) {
      this.authError = authError;
      return this;
    }

    public void unsetAuthError() {
      this.authError = null;
    }

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

    public void setAuthErrorIsSet(boolean value) {
      if (!value) {
        this.authError = null;
      }
    }

    public TInvocationException getServerError() {
      return this.serverError;
    }

    public isAuthenticated_result setServerError(TInvocationException serverError) {
      this.serverError = serverError;
      return this;
    }

    public void unsetServerError() {
      this.serverError = null;
    }

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

    public void setServerErrorIsSet(boolean value) {
      if (!value) {
        this.serverError = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case AUTH_ERROR:
        if (value == null) {
          unsetAuthError();
        } else {
          setAuthError((TAuthorizationException)value);
        }
        break;

      case SERVER_ERROR:
        if (value == null) {
          unsetServerError();
        } else {
          setServerError((TInvocationException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case AUTH_ERROR:
        return getAuthError();

      case SERVER_ERROR:
        return getServerError();

      }
      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 AUTH_ERROR:
        return isSetAuthError();
      case SERVER_ERROR:
        return isSetServerError();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_authError = true && this.isSetAuthError();
      boolean that_present_authError = true && that.isSetAuthError();
      if (this_present_authError || that_present_authError) {
        if (!(this_present_authError && that_present_authError))
          return false;
        if (!this.authError.equals(that.authError))
          return false;
      }

      boolean this_present_serverError = true && this.isSetServerError();
      boolean that_present_serverError = true && that.isSetServerError();
      if (this_present_serverError || that_present_serverError) {
        if (!(this_present_serverError && that_present_serverError))
          return false;
        if (!this.serverError.equals(that.serverError))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_authError = true && (isSetAuthError());
      list.add(present_authError);
      if (present_authError)
        list.add(authError);

      boolean present_serverError = true && (isSetServerError());
      list.add(present_serverError);
      if (present_serverError)
        list.add(serverError);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetServerError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError);
        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("isAuthenticated_result(");
      boolean first = true;

      sb.append("authError:");
      if (this.authError == null) {
        sb.append("null");
      } else {
        sb.append(this.authError);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("serverError:");
      if (this.serverError == null) {
        sb.append("null");
      } else {
        sb.append(this.serverError);
      }
      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 {
        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 isAuthenticated_resultStandardSchemeFactory implements SchemeFactory {
      public isAuthenticated_resultStandardScheme getScheme() {
        return new isAuthenticated_resultStandardScheme();
      }
    }

    private static class isAuthenticated_resultStandardScheme extends StandardScheme<isAuthenticated_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, isAuthenticated_result 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: // AUTH_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.authError = new TAuthorizationException();
                struct.authError.read(iprot);
                struct.setAuthErrorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // SERVER_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.serverError = new TInvocationException();
                struct.serverError.read(iprot);
                struct.setServerErrorIsSet(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, isAuthenticated_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.authError != null) {
          oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC);
          struct.authError.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.serverError != null) {
          oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC);
          struct.serverError.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class isAuthenticated_resultTupleSchemeFactory implements SchemeFactory {
      public isAuthenticated_resultTupleScheme getScheme() {
        return new isAuthenticated_resultTupleScheme();
      }
    }

    private static class isAuthenticated_resultTupleScheme extends TupleScheme<isAuthenticated_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, isAuthenticated_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetAuthError()) {
          optionals.set(0);
        }
        if (struct.isSetServerError()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetAuthError()) {
          struct.authError.write(oprot);
        }
        if (struct.isSetServerError()) {
          struct.serverError.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, isAuthenticated_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.authError = new TAuthorizationException();
          struct.authError.read(iprot);
          struct.setAuthErrorIsSet(true);
        }
        if (incoming.get(1)) {
          struct.serverError = new TInvocationException();
          struct.serverError.read(iprot);
          struct.setServerErrorIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);

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

    public String userToken; // 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 {
      USER_TOKEN((short)1, "userToken");

      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: // USER_TOKEN
            return USER_TOKEN;
          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
    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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "Token")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(whoami_args.class, metaDataMap);
    }

    public whoami_args() {
    }

    public whoami_args(
      String userToken)
    {
      this();
      this.userToken = userToken;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public whoami_args(whoami_args other) {
      if (other.isSetUserToken()) {
        this.userToken = other.userToken;
      }
    }

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

    @Override
    public void clear() {
      this.userToken = null;
    }

    public String getUserToken() {
      return this.userToken;
    }

    public whoami_args setUserToken(String userToken) {
      this.userToken = userToken;
      return this;
    }

    public void unsetUserToken() {
      this.userToken = null;
    }

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

    public void setUserTokenIsSet(boolean value) {
      if (!value) {
        this.userToken = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_TOKEN:
        if (value == null) {
          unsetUserToken();
        } else {
          setUserToken((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_TOKEN:
        return getUserToken();

      }
      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 USER_TOKEN:
        return isSetUserToken();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_userToken = true && this.isSetUserToken();
      boolean that_present_userToken = true && that.isSetUserToken();
      if (this_present_userToken || that_present_userToken) {
        if (!(this_present_userToken && that_present_userToken))
          return false;
        if (!this.userToken.equals(that.userToken))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_userToken = true && (isSetUserToken());
      list.add(present_userToken);
      if (present_userToken)
        list.add(userToken);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserToken()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken);
        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("whoami_args(");
      boolean first = true;

      sb.append("userToken:");
      if (this.userToken == null) {
        sb.append("null");
      } else {
        sb.append(this.userToken);
      }
      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 {
        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 whoami_argsStandardSchemeFactory implements SchemeFactory {
      public whoami_argsStandardScheme getScheme() {
        return new whoami_argsStandardScheme();
      }
    }

    private static class whoami_argsStandardScheme extends StandardScheme<whoami_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, whoami_args 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: // USER_TOKEN
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.userToken = iprot.readString();
                struct.setUserTokenIsSet(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, whoami_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.userToken != null) {
          oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
          oprot.writeString(struct.userToken);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class whoami_argsTupleSchemeFactory implements SchemeFactory {
      public whoami_argsTupleScheme getScheme() {
        return new whoami_argsTupleScheme();
      }
    }

    private static class whoami_argsTupleScheme extends TupleScheme<whoami_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, whoami_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetUserToken()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetUserToken()) {
          oprot.writeString(struct.userToken);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, whoami_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.userToken = iprot.readString();
          struct.setUserTokenIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)2);

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

    public WhoamiInfo success; // required
    public TAuthorizationException authError; // required
    public TInvocationException serverError; // 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 {
      SUCCESS((short)0, "success"),
      AUTH_ERROR((short)1, "authError"),
      SERVER_ERROR((short)2, "serverError");

      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 0: // SUCCESS
            return SUCCESS;
          case 1: // AUTH_ERROR
            return AUTH_ERROR;
          case 2: // SERVER_ERROR
            return SERVER_ERROR;
          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
    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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, WhoamiInfo.class)));
      tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(whoami_result.class, metaDataMap);
    }

    public whoami_result() {
    }

    public whoami_result(
      WhoamiInfo success,
      TAuthorizationException authError,
      TInvocationException serverError)
    {
      this();
      this.success = success;
      this.authError = authError;
      this.serverError = serverError;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public whoami_result(whoami_result other) {
      if (other.isSetSuccess()) {
        this.success = new WhoamiInfo(other.success);
      }
      if (other.isSetAuthError()) {
        this.authError = new TAuthorizationException(other.authError);
      }
      if (other.isSetServerError()) {
        this.serverError = new TInvocationException(other.serverError);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.authError = null;
      this.serverError = null;
    }

    public WhoamiInfo getSuccess() {
      return this.success;
    }

    public whoami_result setSuccess(WhoamiInfo success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

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

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public TAuthorizationException getAuthError() {
      return this.authError;
    }

    public whoami_result setAuthError(TAuthorizationException authError) {
      this.authError = authError;
      return this;
    }

    public void unsetAuthError() {
      this.authError = null;
    }

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

    public void setAuthErrorIsSet(boolean value) {
      if (!value) {
        this.authError = null;
      }
    }

    public TInvocationException getServerError() {
      return this.serverError;
    }

    public whoami_result setServerError(TInvocationException serverError) {
      this.serverError = serverError;
      return this;
    }

    public void unsetServerError() {
      this.serverError = null;
    }

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

    public void setServerErrorIsSet(boolean value) {
      if (!value) {
        this.serverError = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((WhoamiInfo)value);
        }
        break;

      case AUTH_ERROR:
        if (value == null) {
          unsetAuthError();
        } else {
          setAuthError((TAuthorizationException)value);
        }
        break;

      case SERVER_ERROR:
        if (value == null) {
          unsetServerError();
        } else {
          setServerError((TInvocationException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case AUTH_ERROR:
        return getAuthError();

      case SERVER_ERROR:
        return getServerError();

      }
      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 SUCCESS:
        return isSetSuccess();
      case AUTH_ERROR:
        return isSetAuthError();
      case SERVER_ERROR:
        return isSetServerError();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_authError = true && this.isSetAuthError();
      boolean that_present_authError = true && that.isSetAuthError();
      if (this_present_authError || that_present_authError) {
        if (!(this_present_authError && that_present_authError))
          return false;
        if (!this.authError.equals(that.authError))
          return false;
      }

      boolean this_present_serverError = true && this.isSetServerError();
      boolean that_present_serverError = true && that.isSetServerError();
      if (this_present_serverError || that_present_serverError) {
        if (!(this_present_serverError && that_present_serverError))
          return false;
        if (!this.serverError.equals(that.serverError))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_authError = true && (isSetAuthError());
      list.add(present_authError);
      if (present_authError)
        list.add(authError);

      boolean present_serverError = true && (isSetServerError());
      list.add(present_serverError);
      if (present_serverError)
        list.add(serverError);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetServerError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError);
        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("whoami_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("authError:");
      if (this.authError == null) {
        sb.append("null");
      } else {
        sb.append(this.authError);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("serverError:");
      if (this.serverError == null) {
        sb.append("null");
      } else {
        sb.append(this.serverError);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (success != null) {
        success.validate();
      }
    }

    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 {
        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 whoami_resultStandardSchemeFactory implements SchemeFactory {
      public whoami_resultStandardScheme getScheme() {
        return new whoami_resultStandardScheme();
      }
    }

    private static class whoami_resultStandardScheme extends StandardScheme<whoami_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, whoami_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new WhoamiInfo();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // AUTH_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.authError = new TAuthorizationException();
                struct.authError.read(iprot);
                struct.setAuthErrorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // SERVER_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.serverError = new TInvocationException();
                struct.serverError.read(iprot);
                struct.setServerErrorIsSet(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, whoami_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.authError != null) {
          oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC);
          struct.authError.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.serverError != null) {
          oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC);
          struct.serverError.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class whoami_resultTupleSchemeFactory implements SchemeFactory {
      public whoami_resultTupleScheme getScheme() {
        return new whoami_resultTupleScheme();
      }
    }

    private static class whoami_resultTupleScheme extends TupleScheme<whoami_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, whoami_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetAuthError()) {
          optionals.set(1);
        }
        if (struct.isSetServerError()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetAuthError()) {
          struct.authError.write(oprot);
        }
        if (struct.isSetServerError()) {
          struct.serverError.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, whoami_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.success = new WhoamiInfo();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.authError = new TAuthorizationException();
          struct.authError.read(iprot);
          struct.setAuthErrorIsSet(true);
        }
        if (incoming.get(2)) {
          struct.serverError = new TInvocationException();
          struct.serverError.read(iprot);
          struct.setServerErrorIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);

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

    public String userToken; // 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 {
      USER_TOKEN((short)1, "userToken");

      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: // USER_TOKEN
            return USER_TOKEN;
          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
    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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "Token")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(invalidateSession_args.class, metaDataMap);
    }

    public invalidateSession_args() {
    }

    public invalidateSession_args(
      String userToken)
    {
      this();
      this.userToken = userToken;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public invalidateSession_args(invalidateSession_args other) {
      if (other.isSetUserToken()) {
        this.userToken = other.userToken;
      }
    }

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

    @Override
    public void clear() {
      this.userToken = null;
    }

    public String getUserToken() {
      return this.userToken;
    }

    public invalidateSession_args setUserToken(String userToken) {
      this.userToken = userToken;
      return this;
    }

    public void unsetUserToken() {
      this.userToken = null;
    }

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

    public void setUserTokenIsSet(boolean value) {
      if (!value) {
        this.userToken = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_TOKEN:
        if (value == null) {
          unsetUserToken();
        } else {
          setUserToken((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_TOKEN:
        return getUserToken();

      }
      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 USER_TOKEN:
        return isSetUserToken();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_userToken = true && this.isSetUserToken();
      boolean that_present_userToken = true && that.isSetUserToken();
      if (this_present_userToken || that_present_userToken) {
        if (!(this_present_userToken && that_present_userToken))
          return false;
        if (!this.userToken.equals(that.userToken))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_userToken = true && (isSetUserToken());
      list.add(present_userToken);
      if (present_userToken)
        list.add(userToken);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserToken()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken);
        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("invalidateSession_args(");
      boolean first = true;

      sb.append("userToken:");
      if (this.userToken == null) {
        sb.append("null");
      } else {
        sb.append(this.userToken);
      }
      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 {
        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 invalidateSession_argsStandardSchemeFactory implements SchemeFactory {
      public invalidateSession_argsStandardScheme getScheme() {
        return new invalidateSession_argsStandardScheme();
      }
    }

    private static class invalidateSession_argsStandardScheme extends StandardScheme<invalidateSession_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, invalidateSession_args 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: // USER_TOKEN
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.userToken = iprot.readString();
                struct.setUserTokenIsSet(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, invalidateSession_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.userToken != null) {
          oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
          oprot.writeString(struct.userToken);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class invalidateSession_argsTupleSchemeFactory implements SchemeFactory {
      public invalidateSession_argsTupleScheme getScheme() {
        return new invalidateSession_argsTupleScheme();
      }
    }

    private static class invalidateSession_argsTupleScheme extends TupleScheme<invalidateSession_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, invalidateSession_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetUserToken()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetUserToken()) {
          oprot.writeString(struct.userToken);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, invalidateSession_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.userToken = iprot.readString();
          struct.setUserTokenIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField EX_FIELD_DESC = new org.apache.thrift.protocol.TField("ex", org.apache.thrift.protocol.TType.STRUCT, (short)1);

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

    public TInvalidTokenException ex; // 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 {
      EX((short)1, "ex");

      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: // EX
            return EX;
          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
    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.EX, new org.apache.thrift.meta_data.FieldMetaData("ex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(invalidateSession_result.class, metaDataMap);
    }

    public invalidateSession_result() {
    }

    public invalidateSession_result(
      TInvalidTokenException ex)
    {
      this();
      this.ex = ex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public invalidateSession_result(invalidateSession_result other) {
      if (other.isSetEx()) {
        this.ex = new TInvalidTokenException(other.ex);
      }
    }

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

    @Override
    public void clear() {
      this.ex = null;
    }

    public TInvalidTokenException getEx() {
      return this.ex;
    }

    public invalidateSession_result setEx(TInvalidTokenException ex) {
      this.ex = ex;
      return this;
    }

    public void unsetEx() {
      this.ex = null;
    }

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

    public void setExIsSet(boolean value) {
      if (!value) {
        this.ex = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case EX:
        if (value == null) {
          unsetEx();
        } else {
          setEx((TInvalidTokenException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case EX:
        return getEx();

      }
      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 EX:
        return isSetEx();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_ex = true && this.isSetEx();
      boolean that_present_ex = true && that.isSetEx();
      if (this_present_ex || that_present_ex) {
        if (!(this_present_ex && that_present_ex))
          return false;
        if (!this.ex.equals(that.ex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_ex = true && (isSetEx());
      list.add(present_ex);
      if (present_ex)
        list.add(ex);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetEx()).compareTo(other.isSetEx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex, other.ex);
        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("invalidateSession_result(");
      boolean first = true;

      sb.append("ex:");
      if (this.ex == null) {
        sb.append("null");
      } else {
        sb.append(this.ex);
      }
      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 {
        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 invalidateSession_resultStandardSchemeFactory implements SchemeFactory {
      public invalidateSession_resultStandardScheme getScheme() {
        return new invalidateSession_resultStandardScheme();
      }
    }

    private static class invalidateSession_resultStandardScheme extends StandardScheme<invalidateSession_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, invalidateSession_result 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: // EX
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ex = new TInvalidTokenException();
                struct.ex.read(iprot);
                struct.setExIsSet(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, invalidateSession_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.ex != null) {
          oprot.writeFieldBegin(EX_FIELD_DESC);
          struct.ex.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class invalidateSession_resultTupleSchemeFactory implements SchemeFactory {
      public invalidateSession_resultTupleScheme getScheme() {
        return new invalidateSession_resultTupleScheme();
      }
    }

    private static class invalidateSession_resultTupleScheme extends TupleScheme<invalidateSession_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, invalidateSession_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetEx()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetEx()) {
          struct.ex.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, invalidateSession_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.ex = new TInvalidTokenException();
          struct.ex.read(iprot);
          struct.setExIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField PAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("page", org.apache.thrift.protocol.TType.I32, (short)2);

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

    public String userToken; // required
    public int page; // 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 {
      USER_TOKEN((short)1, "userToken"),
      PAGE((short)2, "page");

      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: // USER_TOKEN
            return USER_TOKEN;
          case 2: // PAGE
            return PAGE;
          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 __PAGE_ISSET_ID = 0;
    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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "Token")));
      tmpMap.put(_Fields.PAGE, new org.apache.thrift.meta_data.FieldMetaData("page", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserList_args.class, metaDataMap);
    }

    public getUserList_args() {
    }

    public getUserList_args(
      String userToken,
      int page)
    {
      this();
      this.userToken = userToken;
      this.page = page;
      setPageIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getUserList_args(getUserList_args other) {
      __isset_bitfield = other.__isset_bitfield;
      if (other.isSetUserToken()) {
        this.userToken = other.userToken;
      }
      this.page = other.page;
    }

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

    @Override
    public void clear() {
      this.userToken = null;
      setPageIsSet(false);
      this.page = 0;
    }

    public String getUserToken() {
      return this.userToken;
    }

    public getUserList_args setUserToken(String userToken) {
      this.userToken = userToken;
      return this;
    }

    public void unsetUserToken() {
      this.userToken = null;
    }

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

    public void setUserTokenIsSet(boolean value) {
      if (!value) {
        this.userToken = null;
      }
    }

    public int getPage() {
      return this.page;
    }

    public getUserList_args setPage(int page) {
      this.page = page;
      setPageIsSet(true);
      return this;
    }

    public void unsetPage() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PAGE_ISSET_ID);
    }

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

    public void setPageIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PAGE_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_TOKEN:
        if (value == null) {
          unsetUserToken();
        } else {
          setUserToken((String)value);
        }
        break;

      case PAGE:
        if (value == null) {
          unsetPage();
        } else {
          setPage((Integer)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_TOKEN:
        return getUserToken();

      case PAGE:
        return getPage();

      }
      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 USER_TOKEN:
        return isSetUserToken();
      case PAGE:
        return isSetPage();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_userToken = true && this.isSetUserToken();
      boolean that_present_userToken = true && that.isSetUserToken();
      if (this_present_userToken || that_present_userToken) {
        if (!(this_present_userToken && that_present_userToken))
          return false;
        if (!this.userToken.equals(that.userToken))
          return false;
      }

      boolean this_present_page = true;
      boolean that_present_page = true;
      if (this_present_page || that_present_page) {
        if (!(this_present_page && that_present_page))
          return false;
        if (this.page != that.page)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_userToken = true && (isSetUserToken());
      list.add(present_userToken);
      if (present_userToken)
        list.add(userToken);

      boolean present_page = true;
      list.add(present_page);
      if (present_page)
        list.add(page);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserToken()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetPage()).compareTo(other.isSetPage());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetPage()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.page, other.page);
        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("getUserList_args(");
      boolean first = true;

      sb.append("userToken:");
      if (this.userToken == null) {
        sb.append("null");
      } else {
        sb.append(this.userToken);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("page:");
      sb.append(this.page);
      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 getUserList_argsStandardSchemeFactory implements SchemeFactory {
      public getUserList_argsStandardScheme getScheme() {
        return new getUserList_argsStandardScheme();
      }
    }

    private static class getUserList_argsStandardScheme extends StandardScheme<getUserList_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getUserList_args 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: // USER_TOKEN
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.userToken = iprot.readString();
                struct.setUserTokenIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // PAGE
              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
                struct.page = iprot.readI32();
                struct.setPageIsSet(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, getUserList_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.userToken != null) {
          oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
          oprot.writeString(struct.userToken);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldBegin(PAGE_FIELD_DESC);
        oprot.writeI32(struct.page);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getUserList_argsTupleSchemeFactory implements SchemeFactory {
      public getUserList_argsTupleScheme getScheme() {
        return new getUserList_argsTupleScheme();
      }
    }

    private static class getUserList_argsTupleScheme extends TupleScheme<getUserList_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getUserList_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetUserToken()) {
          optionals.set(0);
        }
        if (struct.isSetPage()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetUserToken()) {
          oprot.writeString(struct.userToken);
        }
        if (struct.isSetPage()) {
          oprot.writeI32(struct.page);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getUserList_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.userToken = iprot.readString();
          struct.setUserTokenIsSet(true);
        }
        if (incoming.get(1)) {
          struct.page = iprot.readI32();
          struct.setPageIsSet(true);
        }
      }
    }

  }

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

    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);
    private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)2);

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

    public List<UserInfo> success; // required
    public TAuthorizationException failure; // required
    public TInvocationException serverError; // 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 {
      SUCCESS((short)0, "success"),
      FAILURE((short)1, "failure"),
      SERVER_ERROR((short)2, "serverError");

      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 0: // SUCCESS
            return SUCCESS;
          case 1: // FAILURE
            return FAILURE;
          case 2: // SERVER_ERROR
            return SERVER_ERROR;
          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
    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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UserInfo.class))));
      tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserList_result.class, metaDataMap);
    }

    public getUserList_result() {
    }

    public getUserList_result(
      List<UserInfo> success,
      TAuthorizationException failure,
      TInvocationException serverError)
    {
      this();
      this.success = success;
      this.failure = failure;
      this.serverError = serverError;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getUserList_result(getUserList_result other) {
      if (other.isSetSuccess()) {
        List<UserInfo> __this__success = new ArrayList<UserInfo>(other.success.size());
        for (UserInfo other_element : other.success) {
          __this__success.add(new UserInfo(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetFailure()) {
        this.failure = new TAuthorizationException(other.failure);
      }
      if (other.isSetServerError()) {
        this.serverError = new TInvocationException(other.serverError);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.failure = null;
      this.serverError = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<UserInfo> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(UserInfo elem) {
      if (this.success == null) {
        this.success = new ArrayList<UserInfo>();
      }
      this.success.add(elem);
    }

    public List<UserInfo> getSuccess() {
      return this.success;
    }

    public getUserList_result setSuccess(List<UserInfo> success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

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

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public TAuthorizationException getFailure() {
      return this.failure;
    }

    public getUserList_result setFailure(TAuthorizationException failure) {
      this.failure = failure;
      return this;
    }

    public void unsetFailure() {
      this.failure = null;
    }

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

    public void setFailureIsSet(boolean value) {
      if (!value) {
        this.failure = null;
      }
    }

    public TInvocationException getServerError() {
      return this.serverError;
    }

    public getUserList_result setServerError(TInvocationException serverError) {
      this.serverError = serverError;
      return this;
    }

    public void unsetServerError() {
      this.serverError = null;
    }

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

    public void setServerErrorIsSet(boolean value) {
      if (!value) {
        this.serverError = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<UserInfo>)value);
        }
        break;

      case FAILURE:
        if (value == null) {
          unsetFailure();
        } else {
          setFailure((TAuthorizationException)value);
        }
        break;

      case SERVER_ERROR:
        if (value == null) {
          unsetServerError();
        } else {
          setServerError((TInvocationException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case FAILURE:
        return getFailure();

      case SERVER_ERROR:
        return getServerError();

      }
      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 SUCCESS:
        return isSetSuccess();
      case FAILURE:
        return isSetFailure();
      case SERVER_ERROR:
        return isSetServerError();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_failure = true && this.isSetFailure();
      boolean that_present_failure = true && that.isSetFailure();
      if (this_present_failure || that_present_failure) {
        if (!(this_present_failure && that_present_failure))
          return false;
        if (!this.failure.equals(that.failure))
          return false;
      }

      boolean this_present_serverError = true && this.isSetServerError();
      boolean that_present_serverError = true && that.isSetServerError();
      if (this_present_serverError || that_present_serverError) {
        if (!(this_present_serverError && that_present_serverError))
          return false;
        if (!this.serverError.equals(that.serverError))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_failure = true && (isSetFailure());
      list.add(present_failure);
      if (present_failure)
        list.add(failure);

      boolean present_serverError = true && (isSetServerError());
      list.add(present_serverError);
      if (present_serverError)
        list.add(serverError);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetFailure()).compareTo(other.isSetFailure());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetFailure()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, other.failure);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetServerError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError);
        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("getUserList_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("failure:");
      if (this.failure == null) {
        sb.append("null");
      } else {
        sb.append(this.failure);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("serverError:");
      if (this.serverError == null) {
        sb.append("null");
      } else {
        sb.append(this.serverError);
      }
      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 {
        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 getUserList_resultStandardSchemeFactory implements SchemeFactory {
      public getUserList_resultStandardScheme getScheme() {
        return new getUserList_resultStandardScheme();
      }
    }

    private static class getUserList_resultStandardScheme extends StandardScheme<getUserList_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getUserList_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                {
                  org.apache.thrift.protocol.TList _list234 = iprot.readListBegin();
                  struct.success = new ArrayList<UserInfo>(_list234.size);
                  UserInfo _elem235;
                  for (int _i236 = 0; _i236 < _list234.size; ++_i236)
                  {
                    _elem235 = new UserInfo();
                    _elem235.read(iprot);
                    struct.success.add(_elem235);
                  }
                  iprot.readListEnd();
                }
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // FAILURE
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.failure = new TAuthorizationException();
                struct.failure.read(iprot);
                struct.setFailureIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // SERVER_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.serverError = new TInvocationException();
                struct.serverError.read(iprot);
                struct.setServerErrorIsSet(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, getUserList_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
            for (UserInfo _iter237 : struct.success)
            {
              _iter237.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.failure != null) {
          oprot.writeFieldBegin(FAILURE_FIELD_DESC);
          struct.failure.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.serverError != null) {
          oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC);
          struct.serverError.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getUserList_resultTupleSchemeFactory implements SchemeFactory {
      public getUserList_resultTupleScheme getScheme() {
        return new getUserList_resultTupleScheme();
      }
    }

    private static class getUserList_resultTupleScheme extends TupleScheme<getUserList_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getUserList_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetFailure()) {
          optionals.set(1);
        }
        if (struct.isSetServerError()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (UserInfo _iter238 : struct.success)
            {
              _iter238.write(oprot);
            }
          }
        }
        if (struct.isSetFailure()) {
          struct.failure.write(oprot);
        }
        if (struct.isSetServerError()) {
          struct.serverError.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getUserList_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          {
            org.apache.thrift.protocol.TList _list239 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
            struct.success = new ArrayList<UserInfo>(_list239.size);
            UserInfo _elem240;
            for (int _i241 = 0; _i241 < _list239.size; ++_i241)
            {
              _elem240 = new UserInfo();
              _elem240.read(iprot);
              struct.success.add(_elem240);
            }
          }
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.failure = new TAuthorizationException();
          struct.failure.read(iprot);
          struct.setFailureIsSet(true);
        }
        if (incoming.get(2)) {
          struct.serverError = new TInvocationException();
          struct.serverError.read(iprot);
          struct.setServerErrorIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);

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

    public String userToken; // 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 {
      USER_TOKEN((short)1, "userToken");

      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: // USER_TOKEN
            return USER_TOKEN;
          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
    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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "Token")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserConfig_args.class, metaDataMap);
    }

    public getUserConfig_args() {
    }

    public getUserConfig_args(
      String userToken)
    {
      this();
      this.userToken = userToken;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getUserConfig_args(getUserConfig_args other) {
      if (other.isSetUserToken()) {
        this.userToken = other.userToken;
      }
    }

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

    @Override
    public void clear() {
      this.userToken = null;
    }

    public String getUserToken() {
      return this.userToken;
    }

    public getUserConfig_args setUserToken(String userToken) {
      this.userToken = userToken;
      return this;
    }

    public void unsetUserToken() {
      this.userToken = null;
    }

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

    public void setUserTokenIsSet(boolean value) {
      if (!value) {
        this.userToken = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_TOKEN:
        if (value == null) {
          unsetUserToken();
        } else {
          setUserToken((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_TOKEN:
        return getUserToken();

      }
      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 USER_TOKEN:
        return isSetUserToken();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_userToken = true && this.isSetUserToken();
      boolean that_present_userToken = true && that.isSetUserToken();
      if (this_present_userToken || that_present_userToken) {
        if (!(this_present_userToken && that_present_userToken))
          return false;
        if (!this.userToken.equals(that.userToken))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_userToken = true && (isSetUserToken());
      list.add(present_userToken);
      if (present_userToken)
        list.add(userToken);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserToken()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken);
        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("getUserConfig_args(");
      boolean first = true;

      sb.append("userToken:");
      if (this.userToken == null) {
        sb.append("null");
      } else {
        sb.append(this.userToken);
      }
      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 {
        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 getUserConfig_argsStandardSchemeFactory implements SchemeFactory {
      public getUserConfig_argsStandardScheme getScheme() {
        return new getUserConfig_argsStandardScheme();
      }
    }

    private static class getUserConfig_argsStandardScheme extends StandardScheme<getUserConfig_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getUserConfig_args 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: // USER_TOKEN
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.userToken = iprot.readString();
                struct.setUserTokenIsSet(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, getUserConfig_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.userToken != null) {
          oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
          oprot.writeString(struct.userToken);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getUserConfig_argsTupleSchemeFactory implements SchemeFactory {
      public getUserConfig_argsTupleScheme getScheme() {
        return new getUserConfig_argsTupleScheme();
      }
    }

    private static class getUserConfig_argsTupleScheme extends TupleScheme<getUserConfig_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getUserConfig_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetUserToken()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetUserToken()) {
          oprot.writeString(struct.userToken);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getUserConfig_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.userToken = iprot.readString();
          struct.setUserTokenIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)2);

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

    public SatelliteUserConfig success; // required
    public TAuthorizationException failure; // required
    public TInvocationException serverError; // 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 {
      SUCCESS((short)0, "success"),
      FAILURE((short)1, "failure"),
      SERVER_ERROR((short)2, "serverError");

      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 0: // SUCCESS
            return SUCCESS;
          case 1: // FAILURE
            return FAILURE;
          case 2: // SERVER_ERROR
            return SERVER_ERROR;
          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
    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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SatelliteUserConfig.class)));
      tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserConfig_result.class, metaDataMap);
    }

    public getUserConfig_result() {
    }

    public getUserConfig_result(
      SatelliteUserConfig success,
      TAuthorizationException failure,
      TInvocationException serverError)
    {
      this();
      this.success = success;
      this.failure = failure;
      this.serverError = serverError;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getUserConfig_result(getUserConfig_result other) {
      if (other.isSetSuccess()) {
        this.success = new SatelliteUserConfig(other.success);
      }
      if (other.isSetFailure()) {
        this.failure = new TAuthorizationException(other.failure);
      }
      if (other.isSetServerError()) {
        this.serverError = new TInvocationException(other.serverError);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.failure = null;
      this.serverError = null;
    }

    public SatelliteUserConfig getSuccess() {
      return this.success;
    }

    public getUserConfig_result setSuccess(SatelliteUserConfig success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

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

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public TAuthorizationException getFailure() {
      return this.failure;
    }

    public getUserConfig_result setFailure(TAuthorizationException failure) {
      this.failure = failure;
      return this;
    }

    public void unsetFailure() {
      this.failure = null;
    }

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

    public void setFailureIsSet(boolean value) {
      if (!value) {
        this.failure = null;
      }
    }

    public TInvocationException getServerError() {
      return this.serverError;
    }

    public getUserConfig_result setServerError(TInvocationException serverError) {
      this.serverError = serverError;
      return this;
    }

    public void unsetServerError() {
      this.serverError = null;
    }

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

    public void setServerErrorIsSet(boolean value) {
      if (!value) {
        this.serverError = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((SatelliteUserConfig)value);
        }
        break;

      case FAILURE:
        if (value == null) {
          unsetFailure();
        } else {
          setFailure((TAuthorizationException)value);
        }
        break;

      case SERVER_ERROR:
        if (value == null) {
          unsetServerError();
        } else {
          setServerError((TInvocationException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case FAILURE:
        return getFailure();

      case SERVER_ERROR:
        return getServerError();

      }
      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 SUCCESS:
        return isSetSuccess();
      case FAILURE:
        return isSetFailure();
      case SERVER_ERROR:
        return isSetServerError();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_failure = true && this.isSetFailure();
      boolean that_present_failure = true && that.isSetFailure();
      if (this_present_failure || that_present_failure) {
        if (!(this_present_failure && that_present_failure))
          return false;
        if (!this.failure.equals(that.failure))
          return false;
      }

      boolean this_present_serverError = true && this.isSetServerError();
      boolean that_present_serverError = true && that.isSetServerError();
      if (this_present_serverError || that_present_serverError) {
        if (!(this_present_serverError && that_present_serverError))
          return false;
        if (!this.serverError.equals(that.serverError))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_failure = true && (isSetFailure());
      list.add(present_failure);
      if (present_failure)
        list.add(failure);

      boolean present_serverError = true && (isSetServerError());
      list.add(present_serverError);
      if (present_serverError)
        list.add(serverError);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetFailure()).compareTo(other.isSetFailure());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetFailure()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, other.failure);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetServerError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError);
        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("getUserConfig_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("failure:");
      if (this.failure == null) {
        sb.append("null");
      } else {
        sb.append(this.failure);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("serverError:");
      if (this.serverError == null) {
        sb.append("null");
      } else {
        sb.append(this.serverError);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (success != null) {
        success.validate();
      }
    }

    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 {
        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 getUserConfig_resultStandardSchemeFactory implements SchemeFactory {
      public getUserConfig_resultStandardScheme getScheme() {
        return new getUserConfig_resultStandardScheme();
      }
    }

    private static class getUserConfig_resultStandardScheme extends StandardScheme<getUserConfig_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getUserConfig_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new SatelliteUserConfig();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // FAILURE
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.failure = new TAuthorizationException();
                struct.failure.read(iprot);
                struct.setFailureIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // SERVER_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.serverError = new TInvocationException();
                struct.serverError.read(iprot);
                struct.setServerErrorIsSet(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, getUserConfig_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.failure != null) {
          oprot.writeFieldBegin(FAILURE_FIELD_DESC);
          struct.failure.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.serverError != null) {
          oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC);
          struct.serverError.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getUserConfig_resultTupleSchemeFactory implements SchemeFactory {
      public getUserConfig_resultTupleScheme getScheme() {
        return new getUserConfig_resultTupleScheme();
      }
    }

    private static class getUserConfig_resultTupleScheme extends TupleScheme<getUserConfig_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getUserConfig_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetFailure()) {
          optionals.set(1);
        }
        if (struct.isSetServerError()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetFailure()) {
          struct.failure.write(oprot);
        }
        if (struct.isSetServerError()) {
          struct.serverError.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getUserConfig_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.success = new SatelliteUserConfig();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.failure = new TAuthorizationException();
          struct.failure.read(iprot);
          struct.setFailureIsSet(true);
        }
        if (incoming.get(2)) {
          struct.serverError = new TInvocationException();
          struct.serverError.read(iprot);
          struct.setServerErrorIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField CONFIG_FIELD_DESC = new org.apache.thrift.protocol.TField("config", org.apache.thrift.protocol.TType.STRUCT, (short)2);

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

    public String userToken; // required
    public SatelliteUserConfig config; // 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 {
      USER_TOKEN((short)1, "userToken"),
      CONFIG((short)2, "config");

      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: // USER_TOKEN
            return USER_TOKEN;
          case 2: // CONFIG
            return CONFIG;
          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
    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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "Token")));
      tmpMap.put(_Fields.CONFIG, new org.apache.thrift.meta_data.FieldMetaData("config", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SatelliteUserConfig.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setUserConfig_args.class, metaDataMap);
    }

    public setUserConfig_args() {
    }

    public setUserConfig_args(
      String userToken,
      SatelliteUserConfig config)
    {
      this();
      this.userToken = userToken;
      this.config = config;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public setUserConfig_args(setUserConfig_args other) {
      if (other.isSetUserToken()) {
        this.userToken = other.userToken;
      }
      if (other.isSetConfig()) {
        this.config = new SatelliteUserConfig(other.config);
      }
    }

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

    @Override
    public void clear() {
      this.userToken = null;
      this.config = null;
    }

    public String getUserToken() {
      return this.userToken;
    }

    public setUserConfig_args setUserToken(String userToken) {
      this.userToken = userToken;
      return this;
    }

    public void unsetUserToken() {
      this.userToken = null;
    }

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

    public void setUserTokenIsSet(boolean value) {
      if (!value) {
        this.userToken = null;
      }
    }

    public SatelliteUserConfig getConfig() {
      return this.config;
    }

    public setUserConfig_args setConfig(SatelliteUserConfig config) {
      this.config = config;
      return this;
    }

    public void unsetConfig() {
      this.config = null;
    }

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

    public void setConfigIsSet(boolean value) {
      if (!value) {
        this.config = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_TOKEN:
        if (value == null) {
          unsetUserToken();
        } else {
          setUserToken((String)value);
        }
        break;

      case CONFIG:
        if (value == null) {
          unsetConfig();
        } else {
          setConfig((SatelliteUserConfig)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_TOKEN:
        return getUserToken();

      case CONFIG:
        return getConfig();

      }
      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 USER_TOKEN:
        return isSetUserToken();
      case CONFIG:
        return isSetConfig();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_userToken = true && this.isSetUserToken();
      boolean that_present_userToken = true && that.isSetUserToken();
      if (this_present_userToken || that_present_userToken) {
        if (!(this_present_userToken && that_present_userToken))
          return false;
        if (!this.userToken.equals(that.userToken))
          return false;
      }

      boolean this_present_config = true && this.isSetConfig();
      boolean that_present_config = true && that.isSetConfig();
      if (this_present_config || that_present_config) {
        if (!(this_present_config && that_present_config))
          return false;
        if (!this.config.equals(that.config))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_userToken = true && (isSetUserToken());
      list.add(present_userToken);
      if (present_userToken)
        list.add(userToken);

      boolean present_config = true && (isSetConfig());
      list.add(present_config);
      if (present_config)
        list.add(config);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserToken()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetConfig()).compareTo(other.isSetConfig());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetConfig()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.config, other.config);
        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("setUserConfig_args(");
      boolean first = true;

      sb.append("userToken:");
      if (this.userToken == null) {
        sb.append("null");
      } else {
        sb.append(this.userToken);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("config:");
      if (this.config == null) {
        sb.append("null");
      } else {
        sb.append(this.config);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (config != null) {
        config.validate();
      }
    }

    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 {
        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 setUserConfig_argsStandardSchemeFactory implements SchemeFactory {
      public setUserConfig_argsStandardScheme getScheme() {
        return new setUserConfig_argsStandardScheme();
      }
    }

    private static class setUserConfig_argsStandardScheme extends StandardScheme<setUserConfig_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, setUserConfig_args 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: // USER_TOKEN
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.userToken = iprot.readString();
                struct.setUserTokenIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // CONFIG
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.config = new SatelliteUserConfig();
                struct.config.read(iprot);
                struct.setConfigIsSet(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, setUserConfig_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.userToken != null) {
          oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
          oprot.writeString(struct.userToken);
          oprot.writeFieldEnd();
        }
        if (struct.config != null) {
          oprot.writeFieldBegin(CONFIG_FIELD_DESC);
          struct.config.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class setUserConfig_argsTupleSchemeFactory implements SchemeFactory {
      public setUserConfig_argsTupleScheme getScheme() {
        return new setUserConfig_argsTupleScheme();
      }
    }

    private static class setUserConfig_argsTupleScheme extends TupleScheme<setUserConfig_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, setUserConfig_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetUserToken()) {
          optionals.set(0);
        }
        if (struct.isSetConfig()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetUserToken()) {
          oprot.writeString(struct.userToken);
        }
        if (struct.isSetConfig()) {
          struct.config.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, setUserConfig_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.userToken = iprot.readString();
          struct.setUserTokenIsSet(true);
        }
        if (incoming.get(1)) {
          struct.config = new SatelliteUserConfig();
          struct.config.read(iprot);
          struct.setConfigIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)2);

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

    public TAuthorizationException failure; // required
    public TInvocationException serverError; // 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 {
      FAILURE((short)1, "failure"),
      SERVER_ERROR((short)2, "serverError");

      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: // FAILURE
            return FAILURE;
          case 2: // SERVER_ERROR
            return SERVER_ERROR;
          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
    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.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setUserConfig_result.class, metaDataMap);
    }

    public setUserConfig_result() {
    }

    public setUserConfig_result(
      TAuthorizationException failure,
      TInvocationException serverError)
    {
      this();
      this.failure = failure;
      this.serverError = serverError;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public setUserConfig_result(setUserConfig_result other) {
      if (other.isSetFailure()) {
        this.failure = new TAuthorizationException(other.failure);
      }
      if (other.isSetServerError()) {
        this.serverError = new TInvocationException(other.serverError);
      }
    }

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

    @Override
    public void clear() {
      this.failure = null;
      this.serverError = null;
    }

    public TAuthorizationException getFailure() {
      return this.failure;
    }

    public setUserConfig_result setFailure(TAuthorizationException failure) {
      this.failure = failure;
      return this;
    }

    public void unsetFailure() {
      this.failure = null;
    }

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

    public void setFailureIsSet(boolean value) {
      if (!value) {
        this.failure = null;
      }
    }

    public TInvocationException getServerError() {
      return this.serverError;
    }

    public setUserConfig_result setServerError(TInvocationException serverError) {
      this.serverError = serverError;
      return this;
    }

    public void unsetServerError() {
      this.serverError = null;
    }

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

    public void setServerErrorIsSet(boolean value) {
      if (!value) {
        this.serverError = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case FAILURE:
        if (value == null) {
          unsetFailure();
        } else {
          setFailure((TAuthorizationException)value);
        }
        break;

      case SERVER_ERROR:
        if (value == null) {
          unsetServerError();
        } else {
          setServerError((TInvocationException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case FAILURE:
        return getFailure();

      case SERVER_ERROR:
        return getServerError();

      }
      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 FAILURE:
        return isSetFailure();
      case SERVER_ERROR:
        return isSetServerError();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_failure = true && this.isSetFailure();
      boolean that_present_failure = true && that.isSetFailure();
      if (this_present_failure || that_present_failure) {
        if (!(this_present_failure && that_present_failure))
          return false;
        if (!this.failure.equals(that.failure))
          return false;
      }

      boolean this_present_serverError = true && this.isSetServerError();
      boolean that_present_serverError = true && that.isSetServerError();
      if (this_present_serverError || that_present_serverError) {
        if (!(this_present_serverError && that_present_serverError))
          return false;
        if (!this.serverError.equals(that.serverError))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_failure = true && (isSetFailure());
      list.add(present_failure);
      if (present_failure)
        list.add(failure);

      boolean present_serverError = true && (isSetServerError());
      list.add(present_serverError);
      if (present_serverError)
        list.add(serverError);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetFailure()).compareTo(other.isSetFailure());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetFailure()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, other.failure);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetServerError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError);
        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("setUserConfig_result(");
      boolean first = true;

      sb.append("failure:");
      if (this.failure == null) {
        sb.append("null");
      } else {
        sb.append(this.failure);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("serverError:");
      if (this.serverError == null) {
        sb.append("null");
      } else {
        sb.append(this.serverError);
      }
      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 {
        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 setUserConfig_resultStandardSchemeFactory implements SchemeFactory {
      public setUserConfig_resultStandardScheme getScheme() {
        return new setUserConfig_resultStandardScheme();
      }
    }

    private static class setUserConfig_resultStandardScheme extends StandardScheme<setUserConfig_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, setUserConfig_result 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: // FAILURE
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.failure = new TAuthorizationException();
                struct.failure.read(iprot);
                struct.setFailureIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // SERVER_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.serverError = new TInvocationException();
                struct.serverError.read(iprot);
                struct.setServerErrorIsSet(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, setUserConfig_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.failure != null) {
          oprot.writeFieldBegin(FAILURE_FIELD_DESC);
          struct.failure.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.serverError != null) {
          oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC);
          struct.serverError.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class setUserConfig_resultTupleSchemeFactory implements SchemeFactory {
      public setUserConfig_resultTupleScheme getScheme() {
        return new setUserConfig_resultTupleScheme();
      }
    }

    private static class setUserConfig_resultTupleScheme extends TupleScheme<setUserConfig_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, setUserConfig_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetFailure()) {
          optionals.set(0);
        }
        if (struct.isSetServerError()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetFailure()) {
          struct.failure.write(oprot);
        }
        if (struct.isSetServerError()) {
          struct.serverError.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, setUserConfig_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.failure = new TAuthorizationException();
          struct.failure.read(iprot);
          struct.setFailureIsSet(true);
        }
        if (incoming.get(1)) {
          struct.serverError = new TInvocationException();
          struct.serverError.read(iprot);
          struct.setServerErrorIsSet(true);
        }
      }
    }

  }

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


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


    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

      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) {
          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;
      }
    }
    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);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getOperatingSystems_args.class, metaDataMap);
    }

    public getOperatingSystems_args() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getOperatingSystems_args(getOperatingSystems_args other) {
    }

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

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      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) {
      }
      throw new IllegalStateException();
    }

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

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

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      return list.hashCode();
    }

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

      int lastComparison = 0;

      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("getOperatingSystems_args(");
      boolean first = true;

      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 {
        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 getOperatingSystems_argsStandardSchemeFactory implements SchemeFactory {
      public getOperatingSystems_argsStandardScheme getScheme() {
        return new getOperatingSystems_argsStandardScheme();
      }
    }

    private static class getOperatingSystems_argsStandardScheme extends StandardScheme<getOperatingSystems_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getOperatingSystems_args 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) {
            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, getOperatingSystems_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getOperatingSystems_argsTupleSchemeFactory implements SchemeFactory {
      public getOperatingSystems_argsTupleScheme getScheme() {
        return new getOperatingSystems_argsTupleScheme();
      }
    }

    private static class getOperatingSystems_argsTupleScheme extends TupleScheme<getOperatingSystems_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getOperatingSystems_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getOperatingSystems_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
      }
    }

  }

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

    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);

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

    public List<OperatingSystem> success; // 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 {
      SUCCESS((short)0, "success");

      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 0: // SUCCESS
            return SUCCESS;
          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
    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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, OperatingSystem.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getOperatingSystems_result.class, metaDataMap);
    }

    public getOperatingSystems_result() {
    }

    public getOperatingSystems_result(
      List<OperatingSystem> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getOperatingSystems_result(getOperatingSystems_result other) {
      if (other.isSetSuccess()) {
        List<OperatingSystem> __this__success = new ArrayList<OperatingSystem>(other.success.size());
        for (OperatingSystem other_element : other.success) {
          __this__success.add(new OperatingSystem(other_element));
        }
        this.success = __this__success;
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<OperatingSystem> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(OperatingSystem elem) {
      if (this.success == null) {
        this.success = new ArrayList<OperatingSystem>();
      }
      this.success.add(elem);
    }

    public List<OperatingSystem> getSuccess() {
      return this.success;
    }

    public getOperatingSystems_result setSuccess(List<OperatingSystem> success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

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

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<OperatingSystem>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      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 SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        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("getOperatingSystems_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      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 {
        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 getOperatingSystems_resultStandardSchemeFactory implements SchemeFactory {
      public getOperatingSystems_resultStandardScheme getScheme() {
        return new getOperatingSystems_resultStandardScheme();
      }
    }

    private static class getOperatingSystems_resultStandardScheme extends StandardScheme<getOperatingSystems_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getOperatingSystems_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                {
                  org.apache.thrift.protocol.TList _list242 = iprot.readListBegin();
                  struct.success = new ArrayList<OperatingSystem>(_list242.size);
                  OperatingSystem _elem243;
                  for (int _i244 = 0; _i244 < _list242.size; ++_i244)
                  {
                    _elem243 = new OperatingSystem();
                    _elem243.read(iprot);
                    struct.success.add(_elem243);
                  }
                  iprot.readListEnd();
                }
                struct.setSuccessIsSet(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, getOperatingSystems_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
            for (OperatingSystem _iter245 : struct.success)
            {
              _iter245.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getOperatingSystems_resultTupleSchemeFactory implements SchemeFactory {
      public getOperatingSystems_resultTupleScheme getScheme() {
        return new getOperatingSystems_resultTupleScheme();
      }
    }

    private static class getOperatingSystems_resultTupleScheme extends TupleScheme<getOperatingSystems_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getOperatingSystems_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (OperatingSystem _iter246 : struct.success)
            {
              _iter246.write(oprot);
            }
          }
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getOperatingSystems_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          {
            org.apache.thrift.protocol.TList _list247 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
            struct.success = new ArrayList<OperatingSystem>(_list247.size);
            OperatingSystem _elem248;
            for (int _i249 = 0; _i249 < _list247.size; ++_i249)
            {
              _elem248 = new OperatingSystem();
              _elem248.read(iprot);
              struct.success.add(_elem248);
            }
          }
          struct.setSuccessIsSet(true);
        }
      }
    }

  }

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


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


    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

      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) {
          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;
      }
    }
    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);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getVirtualizers_args.class, metaDataMap);
    }

    public getVirtualizers_args() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getVirtualizers_args(getVirtualizers_args other) {
    }

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

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      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) {
      }
      throw new IllegalStateException();
    }

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

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

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      return list.hashCode();
    }

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

      int lastComparison = 0;

      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("getVirtualizers_args(");
      boolean first = true;

      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 {
        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 getVirtualizers_argsStandardSchemeFactory implements SchemeFactory {
      public getVirtualizers_argsStandardScheme getScheme() {
        return new getVirtualizers_argsStandardScheme();
      }
    }

    private static class getVirtualizers_argsStandardScheme extends StandardScheme<getVirtualizers_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getVirtualizers_args 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) {
            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, getVirtualizers_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getVirtualizers_argsTupleSchemeFactory implements SchemeFactory {
      public getVirtualizers_argsTupleScheme getScheme() {
        return new getVirtualizers_argsTupleScheme();
      }
    }

    private static class getVirtualizers_argsTupleScheme extends TupleScheme<getVirtualizers_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getVirtualizers_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getVirtualizers_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
      }
    }

  }

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

    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);

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

    public List<Virtualizer> success; // 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 {
      SUCCESS((short)0, "success");

      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 0: // SUCCESS
            return SUCCESS;
          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
    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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Virtualizer.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getVirtualizers_result.class, metaDataMap);
    }

    public getVirtualizers_result() {
    }

    public getVirtualizers_result(
      List<Virtualizer> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getVirtualizers_result(getVirtualizers_result other) {
      if (other.isSetSuccess()) {
        List<Virtualizer> __this__success = new ArrayList<Virtualizer>(other.success.size());
        for (Virtualizer other_element : other.success) {
          __this__success.add(new Virtualizer(other_element));
        }
        this.success = __this__success;
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<Virtualizer> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(Virtualizer elem) {
      if (this.success == null) {
        this.success = new ArrayList<Virtualizer>();
      }
      this.success.add(elem);
    }

    public List<Virtualizer> getSuccess() {
      return this.success;
    }

    public getVirtualizers_result setSuccess(List<Virtualizer> success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

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

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<Virtualizer>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      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 SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        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("getVirtualizers_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      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 {
        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 getVirtualizers_resultStandardSchemeFactory implements SchemeFactory {
      public getVirtualizers_resultStandardScheme getScheme() {
        return new getVirtualizers_resultStandardScheme();
      }
    }

    private static class getVirtualizers_resultStandardScheme extends StandardScheme<getVirtualizers_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getVirtualizers_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                {
                  org.apache.thrift.protocol.TList _list250 = iprot.readListBegin();
                  struct.success = new ArrayList<Virtualizer>(_list250.size);
                  Virtualizer _elem251;
                  for (int _i252 = 0; _i252 < _list250.size; ++_i252)
                  {
                    _elem251 = new Virtualizer();
                    _elem251.read(iprot);
                    struct.success.add(_elem251);
                  }
                  iprot.readListEnd();
                }
                struct.setSuccessIsSet(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, getVirtualizers_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
            for (Virtualizer _iter253 : struct.success)
            {
              _iter253.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getVirtualizers_resultTupleSchemeFactory implements SchemeFactory {
      public getVirtualizers_resultTupleScheme getScheme() {
        return new getVirtualizers_resultTupleScheme();
      }
    }

    private static class getVirtualizers_resultTupleScheme extends TupleScheme<getVirtualizers_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getVirtualizers_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (Virtualizer _iter254 : struct.success)
            {
              _iter254.write(oprot);
            }
          }
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getVirtualizers_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          {
            org.apache.thrift.protocol.TList _list255 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
            struct.success = new ArrayList<Virtualizer>(_list255.size);
            Virtualizer _elem256;
            for (int _i257 = 0; _i257 < _list255.size; ++_i257)
            {
              _elem256 = new Virtualizer();
              _elem256.read(iprot);
              struct.success.add(_elem256);
            }
          }
          struct.setSuccessIsSet(true);
        }
      }
    }

  }

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


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


    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

      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) {
          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;
      }
    }
    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);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllOrganizations_args.class, metaDataMap);
    }

    public getAllOrganizations_args() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAllOrganizations_args(getAllOrganizations_args other) {
    }

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

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      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) {
      }
      throw new IllegalStateException();
    }

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

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

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      return list.hashCode();
    }

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

      int lastComparison = 0;

      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("getAllOrganizations_args(");
      boolean first = true;

      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 {
        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 getAllOrganizations_argsStandardSchemeFactory implements SchemeFactory {
      public getAllOrganizations_argsStandardScheme getScheme() {
        return new getAllOrganizations_argsStandardScheme();
      }
    }

    private static class getAllOrganizations_argsStandardScheme extends StandardScheme<getAllOrganizations_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getAllOrganizations_args 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) {
            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, getAllOrganizations_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getAllOrganizations_argsTupleSchemeFactory implements SchemeFactory {
      public getAllOrganizations_argsTupleScheme getScheme() {
        return new getAllOrganizations_argsTupleScheme();
      }
    }

    private static class getAllOrganizations_argsTupleScheme extends TupleScheme<getAllOrganizations_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getAllOrganizations_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getAllOrganizations_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
      }
    }

  }

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

    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);

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

    public List<Organization> success; // 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 {
      SUCCESS((short)0, "success");

      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 0: // SUCCESS
            return SUCCESS;
          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
    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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Organization.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllOrganizations_result.class, metaDataMap);
    }

    public getAllOrganizations_result() {
    }

    public getAllOrganizations_result(
      List<Organization> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAllOrganizations_result(getAllOrganizations_result other) {
      if (other.isSetSuccess()) {
        List<Organization> __this__success = new ArrayList<Organization>(other.success.size());
        for (Organization other_element : other.success) {
          __this__success.add(new Organization(other_element));
        }
        this.success = __this__success;
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<Organization> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(Organization elem) {
      if (this.success == null) {
        this.success = new ArrayList<Organization>();
      }
      this.success.add(elem);
    }

    public List<Organization> getSuccess() {
      return this.success;
    }

    public getAllOrganizations_result setSuccess(List<Organization> success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

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

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<Organization>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      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 SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        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("getAllOrganizations_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      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 {
        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 getAllOrganizations_resultStandardSchemeFactory implements SchemeFactory {
      public getAllOrganizations_resultStandardScheme getScheme() {
        return new getAllOrganizations_resultStandardScheme();
      }
    }

    private static class getAllOrganizations_resultStandardScheme extends StandardScheme<getAllOrganizations_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getAllOrganizations_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                {
                  org.apache.thrift.protocol.TList _list258 = iprot.readListBegin();
                  struct.success = new ArrayList<Organization>(_list258.size);
                  Organization _elem259;
                  for (int _i260 = 0; _i260 < _list258.size; ++_i260)
                  {
                    _elem259 = new Organization();
                    _elem259.read(iprot);
                    struct.success.add(_elem259);
                  }
                  iprot.readListEnd();
                }
                struct.setSuccessIsSet(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, getAllOrganizations_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
            for (Organization _iter261 : struct.success)
            {
              _iter261.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getAllOrganizations_resultTupleSchemeFactory implements SchemeFactory {
      public getAllOrganizations_resultTupleScheme getScheme() {
        return new getAllOrganizations_resultTupleScheme();
      }
    }

    private static class getAllOrganizations_resultTupleScheme extends TupleScheme<getAllOrganizations_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getAllOrganizations_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (Organization _iter262 : struct.success)
            {
              _iter262.write(oprot);
            }
          }
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getAllOrganizations_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          {
            org.apache.thrift.protocol.TList _list263 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
            struct.success = new ArrayList<Organization>(_list263.size);
            Organization _elem264;
            for (int _i265 = 0; _i265 < _list263.size; ++_i265)
            {
              _elem264 = new Organization();
              _elem264.read(iprot);
              struct.success.add(_elem264);
            }
          }
          struct.setSuccessIsSet(true);
        }
      }
    }

  }

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


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


    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

      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) {
          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;
      }
    }
    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);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLocations_args.class, metaDataMap);
    }

    public getLocations_args() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getLocations_args(getLocations_args other) {
    }

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

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      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) {
      }
      throw new IllegalStateException();
    }

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

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

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      return list.hashCode();
    }

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

      int lastComparison = 0;

      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("getLocations_args(");
      boolean first = true;

      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 {
        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 getLocations_argsStandardSchemeFactory implements SchemeFactory {
      public getLocations_argsStandardScheme getScheme() {
        return new getLocations_argsStandardScheme();
      }
    }

    private static class getLocations_argsStandardScheme extends StandardScheme<getLocations_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getLocations_args 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) {
            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, getLocations_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getLocations_argsTupleSchemeFactory implements SchemeFactory {
      public getLocations_argsTupleScheme getScheme() {
        return new getLocations_argsTupleScheme();
      }
    }

    private static class getLocations_argsTupleScheme extends TupleScheme<getLocations_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getLocations_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getLocations_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
      }
    }

  }

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

    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);

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

    public List<Location> success; // 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 {
      SUCCESS((short)0, "success");

      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 0: // SUCCESS
            return SUCCESS;
          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
    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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Location.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLocations_result.class, metaDataMap);
    }

    public getLocations_result() {
    }

    public getLocations_result(
      List<Location> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getLocations_result(getLocations_result other) {
      if (other.isSetSuccess()) {
        List<Location> __this__success = new ArrayList<Location>(other.success.size());
        for (Location other_element : other.success) {
          __this__success.add(new Location(other_element));
        }
        this.success = __this__success;
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<Location> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(Location elem) {
      if (this.success == null) {
        this.success = new ArrayList<Location>();
      }
      this.success.add(elem);
    }

    public List<Location> getSuccess() {
      return this.success;
    }

    public getLocations_result setSuccess(List<Location> success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

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

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<Location>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      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 SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        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("getLocations_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      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 {
        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 getLocations_resultStandardSchemeFactory implements SchemeFactory {
      public getLocations_resultStandardScheme getScheme() {
        return new getLocations_resultStandardScheme();
      }
    }

    private static class getLocations_resultStandardScheme extends StandardScheme<getLocations_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getLocations_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                {
                  org.apache.thrift.protocol.TList _list266 = iprot.readListBegin();
                  struct.success = new ArrayList<Location>(_list266.size);
                  Location _elem267;
                  for (int _i268 = 0; _i268 < _list266.size; ++_i268)
                  {
                    _elem267 = new Location();
                    _elem267.read(iprot);
                    struct.success.add(_elem267);
                  }
                  iprot.readListEnd();
                }
                struct.setSuccessIsSet(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, getLocations_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
            for (Location _iter269 : struct.success)
            {
              _iter269.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getLocations_resultTupleSchemeFactory implements SchemeFactory {
      public getLocations_resultTupleScheme getScheme() {
        return new getLocations_resultTupleScheme();
      }
    }

    private static class getLocations_resultTupleScheme extends TupleScheme<getLocations_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getLocations_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (Location _iter270 : struct.success)
            {
              _iter270.write(oprot);
            }
          }
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getLocations_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          {
            org.apache.thrift.protocol.TList _list271 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
            struct.success = new ArrayList<Location>(_list271.size);
            Location _elem272;
            for (int _i273 = 0; _i273 < _list271.size; ++_i273)
            {
              _elem272 = new Location();
              _elem272.read(iprot);
              struct.success.add(_elem272);
            }
          }
          struct.setSuccessIsSet(true);
        }
      }
    }

  }

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


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


    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

      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) {
          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;
      }
    }
    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);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getStatus_args.class, metaDataMap);
    }

    public getStatus_args() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getStatus_args(getStatus_args other) {
    }

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

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      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) {
      }
      throw new IllegalStateException();
    }

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

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

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      return list.hashCode();
    }

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

      int lastComparison = 0;

      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("getStatus_args(");
      boolean first = true;

      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 {
        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 getStatus_argsStandardSchemeFactory implements SchemeFactory {
      public getStatus_argsStandardScheme getScheme() {
        return new getStatus_argsStandardScheme();
      }
    }

    private static class getStatus_argsStandardScheme extends StandardScheme<getStatus_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getStatus_args 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) {
            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, getStatus_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getStatus_argsTupleSchemeFactory implements SchemeFactory {
      public getStatus_argsTupleScheme getScheme() {
        return new getStatus_argsTupleScheme();
      }
    }

    private static class getStatus_argsTupleScheme extends TupleScheme<getStatus_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getStatus_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getStatus_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);

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

    public SatelliteStatus success; // 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 {
      SUCCESS((short)0, "success");

      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 0: // SUCCESS
            return SUCCESS;
          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
    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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SatelliteStatus.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getStatus_result.class, metaDataMap);
    }

    public getStatus_result() {
    }

    public getStatus_result(
      SatelliteStatus success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getStatus_result(getStatus_result other) {
      if (other.isSetSuccess()) {
        this.success = new SatelliteStatus(other.success);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
    }

    public SatelliteStatus getSuccess() {
      return this.success;
    }

    public getStatus_result setSuccess(SatelliteStatus success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

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

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((SatelliteStatus)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      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 SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        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("getStatus_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (success != null) {
        success.validate();
      }
    }

    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 {
        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 getStatus_resultStandardSchemeFactory implements SchemeFactory {
      public getStatus_resultStandardScheme getScheme() {
        return new getStatus_resultStandardScheme();
      }
    }

    private static class getStatus_resultStandardScheme extends StandardScheme<getStatus_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getStatus_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new SatelliteStatus();
                struct.success.read(iprot);
                struct.setSuccessIsSet(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, getStatus_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getStatus_resultTupleSchemeFactory implements SchemeFactory {
      public getStatus_resultTupleScheme getScheme() {
        return new getStatus_resultTupleScheme();
      }
    }

    private static class getStatus_resultTupleScheme extends TupleScheme<getStatus_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getStatus_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getStatus_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.success = new SatelliteStatus();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField TAG_SEARCH_FIELD_DESC = new org.apache.thrift.protocol.TField("tagSearch", org.apache.thrift.protocol.TType.LIST, (short)2);
    private static final org.apache.thrift.protocol.TField PAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("page", org.apache.thrift.protocol.TType.I32, (short)3);

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

    public String userToken; // required
    public List<String> tagSearch; // required
    public int page; // 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 {
      USER_TOKEN((short)1, "userToken"),
      TAG_SEARCH((short)2, "tagSearch"),
      PAGE((short)3, "page");

      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: // USER_TOKEN
            return USER_TOKEN;
          case 2: // TAG_SEARCH
            return TAG_SEARCH;
          case 3: // PAGE
            return PAGE;
          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 __PAGE_ISSET_ID = 0;
    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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "Token")));
      tmpMap.put(_Fields.TAG_SEARCH, new org.apache.thrift.meta_data.FieldMetaData("tagSearch", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
      tmpMap.put(_Fields.PAGE, new org.apache.thrift.meta_data.FieldMetaData("page", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageList_args.class, metaDataMap);
    }

    public getImageList_args() {
    }

    public getImageList_args(
      String userToken,
      List<String> tagSearch,
      int page)
    {
      this();
      this.userToken = userToken;
      this.tagSearch = tagSearch;
      this.page = page;
      setPageIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getImageList_args(getImageList_args other) {
      __isset_bitfield = other.__isset_bitfield;
      if (other.isSetUserToken()) {
        this.userToken = other.userToken;
      }
      if (other.isSetTagSearch()) {
        List<String> __this__tagSearch = new ArrayList<String>(other.tagSearch);
        this.tagSearch = __this__tagSearch;
      }
      this.page = other.page;
    }

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

    @Override
    public void clear() {
      this.userToken = null;
      this.tagSearch = null;
      setPageIsSet(false);
      this.page = 0;
    }

    public String getUserToken() {
      return this.userToken;
    }

    public getImageList_args setUserToken(String userToken) {
      this.userToken = userToken;
      return this;
    }

    public void unsetUserToken() {
      this.userToken = null;
    }

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

    public void setUserTokenIsSet(boolean value) {
      if (!value) {
        this.userToken = null;
      }
    }

    public int getTagSearchSize() {
      return (this.tagSearch == null) ? 0 : this.tagSearch.size();
    }

    public java.util.Iterator<String> getTagSearchIterator() {
      return (this.tagSearch == null) ? null : this.tagSearch.iterator();
    }

    public void addToTagSearch(String elem) {
      if (this.tagSearch == null) {
        this.tagSearch = new ArrayList<String>();
      }
      this.tagSearch.add(elem);
    }

    public List<String> getTagSearch() {
      return this.tagSearch;
    }

    public getImageList_args setTagSearch(List<String> tagSearch) {
      this.tagSearch = tagSearch;
      return this;
    }

    public void unsetTagSearch() {
      this.tagSearch = null;
    }

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

    public void setTagSearchIsSet(boolean value) {
      if (!value) {
        this.tagSearch = null;
      }
    }

    public int getPage() {
      return this.page;
    }

    public getImageList_args setPage(int page) {
      this.page = page;
      setPageIsSet(true);
      return this;
    }

    public void unsetPage() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PAGE_ISSET_ID);
    }

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

    public void setPageIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PAGE_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_TOKEN:
        if (value == null) {
          unsetUserToken();
        } else {
          setUserToken((String)value);
        }
        break;

      case TAG_SEARCH:
        if (value == null) {
          unsetTagSearch();
        } else {
          setTagSearch((List<String>)value);
        }
        break;

      case PAGE:
        if (value == null) {
          unsetPage();
        } else {
          setPage((Integer)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_TOKEN:
        return getUserToken();

      case TAG_SEARCH:
        return getTagSearch();

      case PAGE:
        return getPage();

      }
      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 USER_TOKEN:
        return isSetUserToken();
      case TAG_SEARCH:
        return isSetTagSearch();
      case PAGE:
        return isSetPage();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_userToken = true && this.isSetUserToken();
      boolean that_present_userToken = true && that.isSetUserToken();
      if (this_present_userToken || that_present_userToken) {
        if (!(this_present_userToken && that_present_userToken))
          return false;
        if (!this.userToken.equals(that.userToken))
          return false;
      }

      boolean this_present_tagSearch = true && this.isSetTagSearch();
      boolean that_present_tagSearch = true && that.isSetTagSearch();
      if (this_present_tagSearch || that_present_tagSearch) {
        if (!(this_present_tagSearch && that_present_tagSearch))
          return false;
        if (!this.tagSearch.equals(that.tagSearch))
          return false;
      }

      boolean this_present_page = true;
      boolean that_present_page = true;
      if (this_present_page || that_present_page) {
        if (!(this_present_page && that_present_page))
          return false;
        if (this.page != that.page)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_userToken = true && (isSetUserToken());
      list.add(present_userToken);
      if (present_userToken)
        list.add(userToken);

      boolean present_tagSearch = true && (isSetTagSearch());
      list.add(present_tagSearch);
      if (present_tagSearch)
        list.add(tagSearch);

      boolean present_page = true;
      list.add(present_page);
      if (present_page)
        list.add(page);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserToken()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetTagSearch()).compareTo(other.isSetTagSearch());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetTagSearch()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tagSearch, other.tagSearch);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetPage()).compareTo(other.isSetPage());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetPage()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.page, other.page);
        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("getImageList_args(");
      boolean first = true;

      sb.append("userToken:");
      if (this.userToken == null) {
        sb.append("null");
      } else {
        sb.append(this.userToken);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("tagSearch:");
      if (this.tagSearch == null) {
        sb.append("null");
      } else {
        sb.append(this.tagSearch);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("page:");
      sb.append(this.page);
      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 getImageList_argsStandardSchemeFactory implements SchemeFactory {
      public getImageList_argsStandardScheme getScheme() {
        return new getImageList_argsStandardScheme();
      }
    }

    private static class getImageList_argsStandardScheme extends StandardScheme<getImageList_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getImageList_args 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: // USER_TOKEN
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.userToken = iprot.readString();
                struct.setUserTokenIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // TAG_SEARCH
              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                {
                  org.apache.thrift.protocol.TList _list274 = iprot.readListBegin();
                  struct.tagSearch = new ArrayList<String>(_list274.size);
                  String _elem275;
                  for (int _i276 = 0; _i276 < _list274.size; ++_i276)
                  {
                    _elem275 = iprot.readString();
                    struct.tagSearch.add(_elem275);
                  }
                  iprot.readListEnd();
                }
                struct.setTagSearchIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // PAGE
              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
                struct.page = iprot.readI32();
                struct.setPageIsSet(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, getImageList_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.userToken != null) {
          oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
          oprot.writeString(struct.userToken);
          oprot.writeFieldEnd();
        }
        if (struct.tagSearch != null) {
          oprot.writeFieldBegin(TAG_SEARCH_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.tagSearch.size()));
            for (String _iter277 : struct.tagSearch)
            {
              oprot.writeString(_iter277);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        oprot.writeFieldBegin(PAGE_FIELD_DESC);
        oprot.writeI32(struct.page);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getImageList_argsTupleSchemeFactory implements SchemeFactory {
      public getImageList_argsTupleScheme getScheme() {
        return new getImageList_argsTupleScheme();
      }
    }

    private static class getImageList_argsTupleScheme extends TupleScheme<getImageList_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getImageList_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetUserToken()) {
          optionals.set(0);
        }
        if (struct.isSetTagSearch()) {
          optionals.set(1);
        }
        if (struct.isSetPage()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetUserToken()) {
          oprot.writeString(struct.userToken);
        }
        if (struct.isSetTagSearch()) {
          {
            oprot.writeI32(struct.tagSearch.size());
            for (String _iter278 : struct.tagSearch)
            {
              oprot.writeString(_iter278);
            }
          }
        }
        if (struct.isSetPage()) {
          oprot.writeI32(struct.page);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getImageList_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.userToken = iprot.readString();
          struct.setUserTokenIsSet(true);
        }
        if (incoming.get(1)) {
          {
            org.apache.thrift.protocol.TList _list279 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
            struct.tagSearch = new ArrayList<String>(_list279.size);
            String _elem280;
            for (int _i281 = 0; _i281 < _list279.size; ++_i281)
            {
              _elem280 = iprot.readString();
              struct.tagSearch.add(_elem280);
            }
          }
          struct.setTagSearchIsSet(true);
        }
        if (incoming.get(2)) {
          struct.page = iprot.readI32();
          struct.setPageIsSet(true);
        }
      }
    }

  }

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

    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);
    private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)2);

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

    public List<ImageSummaryRead> success; // required
    public TAuthorizationException authError; // required
    public TInvocationException serverError; // 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 {
      SUCCESS((short)0, "success"),
      AUTH_ERROR((short)1, "authError"),
      SERVER_ERROR((short)2, "serverError");

      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 0: // SUCCESS
            return SUCCESS;
          case 1: // AUTH_ERROR
            return AUTH_ERROR;
          case 2: // SERVER_ERROR
            return SERVER_ERROR;
          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
    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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ImageSummaryRead.class))));
      tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageList_result.class, metaDataMap);
    }

    public getImageList_result() {
    }

    public getImageList_result(
      List<ImageSummaryRead> success,
      TAuthorizationException authError,
      TInvocationException serverError)
    {
      this();
      this.success = success;
      this.authError = authError;
      this.serverError = serverError;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getImageList_result(getImageList_result other) {
      if (other.isSetSuccess()) {
        List<ImageSummaryRead> __this__success = new ArrayList<ImageSummaryRead>(other.success.size());
        for (ImageSummaryRead other_element : other.success) {
          __this__success.add(new ImageSummaryRead(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetAuthError()) {
        this.authError = new TAuthorizationException(other.authError);
      }
      if (other.isSetServerError()) {
        this.serverError = new TInvocationException(other.serverError);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.authError = null;
      this.serverError = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<ImageSummaryRead> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(ImageSummaryRead elem) {
      if (this.success == null) {
        this.success = new ArrayList<ImageSummaryRead>();
      }
      this.success.add(elem);
    }

    public List<ImageSummaryRead> getSuccess() {
      return this.success;
    }

    public getImageList_result setSuccess(List<ImageSummaryRead> success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

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

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public TAuthorizationException getAuthError() {
      return this.authError;
    }

    public getImageList_result setAuthError(TAuthorizationException authError) {
      this.authError = authError;
      return this;
    }

    public void unsetAuthError() {
      this.authError = null;
    }

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

    public void setAuthErrorIsSet(boolean value) {
      if (!value) {
        this.authError = null;
      }
    }

    public TInvocationException getServerError() {
      return this.serverError;
    }

    public getImageList_result setServerError(TInvocationException serverError) {
      this.serverError = serverError;
      return this;
    }

    public void unsetServerError() {
      this.serverError = null;
    }

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

    public void setServerErrorIsSet(boolean value) {
      if (!value) {
        this.serverError = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<ImageSummaryRead>)value);
        }
        break;

      case AUTH_ERROR:
        if (value == null) {
          unsetAuthError();
        } else {
          setAuthError((TAuthorizationException)value);
        }
        break;

      case SERVER_ERROR:
        if (value == null) {
          unsetServerError();
        } else {
          setServerError((TInvocationException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case AUTH_ERROR:
        return getAuthError();

      case SERVER_ERROR:
        return getServerError();

      }
      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 SUCCESS:
        return isSetSuccess();
      case AUTH_ERROR:
        return isSetAuthError();
      case SERVER_ERROR:
        return isSetServerError();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_authError = true && this.isSetAuthError();
      boolean that_present_authError = true && that.isSetAuthError();
      if (this_present_authError || that_present_authError) {
        if (!(this_present_authError && that_present_authError))
          return false;
        if (!this.authError.equals(that.authError))
          return false;
      }

      boolean this_present_serverError = true && this.isSetServerError();
      boolean that_present_serverError = true && that.isSetServerError();
      if (this_present_serverError || that_present_serverError) {
        if (!(this_present_serverError && that_present_serverError))
          return false;
        if (!this.serverError.equals(that.serverError))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_authError = true && (isSetAuthError());
      list.add(present_authError);
      if (present_authError)
        list.add(authError);

      boolean present_serverError = true && (isSetServerError());
      list.add(present_serverError);
      if (present_serverError)
        list.add(serverError);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetServerError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError);
        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("getImageList_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("authError:");
      if (this.authError == null) {
        sb.append("null");
      } else {
        sb.append(this.authError);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("serverError:");
      if (this.serverError == null) {
        sb.append("null");
      } else {
        sb.append(this.serverError);
      }
      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 {
        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 getImageList_resultStandardSchemeFactory implements SchemeFactory {
      public getImageList_resultStandardScheme getScheme() {
        return new getImageList_resultStandardScheme();
      }
    }

    private static class getImageList_resultStandardScheme extends StandardScheme<getImageList_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getImageList_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                {
                  org.apache.thrift.protocol.TList _list282 = iprot.readListBegin();
                  struct.success = new ArrayList<ImageSummaryRead>(_list282.size);
                  ImageSummaryRead _elem283;
                  for (int _i284 = 0; _i284 < _list282.size; ++_i284)
                  {
                    _elem283 = new ImageSummaryRead();
                    _elem283.read(iprot);
                    struct.success.add(_elem283);
                  }
                  iprot.readListEnd();
                }
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // AUTH_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.authError = new TAuthorizationException();
                struct.authError.read(iprot);
                struct.setAuthErrorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // SERVER_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.serverError = new TInvocationException();
                struct.serverError.read(iprot);
                struct.setServerErrorIsSet(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, getImageList_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
            for (ImageSummaryRead _iter285 : struct.success)
            {
              _iter285.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.authError != null) {
          oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC);
          struct.authError.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.serverError != null) {
          oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC);
          struct.serverError.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getImageList_resultTupleSchemeFactory implements SchemeFactory {
      public getImageList_resultTupleScheme getScheme() {
        return new getImageList_resultTupleScheme();
      }
    }

    private static class getImageList_resultTupleScheme extends TupleScheme<getImageList_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getImageList_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetAuthError()) {
          optionals.set(1);
        }
        if (struct.isSetServerError()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (ImageSummaryRead _iter286 : struct.success)
            {
              _iter286.write(oprot);
            }
          }
        }
        if (struct.isSetAuthError()) {
          struct.authError.write(oprot);
        }
        if (struct.isSetServerError()) {
          struct.serverError.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getImageList_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          {
            org.apache.thrift.protocol.TList _list287 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
            struct.success = new ArrayList<ImageSummaryRead>(_list287.size);
            ImageSummaryRead _elem288;
            for (int _i289 = 0; _i289 < _list287.size; ++_i289)
            {
              _elem288 = new ImageSummaryRead();
              _elem288.read(iprot);
              struct.success.add(_elem288);
            }
          }
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.authError = new TAuthorizationException();
          struct.authError.read(iprot);
          struct.setAuthErrorIsSet(true);
        }
        if (incoming.get(2)) {
          struct.serverError = new TInvocationException();
          struct.serverError.read(iprot);
          struct.setServerErrorIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField IMAGE_BASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageBaseId", org.apache.thrift.protocol.TType.STRING, (short)2);

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

    public String userToken; // required
    public String imageBaseId; // 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 {
      USER_TOKEN((short)1, "userToken"),
      IMAGE_BASE_ID((short)2, "imageBaseId");

      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: // USER_TOKEN
            return USER_TOKEN;
          case 2: // IMAGE_BASE_ID
            return IMAGE_BASE_ID;
          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
    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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "Token")));
      tmpMap.put(_Fields.IMAGE_BASE_ID, new org.apache.thrift.meta_data.FieldMetaData("imageBaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "UUID")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageDetails_args.class, metaDataMap);
    }

    public getImageDetails_args() {
    }

    public getImageDetails_args(
      String userToken,
      String imageBaseId)
    {
      this();
      this.userToken = userToken;
      this.imageBaseId = imageBaseId;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getImageDetails_args(getImageDetails_args other) {
      if (other.isSetUserToken()) {
        this.userToken = other.userToken;
      }
      if (other.isSetImageBaseId()) {
        this.imageBaseId = other.imageBaseId;
      }
    }

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

    @Override
    public void clear() {
      this.userToken = null;
      this.imageBaseId = null;
    }

    public String getUserToken() {
      return this.userToken;
    }

    public getImageDetails_args setUserToken(String userToken) {
      this.userToken = userToken;
      return this;
    }

    public void unsetUserToken() {
      this.userToken = null;
    }

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

    public void setUserTokenIsSet(boolean value) {
      if (!value) {
        this.userToken = null;
      }
    }

    public String getImageBaseId() {
      return this.imageBaseId;
    }

    public getImageDetails_args setImageBaseId(String imageBaseId) {
      this.imageBaseId = imageBaseId;
      return this;
    }

    public void unsetImageBaseId() {
      this.imageBaseId = null;
    }

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

    public void setImageBaseIdIsSet(boolean value) {
      if (!value) {
        this.imageBaseId = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_TOKEN:
        if (value == null) {
          unsetUserToken();
        } else {
          setUserToken((String)value);
        }
        break;

      case IMAGE_BASE_ID:
        if (value == null) {
          unsetImageBaseId();
        } else {
          setImageBaseId((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_TOKEN:
        return getUserToken();

      case IMAGE_BASE_ID:
        return getImageBaseId();

      }
      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 USER_TOKEN:
        return isSetUserToken();
      case IMAGE_BASE_ID:
        return isSetImageBaseId();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_userToken = true && this.isSetUserToken();
      boolean that_present_userToken = true && that.isSetUserToken();
      if (this_present_userToken || that_present_userToken) {
        if (!(this_present_userToken && that_present_userToken))
          return false;
        if (!this.userToken.equals(that.userToken))
          return false;
      }

      boolean this_present_imageBaseId = true && this.isSetImageBaseId();
      boolean that_present_imageBaseId = true && that.isSetImageBaseId();
      if (this_present_imageBaseId || that_present_imageBaseId) {
        if (!(this_present_imageBaseId && that_present_imageBaseId))
          return false;
        if (!this.imageBaseId.equals(that.imageBaseId))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_userToken = true && (isSetUserToken());
      list.add(present_userToken);
      if (present_userToken)
        list.add(userToken);

      boolean present_imageBaseId = true && (isSetImageBaseId());
      list.add(present_imageBaseId);
      if (present_imageBaseId)
        list.add(imageBaseId);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserToken()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetImageBaseId()).compareTo(other.isSetImageBaseId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetImageBaseId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageBaseId, other.imageBaseId);
        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("getImageDetails_args(");
      boolean first = true;

      sb.append("userToken:");
      if (this.userToken == null) {
        sb.append("null");
      } else {
        sb.append(this.userToken);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("imageBaseId:");
      if (this.imageBaseId == null) {
        sb.append("null");
      } else {
        sb.append(this.imageBaseId);
      }
      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 {
        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 getImageDetails_argsStandardSchemeFactory implements SchemeFactory {
      public getImageDetails_argsStandardScheme getScheme() {
        return new getImageDetails_argsStandardScheme();
      }
    }

    private static class getImageDetails_argsStandardScheme extends StandardScheme<getImageDetails_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getImageDetails_args 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: // USER_TOKEN
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.userToken = iprot.readString();
                struct.setUserTokenIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // IMAGE_BASE_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.imageBaseId = iprot.readString();
                struct.setImageBaseIdIsSet(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, getImageDetails_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.userToken != null) {
          oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
          oprot.writeString(struct.userToken);
          oprot.writeFieldEnd();
        }
        if (struct.imageBaseId != null) {
          oprot.writeFieldBegin(IMAGE_BASE_ID_FIELD_DESC);
          oprot.writeString(struct.imageBaseId);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getImageDetails_argsTupleSchemeFactory implements SchemeFactory {
      public getImageDetails_argsTupleScheme getScheme() {
        return new getImageDetails_argsTupleScheme();
      }
    }

    private static class getImageDetails_argsTupleScheme extends TupleScheme<getImageDetails_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getImageDetails_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetUserToken()) {
          optionals.set(0);
        }
        if (struct.isSetImageBaseId()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetUserToken()) {
          oprot.writeString(struct.userToken);
        }
        if (struct.isSetImageBaseId()) {
          oprot.writeString(struct.imageBaseId);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getImageDetails_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.userToken = iprot.readString();
          struct.setUserTokenIsSet(true);
        }
        if (incoming.get(1)) {
          struct.imageBaseId = iprot.readString();
          struct.setImageBaseIdIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3);

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

    public ImageDetailsRead success; // required
    public TAuthorizationException authError; // required
    public TNotFoundException notFound; // required
    public TInvocationException serverError; // 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 {
      SUCCESS((short)0, "success"),
      AUTH_ERROR((short)1, "authError"),
      NOT_FOUND((short)2, "notFound"),
      SERVER_ERROR((short)3, "serverError");

      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 0: // SUCCESS
            return SUCCESS;
          case 1: // AUTH_ERROR
            return AUTH_ERROR;
          case 2: // NOT_FOUND
            return NOT_FOUND;
          case 3: // SERVER_ERROR
            return SERVER_ERROR;
          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
    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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ImageDetailsRead.class)));
      tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageDetails_result.class, metaDataMap);
    }

    public getImageDetails_result() {
    }

    public getImageDetails_result(
      ImageDetailsRead success,
      TAuthorizationException authError,
      TNotFoundException notFound,
      TInvocationException serverError)
    {
      this();
      this.success = success;
      this.authError = authError;
      this.notFound = notFound;
      this.serverError = serverError;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getImageDetails_result(getImageDetails_result other) {
      if (other.isSetSuccess()) {
        this.success = new ImageDetailsRead(other.success);
      }
      if (other.isSetAuthError()) {
        this.authError = new TAuthorizationException(other.authError);
      }
      if (other.isSetNotFound()) {
        this.notFound = new TNotFoundException(other.notFound);
      }
      if (other.isSetServerError()) {
        this.serverError = new TInvocationException(other.serverError);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.authError = null;
      this.notFound = null;
      this.serverError = null;
    }

    public ImageDetailsRead getSuccess() {
      return this.success;
    }

    public getImageDetails_result setSuccess(ImageDetailsRead success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

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

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public TAuthorizationException getAuthError() {
      return this.authError;
    }

    public getImageDetails_result setAuthError(TAuthorizationException authError) {
      this.authError = authError;
      return this;
    }

    public void unsetAuthError() {
      this.authError = null;
    }

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

    public void setAuthErrorIsSet(boolean value) {
      if (!value) {
        this.authError = null;
      }
    }

    public TNotFoundException getNotFound() {
      return this.notFound;
    }

    public getImageDetails_result setNotFound(TNotFoundException notFound) {
      this.notFound = notFound;
      return this;
    }

    public void unsetNotFound() {
      this.notFound = null;
    }

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

    public void setNotFoundIsSet(boolean value) {
      if (!value) {
        this.notFound = null;
      }
    }

    public TInvocationException getServerError() {
      return this.serverError;
    }

    public getImageDetails_result setServerError(TInvocationException serverError) {
      this.serverError = serverError;
      return this;
    }

    public void unsetServerError() {
      this.serverError = null;
    }

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

    public void setServerErrorIsSet(boolean value) {
      if (!value) {
        this.serverError = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((ImageDetailsRead)value);
        }
        break;

      case AUTH_ERROR:
        if (value == null) {
          unsetAuthError();
        } else {
          setAuthError((TAuthorizationException)value);
        }
        break;

      case NOT_FOUND:
        if (value == null) {
          unsetNotFound();
        } else {
          setNotFound((TNotFoundException)value);
        }
        break;

      case SERVER_ERROR:
        if (value == null) {
          unsetServerError();
        } else {
          setServerError((TInvocationException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case AUTH_ERROR:
        return getAuthError();

      case NOT_FOUND:
        return getNotFound();

      case SERVER_ERROR:
        return getServerError();

      }
      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 SUCCESS:
        return isSetSuccess();
      case AUTH_ERROR:
        return isSetAuthError();
      case NOT_FOUND:
        return isSetNotFound();
      case SERVER_ERROR:
        return isSetServerError();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_authError = true && this.isSetAuthError();
      boolean that_present_authError = true && that.isSetAuthError();
      if (this_present_authError || that_present_authError) {
        if (!(this_present_authError && that_present_authError))
          return false;
        if (!this.authError.equals(that.authError))
          return false;
      }

      boolean this_present_notFound = true && this.isSetNotFound();
      boolean that_present_notFound = true && that.isSetNotFound();
      if (this_present_notFound || that_present_notFound) {
        if (!(this_present_notFound && that_present_notFound))
          return false;
        if (!this.notFound.equals(that.notFound))
          return false;
      }

      boolean this_present_serverError = true && this.isSetServerError();
      boolean that_present_serverError = true && that.isSetServerError();
      if (this_present_serverError || that_present_serverError) {
        if (!(this_present_serverError && that_present_serverError))
          return false;
        if (!this.serverError.equals(that.serverError))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_authError = true && (isSetAuthError());
      list.add(present_authError);
      if (present_authError)
        list.add(authError);

      boolean present_notFound = true && (isSetNotFound());
      list.add(present_notFound);
      if (present_notFound)
        list.add(notFound);

      boolean present_serverError = true && (isSetServerError());
      list.add(present_serverError);
      if (present_serverError)
        list.add(serverError);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFound()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetServerError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError);
        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("getImageDetails_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("authError:");
      if (this.authError == null) {
        sb.append("null");
      } else {
        sb.append(this.authError);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("notFound:");
      if (this.notFound == null) {
        sb.append("null");
      } else {
        sb.append(this.notFound);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("serverError:");
      if (this.serverError == null) {
        sb.append("null");
      } else {
        sb.append(this.serverError);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (success != null) {
        success.validate();
      }
    }

    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 {
        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 getImageDetails_resultStandardSchemeFactory implements SchemeFactory {
      public getImageDetails_resultStandardScheme getScheme() {
        return new getImageDetails_resultStandardScheme();
      }
    }

    private static class getImageDetails_resultStandardScheme extends StandardScheme<getImageDetails_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getImageDetails_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new ImageDetailsRead();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // AUTH_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.authError = new TAuthorizationException();
                struct.authError.read(iprot);
                struct.setAuthErrorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // NOT_FOUND
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.notFound = new TNotFoundException();
                struct.notFound.read(iprot);
                struct.setNotFoundIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // SERVER_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.serverError = new TInvocationException();
                struct.serverError.read(iprot);
                struct.setServerErrorIsSet(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, getImageDetails_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.authError != null) {
          oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC);
          struct.authError.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.notFound != null) {
          oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC);
          struct.notFound.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.serverError != null) {
          oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC);
          struct.serverError.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getImageDetails_resultTupleSchemeFactory implements SchemeFactory {
      public getImageDetails_resultTupleScheme getScheme() {
        return new getImageDetails_resultTupleScheme();
      }
    }

    private static class getImageDetails_resultTupleScheme extends TupleScheme<getImageDetails_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getImageDetails_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetAuthError()) {
          optionals.set(1);
        }
        if (struct.isSetNotFound()) {
          optionals.set(2);
        }
        if (struct.isSetServerError()) {
          optionals.set(3);
        }
        oprot.writeBitSet(optionals, 4);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetAuthError()) {
          struct.authError.write(oprot);
        }
        if (struct.isSetNotFound()) {
          struct.notFound.write(oprot);
        }
        if (struct.isSetServerError()) {
          struct.serverError.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getImageDetails_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(4);
        if (incoming.get(0)) {
          struct.success = new ImageDetailsRead();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.authError = new TAuthorizationException();
          struct.authError.read(iprot);
          struct.setAuthErrorIsSet(true);
        }
        if (incoming.get(2)) {
          struct.notFound = new TNotFoundException();
          struct.notFound.read(iprot);
          struct.setNotFoundIsSet(true);
        }
        if (incoming.get(3)) {
          struct.serverError = new TInvocationException();
          struct.serverError.read(iprot);
          struct.setServerErrorIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField IMAGE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("imageName", org.apache.thrift.protocol.TType.STRING, (short)2);

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

    public String userToken; // required
    public String imageName; // 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 {
      USER_TOKEN((short)1, "userToken"),
      IMAGE_NAME((short)2, "imageName");

      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: // USER_TOKEN
            return USER_TOKEN;
          case 2: // IMAGE_NAME
            return IMAGE_NAME;
          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
    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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "Token")));
      tmpMap.put(_Fields.IMAGE_NAME, new org.apache.thrift.meta_data.FieldMetaData("imageName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createImage_args.class, metaDataMap);
    }

    public createImage_args() {
    }

    public createImage_args(
      String userToken,
      String imageName)
    {
      this();
      this.userToken = userToken;
      this.imageName = imageName;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public createImage_args(createImage_args other) {
      if (other.isSetUserToken()) {
        this.userToken = other.userToken;
      }
      if (other.isSetImageName()) {
        this.imageName = other.imageName;
      }
    }

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

    @Override
    public void clear() {
      this.userToken = null;
      this.imageName = null;
    }

    public String getUserToken() {
      return this.userToken;
    }

    public createImage_args setUserToken(String userToken) {
      this.userToken = userToken;
      return this;
    }

    public void unsetUserToken() {
      this.userToken = null;
    }

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

    public void setUserTokenIsSet(boolean value) {
      if (!value) {
        this.userToken = null;
      }
    }

    public String getImageName() {
      return this.imageName;
    }

    public createImage_args setImageName(String imageName) {
      this.imageName = imageName;
      return this;
    }

    public void unsetImageName() {
      this.imageName = null;
    }

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

    public void setImageNameIsSet(boolean value) {
      if (!value) {
        this.imageName = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_TOKEN:
        if (value == null) {
          unsetUserToken();
        } else {
          setUserToken((String)value);
        }
        break;

      case IMAGE_NAME:
        if (value == null) {
          unsetImageName();
        } else {
          setImageName((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_TOKEN:
        return getUserToken();

      case IMAGE_NAME:
        return getImageName();

      }
      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 USER_TOKEN:
        return isSetUserToken();
      case IMAGE_NAME:
        return isSetImageName();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_userToken = true && this.isSetUserToken();
      boolean that_present_userToken = true && that.isSetUserToken();
      if (this_present_userToken || that_present_userToken) {
        if (!(this_present_userToken && that_present_userToken))
          return false;
        if (!this.userToken.equals(that.userToken))
          return false;
      }

      boolean this_present_imageName = true && this.isSetImageName();
      boolean that_present_imageName = true && that.isSetImageName();
      if (this_present_imageName || that_present_imageName) {
        if (!(this_present_imageName && that_present_imageName))
          return false;
        if (!this.imageName.equals(that.imageName))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_userToken = true && (isSetUserToken());
      list.add(present_userToken);
      if (present_userToken)
        list.add(userToken);

      boolean present_imageName = true && (isSetImageName());
      list.add(present_imageName);
      if (present_imageName)
        list.add(imageName);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserToken()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetImageName()).compareTo(other.isSetImageName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetImageName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageName, other.imageName);
        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("createImage_args(");
      boolean first = true;

      sb.append("userToken:");
      if (this.userToken == null) {
        sb.append("null");
      } else {
        sb.append(this.userToken);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("imageName:");
      if (this.imageName == null) {
        sb.append("null");
      } else {
        sb.append(this.imageName);
      }
      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 {
        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 createImage_argsStandardSchemeFactory implements SchemeFactory {
      public createImage_argsStandardScheme getScheme() {
        return new createImage_argsStandardScheme();
      }
    }

    private static class createImage_argsStandardScheme extends StandardScheme<createImage_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, createImage_args 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: // USER_TOKEN
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.userToken = iprot.readString();
                struct.setUserTokenIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // IMAGE_NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.imageName = iprot.readString();
                struct.setImageNameIsSet(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, createImage_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.userToken != null) {
          oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
          oprot.writeString(struct.userToken);
          oprot.writeFieldEnd();
        }
        if (struct.imageName != null) {
          oprot.writeFieldBegin(IMAGE_NAME_FIELD_DESC);
          oprot.writeString(struct.imageName);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class createImage_argsTupleSchemeFactory implements SchemeFactory {
      public createImage_argsTupleScheme getScheme() {
        return new createImage_argsTupleScheme();
      }
    }

    private static class createImage_argsTupleScheme extends TupleScheme<createImage_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, createImage_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetUserToken()) {
          optionals.set(0);
        }
        if (struct.isSetImageName()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetUserToken()) {
          oprot.writeString(struct.userToken);
        }
        if (struct.isSetImageName()) {
          oprot.writeString(struct.imageName);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, createImage_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.userToken = iprot.readString();
          struct.setUserTokenIsSet(true);
        }
        if (incoming.get(1)) {
          struct.imageName = iprot.readString();
          struct.setImageNameIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
    private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("error", org.apache.thrift.protocol.TType.STRUCT, (short)2);

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

    public String success; // required
    public TAuthorizationException authError; // required
    public TInvocationException error; // 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 {
      SUCCESS((short)0, "success"),
      AUTH_ERROR((short)1, "authError"),
      ERROR((short)2, "error");

      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 0: // SUCCESS
            return SUCCESS;
          case 1: // AUTH_ERROR
            return AUTH_ERROR;
          case 2: // ERROR
            return ERROR;
          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
    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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "UUID")));
      tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.ERROR, new org.apache.thrift.meta_data.FieldMetaData("error", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createImage_result.class, metaDataMap);
    }

    public createImage_result() {
    }

    public createImage_result(
      String success,
      TAuthorizationException authError,
      TInvocationException error)
    {
      this();
      this.success = success;
      this.authError = authError;
      this.error = error;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public createImage_result(createImage_result other) {
      if (other.isSetSuccess()) {
        this.success = other.success;
      }
      if (other.isSetAuthError()) {
        this.authError = new TAuthorizationException(other.authError);
      }
      if (other.isSetError()) {
        this.error = new TInvocationException(other.error);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.authError = null;
      this.error = null;
    }

    public String getSuccess() {
      return this.success;
    }

    public createImage_result setSuccess(String success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

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

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public TAuthorizationException getAuthError() {
      return this.authError;
    }

    public createImage_result setAuthError(TAuthorizationException authError) {
      this.authError = authError;
      return this;
    }

    public void unsetAuthError() {
      this.authError = null;
    }

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

    public void setAuthErrorIsSet(boolean value) {
      if (!value) {
        this.authError = null;
      }
    }

    public TInvocationException getError() {
      return this.error;
    }

    public createImage_result setError(TInvocationException error) {
      this.error = error;
      return this;
    }

    public void unsetError() {
      this.error = null;
    }

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

    public void setErrorIsSet(boolean value) {
      if (!value) {
        this.error = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((String)value);
        }
        break;

      case AUTH_ERROR:
        if (value == null) {
          unsetAuthError();
        } else {
          setAuthError((TAuthorizationException)value);
        }
        break;

      case ERROR:
        if (value == null) {
          unsetError();
        } else {
          setError((TInvocationException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case AUTH_ERROR:
        return getAuthError();

      case ERROR:
        return getError();

      }
      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 SUCCESS:
        return isSetSuccess();
      case AUTH_ERROR:
        return isSetAuthError();
      case ERROR:
        return isSetError();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_authError = true && this.isSetAuthError();
      boolean that_present_authError = true && that.isSetAuthError();
      if (this_present_authError || that_present_authError) {
        if (!(this_present_authError && that_present_authError))
          return false;
        if (!this.authError.equals(that.authError))
          return false;
      }

      boolean this_present_error = true && this.isSetError();
      boolean that_present_error = true && that.isSetError();
      if (this_present_error || that_present_error) {
        if (!(this_present_error && that_present_error))
          return false;
        if (!this.error.equals(that.error))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_authError = true && (isSetAuthError());
      list.add(present_authError);
      if (present_authError)
        list.add(authError);

      boolean present_error = true && (isSetError());
      list.add(present_error);
      if (present_error)
        list.add(error);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetError()).compareTo(other.isSetError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.error, other.error);
        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("createImage_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("authError:");
      if (this.authError == null) {
        sb.append("null");
      } else {
        sb.append(this.authError);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("error:");
      if (this.error == null) {
        sb.append("null");
      } else {
        sb.append(this.error);
      }
      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 {
        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 createImage_resultStandardSchemeFactory implements SchemeFactory {
      public createImage_resultStandardScheme getScheme() {
        return new createImage_resultStandardScheme();
      }
    }

    private static class createImage_resultStandardScheme extends StandardScheme<createImage_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, createImage_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.success = iprot.readString();
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // AUTH_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.authError = new TAuthorizationException();
                struct.authError.read(iprot);
                struct.setAuthErrorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.error = new TInvocationException();
                struct.error.read(iprot);
                struct.setErrorIsSet(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, createImage_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          oprot.writeString(struct.success);
          oprot.writeFieldEnd();
        }
        if (struct.authError != null) {
          oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC);
          struct.authError.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.error != null) {
          oprot.writeFieldBegin(ERROR_FIELD_DESC);
          struct.error.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class createImage_resultTupleSchemeFactory implements SchemeFactory {
      public createImage_resultTupleScheme getScheme() {
        return new createImage_resultTupleScheme();
      }
    }

    private static class createImage_resultTupleScheme extends TupleScheme<createImage_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, createImage_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetAuthError()) {
          optionals.set(1);
        }
        if (struct.isSetError()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetSuccess()) {
          oprot.writeString(struct.success);
        }
        if (struct.isSetAuthError()) {
          struct.authError.write(oprot);
        }
        if (struct.isSetError()) {
          struct.error.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, createImage_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.success = iprot.readString();
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.authError = new TAuthorizationException();
          struct.authError.read(iprot);
          struct.setAuthErrorIsSet(true);
        }
        if (incoming.get(2)) {
          struct.error = new TInvocationException();
          struct.error.read(iprot);
          struct.setErrorIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField IMAGE_BASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageBaseId", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField IMAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("image", org.apache.thrift.protocol.TType.STRUCT, (short)3);

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

    public String userToken; // required
    public String imageBaseId; // required
    public ImageBaseWrite image; // 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 {
      USER_TOKEN((short)1, "userToken"),
      IMAGE_BASE_ID((short)2, "imageBaseId"),
      IMAGE((short)3, "image");

      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: // USER_TOKEN
            return USER_TOKEN;
          case 2: // IMAGE_BASE_ID
            return IMAGE_BASE_ID;
          case 3: // IMAGE
            return IMAGE;
          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
    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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "Token")));
      tmpMap.put(_Fields.IMAGE_BASE_ID, new org.apache.thrift.meta_data.FieldMetaData("imageBaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "UUID")));
      tmpMap.put(_Fields.IMAGE, new org.apache.thrift.meta_data.FieldMetaData("image", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ImageBaseWrite.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateImageBase_args.class, metaDataMap);
    }

    public updateImageBase_args() {
    }

    public updateImageBase_args(
      String userToken,
      String imageBaseId,
      ImageBaseWrite image)
    {
      this();
      this.userToken = userToken;
      this.imageBaseId = imageBaseId;
      this.image = image;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updateImageBase_args(updateImageBase_args other) {
      if (other.isSetUserToken()) {
        this.userToken = other.userToken;
      }
      if (other.isSetImageBaseId()) {
        this.imageBaseId = other.imageBaseId;
      }
      if (other.isSetImage()) {
        this.image = new ImageBaseWrite(other.image);
      }
    }

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

    @Override
    public void clear() {
      this.userToken = null;
      this.imageBaseId = null;
      this.image = null;
    }

    public String getUserToken() {
      return this.userToken;
    }

    public updateImageBase_args setUserToken(String userToken) {
      this.userToken = userToken;
      return this;
    }

    public void unsetUserToken() {
      this.userToken = null;
    }

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

    public void setUserTokenIsSet(boolean value) {
      if (!value) {
        this.userToken = null;
      }
    }

    public String getImageBaseId() {
      return this.imageBaseId;
    }

    public updateImageBase_args setImageBaseId(String imageBaseId) {
      this.imageBaseId = imageBaseId;
      return this;
    }

    public void unsetImageBaseId() {
      this.imageBaseId = null;
    }

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

    public void setImageBaseIdIsSet(boolean value) {
      if (!value) {
        this.imageBaseId = null;
      }
    }

    public ImageBaseWrite getImage() {
      return this.image;
    }

    public updateImageBase_args setImage(ImageBaseWrite image) {
      this.image = image;
      return this;
    }

    public void unsetImage() {
      this.image = null;
    }

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

    public void setImageIsSet(boolean value) {
      if (!value) {
        this.image = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_TOKEN:
        if (value == null) {
          unsetUserToken();
        } else {
          setUserToken((String)value);
        }
        break;

      case IMAGE_BASE_ID:
        if (value == null) {
          unsetImageBaseId();
        } else {
          setImageBaseId((String)value);
        }
        break;

      case IMAGE:
        if (value == null) {
          unsetImage();
        } else {
          setImage((ImageBaseWrite)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_TOKEN:
        return getUserToken();

      case IMAGE_BASE_ID:
        return getImageBaseId();

      case IMAGE:
        return getImage();

      }
      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 USER_TOKEN:
        return isSetUserToken();
      case IMAGE_BASE_ID:
        return isSetImageBaseId();
      case IMAGE:
        return isSetImage();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_userToken = true && this.isSetUserToken();
      boolean that_present_userToken = true && that.isSetUserToken();
      if (this_present_userToken || that_present_userToken) {
        if (!(this_present_userToken && that_present_userToken))
          return false;
        if (!this.userToken.equals(that.userToken))
          return false;
      }

      boolean this_present_imageBaseId = true && this.isSetImageBaseId();
      boolean that_present_imageBaseId = true && that.isSetImageBaseId();
      if (this_present_imageBaseId || that_present_imageBaseId) {
        if (!(this_present_imageBaseId && that_present_imageBaseId))
          return false;
        if (!this.imageBaseId.equals(that.imageBaseId))
          return false;
      }

      boolean this_present_image = true && this.isSetImage();
      boolean that_present_image = true && that.isSetImage();
      if (this_present_image || that_present_image) {
        if (!(this_present_image && that_present_image))
          return false;
        if (!this.image.equals(that.image))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_userToken = true && (isSetUserToken());
      list.add(present_userToken);
      if (present_userToken)
        list.add(userToken);

      boolean present_imageBaseId = true && (isSetImageBaseId());
      list.add(present_imageBaseId);
      if (present_imageBaseId)
        list.add(imageBaseId);

      boolean present_image = true && (isSetImage());
      list.add(present_image);
      if (present_image)
        list.add(image);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserToken()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetImageBaseId()).compareTo(other.isSetImageBaseId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetImageBaseId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageBaseId, other.imageBaseId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetImage()).compareTo(other.isSetImage());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetImage()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.image, other.image);
        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("updateImageBase_args(");
      boolean first = true;

      sb.append("userToken:");
      if (this.userToken == null) {
        sb.append("null");
      } else {
        sb.append(this.userToken);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("imageBaseId:");
      if (this.imageBaseId == null) {
        sb.append("null");
      } else {
        sb.append(this.imageBaseId);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("image:");
      if (this.image == null) {
        sb.append("null");
      } else {
        sb.append(this.image);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (image != null) {
        image.validate();
      }
    }

    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 {
        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 updateImageBase_argsStandardSchemeFactory implements SchemeFactory {
      public updateImageBase_argsStandardScheme getScheme() {
        return new updateImageBase_argsStandardScheme();
      }
    }

    private static class updateImageBase_argsStandardScheme extends StandardScheme<updateImageBase_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, updateImageBase_args 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: // USER_TOKEN
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.userToken = iprot.readString();
                struct.setUserTokenIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // IMAGE_BASE_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.imageBaseId = iprot.readString();
                struct.setImageBaseIdIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // IMAGE
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.image = new ImageBaseWrite();
                struct.image.read(iprot);
                struct.setImageIsSet(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, updateImageBase_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.userToken != null) {
          oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
          oprot.writeString(struct.userToken);
          oprot.writeFieldEnd();
        }
        if (struct.imageBaseId != null) {
          oprot.writeFieldBegin(IMAGE_BASE_ID_FIELD_DESC);
          oprot.writeString(struct.imageBaseId);
          oprot.writeFieldEnd();
        }
        if (struct.image != null) {
          oprot.writeFieldBegin(IMAGE_FIELD_DESC);
          struct.image.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class updateImageBase_argsTupleSchemeFactory implements SchemeFactory {
      public updateImageBase_argsTupleScheme getScheme() {
        return new updateImageBase_argsTupleScheme();
      }
    }

    private static class updateImageBase_argsTupleScheme extends TupleScheme<updateImageBase_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, updateImageBase_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetUserToken()) {
          optionals.set(0);
        }
        if (struct.isSetImageBaseId()) {
          optionals.set(1);
        }
        if (struct.isSetImage()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetUserToken()) {
          oprot.writeString(struct.userToken);
        }
        if (struct.isSetImageBaseId()) {
          oprot.writeString(struct.imageBaseId);
        }
        if (struct.isSetImage()) {
          struct.image.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, updateImageBase_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.userToken = iprot.readString();
          struct.setUserTokenIsSet(true);
        }
        if (incoming.get(1)) {
          struct.imageBaseId = iprot.readString();
          struct.setImageBaseIdIsSet(true);
        }
        if (incoming.get(2)) {
          struct.image = new ImageBaseWrite();
          struct.image.read(iprot);
          struct.setImageIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField IMG_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("imgError", org.apache.thrift.protocol.TType.STRUCT, (short)3);

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

    public TAuthorizationException authError; // required
    public TNotFoundException notFound; // required
    public TInvocationException imgError; // 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 {
      AUTH_ERROR((short)1, "authError"),
      NOT_FOUND((short)2, "notFound"),
      IMG_ERROR((short)3, "imgError");

      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: // AUTH_ERROR
            return AUTH_ERROR;
          case 2: // NOT_FOUND
            return NOT_FOUND;
          case 3: // IMG_ERROR
            return IMG_ERROR;
          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
    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.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.IMG_ERROR, new org.apache.thrift.meta_data.FieldMetaData("imgError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateImageBase_result.class, metaDataMap);
    }

    public updateImageBase_result() {
    }

    public updateImageBase_result(
      TAuthorizationException authError,
      TNotFoundException notFound,
      TInvocationException imgError)
    {
      this();
      this.authError = authError;
      this.notFound = notFound;
      this.imgError = imgError;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updateImageBase_result(updateImageBase_result other) {
      if (other.isSetAuthError()) {
        this.authError = new TAuthorizationException(other.authError);
      }
      if (other.isSetNotFound()) {
        this.notFound = new TNotFoundException(other.notFound);
      }
      if (other.isSetImgError()) {
        this.imgError = new TInvocationException(other.imgError);
      }
    }

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

    @Override
    public void clear() {
      this.authError = null;
      this.notFound = null;
      this.imgError = null;
    }

    public TAuthorizationException getAuthError() {
      return this.authError;
    }

    public updateImageBase_result setAuthError(TAuthorizationException authError) {
      this.authError = authError;
      return this;
    }

    public void unsetAuthError() {
      this.authError = null;
    }

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

    public void setAuthErrorIsSet(boolean value) {
      if (!value) {
        this.authError = null;
      }
    }

    public TNotFoundException getNotFound() {
      return this.notFound;
    }

    public updateImageBase_result setNotFound(TNotFoundException notFound) {
      this.notFound = notFound;
      return this;
    }

    public void unsetNotFound() {
      this.notFound = null;
    }

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

    public void setNotFoundIsSet(boolean value) {
      if (!value) {
        this.notFound = null;
      }
    }

    public TInvocationException getImgError() {
      return this.imgError;
    }

    public updateImageBase_result setImgError(TInvocationException imgError) {
      this.imgError = imgError;
      return this;
    }

    public void unsetImgError() {
      this.imgError = null;
    }

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

    public void setImgErrorIsSet(boolean value) {
      if (!value) {
        this.imgError = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case AUTH_ERROR:
        if (value == null) {
          unsetAuthError();
        } else {
          setAuthError((TAuthorizationException)value);
        }
        break;

      case NOT_FOUND:
        if (value == null) {
          unsetNotFound();
        } else {
          setNotFound((TNotFoundException)value);
        }
        break;

      case IMG_ERROR:
        if (value == null) {
          unsetImgError();
        } else {
          setImgError((TInvocationException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case AUTH_ERROR:
        return getAuthError();

      case NOT_FOUND:
        return getNotFound();

      case IMG_ERROR:
        return getImgError();

      }
      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 AUTH_ERROR:
        return isSetAuthError();
      case NOT_FOUND:
        return isSetNotFound();
      case IMG_ERROR:
        return isSetImgError();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_authError = true && this.isSetAuthError();
      boolean that_present_authError = true && that.isSetAuthError();
      if (this_present_authError || that_present_authError) {
        if (!(this_present_authError && that_present_authError))
          return false;
        if (!this.authError.equals(that.authError))
          return false;
      }

      boolean this_present_notFound = true && this.isSetNotFound();
      boolean that_present_notFound = true && that.isSetNotFound();
      if (this_present_notFound || that_present_notFound) {
        if (!(this_present_notFound && that_present_notFound))
          return false;
        if (!this.notFound.equals(that.notFound))
          return false;
      }

      boolean this_present_imgError = true && this.isSetImgError();
      boolean that_present_imgError = true && that.isSetImgError();
      if (this_present_imgError || that_present_imgError) {
        if (!(this_present_imgError && that_present_imgError))
          return false;
        if (!this.imgError.equals(that.imgError))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_authError = true && (isSetAuthError());
      list.add(present_authError);
      if (present_authError)
        list.add(authError);

      boolean present_notFound = true && (isSetNotFound());
      list.add(present_notFound);
      if (present_notFound)
        list.add(notFound);

      boolean present_imgError = true && (isSetImgError());
      list.add(present_imgError);
      if (present_imgError)
        list.add(imgError);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFound()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetImgError()).compareTo(other.isSetImgError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetImgError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imgError, other.imgError);
        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("updateImageBase_result(");
      boolean first = true;

      sb.append("authError:");
      if (this.authError == null) {
        sb.append("null");
      } else {
        sb.append(this.authError);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("notFound:");
      if (this.notFound == null) {
        sb.append("null");
      } else {
        sb.append(this.notFound);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("imgError:");
      if (this.imgError == null) {
        sb.append("null");
      } else {
        sb.append(this.imgError);
      }
      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 {
        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 updateImageBase_resultStandardSchemeFactory implements SchemeFactory {
      public updateImageBase_resultStandardScheme getScheme() {
        return new updateImageBase_resultStandardScheme();
      }
    }

    private static class updateImageBase_resultStandardScheme extends StandardScheme<updateImageBase_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, updateImageBase_result 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: // AUTH_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.authError = new TAuthorizationException();
                struct.authError.read(iprot);
                struct.setAuthErrorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // NOT_FOUND
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.notFound = new TNotFoundException();
                struct.notFound.read(iprot);
                struct.setNotFoundIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // IMG_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.imgError = new TInvocationException();
                struct.imgError.read(iprot);
                struct.setImgErrorIsSet(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, updateImageBase_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.authError != null) {
          oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC);
          struct.authError.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.notFound != null) {
          oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC);
          struct.notFound.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.imgError != null) {
          oprot.writeFieldBegin(IMG_ERROR_FIELD_DESC);
          struct.imgError.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class updateImageBase_resultTupleSchemeFactory implements SchemeFactory {
      public updateImageBase_resultTupleScheme getScheme() {
        return new updateImageBase_resultTupleScheme();
      }
    }

    private static class updateImageBase_resultTupleScheme extends TupleScheme<updateImageBase_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, updateImageBase_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetAuthError()) {
          optionals.set(0);
        }
        if (struct.isSetNotFound()) {
          optionals.set(1);
        }
        if (struct.isSetImgError()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetAuthError()) {
          struct.authError.write(oprot);
        }
        if (struct.isSetNotFound()) {
          struct.notFound.write(oprot);
        }
        if (struct.isSetImgError()) {
          struct.imgError.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, updateImageBase_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.authError = new TAuthorizationException();
          struct.authError.read(iprot);
          struct.setAuthErrorIsSet(true);
        }
        if (incoming.get(1)) {
          struct.notFound = new TNotFoundException();
          struct.notFound.read(iprot);
          struct.setNotFoundIsSet(true);
        }
        if (incoming.get(2)) {
          struct.imgError = new TInvocationException();
          struct.imgError.read(iprot);
          struct.setImgErrorIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField IMAGE_VERSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageVersionId", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField IMAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("image", org.apache.thrift.protocol.TType.STRUCT, (short)3);

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

    public String userToken; // required
    public String imageVersionId; // required
    public ImageVersionWrite image; // 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 {
      USER_TOKEN((short)1, "userToken"),
      IMAGE_VERSION_ID((short)2, "imageVersionId"),
      IMAGE((short)3, "image");

      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: // USER_TOKEN
            return USER_TOKEN;
          case 2: // IMAGE_VERSION_ID
            return IMAGE_VERSION_ID;
          case 3: // IMAGE
            return IMAGE;
          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
    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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "Token")));
      tmpMap.put(_Fields.IMAGE_VERSION_ID, new org.apache.thrift.meta_data.FieldMetaData("imageVersionId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "UUID")));
      tmpMap.put(_Fields.IMAGE, new org.apache.thrift.meta_data.FieldMetaData("image", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ImageVersionWrite.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateImageVersion_args.class, metaDataMap);
    }

    public updateImageVersion_args() {
    }

    public updateImageVersion_args(
      String userToken,
      String imageVersionId,
      ImageVersionWrite image)
    {
      this();
      this.userToken = userToken;
      this.imageVersionId = imageVersionId;
      this.image = image;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updateImageVersion_args(updateImageVersion_args other) {
      if (other.isSetUserToken()) {
        this.userToken = other.userToken;
      }
      if (other.isSetImageVersionId()) {
        this.imageVersionId = other.imageVersionId;
      }
      if (other.isSetImage()) {
        this.image = new ImageVersionWrite(other.image);
      }
    }

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

    @Override
    public void clear() {
      this.userToken = null;
      this.imageVersionId = null;
      this.image = null;
    }

    public String getUserToken() {
      return this.userToken;
    }

    public updateImageVersion_args setUserToken(String userToken) {
      this.userToken = userToken;
      return this;
    }

    public void unsetUserToken() {
      this.userToken = null;
    }

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

    public void setUserTokenIsSet(boolean value) {
      if (!value) {
        this.userToken = null;
      }
    }

    public String getImageVersionId() {
      return this.imageVersionId;
    }

    public updateImageVersion_args setImageVersionId(String imageVersionId) {
      this.imageVersionId = imageVersionId;
      return this;
    }

    public void unsetImageVersionId() {
      this.imageVersionId = null;
    }

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

    public void setImageVersionIdIsSet(boolean value) {
      if (!value) {
        this.imageVersionId = null;
      }
    }

    public ImageVersionWrite getImage() {
      return this.image;
    }

    public updateImageVersion_args setImage(ImageVersionWrite image) {
      this.image = image;
      return this;
    }

    public void unsetImage() {
      this.image = null;
    }

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

    public void setImageIsSet(boolean value) {
      if (!value) {
        this.image = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_TOKEN:
        if (value == null) {
          unsetUserToken();
        } else {
          setUserToken((String)value);
        }
        break;

      case IMAGE_VERSION_ID:
        if (value == null) {
          unsetImageVersionId();
        } else {
          setImageVersionId((String)value);
        }
        break;

      case IMAGE:
        if (value == null) {
          unsetImage();
        } else {
          setImage((ImageVersionWrite)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_TOKEN:
        return getUserToken();

      case IMAGE_VERSION_ID:
        return getImageVersionId();

      case IMAGE:
        return getImage();

      }
      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 USER_TOKEN:
        return isSetUserToken();
      case IMAGE_VERSION_ID:
        return isSetImageVersionId();
      case IMAGE:
        return isSetImage();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_userToken = true && this.isSetUserToken();
      boolean that_present_userToken = true && that.isSetUserToken();
      if (this_present_userToken || that_present_userToken) {
        if (!(this_present_userToken && that_present_userToken))
          return false;
        if (!this.userToken.equals(that.userToken))
          return false;
      }

      boolean this_present_imageVersionId = true && this.isSetImageVersionId();
      boolean that_present_imageVersionId = true && that.isSetImageVersionId();
      if (this_present_imageVersionId || that_present_imageVersionId) {
        if (!(this_present_imageVersionId && that_present_imageVersionId))
          return false;
        if (!this.imageVersionId.equals(that.imageVersionId))
          return false;
      }

      boolean this_present_image = true && this.isSetImage();
      boolean that_present_image = true && that.isSetImage();
      if (this_present_image || that_present_image) {
        if (!(this_present_image && that_present_image))
          return false;
        if (!this.image.equals(that.image))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_userToken = true && (isSetUserToken());
      list.add(present_userToken);
      if (present_userToken)
        list.add(userToken);

      boolean present_imageVersionId = true && (isSetImageVersionId());
      list.add(present_imageVersionId);
      if (present_imageVersionId)
        list.add(imageVersionId);

      boolean present_image = true && (isSetImage());
      list.add(present_image);
      if (present_image)
        list.add(image);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserToken()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetImageVersionId()).compareTo(other.isSetImageVersionId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetImageVersionId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageVersionId, other.imageVersionId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetImage()).compareTo(other.isSetImage());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetImage()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.image, other.image);
        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("updateImageVersion_args(");
      boolean first = true;

      sb.append("userToken:");
      if (this.userToken == null) {
        sb.append("null");
      } else {
        sb.append(this.userToken);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("imageVersionId:");
      if (this.imageVersionId == null) {
        sb.append("null");
      } else {
        sb.append(this.imageVersionId);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("image:");
      if (this.image == null) {
        sb.append("null");
      } else {
        sb.append(this.image);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (image != null) {
        image.validate();
      }
    }

    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 {
        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 updateImageVersion_argsStandardSchemeFactory implements SchemeFactory {
      public updateImageVersion_argsStandardScheme getScheme() {
        return new updateImageVersion_argsStandardScheme();
      }
    }

    private static class updateImageVersion_argsStandardScheme extends StandardScheme<updateImageVersion_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, updateImageVersion_args 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: // USER_TOKEN
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.userToken = iprot.readString();
                struct.setUserTokenIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // IMAGE_VERSION_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.imageVersionId = iprot.readString();
                struct.setImageVersionIdIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // IMAGE
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.image = new ImageVersionWrite();
                struct.image.read(iprot);
                struct.setImageIsSet(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, updateImageVersion_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.userToken != null) {
          oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
          oprot.writeString(struct.userToken);
          oprot.writeFieldEnd();
        }
        if (struct.imageVersionId != null) {
          oprot.writeFieldBegin(IMAGE_VERSION_ID_FIELD_DESC);
          oprot.writeString(struct.imageVersionId);
          oprot.writeFieldEnd();
        }
        if (struct.image != null) {
          oprot.writeFieldBegin(IMAGE_FIELD_DESC);
          struct.image.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class updateImageVersion_argsTupleSchemeFactory implements SchemeFactory {
      public updateImageVersion_argsTupleScheme getScheme() {
        return new updateImageVersion_argsTupleScheme();
      }
    }

    private static class updateImageVersion_argsTupleScheme extends TupleScheme<updateImageVersion_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, updateImageVersion_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetUserToken()) {
          optionals.set(0);
        }
        if (struct.isSetImageVersionId()) {
          optionals.set(1);
        }
        if (struct.isSetImage()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetUserToken()) {
          oprot.writeString(struct.userToken);
        }
        if (struct.isSetImageVersionId()) {
          oprot.writeString(struct.imageVersionId);
        }
        if (struct.isSetImage()) {
          struct.image.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, updateImageVersion_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.userToken = iprot.readString();
          struct.setUserTokenIsSet(true);
        }
        if (incoming.get(1)) {
          struct.imageVersionId = iprot.readString();
          struct.setImageVersionIdIsSet(true);
        }
        if (incoming.get(2)) {
          struct.image = new ImageVersionWrite();
          struct.image.read(iprot);
          struct.setImageIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField IMG_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("imgError", org.apache.thrift.protocol.TType.STRUCT, (short)3);

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

    public TAuthorizationException authError; // required
    public TNotFoundException notFound; // required
    public TInvocationException imgError; // 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 {
      AUTH_ERROR((short)1, "authError"),
      NOT_FOUND((short)2, "notFound"),
      IMG_ERROR((short)3, "imgError");

      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: // AUTH_ERROR
            return AUTH_ERROR;
          case 2: // NOT_FOUND
            return NOT_FOUND;
          case 3: // IMG_ERROR
            return IMG_ERROR;
          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
    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.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.IMG_ERROR, new org.apache.thrift.meta_data.FieldMetaData("imgError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateImageVersion_result.class, metaDataMap);
    }

    public updateImageVersion_result() {
    }

    public updateImageVersion_result(
      TAuthorizationException authError,
      TNotFoundException notFound,
      TInvocationException imgError)
    {
      this();
      this.authError = authError;
      this.notFound = notFound;
      this.imgError = imgError;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updateImageVersion_result(updateImageVersion_result other) {
      if (other.isSetAuthError()) {
        this.authError = new TAuthorizationException(other.authError);
      }
      if (other.isSetNotFound()) {
        this.notFound = new TNotFoundException(other.notFound);
      }
      if (other.isSetImgError()) {
        this.imgError = new TInvocationException(other.imgError);
      }
    }

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

    @Override
    public void clear() {
      this.authError = null;
      this.notFound = null;
      this.imgError = null;
    }

    public TAuthorizationException getAuthError() {
      return this.authError;
    }

    public updateImageVersion_result setAuthError(TAuthorizationException authError) {
      this.authError = authError;
      return this;
    }

    public void unsetAuthError() {
      this.authError = null;
    }

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

    public void setAuthErrorIsSet(boolean value) {
      if (!value) {
        this.authError = null;
      }
    }

    public TNotFoundException getNotFound() {
      return this.notFound;
    }

    public updateImageVersion_result setNotFound(TNotFoundException notFound) {
      this.notFound = notFound;
      return this;
    }

    public void unsetNotFound() {
      this.notFound = null;
    }

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

    public void setNotFoundIsSet(boolean value) {
      if (!value) {
        this.notFound = null;
      }
    }

    public TInvocationException getImgError() {
      return this.imgError;
    }

    public updateImageVersion_result setImgError(TInvocationException imgError) {
      this.imgError = imgError;
      return this;
    }

    public void unsetImgError() {
      this.imgError = null;
    }

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

    public void setImgErrorIsSet(boolean value) {
      if (!value) {
        this.imgError = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case AUTH_ERROR:
        if (value == null) {
          unsetAuthError();
        } else {
          setAuthError((TAuthorizationException)value);
        }
        break;

      case NOT_FOUND:
        if (value == null) {
          unsetNotFound();
        } else {
          setNotFound((TNotFoundException)value);
        }
        break;

      case IMG_ERROR:
        if (value == null) {
          unsetImgError();
        } else {
          setImgError((TInvocationException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case AUTH_ERROR:
        return getAuthError();

      case NOT_FOUND:
        return getNotFound();

      case IMG_ERROR:
        return getImgError();

      }
      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 AUTH_ERROR:
        return isSetAuthError();
      case NOT_FOUND:
        return isSetNotFound();
      case IMG_ERROR:
        return isSetImgError();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_authError = true && this.isSetAuthError();
      boolean that_present_authError = true && that.isSetAuthError();
      if (this_present_authError || that_present_authError) {
        if (!(this_present_authError && that_present_authError))
          return false;
        if (!this.authError.equals(that.authError))
          return false;
      }

      boolean this_present_notFound = true && this.isSetNotFound();
      boolean that_present_notFound = true && that.isSetNotFound();
      if (this_present_notFound || that_present_notFound) {
        if (!(this_present_notFound && that_present_notFound))
          return false;
        if (!this.notFound.equals(that.notFound))
          return false;
      }

      boolean this_present_imgError = true && this.isSetImgError();
      boolean that_present_imgError = true && that.isSetImgError();
      if (this_present_imgError || that_present_imgError) {
        if (!(this_present_imgError && that_present_imgError))
          return false;
        if (!this.imgError.equals(that.imgError))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_authError = true && (isSetAuthError());
      list.add(present_authError);
      if (present_authError)
        list.add(authError);

      boolean present_notFound = true && (isSetNotFound());
      list.add(present_notFound);
      if (present_notFound)
        list.add(notFound);

      boolean present_imgError = true && (isSetImgError());
      list.add(present_imgError);
      if (present_imgError)
        list.add(imgError);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFound()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetImgError()).compareTo(other.isSetImgError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetImgError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imgError, other.imgError);
        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("updateImageVersion_result(");
      boolean first = true;

      sb.append("authError:");
      if (this.authError == null) {
        sb.append("null");
      } else {
        sb.append(this.authError);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("notFound:");
      if (this.notFound == null) {
        sb.append("null");
      } else {
        sb.append(this.notFound);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("imgError:");
      if (this.imgError == null) {
        sb.append("null");
      } else {
        sb.append(this.imgError);
      }
      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 {
        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 updateImageVersion_resultStandardSchemeFactory implements SchemeFactory {
      public updateImageVersion_resultStandardScheme getScheme() {
        return new updateImageVersion_resultStandardScheme();
      }
    }

    private static class updateImageVersion_resultStandardScheme extends StandardScheme<updateImageVersion_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, updateImageVersion_result 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: // AUTH_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.authError = new TAuthorizationException();
                struct.authError.read(iprot);
                struct.setAuthErrorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // NOT_FOUND
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.notFound = new TNotFoundException();
                struct.notFound.read(iprot);
                struct.setNotFoundIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // IMG_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.imgError = new TInvocationException();
                struct.imgError.read(iprot);
                struct.setImgErrorIsSet(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, updateImageVersion_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.authError != null) {
          oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC);
          struct.authError.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.notFound != null) {
          oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC);
          struct.notFound.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.imgError != null) {
          oprot.writeFieldBegin(IMG_ERROR_FIELD_DESC);
          struct.imgError.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class updateImageVersion_resultTupleSchemeFactory implements SchemeFactory {
      public updateImageVersion_resultTupleScheme getScheme() {
        return new updateImageVersion_resultTupleScheme();
      }
    }

    private static class updateImageVersion_resultTupleScheme extends TupleScheme<updateImageVersion_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, updateImageVersion_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetAuthError()) {
          optionals.set(0);
        }
        if (struct.isSetNotFound()) {
          optionals.set(1);
        }
        if (struct.isSetImgError()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetAuthError()) {
          struct.authError.write(oprot);
        }
        if (struct.isSetNotFound()) {
          struct.notFound.write(oprot);
        }
        if (struct.isSetImgError()) {
          struct.imgError.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, updateImageVersion_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.authError = new TAuthorizationException();
          struct.authError.read(iprot);
          struct.setAuthErrorIsSet(true);
        }
        if (incoming.get(1)) {
          struct.notFound = new TNotFoundException();
          struct.notFound.read(iprot);
          struct.setNotFoundIsSet(true);
        }
        if (incoming.get(2)) {
          struct.imgError = new TInvocationException();
          struct.imgError.read(iprot);
          struct.setImgErrorIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField IMAGE_VERSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageVersionId", org.apache.thrift.protocol.TType.STRING, (short)2);

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

    public String userToken; // required
    public String imageVersionId; // 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 {
      USER_TOKEN((short)1, "userToken"),
      IMAGE_VERSION_ID((short)2, "imageVersionId");

      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: // USER_TOKEN
            return USER_TOKEN;
          case 2: // IMAGE_VERSION_ID
            return IMAGE_VERSION_ID;
          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
    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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "Token")));
      tmpMap.put(_Fields.IMAGE_VERSION_ID, new org.apache.thrift.meta_data.FieldMetaData("imageVersionId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "UUID")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteImageVersion_args.class, metaDataMap);
    }

    public deleteImageVersion_args() {
    }

    public deleteImageVersion_args(
      String userToken,
      String imageVersionId)
    {
      this();
      this.userToken = userToken;
      this.imageVersionId = imageVersionId;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public deleteImageVersion_args(deleteImageVersion_args other) {
      if (other.isSetUserToken()) {
        this.userToken = other.userToken;
      }
      if (other.isSetImageVersionId()) {
        this.imageVersionId = other.imageVersionId;
      }
    }

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

    @Override
    public void clear() {
      this.userToken = null;
      this.imageVersionId = null;
    }

    public String getUserToken() {
      return this.userToken;
    }

    public deleteImageVersion_args setUserToken(String userToken) {
      this.userToken = userToken;
      return this;
    }

    public void unsetUserToken() {
      this.userToken = null;
    }

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

    public void setUserTokenIsSet(boolean value) {
      if (!value) {
        this.userToken = null;
      }
    }

    public String getImageVersionId() {
      return this.imageVersionId;
    }

    public deleteImageVersion_args setImageVersionId(String imageVersionId) {
      this.imageVersionId = imageVersionId;
      return this;
    }

    public void unsetImageVersionId() {
      this.imageVersionId = null;
    }

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

    public void setImageVersionIdIsSet(boolean value) {
      if (!value) {
        this.imageVersionId = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_TOKEN:
        if (value == null) {
          unsetUserToken();
        } else {
          setUserToken((String)value);
        }
        break;

      case IMAGE_VERSION_ID:
        if (value == null) {
          unsetImageVersionId();
        } else {
          setImageVersionId((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_TOKEN:
        return getUserToken();

      case IMAGE_VERSION_ID:
        return getImageVersionId();

      }
      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 USER_TOKEN:
        return isSetUserToken();
      case IMAGE_VERSION_ID:
        return isSetImageVersionId();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_userToken = true && this.isSetUserToken();
      boolean that_present_userToken = true && that.isSetUserToken();
      if (this_present_userToken || that_present_userToken) {
        if (!(this_present_userToken && that_present_userToken))
          return false;
        if (!this.userToken.equals(that.userToken))
          return false;
      }

      boolean this_present_imageVersionId = true && this.isSetImageVersionId();
      boolean that_present_imageVersionId = true && that.isSetImageVersionId();
      if (this_present_imageVersionId || that_present_imageVersionId) {
        if (!(this_present_imageVersionId && that_present_imageVersionId))
          return false;
        if (!this.imageVersionId.equals(that.imageVersionId))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_userToken = true && (isSetUserToken());
      list.add(present_userToken);
      if (present_userToken)
        list.add(userToken);

      boolean present_imageVersionId = true && (isSetImageVersionId());
      list.add(present_imageVersionId);
      if (present_imageVersionId)
        list.add(imageVersionId);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserToken()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetImageVersionId()).compareTo(other.isSetImageVersionId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetImageVersionId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageVersionId, other.imageVersionId);
        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("deleteImageVersion_args(");
      boolean first = true;

      sb.append("userToken:");
      if (this.userToken == null) {
        sb.append("null");
      } else {
        sb.append(this.userToken);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("imageVersionId:");
      if (this.imageVersionId == null) {
        sb.append("null");
      } else {
        sb.append(this.imageVersionId);
      }
      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 {
        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 deleteImageVersion_argsStandardSchemeFactory implements SchemeFactory {
      public deleteImageVersion_argsStandardScheme getScheme() {
        return new deleteImageVersion_argsStandardScheme();
      }
    }

    private static class deleteImageVersion_argsStandardScheme extends StandardScheme<deleteImageVersion_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, deleteImageVersion_args 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: // USER_TOKEN
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.userToken = iprot.readString();
                struct.setUserTokenIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // IMAGE_VERSION_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.imageVersionId = iprot.readString();
                struct.setImageVersionIdIsSet(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, deleteImageVersion_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.userToken != null) {
          oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
          oprot.writeString(struct.userToken);
          oprot.writeFieldEnd();
        }
        if (struct.imageVersionId != null) {
          oprot.writeFieldBegin(IMAGE_VERSION_ID_FIELD_DESC);
          oprot.writeString(struct.imageVersionId);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class deleteImageVersion_argsTupleSchemeFactory implements SchemeFactory {
      public deleteImageVersion_argsTupleScheme getScheme() {
        return new deleteImageVersion_argsTupleScheme();
      }
    }

    private static class deleteImageVersion_argsTupleScheme extends TupleScheme<deleteImageVersion_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, deleteImageVersion_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetUserToken()) {
          optionals.set(0);
        }
        if (struct.isSetImageVersionId()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetUserToken()) {
          oprot.writeString(struct.userToken);
        }
        if (struct.isSetImageVersionId()) {
          oprot.writeString(struct.imageVersionId);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, deleteImageVersion_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.userToken = iprot.readString();
          struct.setUserTokenIsSet(true);
        }
        if (incoming.get(1)) {
          struct.imageVersionId = iprot.readString();
          struct.setImageVersionIdIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3);

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

    public TAuthorizationException authError; // required
    public TNotFoundException notFound; // required
    public TInvocationException serverError; // 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 {
      AUTH_ERROR((short)1, "authError"),
      NOT_FOUND((short)2, "notFound"),
      SERVER_ERROR((short)3, "serverError");

      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: // AUTH_ERROR
            return AUTH_ERROR;
          case 2: // NOT_FOUND
            return NOT_FOUND;
          case 3: // SERVER_ERROR
            return SERVER_ERROR;
          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
    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.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteImageVersion_result.class, metaDataMap);
    }

    public deleteImageVersion_result() {
    }

    public deleteImageVersion_result(
      TAuthorizationException authError,
      TNotFoundException notFound,
      TInvocationException serverError)
    {
      this();
      this.authError = authError;
      this.notFound = notFound;
      this.serverError = serverError;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public deleteImageVersion_result(deleteImageVersion_result other) {
      if (other.isSetAuthError()) {
        this.authError = new TAuthorizationException(other.authError);
      }
      if (other.isSetNotFound()) {
        this.notFound = new TNotFoundException(other.notFound);
      }
      if (other.isSetServerError()) {
        this.serverError = new TInvocationException(other.serverError);
      }
    }

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

    @Override
    public void clear() {
      this.authError = null;
      this.notFound = null;
      this.serverError = null;
    }

    public TAuthorizationException getAuthError() {
      return this.authError;
    }

    public deleteImageVersion_result setAuthError(TAuthorizationException authError) {
      this.authError = authError;
      return this;
    }

    public void unsetAuthError() {
      this.authError = null;
    }

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

    public void setAuthErrorIsSet(boolean value) {
      if (!value) {
        this.authError = null;
      }
    }

    public TNotFoundException getNotFound() {
      return this.notFound;
    }

    public deleteImageVersion_result setNotFound(TNotFoundException notFound) {
      this.notFound = notFound;
      return this;
    }

    public void unsetNotFound() {
      this.notFound = null;
    }

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

    public void setNotFoundIsSet(boolean value) {
      if (!value) {
        this.notFound = null;
      }
    }

    public TInvocationException getServerError() {
      return this.serverError;
    }

    public deleteImageVersion_result setServerError(TInvocationException serverError) {
      this.serverError = serverError;
      return this;
    }

    public void unsetServerError() {
      this.serverError = null;
    }

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

    public void setServerErrorIsSet(boolean value) {
      if (!value) {
        this.serverError = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case AUTH_ERROR:
        if (value == null) {
          unsetAuthError();
        } else {
          setAuthError((TAuthorizationException)value);
        }
        break;

      case NOT_FOUND:
        if (value == null) {
          unsetNotFound();
        } else {
          setNotFound((TNotFoundException)value);
        }
        break;

      case SERVER_ERROR:
        if (value == null) {
          unsetServerError();
        } else {
          setServerError((TInvocationException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case AUTH_ERROR:
        return getAuthError();

      case NOT_FOUND:
        return getNotFound();

      case SERVER_ERROR:
        return getServerError();

      }
      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 AUTH_ERROR:
        return isSetAuthError();
      case NOT_FOUND:
        return isSetNotFound();
      case SERVER_ERROR:
        return isSetServerError();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_authError = true && this.isSetAuthError();
      boolean that_present_authError = true && that.isSetAuthError();
      if (this_present_authError || that_present_authError) {
        if (!(this_present_authError && that_present_authError))
          return false;
        if (!this.authError.equals(that.authError))
          return false;
      }

      boolean this_present_notFound = true && this.isSetNotFound();
      boolean that_present_notFound = true && that.isSetNotFound();
      if (this_present_notFound || that_present_notFound) {
        if (!(this_present_notFound && that_present_notFound))
          return false;
        if (!this.notFound.equals(that.notFound))
          return false;
      }

      boolean this_present_serverError = true && this.isSetServerError();
      boolean that_present_serverError = true && that.isSetServerError();
      if (this_present_serverError || that_present_serverError) {
        if (!(this_present_serverError && that_present_serverError))
          return false;
        if (!this.serverError.equals(that.serverError))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_authError = true && (isSetAuthError());
      list.add(present_authError);
      if (present_authError)
        list.add(authError);

      boolean present_notFound = true && (isSetNotFound());
      list.add(present_notFound);
      if (present_notFound)
        list.add(notFound);

      boolean present_serverError = true && (isSetServerError());
      list.add(present_serverError);
      if (present_serverError)
        list.add(serverError);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFound()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetServerError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError);
        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("deleteImageVersion_result(");
      boolean first = true;

      sb.append("authError:");
      if (this.authError == null) {
        sb.append("null");
      } else {
        sb.append(this.authError);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("notFound:");
      if (this.notFound == null) {
        sb.append("null");
      } else {
        sb.append(this.notFound);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("serverError:");
      if (this.serverError == null) {
        sb.append("null");
      } else {
        sb.append(this.serverError);
      }
      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 {
        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 deleteImageVersion_resultStandardSchemeFactory implements SchemeFactory {
      public deleteImageVersion_resultStandardScheme getScheme() {
        return new deleteImageVersion_resultStandardScheme();
      }
    }

    private static class deleteImageVersion_resultStandardScheme extends StandardScheme<deleteImageVersion_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, deleteImageVersion_result 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: // AUTH_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.authError = new TAuthorizationException();
                struct.authError.read(iprot);
                struct.setAuthErrorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // NOT_FOUND
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.notFound = new TNotFoundException();
                struct.notFound.read(iprot);
                struct.setNotFoundIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // SERVER_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.serverError = new TInvocationException();
                struct.serverError.read(iprot);
                struct.setServerErrorIsSet(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, deleteImageVersion_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.authError != null) {
          oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC);
          struct.authError.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.notFound != null) {
          oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC);
          struct.notFound.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.serverError != null) {
          oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC);
          struct.serverError.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class deleteImageVersion_resultTupleSchemeFactory implements SchemeFactory {
      public deleteImageVersion_resultTupleScheme getScheme() {
        return new deleteImageVersion_resultTupleScheme();
      }
    }

    private static class deleteImageVersion_resultTupleScheme extends TupleScheme<deleteImageVersion_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, deleteImageVersion_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetAuthError()) {
          optionals.set(0);
        }
        if (struct.isSetNotFound()) {
          optionals.set(1);
        }
        if (struct.isSetServerError()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetAuthError()) {
          struct.authError.write(oprot);
        }
        if (struct.isSetNotFound()) {
          struct.notFound.write(oprot);
        }
        if (struct.isSetServerError()) {
          struct.serverError.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, deleteImageVersion_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.authError = new TAuthorizationException();
          struct.authError.read(iprot);
          struct.setAuthErrorIsSet(true);
        }
        if (incoming.get(1)) {
          struct.notFound = new TNotFoundException();
          struct.notFound.read(iprot);
          struct.setNotFoundIsSet(true);
        }
        if (incoming.get(2)) {
          struct.serverError = new TInvocationException();
          struct.serverError.read(iprot);
          struct.setServerErrorIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField IMAGE_BASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageBaseId", org.apache.thrift.protocol.TType.STRING, (short)2);

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

    public String userToken; // required
    public String imageBaseId; // 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 {
      USER_TOKEN((short)1, "userToken"),
      IMAGE_BASE_ID((short)2, "imageBaseId");

      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: // USER_TOKEN
            return USER_TOKEN;
          case 2: // IMAGE_BASE_ID
            return IMAGE_BASE_ID;
          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
    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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "Token")));
      tmpMap.put(_Fields.IMAGE_BASE_ID, new org.apache.thrift.meta_data.FieldMetaData("imageBaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "UUID")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteImageBase_args.class, metaDataMap);
    }

    public deleteImageBase_args() {
    }

    public deleteImageBase_args(
      String userToken,
      String imageBaseId)
    {
      this();
      this.userToken = userToken;
      this.imageBaseId = imageBaseId;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public deleteImageBase_args(deleteImageBase_args other) {
      if (other.isSetUserToken()) {
        this.userToken = other.userToken;
      }
      if (other.isSetImageBaseId()) {
        this.imageBaseId = other.imageBaseId;
      }
    }

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

    @Override
    public void clear() {
      this.userToken = null;
      this.imageBaseId = null;
    }

    public String getUserToken() {
      return this.userToken;
    }

    public deleteImageBase_args setUserToken(String userToken) {
      this.userToken = userToken;
      return this;
    }

    public void unsetUserToken() {
      this.userToken = null;
    }

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

    public void setUserTokenIsSet(boolean value) {
      if (!value) {
        this.userToken = null;
      }
    }

    public String getImageBaseId() {
      return this.imageBaseId;
    }

    public deleteImageBase_args setImageBaseId(String imageBaseId) {
      this.imageBaseId = imageBaseId;
      return this;
    }

    public void unsetImageBaseId() {
      this.imageBaseId = null;
    }

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

    public void setImageBaseIdIsSet(boolean value) {
      if (!value) {
        this.imageBaseId = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_TOKEN:
        if (value == null) {
          unsetUserToken();
        } else {
          setUserToken((String)value);
        }
        break;

      case IMAGE_BASE_ID:
        if (value == null) {
          unsetImageBaseId();
        } else {
          setImageBaseId((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_TOKEN:
        return getUserToken();

      case IMAGE_BASE_ID:
        return getImageBaseId();

      }
      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 USER_TOKEN:
        return isSetUserToken();
      case IMAGE_BASE_ID:
        return isSetImageBaseId();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_userToken = true && this.isSetUserToken();
      boolean that_present_userToken = true && that.isSetUserToken();
      if (this_present_userToken || that_present_userToken) {
        if (!(this_present_userToken && that_present_userToken))
          return false;
        if (!this.userToken.equals(that.userToken))
          return false;
      }

      boolean this_present_imageBaseId = true && this.isSetImageBaseId();
      boolean that_present_imageBaseId = true && that.isSetImageBaseId();
      if (this_present_imageBaseId || that_present_imageBaseId) {
        if (!(this_present_imageBaseId && that_present_imageBaseId))
          return false;
        if (!this.imageBaseId.equals(that.imageBaseId))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_userToken = true && (isSetUserToken());
      list.add(present_userToken);
      if (present_userToken)
        list.add(userToken);

      boolean present_imageBaseId = true && (isSetImageBaseId());
      list.add(present_imageBaseId);
      if (present_imageBaseId)
        list.add(imageBaseId);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserToken()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetImageBaseId()).compareTo(other.isSetImageBaseId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetImageBaseId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageBaseId, other.imageBaseId);
        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("deleteImageBase_args(");
      boolean first = true;

      sb.append("userToken:");
      if (this.userToken == null) {
        sb.append("null");
      } else {
        sb.append(this.userToken);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("imageBaseId:");
      if (this.imageBaseId == null) {
        sb.append("null");
      } else {
        sb.append(this.imageBaseId);
      }
      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 {
        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 deleteImageBase_argsStandardSchemeFactory implements SchemeFactory {
      public deleteImageBase_argsStandardScheme getScheme() {
        return new deleteImageBase_argsStandardScheme();
      }
    }

    private static class deleteImageBase_argsStandardScheme extends StandardScheme<deleteImageBase_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, deleteImageBase_args 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: // USER_TOKEN
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.userToken = iprot.readString();
                struct.setUserTokenIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // IMAGE_BASE_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.imageBaseId = iprot.readString();
                struct.setImageBaseIdIsSet(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, deleteImageBase_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.userToken != null) {
          oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
          oprot.writeString(struct.userToken);
          oprot.writeFieldEnd();
        }
        if (struct.imageBaseId != null) {
          oprot.writeFieldBegin(IMAGE_BASE_ID_FIELD_DESC);
          oprot.writeString(struct.imageBaseId);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class deleteImageBase_argsTupleSchemeFactory implements SchemeFactory {
      public deleteImageBase_argsTupleScheme getScheme() {
        return new deleteImageBase_argsTupleScheme();
      }
    }

    private static class deleteImageBase_argsTupleScheme extends TupleScheme<deleteImageBase_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, deleteImageBase_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetUserToken()) {
          optionals.set(0);
        }
        if (struct.isSetImageBaseId()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetUserToken()) {
          oprot.writeString(struct.userToken);
        }
        if (struct.isSetImageBaseId()) {
          oprot.writeString(struct.imageBaseId);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, deleteImageBase_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.userToken = iprot.readString();
          struct.setUserTokenIsSet(true);
        }
        if (incoming.get(1)) {
          struct.imageBaseId = iprot.readString();
          struct.setImageBaseIdIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3);

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

    public TAuthorizationException authError; // required
    public TNotFoundException notFound; // required
    public TInvocationException serverError; // 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 {
      AUTH_ERROR((short)1, "authError"),
      NOT_FOUND((short)2, "notFound"),
      SERVER_ERROR((short)3, "serverError");

      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: // AUTH_ERROR
            return AUTH_ERROR;
          case 2: // NOT_FOUND
            return NOT_FOUND;
          case 3: // SERVER_ERROR
            return SERVER_ERROR;
          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
    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.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteImageBase_result.class, metaDataMap);
    }

    public deleteImageBase_result() {
    }

    public deleteImageBase_result(
      TAuthorizationException authError,
      TNotFoundException notFound,
      TInvocationException serverError)
    {
      this();
      this.authError = authError;
      this.notFound = notFound;
      this.serverError = serverError;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public deleteImageBase_result(deleteImageBase_result other) {
      if (other.isSetAuthError()) {
        this.authError = new TAuthorizationException(other.authError);
      }
      if (other.isSetNotFound()) {
        this.notFound = new TNotFoundException(other.notFound);
      }
      if (other.isSetServerError()) {
        this.serverError = new TInvocationException(other.serverError);
      }
    }

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

    @Override
    public void clear() {
      this.authError = null;
      this.notFound = null;
      this.serverError = null;
    }

    public TAuthorizationException getAuthError() {
      return this.authError;
    }

    public deleteImageBase_result setAuthError(TAuthorizationException authError) {
      this.authError = authError;
      return this;
    }

    public void unsetAuthError() {
      this.authError = null;
    }

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

    public void setAuthErrorIsSet(boolean value) {
      if (!value) {
        this.authError = null;
      }
    }

    public TNotFoundException getNotFound() {
      return this.notFound;
    }

    public deleteImageBase_result setNotFound(TNotFoundException notFound) {
      this.notFound = notFound;
      return this;
    }

    public void unsetNotFound() {
      this.notFound = null;
    }

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

    public void setNotFoundIsSet(boolean value) {
      if (!value) {
        this.notFound = null;
      }
    }

    public TInvocationException getServerError() {
      return this.serverError;
    }

    public deleteImageBase_result setServerError(TInvocationException serverError) {
      this.serverError = serverError;
      return this;
    }

    public void unsetServerError() {
      this.serverError = null;
    }

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

    public void setServerErrorIsSet(boolean value) {
      if (!value) {
        this.serverError = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case AUTH_ERROR:
        if (value == null) {
          unsetAuthError();
        } else {
          setAuthError((TAuthorizationException)value);
        }
        break;

      case NOT_FOUND:
        if (value == null) {
          unsetNotFound();
        } else {
          setNotFound((TNotFoundException)value);
        }
        break;

      case SERVER_ERROR:
        if (value == null) {
          unsetServerError();
        } else {
          setServerError((TInvocationException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case AUTH_ERROR:
        return getAuthError();

      case NOT_FOUND:
        return getNotFound();

      case SERVER_ERROR:
        return getServerError();

      }
      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 AUTH_ERROR:
        return isSetAuthError();
      case NOT_FOUND:
        return isSetNotFound();
      case SERVER_ERROR:
        return isSetServerError();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_authError = true && this.isSetAuthError();
      boolean that_present_authError = true && that.isSetAuthError();
      if (this_present_authError || that_present_authError) {
        if (!(this_present_authError && that_present_authError))
          return false;
        if (!this.authError.equals(that.authError))
          return false;
      }

      boolean this_present_notFound = true && this.isSetNotFound();
      boolean that_present_notFound = true && that.isSetNotFound();
      if (this_present_notFound || that_present_notFound) {
        if (!(this_present_notFound && that_present_notFound))
          return false;
        if (!this.notFound.equals(that.notFound))
          return false;
      }

      boolean this_present_serverError = true && this.isSetServerError();
      boolean that_present_serverError = true && that.isSetServerError();
      if (this_present_serverError || that_present_serverError) {
        if (!(this_present_serverError && that_present_serverError))
          return false;
        if (!this.serverError.equals(that.serverError))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_authError = true && (isSetAuthError());
      list.add(present_authError);
      if (present_authError)
        list.add(authError);

      boolean present_notFound = true && (isSetNotFound());
      list.add(present_notFound);
      if (present_notFound)
        list.add(notFound);

      boolean present_serverError = true && (isSetServerError());
      list.add(present_serverError);
      if (present_serverError)
        list.add(serverError);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFound()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetServerError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError);
        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("deleteImageBase_result(");
      boolean first = true;

      sb.append("authError:");
      if (this.authError == null) {
        sb.append("null");
      } else {
        sb.append(this.authError);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("notFound:");
      if (this.notFound == null) {
        sb.append("null");
      } else {
        sb.append(this.notFound);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("serverError:");
      if (this.serverError == null) {
        sb.append("null");
      } else {
        sb.append(this.serverError);
      }
      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 {
        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 deleteImageBase_resultStandardSchemeFactory implements SchemeFactory {
      public deleteImageBase_resultStandardScheme getScheme() {
        return new deleteImageBase_resultStandardScheme();
      }
    }

    private static class deleteImageBase_resultStandardScheme extends StandardScheme<deleteImageBase_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, deleteImageBase_result 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: // AUTH_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.authError = new TAuthorizationException();
                struct.authError.read(iprot);
                struct.setAuthErrorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // NOT_FOUND
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.notFound = new TNotFoundException();
                struct.notFound.read(iprot);
                struct.setNotFoundIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // SERVER_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.serverError = new TInvocationException();
                struct.serverError.read(iprot);
                struct.setServerErrorIsSet(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, deleteImageBase_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.authError != null) {
          oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC);
          struct.authError.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.notFound != null) {
          oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC);
          struct.notFound.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.serverError != null) {
          oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC);
          struct.serverError.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class deleteImageBase_resultTupleSchemeFactory implements SchemeFactory {
      public deleteImageBase_resultTupleScheme getScheme() {
        return new deleteImageBase_resultTupleScheme();
      }
    }

    private static class deleteImageBase_resultTupleScheme extends TupleScheme<deleteImageBase_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, deleteImageBase_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetAuthError()) {
          optionals.set(0);
        }
        if (struct.isSetNotFound()) {
          optionals.set(1);
        }
        if (struct.isSetServerError()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetAuthError()) {
          struct.authError.write(oprot);
        }
        if (struct.isSetNotFound()) {
          struct.notFound.write(oprot);
        }
        if (struct.isSetServerError()) {
          struct.serverError.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, deleteImageBase_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.authError = new TAuthorizationException();
          struct.authError.read(iprot);
          struct.setAuthErrorIsSet(true);
        }
        if (incoming.get(1)) {
          struct.notFound = new TNotFoundException();
          struct.notFound.read(iprot);
          struct.setNotFoundIsSet(true);
        }
        if (incoming.get(2)) {
          struct.serverError = new TInvocationException();
          struct.serverError.read(iprot);
          struct.setServerErrorIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField IMAGE_BASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageBaseId", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField PERMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("permissions", org.apache.thrift.protocol.TType.MAP, (short)3);

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

    public String userToken; // required
    public String imageBaseId; // required
    public Map<String,ImagePermissions> permissions; // 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 {
      USER_TOKEN((short)1, "userToken"),
      IMAGE_BASE_ID((short)2, "imageBaseId"),
      PERMISSIONS((short)3, "permissions");

      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: // USER_TOKEN
            return USER_TOKEN;
          case 2: // IMAGE_BASE_ID
            return IMAGE_BASE_ID;
          case 3: // PERMISSIONS
            return PERMISSIONS;
          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
    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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "Token")));
      tmpMap.put(_Fields.IMAGE_BASE_ID, new org.apache.thrift.meta_data.FieldMetaData("imageBaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "UUID")));
      tmpMap.put(_Fields.PERMISSIONS, new org.apache.thrift.meta_data.FieldMetaData("permissions", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING              , "UUID"), 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ImagePermissions.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(writeImagePermissions_args.class, metaDataMap);
    }

    public writeImagePermissions_args() {
    }

    public writeImagePermissions_args(
      String userToken,
      String imageBaseId,
      Map<String,ImagePermissions> permissions)
    {
      this();
      this.userToken = userToken;
      this.imageBaseId = imageBaseId;
      this.permissions = permissions;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public writeImagePermissions_args(writeImagePermissions_args other) {
      if (other.isSetUserToken()) {
        this.userToken = other.userToken;
      }
      if (other.isSetImageBaseId()) {
        this.imageBaseId = other.imageBaseId;
      }
      if (other.isSetPermissions()) {
        Map<String,ImagePermissions> __this__permissions = new HashMap<String,ImagePermissions>(other.permissions.size());
        for (Map.Entry<String, ImagePermissions> other_element : other.permissions.entrySet()) {

          String other_element_key = other_element.getKey();
          ImagePermissions other_element_value = other_element.getValue();

          String __this__permissions_copy_key = other_element_key;

          ImagePermissions __this__permissions_copy_value = new ImagePermissions(other_element_value);

          __this__permissions.put(__this__permissions_copy_key, __this__permissions_copy_value);
        }
        this.permissions = __this__permissions;
      }
    }

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

    @Override
    public void clear() {
      this.userToken = null;
      this.imageBaseId = null;
      this.permissions = null;
    }

    public String getUserToken() {
      return this.userToken;
    }

    public writeImagePermissions_args setUserToken(String userToken) {
      this.userToken = userToken;
      return this;
    }

    public void unsetUserToken() {
      this.userToken = null;
    }

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

    public void setUserTokenIsSet(boolean value) {
      if (!value) {
        this.userToken = null;
      }
    }

    public String getImageBaseId() {
      return this.imageBaseId;
    }

    public writeImagePermissions_args setImageBaseId(String imageBaseId) {
      this.imageBaseId = imageBaseId;
      return this;
    }

    public void unsetImageBaseId() {
      this.imageBaseId = null;
    }

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

    public void setImageBaseIdIsSet(boolean value) {
      if (!value) {
        this.imageBaseId = null;
      }
    }

    public int getPermissionsSize() {
      return (this.permissions == null) ? 0 : this.permissions.size();
    }

    public void putToPermissions(String key, ImagePermissions val) {
      if (this.permissions == null) {
        this.permissions = new HashMap<String,ImagePermissions>();
      }
      this.permissions.put(key, val);
    }

    public Map<String,ImagePermissions> getPermissions() {
      return this.permissions;
    }

    public writeImagePermissions_args setPermissions(Map<String,ImagePermissions> permissions) {
      this.permissions = permissions;
      return this;
    }

    public void unsetPermissions() {
      this.permissions = null;
    }

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

    public void setPermissionsIsSet(boolean value) {
      if (!value) {
        this.permissions = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_TOKEN:
        if (value == null) {
          unsetUserToken();
        } else {
          setUserToken((String)value);
        }
        break;

      case IMAGE_BASE_ID:
        if (value == null) {
          unsetImageBaseId();
        } else {
          setImageBaseId((String)value);
        }
        break;

      case PERMISSIONS:
        if (value == null) {
          unsetPermissions();
        } else {
          setPermissions((Map<String,ImagePermissions>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_TOKEN:
        return getUserToken();

      case IMAGE_BASE_ID:
        return getImageBaseId();

      case PERMISSIONS:
        return getPermissions();

      }
      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 USER_TOKEN:
        return isSetUserToken();
      case IMAGE_BASE_ID:
        return isSetImageBaseId();
      case PERMISSIONS:
        return isSetPermissions();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_userToken = true && this.isSetUserToken();
      boolean that_present_userToken = true && that.isSetUserToken();
      if (this_present_userToken || that_present_userToken) {
        if (!(this_present_userToken && that_present_userToken))
          return false;
        if (!this.userToken.equals(that.userToken))
          return false;
      }

      boolean this_present_imageBaseId = true && this.isSetImageBaseId();
      boolean that_present_imageBaseId = true && that.isSetImageBaseId();
      if (this_present_imageBaseId || that_present_imageBaseId) {
        if (!(this_present_imageBaseId && that_present_imageBaseId))
          return false;
        if (!this.imageBaseId.equals(that.imageBaseId))
          return false;
      }

      boolean this_present_permissions = true && this.isSetPermissions();
      boolean that_present_permissions = true && that.isSetPermissions();
      if (this_present_permissions || that_present_permissions) {
        if (!(this_present_permissions && that_present_permissions))
          return false;
        if (!this.permissions.equals(that.permissions))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_userToken = true && (isSetUserToken());
      list.add(present_userToken);
      if (present_userToken)
        list.add(userToken);

      boolean present_imageBaseId = true && (isSetImageBaseId());
      list.add(present_imageBaseId);
      if (present_imageBaseId)
        list.add(imageBaseId);

      boolean present_permissions = true && (isSetPermissions());
      list.add(present_permissions);
      if (present_permissions)
        list.add(permissions);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserToken()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetImageBaseId()).compareTo(other.isSetImageBaseId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetImageBaseId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageBaseId, other.imageBaseId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetPermissions()).compareTo(other.isSetPermissions());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetPermissions()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.permissions, other.permissions);
        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("writeImagePermissions_args(");
      boolean first = true;

      sb.append("userToken:");
      if (this.userToken == null) {
        sb.append("null");
      } else {
        sb.append(this.userToken);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("imageBaseId:");
      if (this.imageBaseId == null) {
        sb.append("null");
      } else {
        sb.append(this.imageBaseId);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("permissions:");
      if (this.permissions == null) {
        sb.append("null");
      } else {
        sb.append(this.permissions);
      }
      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 {
        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 writeImagePermissions_argsStandardSchemeFactory implements SchemeFactory {
      public writeImagePermissions_argsStandardScheme getScheme() {
        return new writeImagePermissions_argsStandardScheme();
      }
    }

    private static class writeImagePermissions_argsStandardScheme extends StandardScheme<writeImagePermissions_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, writeImagePermissions_args 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: // USER_TOKEN
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.userToken = iprot.readString();
                struct.setUserTokenIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // IMAGE_BASE_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.imageBaseId = iprot.readString();
                struct.setImageBaseIdIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // PERMISSIONS
              if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
                {
                  org.apache.thrift.protocol.TMap _map290 = iprot.readMapBegin();
                  struct.permissions = new HashMap<String,ImagePermissions>(2*_map290.size);
                  String _key291;
                  ImagePermissions _val292;
                  for (int _i293 = 0; _i293 < _map290.size; ++_i293)
                  {
                    _key291 = iprot.readString();
                    _val292 = new ImagePermissions();
                    _val292.read(iprot);
                    struct.permissions.put(_key291, _val292);
                  }
                  iprot.readMapEnd();
                }
                struct.setPermissionsIsSet(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, writeImagePermissions_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.userToken != null) {
          oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
          oprot.writeString(struct.userToken);
          oprot.writeFieldEnd();
        }
        if (struct.imageBaseId != null) {
          oprot.writeFieldBegin(IMAGE_BASE_ID_FIELD_DESC);
          oprot.writeString(struct.imageBaseId);
          oprot.writeFieldEnd();
        }
        if (struct.permissions != null) {
          oprot.writeFieldBegin(PERMISSIONS_FIELD_DESC);
          {
            oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.permissions.size()));
            for (Map.Entry<String, ImagePermissions> _iter294 : struct.permissions.entrySet())
            {
              oprot.writeString(_iter294.getKey());
              _iter294.getValue().write(oprot);
            }
            oprot.writeMapEnd();
          }
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class writeImagePermissions_argsTupleSchemeFactory implements SchemeFactory {
      public writeImagePermissions_argsTupleScheme getScheme() {
        return new writeImagePermissions_argsTupleScheme();
      }
    }

    private static class writeImagePermissions_argsTupleScheme extends TupleScheme<writeImagePermissions_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, writeImagePermissions_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetUserToken()) {
          optionals.set(0);
        }
        if (struct.isSetImageBaseId()) {
          optionals.set(1);
        }
        if (struct.isSetPermissions()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetUserToken()) {
          oprot.writeString(struct.userToken);
        }
        if (struct.isSetImageBaseId()) {
          oprot.writeString(struct.imageBaseId);
        }
        if (struct.isSetPermissions()) {
          {
            oprot.writeI32(struct.permissions.size());
            for (Map.Entry<String, ImagePermissions> _iter295 : struct.permissions.entrySet())
            {
              oprot.writeString(_iter295.getKey());
              _iter295.getValue().write(oprot);
            }
          }
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, writeImagePermissions_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.userToken = iprot.readString();
          struct.setUserTokenIsSet(true);
        }
        if (incoming.get(1)) {
          struct.imageBaseId = iprot.readString();
          struct.setImageBaseIdIsSet(true);
        }
        if (incoming.get(2)) {
          {
            org.apache.thrift.protocol.TMap _map296 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
            struct.permissions = new HashMap<String,ImagePermissions>(2*_map296.size);
            String _key297;
            ImagePermissions _val298;
            for (int _i299 = 0; _i299 < _map296.size; ++_i299)
            {
              _key297 = iprot.readString();
              _val298 = new ImagePermissions();
              _val298.read(iprot);
              struct.permissions.put(_key297, _val298);
            }
          }
          struct.setPermissionsIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3);

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

    public TAuthorizationException authError; // required
    public TNotFoundException notFound; // required
    public TInvocationException serverError; // 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 {
      AUTH_ERROR((short)1, "authError"),
      NOT_FOUND((short)2, "notFound"),
      SERVER_ERROR((short)3, "serverError");

      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: // AUTH_ERROR
            return AUTH_ERROR;
          case 2: // NOT_FOUND
            return NOT_FOUND;
          case 3: // SERVER_ERROR
            return SERVER_ERROR;
          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
    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.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(writeImagePermissions_result.class, metaDataMap);
    }

    public writeImagePermissions_result() {
    }

    public writeImagePermissions_result(
      TAuthorizationException authError,
      TNotFoundException notFound,
      TInvocationException serverError)
    {
      this();
      this.authError = authError;
      this.notFound = notFound;
      this.serverError = serverError;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public writeImagePermissions_result(writeImagePermissions_result other) {
      if (other.isSetAuthError()) {
        this.authError = new TAuthorizationException(other.authError);
      }
      if (other.isSetNotFound()) {
        this.notFound = new TNotFoundException(other.notFound);
      }
      if (other.isSetServerError()) {
        this.serverError = new TInvocationException(other.serverError);
      }
    }

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

    @Override
    public void clear() {
      this.authError = null;
      this.notFound = null;
      this.serverError = null;
    }

    public TAuthorizationException getAuthError() {
      return this.authError;
    }

    public writeImagePermissions_result setAuthError(TAuthorizationException authError) {
      this.authError = authError;
      return this;
    }

    public void unsetAuthError() {
      this.authError = null;
    }

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

    public void setAuthErrorIsSet(boolean value) {
      if (!value) {
        this.authError = null;
      }
    }

    public TNotFoundException getNotFound() {
      return this.notFound;
    }

    public writeImagePermissions_result setNotFound(TNotFoundException notFound) {
      this.notFound = notFound;
      return this;
    }

    public void unsetNotFound() {
      this.notFound = null;
    }

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

    public void setNotFoundIsSet(boolean value) {
      if (!value) {
        this.notFound = null;
      }
    }

    public TInvocationException getServerError() {
      return this.serverError;
    }

    public writeImagePermissions_result setServerError(TInvocationException serverError) {
      this.serverError = serverError;
      return this;
    }

    public void unsetServerError() {
      this.serverError = null;
    }

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

    public void setServerErrorIsSet(boolean value) {
      if (!value) {
        this.serverError = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case AUTH_ERROR:
        if (value == null) {
          unsetAuthError();
        } else {
          setAuthError((TAuthorizationException)value);
        }
        break;

      case NOT_FOUND:
        if (value == null) {
          unsetNotFound();
        } else {
          setNotFound((TNotFoundException)value);
        }
        break;

      case SERVER_ERROR:
        if (value == null) {
          unsetServerError();
        } else {
          setServerError((TInvocationException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case AUTH_ERROR:
        return getAuthError();

      case NOT_FOUND:
        return getNotFound();

      case SERVER_ERROR:
        return getServerError();

      }
      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 AUTH_ERROR:
        return isSetAuthError();
      case NOT_FOUND:
        return isSetNotFound();
      case SERVER_ERROR:
        return isSetServerError();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_authError = true && this.isSetAuthError();
      boolean that_present_authError = true && that.isSetAuthError();
      if (this_present_authError || that_present_authError) {
        if (!(this_present_authError && that_present_authError))
          return false;
        if (!this.authError.equals(that.authError))
          return false;
      }

      boolean this_present_notFound = true && this.isSetNotFound();
      boolean that_present_notFound = true && that.isSetNotFound();
      if (this_present_notFound || that_present_notFound) {
        if (!(this_present_notFound && that_present_notFound))
          return false;
        if (!this.notFound.equals(that.notFound))
          return false;
      }

      boolean this_present_serverError = true && this.isSetServerError();
      boolean that_present_serverError = true && that.isSetServerError();
      if (this_present_serverError || that_present_serverError) {
        if (!(this_present_serverError && that_present_serverError))
          return false;
        if (!this.serverError.equals(that.serverError))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_authError = true && (isSetAuthError());
      list.add(present_authError);
      if (present_authError)
        list.add(authError);

      boolean present_notFound = true && (isSetNotFound());
      list.add(present_notFound);
      if (present_notFound)
        list.add(notFound);

      boolean present_serverError = true && (isSetServerError());
      list.add(present_serverError);
      if (present_serverError)
        list.add(serverError);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFound()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetServerError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError);
        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("writeImagePermissions_result(");
      boolean first = true;

      sb.append("authError:");
      if (this.authError == null) {
        sb.append("null");
      } else {
        sb.append(this.authError);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("notFound:");
      if (this.notFound == null) {
        sb.append("null");
      } else {
        sb.append(this.notFound);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("serverError:");
      if (this.serverError == null) {
        sb.append("null");
      } else {
        sb.append(this.serverError);
      }
      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 {
        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 writeImagePermissions_resultStandardSchemeFactory implements SchemeFactory {
      public writeImagePermissions_resultStandardScheme getScheme() {
        return new writeImagePermissions_resultStandardScheme();
      }
    }

    private static class writeImagePermissions_resultStandardScheme extends StandardScheme<writeImagePermissions_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, writeImagePermissions_result 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: // AUTH_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.authError = new TAuthorizationException();
                struct.authError.read(iprot);
                struct.setAuthErrorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // NOT_FOUND
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.notFound = new TNotFoundException();
                struct.notFound.read(iprot);
                struct.setNotFoundIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // SERVER_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.serverError = new TInvocationException();
                struct.serverError.read(iprot);
                struct.setServerErrorIsSet(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, writeImagePermissions_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.authError != null) {
          oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC);
          struct.authError.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.notFound != null) {
          oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC);
          struct.notFound.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.serverError != null) {
          oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC);
          struct.serverError.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class writeImagePermissions_resultTupleSchemeFactory implements SchemeFactory {
      public writeImagePermissions_resultTupleScheme getScheme() {
        return new writeImagePermissions_resultTupleScheme();
      }
    }

    private static class writeImagePermissions_resultTupleScheme extends TupleScheme<writeImagePermissions_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, writeImagePermissions_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetAuthError()) {
          optionals.set(0);
        }
        if (struct.isSetNotFound()) {
          optionals.set(1);
        }
        if (struct.isSetServerError()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetAuthError()) {
          struct.authError.write(oprot);
        }
        if (struct.isSetNotFound()) {
          struct.notFound.write(oprot);
        }
        if (struct.isSetServerError()) {
          struct.serverError.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, writeImagePermissions_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.authError = new TAuthorizationException();
          struct.authError.read(iprot);
          struct.setAuthErrorIsSet(true);
        }
        if (incoming.get(1)) {
          struct.notFound = new TNotFoundException();
          struct.notFound.read(iprot);
          struct.setNotFoundIsSet(true);
        }
        if (incoming.get(2)) {
          struct.serverError = new TInvocationException();
          struct.serverError.read(iprot);
          struct.setServerErrorIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField IMAGE_BASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageBaseId", org.apache.thrift.protocol.TType.STRING, (short)2);

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

    public String userToken; // required
    public String imageBaseId; // 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 {
      USER_TOKEN((short)1, "userToken"),
      IMAGE_BASE_ID((short)2, "imageBaseId");

      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: // USER_TOKEN
            return USER_TOKEN;
          case 2: // IMAGE_BASE_ID
            return IMAGE_BASE_ID;
          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
    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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "Token")));
      tmpMap.put(_Fields.IMAGE_BASE_ID, new org.apache.thrift.meta_data.FieldMetaData("imageBaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "UUID")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImagePermissions_args.class, metaDataMap);
    }

    public getImagePermissions_args() {
    }

    public getImagePermissions_args(
      String userToken,
      String imageBaseId)
    {
      this();
      this.userToken = userToken;
      this.imageBaseId = imageBaseId;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getImagePermissions_args(getImagePermissions_args other) {
      if (other.isSetUserToken()) {
        this.userToken = other.userToken;
      }
      if (other.isSetImageBaseId()) {
        this.imageBaseId = other.imageBaseId;
      }
    }

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

    @Override
    public void clear() {
      this.userToken = null;
      this.imageBaseId = null;
    }

    public String getUserToken() {
      return this.userToken;
    }

    public getImagePermissions_args setUserToken(String userToken) {
      this.userToken = userToken;
      return this;
    }

    public void unsetUserToken() {
      this.userToken = null;
    }

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

    public void setUserTokenIsSet(boolean value) {
      if (!value) {
        this.userToken = null;
      }
    }

    public String getImageBaseId() {
      return this.imageBaseId;
    }

    public getImagePermissions_args setImageBaseId(String imageBaseId) {
      this.imageBaseId = imageBaseId;
      return this;
    }

    public void unsetImageBaseId() {
      this.imageBaseId = null;
    }

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

    public void setImageBaseIdIsSet(boolean value) {
      if (!value) {
        this.imageBaseId = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_TOKEN:
        if (value == null) {
          unsetUserToken();
        } else {
          setUserToken((String)value);
        }
        break;

      case IMAGE_BASE_ID:
        if (value == null) {
          unsetImageBaseId();
        } else {
          setImageBaseId((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_TOKEN:
        return getUserToken();

      case IMAGE_BASE_ID:
        return getImageBaseId();

      }
      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 USER_TOKEN:
        return isSetUserToken();
      case IMAGE_BASE_ID:
        return isSetImageBaseId();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_userToken = true && this.isSetUserToken();
      boolean that_present_userToken = true && that.isSetUserToken();
      if (this_present_userToken || that_present_userToken) {
        if (!(this_present_userToken && that_present_userToken))
          return false;
        if (!this.userToken.equals(that.userToken))
          return false;
      }

      boolean this_present_imageBaseId = true && this.isSetImageBaseId();
      boolean that_present_imageBaseId = true && that.isSetImageBaseId();
      if (this_present_imageBaseId || that_present_imageBaseId) {
        if (!(this_present_imageBaseId && that_present_imageBaseId))
          return false;
        if (!this.imageBaseId.equals(that.imageBaseId))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_userToken = true && (isSetUserToken());
      list.add(present_userToken);
      if (present_userToken)
        list.add(userToken);

      boolean present_imageBaseId = true && (isSetImageBaseId());
      list.add(present_imageBaseId);
      if (present_imageBaseId)
        list.add(imageBaseId);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserToken()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetImageBaseId()).compareTo(other.isSetImageBaseId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetImageBaseId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageBaseId, other.imageBaseId);
        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("getImagePermissions_args(");
      boolean first = true;

      sb.append("userToken:");
      if (this.userToken == null) {
        sb.append("null");
      } else {
        sb.append(this.userToken);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("imageBaseId:");
      if (this.imageBaseId == null) {
        sb.append("null");
      } else {
        sb.append(this.imageBaseId);
      }
      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 {
        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 getImagePermissions_argsStandardSchemeFactory implements SchemeFactory {
      public getImagePermissions_argsStandardScheme getScheme() {
        return new getImagePermissions_argsStandardScheme();
      }
    }

    private static class getImagePermissions_argsStandardScheme extends StandardScheme<getImagePermissions_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getImagePermissions_args 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: // USER_TOKEN
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.userToken = iprot.readString();
                struct.setUserTokenIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // IMAGE_BASE_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.imageBaseId = iprot.readString();
                struct.setImageBaseIdIsSet(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, getImagePermissions_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.userToken != null) {
          oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
          oprot.writeString(struct.userToken);
          oprot.writeFieldEnd();
        }
        if (struct.imageBaseId != null) {
          oprot.writeFieldBegin(IMAGE_BASE_ID_FIELD_DESC);
          oprot.writeString(struct.imageBaseId);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getImagePermissions_argsTupleSchemeFactory implements SchemeFactory {
      public getImagePermissions_argsTupleScheme getScheme() {
        return new getImagePermissions_argsTupleScheme();
      }
    }

    private static class getImagePermissions_argsTupleScheme extends TupleScheme<getImagePermissions_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getImagePermissions_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetUserToken()) {
          optionals.set(0);
        }
        if (struct.isSetImageBaseId()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetUserToken()) {
          oprot.writeString(struct.userToken);
        }
        if (struct.isSetImageBaseId()) {
          oprot.writeString(struct.imageBaseId);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getImagePermissions_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.userToken = iprot.readString();
          struct.setUserTokenIsSet(true);
        }
        if (incoming.get(1)) {
          struct.imageBaseId = iprot.readString();
          struct.setImageBaseIdIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0);
    private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3);

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

    public Map<String,ImagePermissions> success; // required
    public TAuthorizationException authError; // required
    public TNotFoundException notFound; // required
    public TInvocationException serverError; // 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 {
      SUCCESS((short)0, "success"),
      AUTH_ERROR((short)1, "authError"),
      NOT_FOUND((short)2, "notFound"),
      SERVER_ERROR((short)3, "serverError");

      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 0: // SUCCESS
            return SUCCESS;
          case 1: // AUTH_ERROR
            return AUTH_ERROR;
          case 2: // NOT_FOUND
            return NOT_FOUND;
          case 3: // SERVER_ERROR
            return SERVER_ERROR;
          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
    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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING              , "UUID"), 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ImagePermissions.class))));
      tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImagePermissions_result.class, metaDataMap);
    }

    public getImagePermissions_result() {
    }

    public getImagePermissions_result(
      Map<String,ImagePermissions> success,
      TAuthorizationException authError,
      TNotFoundException notFound,
      TInvocationException serverError)
    {
      this();
      this.success = success;
      this.authError = authError;
      this.notFound = notFound;
      this.serverError = serverError;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getImagePermissions_result(getImagePermissions_result other) {
      if (other.isSetSuccess()) {
        Map<String,ImagePermissions> __this__success = new HashMap<String,ImagePermissions>(other.success.size());
        for (Map.Entry<String, ImagePermissions> other_element : other.success.entrySet()) {

          String other_element_key = other_element.getKey();
          ImagePermissions other_element_value = other_element.getValue();

          String __this__success_copy_key = other_element_key;

          ImagePermissions __this__success_copy_value = new ImagePermissions(other_element_value);

          __this__success.put(__this__success_copy_key, __this__success_copy_value);
        }
        this.success = __this__success;
      }
      if (other.isSetAuthError()) {
        this.authError = new TAuthorizationException(other.authError);
      }
      if (other.isSetNotFound()) {
        this.notFound = new TNotFoundException(other.notFound);
      }
      if (other.isSetServerError()) {
        this.serverError = new TInvocationException(other.serverError);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.authError = null;
      this.notFound = null;
      this.serverError = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public void putToSuccess(String key, ImagePermissions val) {
      if (this.success == null) {
        this.success = new HashMap<String,ImagePermissions>();
      }
      this.success.put(key, val);
    }

    public Map<String,ImagePermissions> getSuccess() {
      return this.success;
    }

    public getImagePermissions_result setSuccess(Map<String,ImagePermissions> success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

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

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public TAuthorizationException getAuthError() {
      return this.authError;
    }

    public getImagePermissions_result setAuthError(TAuthorizationException authError) {
      this.authError = authError;
      return this;
    }

    public void unsetAuthError() {
      this.authError = null;
    }

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

    public void setAuthErrorIsSet(boolean value) {
      if (!value) {
        this.authError = null;
      }
    }

    public TNotFoundException getNotFound() {
      return this.notFound;
    }

    public getImagePermissions_result setNotFound(TNotFoundException notFound) {
      this.notFound = notFound;
      return this;
    }

    public void unsetNotFound() {
      this.notFound = null;
    }

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

    public void setNotFoundIsSet(boolean value) {
      if (!value) {
        this.notFound = null;
      }
    }

    public TInvocationException getServerError() {
      return this.serverError;
    }

    public getImagePermissions_result setServerError(TInvocationException serverError) {
      this.serverError = serverError;
      return this;
    }

    public void unsetServerError() {
      this.serverError = null;
    }

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

    public void setServerErrorIsSet(boolean value) {
      if (!value) {
        this.serverError = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Map<String,ImagePermissions>)value);
        }
        break;

      case AUTH_ERROR:
        if (value == null) {
          unsetAuthError();
        } else {
          setAuthError((TAuthorizationException)value);
        }
        break;

      case NOT_FOUND:
        if (value == null) {
          unsetNotFound();
        } else {
          setNotFound((TNotFoundException)value);
        }
        break;

      case SERVER_ERROR:
        if (value == null) {
          unsetServerError();
        } else {
          setServerError((TInvocationException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case AUTH_ERROR:
        return getAuthError();

      case NOT_FOUND:
        return getNotFound();

      case SERVER_ERROR:
        return getServerError();

      }
      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 SUCCESS:
        return isSetSuccess();
      case AUTH_ERROR:
        return isSetAuthError();
      case NOT_FOUND:
        return isSetNotFound();
      case SERVER_ERROR:
        return isSetServerError();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_authError = true && this.isSetAuthError();
      boolean that_present_authError = true && that.isSetAuthError();
      if (this_present_authError || that_present_authError) {
        if (!(this_present_authError && that_present_authError))
          return false;
        if (!this.authError.equals(that.authError))
          return false;
      }

      boolean this_present_notFound = true && this.isSetNotFound();
      boolean that_present_notFound = true && that.isSetNotFound();
      if (this_present_notFound || that_present_notFound) {
        if (!(this_present_notFound && that_present_notFound))
          return false;
        if (!this.notFound.equals(that.notFound))
          return false;
      }

      boolean this_present_serverError = true && this.isSetServerError();
      boolean that_present_serverError = true && that.isSetServerError();
      if (this_present_serverError || that_present_serverError) {
        if (!(this_present_serverError && that_present_serverError))
          return false;
        if (!this.serverError.equals(that.serverError))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_authError = true && (isSetAuthError());
      list.add(present_authError);
      if (present_authError)
        list.add(authError);

      boolean present_notFound = true && (isSetNotFound());
      list.add(present_notFound);
      if (present_notFound)
        list.add(notFound);

      boolean present_serverError = true && (isSetServerError());
      list.add(present_serverError);
      if (present_serverError)
        list.add(serverError);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFound()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetServerError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError);
        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("getImagePermissions_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("authError:");
      if (this.authError == null) {
        sb.append("null");
      } else {
        sb.append(this.authError);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("notFound:");
      if (this.notFound == null) {
        sb.append("null");
      } else {
        sb.append(this.notFound);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("serverError:");
      if (this.serverError == null) {
        sb.append("null");
      } else {
        sb.append(this.serverError);
      }
      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 {
        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 getImagePermissions_resultStandardSchemeFactory implements SchemeFactory {
      public getImagePermissions_resultStandardScheme getScheme() {
        return new getImagePermissions_resultStandardScheme();
      }
    }

    private static class getImagePermissions_resultStandardScheme extends StandardScheme<getImagePermissions_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getImagePermissions_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
                {
                  org.apache.thrift.protocol.TMap _map300 = iprot.readMapBegin();
                  struct.success = new HashMap<String,ImagePermissions>(2*_map300.size);
                  String _key301;
                  ImagePermissions _val302;
                  for (int _i303 = 0; _i303 < _map300.size; ++_i303)
                  {
                    _key301 = iprot.readString();
                    _val302 = new ImagePermissions();
                    _val302.read(iprot);
                    struct.success.put(_key301, _val302);
                  }
                  iprot.readMapEnd();
                }
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // AUTH_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.authError = new TAuthorizationException();
                struct.authError.read(iprot);
                struct.setAuthErrorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // NOT_FOUND
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.notFound = new TNotFoundException();
                struct.notFound.read(iprot);
                struct.setNotFoundIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // SERVER_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.serverError = new TInvocationException();
                struct.serverError.read(iprot);
                struct.setServerErrorIsSet(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, getImagePermissions_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          {
            oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
            for (Map.Entry<String, ImagePermissions> _iter304 : struct.success.entrySet())
            {
              oprot.writeString(_iter304.getKey());
              _iter304.getValue().write(oprot);
            }
            oprot.writeMapEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.authError != null) {
          oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC);
          struct.authError.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.notFound != null) {
          oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC);
          struct.notFound.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.serverError != null) {
          oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC);
          struct.serverError.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getImagePermissions_resultTupleSchemeFactory implements SchemeFactory {
      public getImagePermissions_resultTupleScheme getScheme() {
        return new getImagePermissions_resultTupleScheme();
      }
    }

    private static class getImagePermissions_resultTupleScheme extends TupleScheme<getImagePermissions_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getImagePermissions_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetAuthError()) {
          optionals.set(1);
        }
        if (struct.isSetNotFound()) {
          optionals.set(2);
        }
        if (struct.isSetServerError()) {
          optionals.set(3);
        }
        oprot.writeBitSet(optionals, 4);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (Map.Entry<String, ImagePermissions> _iter305 : struct.success.entrySet())
            {
              oprot.writeString(_iter305.getKey());
              _iter305.getValue().write(oprot);
            }
          }
        }
        if (struct.isSetAuthError()) {
          struct.authError.write(oprot);
        }
        if (struct.isSetNotFound()) {
          struct.notFound.write(oprot);
        }
        if (struct.isSetServerError()) {
          struct.serverError.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getImagePermissions_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(4);
        if (incoming.get(0)) {
          {
            org.apache.thrift.protocol.TMap _map306 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
            struct.success = new HashMap<String,ImagePermissions>(2*_map306.size);
            String _key307;
            ImagePermissions _val308;
            for (int _i309 = 0; _i309 < _map306.size; ++_i309)
            {
              _key307 = iprot.readString();
              _val308 = new ImagePermissions();
              _val308.read(iprot);
              struct.success.put(_key307, _val308);
            }
          }
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.authError = new TAuthorizationException();
          struct.authError.read(iprot);
          struct.setAuthErrorIsSet(true);
        }
        if (incoming.get(2)) {
          struct.notFound = new TNotFoundException();
          struct.notFound.read(iprot);
          struct.setNotFoundIsSet(true);
        }
        if (incoming.get(3)) {
          struct.serverError = new TInvocationException();
          struct.serverError.read(iprot);
          struct.setServerErrorIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField IMAGE_BASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageBaseId", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField NEW_OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("newOwnerId", org.apache.thrift.protocol.TType.STRING, (short)3);

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

    public String userToken; // required
    public String imageBaseId; // required
    public String newOwnerId; // 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 {
      USER_TOKEN((short)1, "userToken"),
      IMAGE_BASE_ID((short)2, "imageBaseId"),
      NEW_OWNER_ID((short)3, "newOwnerId");

      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: // USER_TOKEN
            return USER_TOKEN;
          case 2: // IMAGE_BASE_ID
            return IMAGE_BASE_ID;
          case 3: // NEW_OWNER_ID
            return NEW_OWNER_ID;
          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
    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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "Token")));
      tmpMap.put(_Fields.IMAGE_BASE_ID, new org.apache.thrift.meta_data.FieldMetaData("imageBaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "UUID")));
      tmpMap.put(_Fields.NEW_OWNER_ID, new org.apache.thrift.meta_data.FieldMetaData("newOwnerId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "UUID")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setImageOwner_args.class, metaDataMap);
    }

    public setImageOwner_args() {
    }

    public setImageOwner_args(
      String userToken,
      String imageBaseId,
      String newOwnerId)
    {
      this();
      this.userToken = userToken;
      this.imageBaseId = imageBaseId;
      this.newOwnerId = newOwnerId;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public setImageOwner_args(setImageOwner_args other) {
      if (other.isSetUserToken()) {
        this.userToken = other.userToken;
      }
      if (other.isSetImageBaseId()) {
        this.imageBaseId = other.imageBaseId;
      }
      if (other.isSetNewOwnerId()) {
        this.newOwnerId = other.newOwnerId;
      }
    }

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

    @Override
    public void clear() {
      this.userToken = null;
      this.imageBaseId = null;
      this.newOwnerId = null;
    }

    public String getUserToken() {
      return this.userToken;
    }

    public setImageOwner_args setUserToken(String userToken) {
      this.userToken = userToken;
      return this;
    }

    public void unsetUserToken() {
      this.userToken = null;
    }

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

    public void setUserTokenIsSet(boolean value) {
      if (!value) {
        this.userToken = null;
      }
    }

    public String getImageBaseId() {
      return this.imageBaseId;
    }

    public setImageOwner_args setImageBaseId(String imageBaseId) {
      this.imageBaseId = imageBaseId;
      return this;
    }

    public void unsetImageBaseId() {
      this.imageBaseId = null;
    }

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

    public void setImageBaseIdIsSet(boolean value) {
      if (!value) {
        this.imageBaseId = null;
      }
    }

    public String getNewOwnerId() {
      return this.newOwnerId;
    }

    public setImageOwner_args setNewOwnerId(String newOwnerId) {
      this.newOwnerId = newOwnerId;
      return this;
    }

    public void unsetNewOwnerId() {
      this.newOwnerId = null;
    }

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

    public void setNewOwnerIdIsSet(boolean value) {
      if (!value) {
        this.newOwnerId = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_TOKEN:
        if (value == null) {
          unsetUserToken();
        } else {
          setUserToken((String)value);
        }
        break;

      case IMAGE_BASE_ID:
        if (value == null) {
          unsetImageBaseId();
        } else {
          setImageBaseId((String)value);
        }
        break;

      case NEW_OWNER_ID:
        if (value == null) {
          unsetNewOwnerId();
        } else {
          setNewOwnerId((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_TOKEN:
        return getUserToken();

      case IMAGE_BASE_ID:
        return getImageBaseId();

      case NEW_OWNER_ID:
        return getNewOwnerId();

      }
      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 USER_TOKEN:
        return isSetUserToken();
      case IMAGE_BASE_ID:
        return isSetImageBaseId();
      case NEW_OWNER_ID:
        return isSetNewOwnerId();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_userToken = true && this.isSetUserToken();
      boolean that_present_userToken = true && that.isSetUserToken();
      if (this_present_userToken || that_present_userToken) {
        if (!(this_present_userToken && that_present_userToken))
          return false;
        if (!this.userToken.equals(that.userToken))
          return false;
      }

      boolean this_present_imageBaseId = true && this.isSetImageBaseId();
      boolean that_present_imageBaseId = true && that.isSetImageBaseId();
      if (this_present_imageBaseId || that_present_imageBaseId) {
        if (!(this_present_imageBaseId && that_present_imageBaseId))
          return false;
        if (!this.imageBaseId.equals(that.imageBaseId))
          return false;
      }

      boolean this_present_newOwnerId = true && this.isSetNewOwnerId();
      boolean that_present_newOwnerId = true && that.isSetNewOwnerId();
      if (this_present_newOwnerId || that_present_newOwnerId) {
        if (!(this_present_newOwnerId && that_present_newOwnerId))
          return false;
        if (!this.newOwnerId.equals(that.newOwnerId))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_userToken = true && (isSetUserToken());
      list.add(present_userToken);
      if (present_userToken)
        list.add(userToken);

      boolean present_imageBaseId = true && (isSetImageBaseId());
      list.add(present_imageBaseId);
      if (present_imageBaseId)
        list.add(imageBaseId);

      boolean present_newOwnerId = true && (isSetNewOwnerId());
      list.add(present_newOwnerId);
      if (present_newOwnerId)
        list.add(newOwnerId);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserToken()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetImageBaseId()).compareTo(other.isSetImageBaseId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetImageBaseId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageBaseId, other.imageBaseId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNewOwnerId()).compareTo(other.isSetNewOwnerId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNewOwnerId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.newOwnerId, other.newOwnerId);
        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("setImageOwner_args(");
      boolean first = true;

      sb.append("userToken:");
      if (this.userToken == null) {
        sb.append("null");
      } else {
        sb.append(this.userToken);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("imageBaseId:");
      if (this.imageBaseId == null) {
        sb.append("null");
      } else {
        sb.append(this.imageBaseId);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("newOwnerId:");
      if (this.newOwnerId == null) {
        sb.append("null");
      } else {
        sb.append(this.newOwnerId);
      }
      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 {
        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 setImageOwner_argsStandardSchemeFactory implements SchemeFactory {
      public setImageOwner_argsStandardScheme getScheme() {
        return new setImageOwner_argsStandardScheme();
      }
    }

    private static class setImageOwner_argsStandardScheme extends StandardScheme<setImageOwner_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, setImageOwner_args 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: // USER_TOKEN
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.userToken = iprot.readString();
                struct.setUserTokenIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // IMAGE_BASE_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.imageBaseId = iprot.readString();
                struct.setImageBaseIdIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // NEW_OWNER_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.newOwnerId = iprot.readString();
                struct.setNewOwnerIdIsSet(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, setImageOwner_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.userToken != null) {
          oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
          oprot.writeString(struct.userToken);
          oprot.writeFieldEnd();
        }
        if (struct.imageBaseId != null) {
          oprot.writeFieldBegin(IMAGE_BASE_ID_FIELD_DESC);
          oprot.writeString(struct.imageBaseId);
          oprot.writeFieldEnd();
        }
        if (struct.newOwnerId != null) {
          oprot.writeFieldBegin(NEW_OWNER_ID_FIELD_DESC);
          oprot.writeString(struct.newOwnerId);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class setImageOwner_argsTupleSchemeFactory implements SchemeFactory {
      public setImageOwner_argsTupleScheme getScheme() {
        return new setImageOwner_argsTupleScheme();
      }
    }

    private static class setImageOwner_argsTupleScheme extends TupleScheme<setImageOwner_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, setImageOwner_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetUserToken()) {
          optionals.set(0);
        }
        if (struct.isSetImageBaseId()) {
          optionals.set(1);
        }
        if (struct.isSetNewOwnerId()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetUserToken()) {
          oprot.writeString(struct.userToken);
        }
        if (struct.isSetImageBaseId()) {
          oprot.writeString(struct.imageBaseId);
        }
        if (struct.isSetNewOwnerId()) {
          oprot.writeString(struct.newOwnerId);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, setImageOwner_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.userToken = iprot.readString();
          struct.setUserTokenIsSet(true);
        }
        if (incoming.get(1)) {
          struct.imageBaseId = iprot.readString();
          struct.setImageBaseIdIsSet(true);
        }
        if (incoming.get(2)) {
          struct.newOwnerId = iprot.readString();
          struct.setNewOwnerIdIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3);

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

    public TAuthorizationException authError; // required
    public TNotFoundException notFound; // required
    public TInvocationException serverError; // 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 {
      AUTH_ERROR((short)1, "authError"),
      NOT_FOUND((short)2, "notFound"),
      SERVER_ERROR((short)3, "serverError");

      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: // AUTH_ERROR
            return AUTH_ERROR;
          case 2: // NOT_FOUND
            return NOT_FOUND;
          case 3: // SERVER_ERROR
            return SERVER_ERROR;
          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
    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.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setImageOwner_result.class, metaDataMap);
    }

    public setImageOwner_result() {
    }

    public setImageOwner_result(
      TAuthorizationException authError,
      TNotFoundException notFound,
      TInvocationException serverError)
    {
      this();
      this.authError = authError;
      this.notFound = notFound;
      this.serverError = serverError;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public setImageOwner_result(setImageOwner_result other) {
      if (other.isSetAuthError()) {
        this.authError = new TAuthorizationException(other.authError);
      }
      if (other.isSetNotFound()) {
        this.notFound = new TNotFoundException(other.notFound);
      }
      if (other.isSetServerError()) {
        this.serverError = new TInvocationException(other.serverError);
      }
    }

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

    @Override
    public void clear() {
      this.authError = null;
      this.notFound = null;
      this.serverError = null;
    }

    public TAuthorizationException getAuthError() {
      return this.authError;
    }

    public setImageOwner_result setAuthError(TAuthorizationException authError) {
      this.authError = authError;
      return this;
    }

    public void unsetAuthError() {
      this.authError = null;
    }

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

    public void setAuthErrorIsSet(boolean value) {
      if (!value) {
        this.authError = null;
      }
    }

    public TNotFoundException getNotFound() {
      return this.notFound;
    }

    public setImageOwner_result setNotFound(TNotFoundException notFound) {
      this.notFound = notFound;
      return this;
    }

    public void unsetNotFound() {
      this.notFound = null;
    }

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

    public void setNotFoundIsSet(boolean value) {
      if (!value) {
        this.notFound = null;
      }
    }

    public TInvocationException getServerError() {
      return this.serverError;
    }

    public setImageOwner_result setServerError(TInvocationException serverError) {
      this.serverError = serverError;
      return this;
    }

    public void unsetServerError() {
      this.serverError = null;
    }

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

    public void setServerErrorIsSet(boolean value) {
      if (!value) {
        this.serverError = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case AUTH_ERROR:
        if (value == null) {
          unsetAuthError();
        } else {
          setAuthError((TAuthorizationException)value);
        }
        break;

      case NOT_FOUND:
        if (value == null) {
          unsetNotFound();
        } else {
          setNotFound((TNotFoundException)value);
        }
        break;

      case SERVER_ERROR:
        if (value == null) {
          unsetServerError();
        } else {
          setServerError((TInvocationException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case AUTH_ERROR:
        return getAuthError();

      case NOT_FOUND:
        return getNotFound();

      case SERVER_ERROR:
        return getServerError();

      }
      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 AUTH_ERROR:
        return isSetAuthError();
      case NOT_FOUND:
        return isSetNotFound();
      case SERVER_ERROR:
        return isSetServerError();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_authError = true && this.isSetAuthError();
      boolean that_present_authError = true && that.isSetAuthError();
      if (this_present_authError || that_present_authError) {
        if (!(this_present_authError && that_present_authError))
          return false;
        if (!this.authError.equals(that.authError))
          return false;
      }

      boolean this_present_notFound = true && this.isSetNotFound();
      boolean that_present_notFound = true && that.isSetNotFound();
      if (this_present_notFound || that_present_notFound) {
        if (!(this_present_notFound && that_present_notFound))
          return false;
        if (!this.notFound.equals(that.notFound))
          return false;
      }

      boolean this_present_serverError = true && this.isSetServerError();
      boolean that_present_serverError = true && that.isSetServerError();
      if (this_present_serverError || that_present_serverError) {
        if (!(this_present_serverError && that_present_serverError))
          return false;
        if (!this.serverError.equals(that.serverError))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_authError = true && (isSetAuthError());
      list.add(present_authError);
      if (present_authError)
        list.add(authError);

      boolean present_notFound = true && (isSetNotFound());
      list.add(present_notFound);
      if (present_notFound)
        list.add(notFound);

      boolean present_serverError = true && (isSetServerError());
      list.add(present_serverError);
      if (present_serverError)
        list.add(serverError);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFound()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetServerError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError);
        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("setImageOwner_result(");
      boolean first = true;

      sb.append("authError:");
      if (this.authError == null) {
        sb.append("null");
      } else {
        sb.append(this.authError);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("notFound:");
      if (this.notFound == null) {
        sb.append("null");
      } else {
        sb.append(this.notFound);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("serverError:");
      if (this.serverError == null) {
        sb.append("null");
      } else {
        sb.append(this.serverError);
      }
      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 {
        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 setImageOwner_resultStandardSchemeFactory implements SchemeFactory {
      public setImageOwner_resultStandardScheme getScheme() {
        return new setImageOwner_resultStandardScheme();
      }
    }

    private static class setImageOwner_resultStandardScheme extends StandardScheme<setImageOwner_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, setImageOwner_result 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: // AUTH_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.authError = new TAuthorizationException();
                struct.authError.read(iprot);
                struct.setAuthErrorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // NOT_FOUND
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.notFound = new TNotFoundException();
                struct.notFound.read(iprot);
                struct.setNotFoundIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // SERVER_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.serverError = new TInvocationException();
                struct.serverError.read(iprot);
                struct.setServerErrorIsSet(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, setImageOwner_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.authError != null) {
          oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC);
          struct.authError.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.notFound != null) {
          oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC);
          struct.notFound.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.serverError != null) {
          oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC);
          struct.serverError.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class setImageOwner_resultTupleSchemeFactory implements SchemeFactory {
      public setImageOwner_resultTupleScheme getScheme() {
        return new setImageOwner_resultTupleScheme();
      }
    }

    private static class setImageOwner_resultTupleScheme extends TupleScheme<setImageOwner_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, setImageOwner_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetAuthError()) {
          optionals.set(0);
        }
        if (struct.isSetNotFound()) {
          optionals.set(1);
        }
        if (struct.isSetServerError()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetAuthError()) {
          struct.authError.write(oprot);
        }
        if (struct.isSetNotFound()) {
          struct.notFound.write(oprot);
        }
        if (struct.isSetServerError()) {
          struct.serverError.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, setImageOwner_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.authError = new TAuthorizationException();
          struct.authError.read(iprot);
          struct.setAuthErrorIsSet(true);
        }
        if (incoming.get(1)) {
          struct.notFound = new TNotFoundException();
          struct.notFound.read(iprot);
          struct.setNotFoundIsSet(true);
        }
        if (incoming.get(2)) {
          struct.serverError = new TInvocationException();
          struct.serverError.read(iprot);
          struct.setServerErrorIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField IMAGE_BASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageBaseId", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField EXPIRE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("expireTime", org.apache.thrift.protocol.TType.I64, (short)3);

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

    public String userToken; // required
    public String imageBaseId; // required
    public long expireTime; // 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 {
      USER_TOKEN((short)1, "userToken"),
      IMAGE_BASE_ID((short)2, "imageBaseId"),
      EXPIRE_TIME((short)3, "expireTime");

      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: // USER_TOKEN
            return USER_TOKEN;
          case 2: // IMAGE_BASE_ID
            return IMAGE_BASE_ID;
          case 3: // EXPIRE_TIME
            return EXPIRE_TIME;
          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 __EXPIRETIME_ISSET_ID = 0;
    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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "Token")));
      tmpMap.put(_Fields.IMAGE_BASE_ID, new org.apache.thrift.meta_data.FieldMetaData("imageBaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "UUID")));
      tmpMap.put(_Fields.EXPIRE_TIME, new org.apache.thrift.meta_data.FieldMetaData("expireTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64          , "UnixTimestamp")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setImageVersionExpiry_args.class, metaDataMap);
    }

    public setImageVersionExpiry_args() {
    }

    public setImageVersionExpiry_args(
      String userToken,
      String imageBaseId,
      long expireTime)
    {
      this();
      this.userToken = userToken;
      this.imageBaseId = imageBaseId;
      this.expireTime = expireTime;
      setExpireTimeIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public setImageVersionExpiry_args(setImageVersionExpiry_args other) {
      __isset_bitfield = other.__isset_bitfield;
      if (other.isSetUserToken()) {
        this.userToken = other.userToken;
      }
      if (other.isSetImageBaseId()) {
        this.imageBaseId = other.imageBaseId;
      }
      this.expireTime = other.expireTime;
    }

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

    @Override
    public void clear() {
      this.userToken = null;
      this.imageBaseId = null;
      setExpireTimeIsSet(false);
      this.expireTime = 0;
    }

    public String getUserToken() {
      return this.userToken;
    }

    public setImageVersionExpiry_args setUserToken(String userToken) {
      this.userToken = userToken;
      return this;
    }

    public void unsetUserToken() {
      this.userToken = null;
    }

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

    public void setUserTokenIsSet(boolean value) {
      if (!value) {
        this.userToken = null;
      }
    }

    public String getImageBaseId() {
      return this.imageBaseId;
    }

    public setImageVersionExpiry_args setImageBaseId(String imageBaseId) {
      this.imageBaseId = imageBaseId;
      return this;
    }

    public void unsetImageBaseId() {
      this.imageBaseId = null;
    }

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

    public void setImageBaseIdIsSet(boolean value) {
      if (!value) {
        this.imageBaseId = null;
      }
    }

    public long getExpireTime() {
      return this.expireTime;
    }

    public setImageVersionExpiry_args setExpireTime(long expireTime) {
      this.expireTime = expireTime;
      setExpireTimeIsSet(true);
      return this;
    }

    public void unsetExpireTime() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EXPIRETIME_ISSET_ID);
    }

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

    public void setExpireTimeIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EXPIRETIME_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_TOKEN:
        if (value == null) {
          unsetUserToken();
        } else {
          setUserToken((String)value);
        }
        break;

      case IMAGE_BASE_ID:
        if (value == null) {
          unsetImageBaseId();
        } else {
          setImageBaseId((String)value);
        }
        break;

      case EXPIRE_TIME:
        if (value == null) {
          unsetExpireTime();
        } else {
          setExpireTime((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_TOKEN:
        return getUserToken();

      case IMAGE_BASE_ID:
        return getImageBaseId();

      case EXPIRE_TIME:
        return getExpireTime();

      }
      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 USER_TOKEN:
        return isSetUserToken();
      case IMAGE_BASE_ID:
        return isSetImageBaseId();
      case EXPIRE_TIME:
        return isSetExpireTime();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_userToken = true && this.isSetUserToken();
      boolean that_present_userToken = true && that.isSetUserToken();
      if (this_present_userToken || that_present_userToken) {
        if (!(this_present_userToken && that_present_userToken))
          return false;
        if (!this.userToken.equals(that.userToken))
          return false;
      }

      boolean this_present_imageBaseId = true && this.isSetImageBaseId();
      boolean that_present_imageBaseId = true && that.isSetImageBaseId();
      if (this_present_imageBaseId || that_present_imageBaseId) {
        if (!(this_present_imageBaseId && that_present_imageBaseId))
          return false;
        if (!this.imageBaseId.equals(that.imageBaseId))
          return false;
      }

      boolean this_present_expireTime = true;
      boolean that_present_expireTime = true;
      if (this_present_expireTime || that_present_expireTime) {
        if (!(this_present_expireTime && that_present_expireTime))
          return false;
        if (this.expireTime != that.expireTime)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_userToken = true && (isSetUserToken());
      list.add(present_userToken);
      if (present_userToken)
        list.add(userToken);

      boolean present_imageBaseId = true && (isSetImageBaseId());
      list.add(present_imageBaseId);
      if (present_imageBaseId)
        list.add(imageBaseId);

      boolean present_expireTime = true;
      list.add(present_expireTime);
      if (present_expireTime)
        list.add(expireTime);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserToken()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetImageBaseId()).compareTo(other.isSetImageBaseId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetImageBaseId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageBaseId, other.imageBaseId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetExpireTime()).compareTo(other.isSetExpireTime());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetExpireTime()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.expireTime, other.expireTime);
        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("setImageVersionExpiry_args(");
      boolean first = true;

      sb.append("userToken:");
      if (this.userToken == null) {
        sb.append("null");
      } else {
        sb.append(this.userToken);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("imageBaseId:");
      if (this.imageBaseId == null) {
        sb.append("null");
      } else {
        sb.append(this.imageBaseId);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("expireTime:");
      sb.append(this.expireTime);
      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 setImageVersionExpiry_argsStandardSchemeFactory implements SchemeFactory {
      public setImageVersionExpiry_argsStandardScheme getScheme() {
        return new setImageVersionExpiry_argsStandardScheme();
      }
    }

    private static class setImageVersionExpiry_argsStandardScheme extends StandardScheme<setImageVersionExpiry_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, setImageVersionExpiry_args 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: // USER_TOKEN
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.userToken = iprot.readString();
                struct.setUserTokenIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // IMAGE_BASE_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.imageBaseId = iprot.readString();
                struct.setImageBaseIdIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // EXPIRE_TIME
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.expireTime = iprot.readI64();
                struct.setExpireTimeIsSet(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, setImageVersionExpiry_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.userToken != null) {
          oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
          oprot.writeString(struct.userToken);
          oprot.writeFieldEnd();
        }
        if (struct.imageBaseId != null) {
          oprot.writeFieldBegin(IMAGE_BASE_ID_FIELD_DESC);
          oprot.writeString(struct.imageBaseId);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldBegin(EXPIRE_TIME_FIELD_DESC);
        oprot.writeI64(struct.expireTime);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class setImageVersionExpiry_argsTupleSchemeFactory implements SchemeFactory {
      public setImageVersionExpiry_argsTupleScheme getScheme() {
        return new setImageVersionExpiry_argsTupleScheme();
      }
    }

    private static class setImageVersionExpiry_argsTupleScheme extends TupleScheme<setImageVersionExpiry_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, setImageVersionExpiry_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetUserToken()) {
          optionals.set(0);
        }
        if (struct.isSetImageBaseId()) {
          optionals.set(1);
        }
        if (struct.isSetExpireTime()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetUserToken()) {
          oprot.writeString(struct.userToken);
        }
        if (struct.isSetImageBaseId()) {
          oprot.writeString(struct.imageBaseId);
        }
        if (struct.isSetExpireTime()) {
          oprot.writeI64(struct.expireTime);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, setImageVersionExpiry_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.userToken = iprot.readString();
          struct.setUserTokenIsSet(true);
        }
        if (incoming.get(1)) {
          struct.imageBaseId = iprot.readString();
          struct.setImageBaseIdIsSet(true);
        }
        if (incoming.get(2)) {
          struct.expireTime = iprot.readI64();
          struct.setExpireTimeIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3);
    private static final org.apache.thrift.protocol.TField DATE_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("dateError", org.apache.thrift.protocol.TType.STRUCT, (short)4);

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

    public TAuthorizationException authError; // required
    public TNotFoundException notFound; // required
    public TInvocationException serverError; // required
    public TInvalidDateParam dateError; // 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 {
      AUTH_ERROR((short)1, "authError"),
      NOT_FOUND((short)2, "notFound"),
      SERVER_ERROR((short)3, "serverError"),
      DATE_ERROR((short)4, "dateError");

      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: // AUTH_ERROR
            return AUTH_ERROR;
          case 2: // NOT_FOUND
            return NOT_FOUND;
          case 3: // SERVER_ERROR
            return SERVER_ERROR;
          case 4: // DATE_ERROR
            return DATE_ERROR;
          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
    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.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.DATE_ERROR, new org.apache.thrift.meta_data.FieldMetaData("dateError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setImageVersionExpiry_result.class, metaDataMap);
    }

    public setImageVersionExpiry_result() {
    }

    public setImageVersionExpiry_result(
      TAuthorizationException authError,
      TNotFoundException notFound,
      TInvocationException serverError,
      TInvalidDateParam dateError)
    {
      this();
      this.authError = authError;
      this.notFound = notFound;
      this.serverError = serverError;
      this.dateError = dateError;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public setImageVersionExpiry_result(setImageVersionExpiry_result other) {
      if (other.isSetAuthError()) {
        this.authError = new TAuthorizationException(other.authError);
      }
      if (other.isSetNotFound()) {
        this.notFound = new TNotFoundException(other.notFound);
      }
      if (other.isSetServerError()) {
        this.serverError = new TInvocationException(other.serverError);
      }
      if (other.isSetDateError()) {
        this.dateError = new TInvalidDateParam(other.dateError);
      }
    }

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

    @Override
    public void clear() {
      this.authError = null;
      this.notFound = null;
      this.serverError = null;
      this.dateError = null;
    }

    public TAuthorizationException getAuthError() {
      return this.authError;
    }

    public setImageVersionExpiry_result setAuthError(TAuthorizationException authError) {
      this.authError = authError;
      return this;
    }

    public void unsetAuthError() {
      this.authError = null;
    }

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

    public void setAuthErrorIsSet(boolean value) {
      if (!value) {
        this.authError = null;
      }
    }

    public TNotFoundException getNotFound() {
      return this.notFound;
    }

    public setImageVersionExpiry_result setNotFound(TNotFoundException notFound) {
      this.notFound = notFound;
      return this;
    }

    public void unsetNotFound() {
      this.notFound = null;
    }

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

    public void setNotFoundIsSet(boolean value) {
      if (!value) {
        this.notFound = null;
      }
    }

    public TInvocationException getServerError() {
      return this.serverError;
    }

    public setImageVersionExpiry_result setServerError(TInvocationException serverError) {
      this.serverError = serverError;
      return this;
    }

    public void unsetServerError() {
      this.serverError = null;
    }

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

    public void setServerErrorIsSet(boolean value) {
      if (!value) {
        this.serverError = null;
      }
    }

    public TInvalidDateParam getDateError() {
      return this.dateError;
    }

    public setImageVersionExpiry_result setDateError(TInvalidDateParam dateError) {
      this.dateError = dateError;
      return this;
    }

    public void unsetDateError() {
      this.dateError = null;
    }

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

    public void setDateErrorIsSet(boolean value) {
      if (!value) {
        this.dateError = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case AUTH_ERROR:
        if (value == null) {
          unsetAuthError();
        } else {
          setAuthError((TAuthorizationException)value);
        }
        break;

      case NOT_FOUND:
        if (value == null) {
          unsetNotFound();
        } else {
          setNotFound((TNotFoundException)value);
        }
        break;

      case SERVER_ERROR:
        if (value == null) {
          unsetServerError();
        } else {
          setServerError((TInvocationException)value);
        }
        break;

      case DATE_ERROR:
        if (value == null) {
          unsetDateError();
        } else {
          setDateError((TInvalidDateParam)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case AUTH_ERROR:
        return getAuthError();

      case NOT_FOUND:
        return getNotFound();

      case SERVER_ERROR:
        return getServerError();

      case DATE_ERROR:
        return getDateError();

      }
      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 AUTH_ERROR:
        return isSetAuthError();
      case NOT_FOUND:
        return isSetNotFound();
      case SERVER_ERROR:
        return isSetServerError();
      case DATE_ERROR:
        return isSetDateError();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_authError = true && this.isSetAuthError();
      boolean that_present_authError = true && that.isSetAuthError();
      if (this_present_authError || that_present_authError) {
        if (!(this_present_authError && that_present_authError))
          return false;
        if (!this.authError.equals(that.authError))
          return false;
      }

      boolean this_present_notFound = true && this.isSetNotFound();
      boolean that_present_notFound = true && that.isSetNotFound();
      if (this_present_notFound || that_present_notFound) {
        if (!(this_present_notFound && that_present_notFound))
          return false;
        if (!this.notFound.equals(that.notFound))
          return false;
      }

      boolean this_present_serverError = true && this.isSetServerError();
      boolean that_present_serverError = true && that.isSetServerError();
      if (this_present_serverError || that_present_serverError) {
        if (!(this_present_serverError && that_present_serverError))
          return false;
        if (!this.serverError.equals(that.serverError))
          return false;
      }

      boolean this_present_dateError = true && this.isSetDateError();
      boolean that_present_dateError = true && that.isSetDateError();
      if (this_present_dateError || that_present_dateError) {
        if (!(this_present_dateError && that_present_dateError))
          return false;
        if (!this.dateError.equals(that.dateError))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_authError = true && (isSetAuthError());
      list.add(present_authError);
      if (present_authError)
        list.add(authError);

      boolean present_notFound = true && (isSetNotFound());
      list.add(present_notFound);
      if (present_notFound)
        list.add(notFound);

      boolean present_serverError = true && (isSetServerError());
      list.add(present_serverError);
      if (present_serverError)
        list.add(serverError);

      boolean present_dateError = true && (isSetDateError());
      list.add(present_dateError);
      if (present_dateError)
        list.add(dateError);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFound()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetServerError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetDateError()).compareTo(other.isSetDateError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetDateError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dateError, other.dateError);
        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("setImageVersionExpiry_result(");
      boolean first = true;

      sb.append("authError:");
      if (this.authError == null) {
        sb.append("null");
      } else {
        sb.append(this.authError);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("notFound:");
      if (this.notFound == null) {
        sb.append("null");
      } else {
        sb.append(this.notFound);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("serverError:");
      if (this.serverError == null) {
        sb.append("null");
      } else {
        sb.append(this.serverError);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("dateError:");
      if (this.dateError == null) {
        sb.append("null");
      } else {
        sb.append(this.dateError);
      }
      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 {
        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 setImageVersionExpiry_resultStandardSchemeFactory implements SchemeFactory {
      public setImageVersionExpiry_resultStandardScheme getScheme() {
        return new setImageVersionExpiry_resultStandardScheme();
      }
    }

    private static class setImageVersionExpiry_resultStandardScheme extends StandardScheme<setImageVersionExpiry_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, setImageVersionExpiry_result 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: // AUTH_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.authError = new TAuthorizationException();
                struct.authError.read(iprot);
                struct.setAuthErrorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // NOT_FOUND
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.notFound = new TNotFoundException();
                struct.notFound.read(iprot);
                struct.setNotFoundIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // SERVER_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.serverError = new TInvocationException();
                struct.serverError.read(iprot);
                struct.setServerErrorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 4: // DATE_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.dateError = new TInvalidDateParam();
                struct.dateError.read(iprot);
                struct.setDateErrorIsSet(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, setImageVersionExpiry_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.authError != null) {
          oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC);
          struct.authError.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.notFound != null) {
          oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC);
          struct.notFound.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.serverError != null) {
          oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC);
          struct.serverError.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.dateError != null) {
          oprot.writeFieldBegin(DATE_ERROR_FIELD_DESC);
          struct.dateError.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class setImageVersionExpiry_resultTupleSchemeFactory implements SchemeFactory {
      public setImageVersionExpiry_resultTupleScheme getScheme() {
        return new setImageVersionExpiry_resultTupleScheme();
      }
    }

    private static class setImageVersionExpiry_resultTupleScheme extends TupleScheme<setImageVersionExpiry_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, setImageVersionExpiry_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetAuthError()) {
          optionals.set(0);
        }
        if (struct.isSetNotFound()) {
          optionals.set(1);
        }
        if (struct.isSetServerError()) {
          optionals.set(2);
        }
        if (struct.isSetDateError()) {
          optionals.set(3);
        }
        oprot.writeBitSet(optionals, 4);
        if (struct.isSetAuthError()) {
          struct.authError.write(oprot);
        }
        if (struct.isSetNotFound()) {
          struct.notFound.write(oprot);
        }
        if (struct.isSetServerError()) {
          struct.serverError.write(oprot);
        }
        if (struct.isSetDateError()) {
          struct.dateError.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, setImageVersionExpiry_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(4);
        if (incoming.get(0)) {
          struct.authError = new TAuthorizationException();
          struct.authError.read(iprot);
          struct.setAuthErrorIsSet(true);
        }
        if (incoming.get(1)) {
          struct.notFound = new TNotFoundException();
          struct.notFound.read(iprot);
          struct.setNotFoundIsSet(true);
        }
        if (incoming.get(2)) {
          struct.serverError = new TInvocationException();
          struct.serverError.read(iprot);
          struct.setServerErrorIsSet(true);
        }
        if (incoming.get(3)) {
          struct.dateError = new TInvalidDateParam();
          struct.dateError.read(iprot);
          struct.setDateErrorIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField IMAGE_VERSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageVersionId", org.apache.thrift.protocol.TType.STRING, (short)2);

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

    public String userToken; // required
    public String imageVersionId; // 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 {
      USER_TOKEN((short)1, "userToken"),
      IMAGE_VERSION_ID((short)2, "imageVersionId");

      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: // USER_TOKEN
            return USER_TOKEN;
          case 2: // IMAGE_VERSION_ID
            return IMAGE_VERSION_ID;
          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
    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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "Token")));
      tmpMap.put(_Fields.IMAGE_VERSION_ID, new org.apache.thrift.meta_data.FieldMetaData("imageVersionId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "UUID")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageVersionVirtConfig_args.class, metaDataMap);
    }

    public getImageVersionVirtConfig_args() {
    }

    public getImageVersionVirtConfig_args(
      String userToken,
      String imageVersionId)
    {
      this();
      this.userToken = userToken;
      this.imageVersionId = imageVersionId;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getImageVersionVirtConfig_args(getImageVersionVirtConfig_args other) {
      if (other.isSetUserToken()) {
        this.userToken = other.userToken;
      }
      if (other.isSetImageVersionId()) {
        this.imageVersionId = other.imageVersionId;
      }
    }

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

    @Override
    public void clear() {
      this.userToken = null;
      this.imageVersionId = null;
    }

    public String getUserToken() {
      return this.userToken;
    }

    public getImageVersionVirtConfig_args setUserToken(String userToken) {
      this.userToken = userToken;
      return this;
    }

    public void unsetUserToken() {
      this.userToken = null;
    }

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

    public void setUserTokenIsSet(boolean value) {
      if (!value) {
        this.userToken = null;
      }
    }

    public String getImageVersionId() {
      return this.imageVersionId;
    }

    public getImageVersionVirtConfig_args setImageVersionId(String imageVersionId) {
      this.imageVersionId = imageVersionId;
      return this;
    }

    public void unsetImageVersionId() {
      this.imageVersionId = null;
    }

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

    public void setImageVersionIdIsSet(boolean value) {
      if (!value) {
        this.imageVersionId = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_TOKEN:
        if (value == null) {
          unsetUserToken();
        } else {
          setUserToken((String)value);
        }
        break;

      case IMAGE_VERSION_ID:
        if (value == null) {
          unsetImageVersionId();
        } else {
          setImageVersionId((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_TOKEN:
        return getUserToken();

      case IMAGE_VERSION_ID:
        return getImageVersionId();

      }
      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 USER_TOKEN:
        return isSetUserToken();
      case IMAGE_VERSION_ID:
        return isSetImageVersionId();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_userToken = true && this.isSetUserToken();
      boolean that_present_userToken = true && that.isSetUserToken();
      if (this_present_userToken || that_present_userToken) {
        if (!(this_present_userToken && that_present_userToken))
          return false;
        if (!this.userToken.equals(that.userToken))
          return false;
      }

      boolean this_present_imageVersionId = true && this.isSetImageVersionId();
      boolean that_present_imageVersionId = true && that.isSetImageVersionId();
      if (this_present_imageVersionId || that_present_imageVersionId) {
        if (!(this_present_imageVersionId && that_present_imageVersionId))
          return false;
        if (!this.imageVersionId.equals(that.imageVersionId))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_userToken = true && (isSetUserToken());
      list.add(present_userToken);
      if (present_userToken)
        list.add(userToken);

      boolean present_imageVersionId = true && (isSetImageVersionId());
      list.add(present_imageVersionId);
      if (present_imageVersionId)
        list.add(imageVersionId);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserToken()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetImageVersionId()).compareTo(other.isSetImageVersionId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetImageVersionId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageVersionId, other.imageVersionId);
        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("getImageVersionVirtConfig_args(");
      boolean first = true;

      sb.append("userToken:");
      if (this.userToken == null) {
        sb.append("null");
      } else {
        sb.append(this.userToken);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("imageVersionId:");
      if (this.imageVersionId == null) {
        sb.append("null");
      } else {
        sb.append(this.imageVersionId);
      }
      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 {
        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 getImageVersionVirtConfig_argsStandardSchemeFactory implements SchemeFactory {
      public getImageVersionVirtConfig_argsStandardScheme getScheme() {
        return new getImageVersionVirtConfig_argsStandardScheme();
      }
    }

    private static class getImageVersionVirtConfig_argsStandardScheme extends StandardScheme<getImageVersionVirtConfig_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getImageVersionVirtConfig_args 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: // USER_TOKEN
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.userToken = iprot.readString();
                struct.setUserTokenIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // IMAGE_VERSION_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.imageVersionId = iprot.readString();
                struct.setImageVersionIdIsSet(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, getImageVersionVirtConfig_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.userToken != null) {
          oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
          oprot.writeString(struct.userToken);
          oprot.writeFieldEnd();
        }
        if (struct.imageVersionId != null) {
          oprot.writeFieldBegin(IMAGE_VERSION_ID_FIELD_DESC);
          oprot.writeString(struct.imageVersionId);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getImageVersionVirtConfig_argsTupleSchemeFactory implements SchemeFactory {
      public getImageVersionVirtConfig_argsTupleScheme getScheme() {
        return new getImageVersionVirtConfig_argsTupleScheme();
      }
    }

    private static class getImageVersionVirtConfig_argsTupleScheme extends TupleScheme<getImageVersionVirtConfig_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getImageVersionVirtConfig_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetUserToken()) {
          optionals.set(0);
        }
        if (struct.isSetImageVersionId()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetUserToken()) {
          oprot.writeString(struct.userToken);
        }
        if (struct.isSetImageVersionId()) {
          oprot.writeString(struct.imageVersionId);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getImageVersionVirtConfig_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.userToken = iprot.readString();
          struct.setUserTokenIsSet(true);
        }
        if (incoming.get(1)) {
          struct.imageVersionId = iprot.readString();
          struct.setImageVersionIdIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
    private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3);

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

    public ByteBuffer success; // required
    public TAuthorizationException authError; // required
    public TNotFoundException notFound; // required
    public TInvocationException serverError; // 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 {
      SUCCESS((short)0, "success"),
      AUTH_ERROR((short)1, "authError"),
      NOT_FOUND((short)2, "notFound"),
      SERVER_ERROR((short)3, "serverError");

      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 0: // SUCCESS
            return SUCCESS;
          case 1: // AUTH_ERROR
            return AUTH_ERROR;
          case 2: // NOT_FOUND
            return NOT_FOUND;
          case 3: // SERVER_ERROR
            return SERVER_ERROR;
          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
    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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , true)));
      tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageVersionVirtConfig_result.class, metaDataMap);
    }

    public getImageVersionVirtConfig_result() {
    }

    public getImageVersionVirtConfig_result(
      ByteBuffer success,
      TAuthorizationException authError,
      TNotFoundException notFound,
      TInvocationException serverError)
    {
      this();
      this.success = org.apache.thrift.TBaseHelper.copyBinary(success);
      this.authError = authError;
      this.notFound = notFound;
      this.serverError = serverError;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getImageVersionVirtConfig_result(getImageVersionVirtConfig_result other) {
      if (other.isSetSuccess()) {
        this.success = org.apache.thrift.TBaseHelper.copyBinary(other.success);
      }
      if (other.isSetAuthError()) {
        this.authError = new TAuthorizationException(other.authError);
      }
      if (other.isSetNotFound()) {
        this.notFound = new TNotFoundException(other.notFound);
      }
      if (other.isSetServerError()) {
        this.serverError = new TInvocationException(other.serverError);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.authError = null;
      this.notFound = null;
      this.serverError = null;
    }

    public byte[] getSuccess() {
      setSuccess(org.apache.thrift.TBaseHelper.rightSize(success));
      return success == null ? null : success.array();
    }

    public ByteBuffer bufferForSuccess() {
      return org.apache.thrift.TBaseHelper.copyBinary(success);
    }

    public getImageVersionVirtConfig_result setSuccess(byte[] success) {
      this.success = success == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(success, success.length));
      return this;
    }

    public getImageVersionVirtConfig_result setSuccess(ByteBuffer success) {
      this.success = org.apache.thrift.TBaseHelper.copyBinary(success);
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

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

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public TAuthorizationException getAuthError() {
      return this.authError;
    }

    public getImageVersionVirtConfig_result setAuthError(TAuthorizationException authError) {
      this.authError = authError;
      return this;
    }

    public void unsetAuthError() {
      this.authError = null;
    }

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

    public void setAuthErrorIsSet(boolean value) {
      if (!value) {
        this.authError = null;
      }
    }

    public TNotFoundException getNotFound() {
      return this.notFound;
    }

    public getImageVersionVirtConfig_result setNotFound(TNotFoundException notFound) {
      this.notFound = notFound;
      return this;
    }

    public void unsetNotFound() {
      this.notFound = null;
    }

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

    public void setNotFoundIsSet(boolean value) {
      if (!value) {
        this.notFound = null;
      }
    }

    public TInvocationException getServerError() {
      return this.serverError;
    }

    public getImageVersionVirtConfig_result setServerError(TInvocationException serverError) {
      this.serverError = serverError;
      return this;
    }

    public void unsetServerError() {
      this.serverError = null;
    }

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

    public void setServerErrorIsSet(boolean value) {
      if (!value) {
        this.serverError = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((ByteBuffer)value);
        }
        break;

      case AUTH_ERROR:
        if (value == null) {
          unsetAuthError();
        } else {
          setAuthError((TAuthorizationException)value);
        }
        break;

      case NOT_FOUND:
        if (value == null) {
          unsetNotFound();
        } else {
          setNotFound((TNotFoundException)value);
        }
        break;

      case SERVER_ERROR:
        if (value == null) {
          unsetServerError();
        } else {
          setServerError((TInvocationException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case AUTH_ERROR:
        return getAuthError();

      case NOT_FOUND:
        return getNotFound();

      case SERVER_ERROR:
        return getServerError();

      }
      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 SUCCESS:
        return isSetSuccess();
      case AUTH_ERROR:
        return isSetAuthError();
      case NOT_FOUND:
        return isSetNotFound();
      case SERVER_ERROR:
        return isSetServerError();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_authError = true && this.isSetAuthError();
      boolean that_present_authError = true && that.isSetAuthError();
      if (this_present_authError || that_present_authError) {
        if (!(this_present_authError && that_present_authError))
          return false;
        if (!this.authError.equals(that.authError))
          return false;
      }

      boolean this_present_notFound = true && this.isSetNotFound();
      boolean that_present_notFound = true && that.isSetNotFound();
      if (this_present_notFound || that_present_notFound) {
        if (!(this_present_notFound && that_present_notFound))
          return false;
        if (!this.notFound.equals(that.notFound))
          return false;
      }

      boolean this_present_serverError = true && this.isSetServerError();
      boolean that_present_serverError = true && that.isSetServerError();
      if (this_present_serverError || that_present_serverError) {
        if (!(this_present_serverError && that_present_serverError))
          return false;
        if (!this.serverError.equals(that.serverError))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_authError = true && (isSetAuthError());
      list.add(present_authError);
      if (present_authError)
        list.add(authError);

      boolean present_notFound = true && (isSetNotFound());
      list.add(present_notFound);
      if (present_notFound)
        list.add(notFound);

      boolean present_serverError = true && (isSetServerError());
      list.add(present_serverError);
      if (present_serverError)
        list.add(serverError);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFound()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetServerError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError);
        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("getImageVersionVirtConfig_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        org.apache.thrift.TBaseHelper.toString(this.success, sb);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("authError:");
      if (this.authError == null) {
        sb.append("null");
      } else {
        sb.append(this.authError);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("notFound:");
      if (this.notFound == null) {
        sb.append("null");
      } else {
        sb.append(this.notFound);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("serverError:");
      if (this.serverError == null) {
        sb.append("null");
      } else {
        sb.append(this.serverError);
      }
      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 {
        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 getImageVersionVirtConfig_resultStandardSchemeFactory implements SchemeFactory {
      public getImageVersionVirtConfig_resultStandardScheme getScheme() {
        return new getImageVersionVirtConfig_resultStandardScheme();
      }
    }

    private static class getImageVersionVirtConfig_resultStandardScheme extends StandardScheme<getImageVersionVirtConfig_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getImageVersionVirtConfig_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.success = iprot.readBinary();
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // AUTH_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.authError = new TAuthorizationException();
                struct.authError.read(iprot);
                struct.setAuthErrorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // NOT_FOUND
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.notFound = new TNotFoundException();
                struct.notFound.read(iprot);
                struct.setNotFoundIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // SERVER_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.serverError = new TInvocationException();
                struct.serverError.read(iprot);
                struct.setServerErrorIsSet(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, getImageVersionVirtConfig_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          oprot.writeBinary(struct.success);
          oprot.writeFieldEnd();
        }
        if (struct.authError != null) {
          oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC);
          struct.authError.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.notFound != null) {
          oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC);
          struct.notFound.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.serverError != null) {
          oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC);
          struct.serverError.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getImageVersionVirtConfig_resultTupleSchemeFactory implements SchemeFactory {
      public getImageVersionVirtConfig_resultTupleScheme getScheme() {
        return new getImageVersionVirtConfig_resultTupleScheme();
      }
    }

    private static class getImageVersionVirtConfig_resultTupleScheme extends TupleScheme<getImageVersionVirtConfig_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getImageVersionVirtConfig_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetAuthError()) {
          optionals.set(1);
        }
        if (struct.isSetNotFound()) {
          optionals.set(2);
        }
        if (struct.isSetServerError()) {
          optionals.set(3);
        }
        oprot.writeBitSet(optionals, 4);
        if (struct.isSetSuccess()) {
          oprot.writeBinary(struct.success);
        }
        if (struct.isSetAuthError()) {
          struct.authError.write(oprot);
        }
        if (struct.isSetNotFound()) {
          struct.notFound.write(oprot);
        }
        if (struct.isSetServerError()) {
          struct.serverError.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getImageVersionVirtConfig_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(4);
        if (incoming.get(0)) {
          struct.success = iprot.readBinary();
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.authError = new TAuthorizationException();
          struct.authError.read(iprot);
          struct.setAuthErrorIsSet(true);
        }
        if (incoming.get(2)) {
          struct.notFound = new TNotFoundException();
          struct.notFound.read(iprot);
          struct.setNotFoundIsSet(true);
        }
        if (incoming.get(3)) {
          struct.serverError = new TInvocationException();
          struct.serverError.read(iprot);
          struct.setServerErrorIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField IMAGE_VERSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageVersionId", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField META_FIELD_DESC = new org.apache.thrift.protocol.TField("meta", org.apache.thrift.protocol.TType.STRING, (short)3);

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

    public String userToken; // required
    public String imageVersionId; // required
    public ByteBuffer meta; // 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 {
      USER_TOKEN((short)1, "userToken"),
      IMAGE_VERSION_ID((short)2, "imageVersionId"),
      META((short)3, "meta");

      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: // USER_TOKEN
            return USER_TOKEN;
          case 2: // IMAGE_VERSION_ID
            return IMAGE_VERSION_ID;
          case 3: // META
            return META;
          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
    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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "Token")));
      tmpMap.put(_Fields.IMAGE_VERSION_ID, new org.apache.thrift.meta_data.FieldMetaData("imageVersionId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "UUID")));
      tmpMap.put(_Fields.META, new org.apache.thrift.meta_data.FieldMetaData("meta", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , true)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setImageVersionVirtConfig_args.class, metaDataMap);
    }

    public setImageVersionVirtConfig_args() {
    }

    public setImageVersionVirtConfig_args(
      String userToken,
      String imageVersionId,
      ByteBuffer meta)
    {
      this();
      this.userToken = userToken;
      this.imageVersionId = imageVersionId;
      this.meta = org.apache.thrift.TBaseHelper.copyBinary(meta);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public setImageVersionVirtConfig_args(setImageVersionVirtConfig_args other) {
      if (other.isSetUserToken()) {
        this.userToken = other.userToken;
      }
      if (other.isSetImageVersionId()) {
        this.imageVersionId = other.imageVersionId;
      }
      if (other.isSetMeta()) {
        this.meta = org.apache.thrift.TBaseHelper.copyBinary(other.meta);
      }
    }

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

    @Override
    public void clear() {
      this.userToken = null;
      this.imageVersionId = null;
      this.meta = null;
    }

    public String getUserToken() {
      return this.userToken;
    }

    public setImageVersionVirtConfig_args setUserToken(String userToken) {
      this.userToken = userToken;
      return this;
    }

    public void unsetUserToken() {
      this.userToken = null;
    }

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

    public void setUserTokenIsSet(boolean value) {
      if (!value) {
        this.userToken = null;
      }
    }

    public String getImageVersionId() {
      return this.imageVersionId;
    }

    public setImageVersionVirtConfig_args setImageVersionId(String imageVersionId) {
      this.imageVersionId = imageVersionId;
      return this;
    }

    public void unsetImageVersionId() {
      this.imageVersionId = null;
    }

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

    public void setImageVersionIdIsSet(boolean value) {
      if (!value) {
        this.imageVersionId = null;
      }
    }

    public byte[] getMeta() {
      setMeta(org.apache.thrift.TBaseHelper.rightSize(meta));
      return meta == null ? null : meta.array();
    }

    public ByteBuffer bufferForMeta() {
      return org.apache.thrift.TBaseHelper.copyBinary(meta);
    }

    public setImageVersionVirtConfig_args setMeta(byte[] meta) {
      this.meta = meta == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(meta, meta.length));
      return this;
    }

    public setImageVersionVirtConfig_args setMeta(ByteBuffer meta) {
      this.meta = org.apache.thrift.TBaseHelper.copyBinary(meta);
      return this;
    }

    public void unsetMeta() {
      this.meta = null;
    }

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

    public void setMetaIsSet(boolean value) {
      if (!value) {
        this.meta = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_TOKEN:
        if (value == null) {
          unsetUserToken();
        } else {
          setUserToken((String)value);
        }
        break;

      case IMAGE_VERSION_ID:
        if (value == null) {
          unsetImageVersionId();
        } else {
          setImageVersionId((String)value);
        }
        break;

      case META:
        if (value == null) {
          unsetMeta();
        } else {
          setMeta((ByteBuffer)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_TOKEN:
        return getUserToken();

      case IMAGE_VERSION_ID:
        return getImageVersionId();

      case META:
        return getMeta();

      }
      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 USER_TOKEN:
        return isSetUserToken();
      case IMAGE_VERSION_ID:
        return isSetImageVersionId();
      case META:
        return isSetMeta();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_userToken = true && this.isSetUserToken();
      boolean that_present_userToken = true && that.isSetUserToken();
      if (this_present_userToken || that_present_userToken) {
        if (!(this_present_userToken && that_present_userToken))
          return false;
        if (!this.userToken.equals(that.userToken))
          return false;
      }

      boolean this_present_imageVersionId = true && this.isSetImageVersionId();
      boolean that_present_imageVersionId = true && that.isSetImageVersionId();
      if (this_present_imageVersionId || that_present_imageVersionId) {
        if (!(this_present_imageVersionId && that_present_imageVersionId))
          return false;
        if (!this.imageVersionId.equals(that.imageVersionId))
          return false;
      }

      boolean this_present_meta = true && this.isSetMeta();
      boolean that_present_meta = true && that.isSetMeta();
      if (this_present_meta || that_present_meta) {
        if (!(this_present_meta && that_present_meta))
          return false;
        if (!this.meta.equals(that.meta))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_userToken = true && (isSetUserToken());
      list.add(present_userToken);
      if (present_userToken)
        list.add(userToken);

      boolean present_imageVersionId = true && (isSetImageVersionId());
      list.add(present_imageVersionId);
      if (present_imageVersionId)
        list.add(imageVersionId);

      boolean present_meta = true && (isSetMeta());
      list.add(present_meta);
      if (present_meta)
        list.add(meta);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserToken()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetImageVersionId()).compareTo(other.isSetImageVersionId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetImageVersionId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageVersionId, other.imageVersionId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetMeta()).compareTo(other.isSetMeta());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMeta()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.meta, other.meta);
        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("setImageVersionVirtConfig_args(");
      boolean first = true;

      sb.append("userToken:");
      if (this.userToken == null) {
        sb.append("null");
      } else {
        sb.append(this.userToken);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("imageVersionId:");
      if (this.imageVersionId == null) {
        sb.append("null");
      } else {
        sb.append(this.imageVersionId);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("meta:");
      if (this.meta == null) {
        sb.append("null");
      } else {
        org.apache.thrift.TBaseHelper.toString(this.meta, sb);
      }
      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 {
        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 setImageVersionVirtConfig_argsStandardSchemeFactory implements SchemeFactory {
      public setImageVersionVirtConfig_argsStandardScheme getScheme() {
        return new setImageVersionVirtConfig_argsStandardScheme();
      }
    }

    private static class setImageVersionVirtConfig_argsStandardScheme extends StandardScheme<setImageVersionVirtConfig_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, setImageVersionVirtConfig_args 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: // USER_TOKEN
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.userToken = iprot.readString();
                struct.setUserTokenIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // IMAGE_VERSION_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.imageVersionId = iprot.readString();
                struct.setImageVersionIdIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // META
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.meta = iprot.readBinary();
                struct.setMetaIsSet(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, setImageVersionVirtConfig_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.userToken != null) {
          oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
          oprot.writeString(struct.userToken);
          oprot.writeFieldEnd();
        }
        if (struct.imageVersionId != null) {
          oprot.writeFieldBegin(IMAGE_VERSION_ID_FIELD_DESC);
          oprot.writeString(struct.imageVersionId);
          oprot.writeFieldEnd();
        }
        if (struct.meta != null) {
          oprot.writeFieldBegin(META_FIELD_DESC);
          oprot.writeBinary(struct.meta);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class setImageVersionVirtConfig_argsTupleSchemeFactory implements SchemeFactory {
      public setImageVersionVirtConfig_argsTupleScheme getScheme() {
        return new setImageVersionVirtConfig_argsTupleScheme();
      }
    }

    private static class setImageVersionVirtConfig_argsTupleScheme extends TupleScheme<setImageVersionVirtConfig_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, setImageVersionVirtConfig_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetUserToken()) {
          optionals.set(0);
        }
        if (struct.isSetImageVersionId()) {
          optionals.set(1);
        }
        if (struct.isSetMeta()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetUserToken()) {
          oprot.writeString(struct.userToken);
        }
        if (struct.isSetImageVersionId()) {
          oprot.writeString(struct.imageVersionId);
        }
        if (struct.isSetMeta()) {
          oprot.writeBinary(struct.meta);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, setImageVersionVirtConfig_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.userToken = iprot.readString();
          struct.setUserTokenIsSet(true);
        }
        if (incoming.get(1)) {
          struct.imageVersionId = iprot.readString();
          struct.setImageVersionIdIsSet(true);
        }
        if (incoming.get(2)) {
          struct.meta = iprot.readBinary();
          struct.setMetaIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3);

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

    public TAuthorizationException authError; // required
    public TNotFoundException notFound; // required
    public TInvocationException serverError; // 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 {
      AUTH_ERROR((short)1, "authError"),
      NOT_FOUND((short)2, "notFound"),
      SERVER_ERROR((short)3, "serverError");

      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: // AUTH_ERROR
            return AUTH_ERROR;
          case 2: // NOT_FOUND
            return NOT_FOUND;
          case 3: // SERVER_ERROR
            return SERVER_ERROR;
          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
    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.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setImageVersionVirtConfig_result.class, metaDataMap);
    }

    public setImageVersionVirtConfig_result() {
    }

    public setImageVersionVirtConfig_result(
      TAuthorizationException authError,
      TNotFoundException notFound,
      TInvocationException serverError)
    {
      this();
      this.authError = authError;
      this.notFound = notFound;
      this.serverError = serverError;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public setImageVersionVirtConfig_result(setImageVersionVirtConfig_result other) {
      if (other.isSetAuthError()) {
        this.authError = new TAuthorizationException(other.authError);
      }
      if (other.isSetNotFound()) {
        this.notFound = new TNotFoundException(other.notFound);
      }
      if (other.isSetServerError()) {
        this.serverError = new TInvocationException(other.serverError);
      }
    }

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

    @Override
    public void clear() {
      this.authError = null;
      this.notFound = null;
      this.serverError = null;
    }

    public TAuthorizationException getAuthError() {
      return this.authError;
    }

    public setImageVersionVirtConfig_result setAuthError(TAuthorizationException authError) {
      this.authError = authError;
      return this;
    }

    public void unsetAuthError() {
      this.authError = null;
    }

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

    public void setAuthErrorIsSet(boolean value) {
      if (!value) {
        this.authError = null;
      }
    }

    public TNotFoundException getNotFound() {
      return this.notFound;
    }

    public setImageVersionVirtConfig_result setNotFound(TNotFoundException notFound) {
      this.notFound = notFound;
      return this;
    }

    public void unsetNotFound() {
      this.notFound = null;
    }

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

    public void setNotFoundIsSet(boolean value) {
      if (!value) {
        this.notFound = null;
      }
    }

    public TInvocationException getServerError() {
      return this.serverError;
    }

    public setImageVersionVirtConfig_result setServerError(TInvocationException serverError) {
      this.serverError = serverError;
      return this;
    }

    public void unsetServerError() {
      this.serverError = null;
    }

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

    public void setServerErrorIsSet(boolean value) {
      if (!value) {
        this.serverError = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case AUTH_ERROR:
        if (value == null) {
          unsetAuthError();
        } else {
          setAuthError((TAuthorizationException)value);
        }
        break;

      case NOT_FOUND:
        if (value == null) {
          unsetNotFound();
        } else {
          setNotFound((TNotFoundException)value);
        }
        break;

      case SERVER_ERROR:
        if (value == null) {
          unsetServerError();
        } else {
          setServerError((TInvocationException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case AUTH_ERROR:
        return getAuthError();

      case NOT_FOUND:
        return getNotFound();

      case SERVER_ERROR:
        return getServerError();

      }
      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 AUTH_ERROR:
        return isSetAuthError();
      case NOT_FOUND:
        return isSetNotFound();
      case SERVER_ERROR:
        return isSetServerError();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_authError = true && this.isSetAuthError();
      boolean that_present_authError = true && that.isSetAuthError();
      if (this_present_authError || that_present_authError) {
        if (!(this_present_authError && that_present_authError))
          return false;
        if (!this.authError.equals(that.authError))
          return false;
      }

      boolean this_present_notFound = true && this.isSetNotFound();
      boolean that_present_notFound = true && that.isSetNotFound();
      if (this_present_notFound || that_present_notFound) {
        if (!(this_present_notFound && that_present_notFound))
          return false;
        if (!this.notFound.equals(that.notFound))
          return false;
      }

      boolean this_present_serverError = true && this.isSetServerError();
      boolean that_present_serverError = true && that.isSetServerError();
      if (this_present_serverError || that_present_serverError) {
        if (!(this_present_serverError && that_present_serverError))
          return false;
        if (!this.serverError.equals(that.serverError))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_authError = true && (isSetAuthError());
      list.add(present_authError);
      if (present_authError)
        list.add(authError);

      boolean present_notFound = true && (isSetNotFound());
      list.add(present_notFound);
      if (present_notFound)
        list.add(notFound);

      boolean present_serverError = true && (isSetServerError());
      list.add(present_serverError);
      if (present_serverError)
        list.add(serverError);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFound()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetServerError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError);
        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("setImageVersionVirtConfig_result(");
      boolean first = true;

      sb.append("authError:");
      if (this.authError == null) {
        sb.append("null");
      } else {
        sb.append(this.authError);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("notFound:");
      if (this.notFound == null) {
        sb.append("null");
      } else {
        sb.append(this.notFound);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("serverError:");
      if (this.serverError == null) {
        sb.append("null");
      } else {
        sb.append(this.serverError);
      }
      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 {
        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 setImageVersionVirtConfig_resultStandardSchemeFactory implements SchemeFactory {
      public setImageVersionVirtConfig_resultStandardScheme getScheme() {
        return new setImageVersionVirtConfig_resultStandardScheme();
      }
    }

    private static class setImageVersionVirtConfig_resultStandardScheme extends StandardScheme<setImageVersionVirtConfig_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, setImageVersionVirtConfig_result 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: // AUTH_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.authError = new TAuthorizationException();
                struct.authError.read(iprot);
                struct.setAuthErrorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // NOT_FOUND
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.notFound = new TNotFoundException();
                struct.notFound.read(iprot);
                struct.setNotFoundIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // SERVER_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.serverError = new TInvocationException();
                struct.serverError.read(iprot);
                struct.setServerErrorIsSet(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, setImageVersionVirtConfig_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.authError != null) {
          oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC);
          struct.authError.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.notFound != null) {
          oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC);
          struct.notFound.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.serverError != null) {
          oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC);
          struct.serverError.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class setImageVersionVirtConfig_resultTupleSchemeFactory implements SchemeFactory {
      public setImageVersionVirtConfig_resultTupleScheme getScheme() {
        return new setImageVersionVirtConfig_resultTupleScheme();
      }
    }

    private static class setImageVersionVirtConfig_resultTupleScheme extends TupleScheme<setImageVersionVirtConfig_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, setImageVersionVirtConfig_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetAuthError()) {
          optionals.set(0);
        }
        if (struct.isSetNotFound()) {
          optionals.set(1);
        }
        if (struct.isSetServerError()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetAuthError()) {
          struct.authError.write(oprot);
        }
        if (struct.isSetNotFound()) {
          struct.notFound.write(oprot);
        }
        if (struct.isSetServerError()) {
          struct.serverError.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, setImageVersionVirtConfig_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.authError = new TAuthorizationException();
          struct.authError.read(iprot);
          struct.setAuthErrorIsSet(true);
        }
        if (incoming.get(1)) {
          struct.notFound = new TNotFoundException();
          struct.notFound.read(iprot);
          struct.setNotFoundIsSet(true);
        }
        if (incoming.get(2)) {
          struct.serverError = new TInvocationException();
          struct.serverError.read(iprot);
          struct.setServerErrorIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField IMAGE_VERSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageVersionId", org.apache.thrift.protocol.TType.STRING, (short)2);

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

    public String userToken; // required
    public String imageVersionId; // 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 {
      USER_TOKEN((short)1, "userToken"),
      IMAGE_VERSION_ID((short)2, "imageVersionId");

      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: // USER_TOKEN
            return USER_TOKEN;
          case 2: // IMAGE_VERSION_ID
            return IMAGE_VERSION_ID;
          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
    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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "Token")));
      tmpMap.put(_Fields.IMAGE_VERSION_ID, new org.apache.thrift.meta_data.FieldMetaData("imageVersionId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "UUID")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestImageReplication_args.class, metaDataMap);
    }

    public requestImageReplication_args() {
    }

    public requestImageReplication_args(
      String userToken,
      String imageVersionId)
    {
      this();
      this.userToken = userToken;
      this.imageVersionId = imageVersionId;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public requestImageReplication_args(requestImageReplication_args other) {
      if (other.isSetUserToken()) {
        this.userToken = other.userToken;
      }
      if (other.isSetImageVersionId()) {
        this.imageVersionId = other.imageVersionId;
      }
    }

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

    @Override
    public void clear() {
      this.userToken = null;
      this.imageVersionId = null;
    }

    public String getUserToken() {
      return this.userToken;
    }

    public requestImageReplication_args setUserToken(String userToken) {
      this.userToken = userToken;
      return this;
    }

    public void unsetUserToken() {
      this.userToken = null;
    }

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

    public void setUserTokenIsSet(boolean value) {
      if (!value) {
        this.userToken = null;
      }
    }

    public String getImageVersionId() {
      return this.imageVersionId;
    }

    public requestImageReplication_args setImageVersionId(String imageVersionId) {
      this.imageVersionId = imageVersionId;
      return this;
    }

    public void unsetImageVersionId() {
      this.imageVersionId = null;
    }

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

    public void setImageVersionIdIsSet(boolean value) {
      if (!value) {
        this.imageVersionId = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_TOKEN:
        if (value == null) {
          unsetUserToken();
        } else {
          setUserToken((String)value);
        }
        break;

      case IMAGE_VERSION_ID:
        if (value == null) {
          unsetImageVersionId();
        } else {
          setImageVersionId((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_TOKEN:
        return getUserToken();

      case IMAGE_VERSION_ID:
        return getImageVersionId();

      }
      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 USER_TOKEN:
        return isSetUserToken();
      case IMAGE_VERSION_ID:
        return isSetImageVersionId();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_userToken = true && this.isSetUserToken();
      boolean that_present_userToken = true && that.isSetUserToken();
      if (this_present_userToken || that_present_userToken) {
        if (!(this_present_userToken && that_present_userToken))
          return false;
        if (!this.userToken.equals(that.userToken))
          return false;
      }

      boolean this_present_imageVersionId = true && this.isSetImageVersionId();
      boolean that_present_imageVersionId = true && that.isSetImageVersionId();
      if (this_present_imageVersionId || that_present_imageVersionId) {
        if (!(this_present_imageVersionId && that_present_imageVersionId))
          return false;
        if (!this.imageVersionId.equals(that.imageVersionId))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_userToken = true && (isSetUserToken());
      list.add(present_userToken);
      if (present_userToken)
        list.add(userToken);

      boolean present_imageVersionId = true && (isSetImageVersionId());
      list.add(present_imageVersionId);
      if (present_imageVersionId)
        list.add(imageVersionId);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserToken()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetImageVersionId()).compareTo(other.isSetImageVersionId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetImageVersionId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageVersionId, other.imageVersionId);
        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("requestImageReplication_args(");
      boolean first = true;

      sb.append("userToken:");
      if (this.userToken == null) {
        sb.append("null");
      } else {
        sb.append(this.userToken);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("imageVersionId:");
      if (this.imageVersionId == null) {
        sb.append("null");
      } else {
        sb.append(this.imageVersionId);
      }
      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 {
        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 requestImageReplication_argsStandardSchemeFactory implements SchemeFactory {
      public requestImageReplication_argsStandardScheme getScheme() {
        return new requestImageReplication_argsStandardScheme();
      }
    }

    private static class requestImageReplication_argsStandardScheme extends StandardScheme<requestImageReplication_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, requestImageReplication_args 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: // USER_TOKEN
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.userToken = iprot.readString();
                struct.setUserTokenIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // IMAGE_VERSION_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.imageVersionId = iprot.readString();
                struct.setImageVersionIdIsSet(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, requestImageReplication_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.userToken != null) {
          oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
          oprot.writeString(struct.userToken);
          oprot.writeFieldEnd();
        }
        if (struct.imageVersionId != null) {
          oprot.writeFieldBegin(IMAGE_VERSION_ID_FIELD_DESC);
          oprot.writeString(struct.imageVersionId);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class requestImageReplication_argsTupleSchemeFactory implements SchemeFactory {
      public requestImageReplication_argsTupleScheme getScheme() {
        return new requestImageReplication_argsTupleScheme();
      }
    }

    private static class requestImageReplication_argsTupleScheme extends TupleScheme<requestImageReplication_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, requestImageReplication_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetUserToken()) {
          optionals.set(0);
        }
        if (struct.isSetImageVersionId()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetUserToken()) {
          oprot.writeString(struct.userToken);
        }
        if (struct.isSetImageVersionId()) {
          oprot.writeString(struct.imageVersionId);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, requestImageReplication_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.userToken = iprot.readString();
          struct.setUserTokenIsSet(true);
        }
        if (incoming.get(1)) {
          struct.imageVersionId = iprot.readString();
          struct.setImageVersionIdIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
    private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3);

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

    public String success; // required
    public TAuthorizationException authError; // required
    public TNotFoundException notFound; // required
    public TInvocationException serverError; // 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 {
      SUCCESS((short)0, "success"),
      AUTH_ERROR((short)1, "authError"),
      NOT_FOUND((short)2, "notFound"),
      SERVER_ERROR((short)3, "serverError");

      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 0: // SUCCESS
            return SUCCESS;
          case 1: // AUTH_ERROR
            return AUTH_ERROR;
          case 2: // NOT_FOUND
            return NOT_FOUND;
          case 3: // SERVER_ERROR
            return SERVER_ERROR;
          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
    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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "UUID")));
      tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestImageReplication_result.class, metaDataMap);
    }

    public requestImageReplication_result() {
    }

    public requestImageReplication_result(
      String success,
      TAuthorizationException authError,
      TNotFoundException notFound,
      TInvocationException serverError)
    {
      this();
      this.success = success;
      this.authError = authError;
      this.notFound = notFound;
      this.serverError = serverError;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public requestImageReplication_result(requestImageReplication_result other) {
      if (other.isSetSuccess()) {
        this.success = other.success;
      }
      if (other.isSetAuthError()) {
        this.authError = new TAuthorizationException(other.authError);
      }
      if (other.isSetNotFound()) {
        this.notFound = new TNotFoundException(other.notFound);
      }
      if (other.isSetServerError()) {
        this.serverError = new TInvocationException(other.serverError);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.authError = null;
      this.notFound = null;
      this.serverError = null;
    }

    public String getSuccess() {
      return this.success;
    }

    public requestImageReplication_result setSuccess(String success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

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

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public TAuthorizationException getAuthError() {
      return this.authError;
    }

    public requestImageReplication_result setAuthError(TAuthorizationException authError) {
      this.authError = authError;
      return this;
    }

    public void unsetAuthError() {
      this.authError = null;
    }

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

    public void setAuthErrorIsSet(boolean value) {
      if (!value) {
        this.authError = null;
      }
    }

    public TNotFoundException getNotFound() {
      return this.notFound;
    }

    public requestImageReplication_result setNotFound(TNotFoundException notFound) {
      this.notFound = notFound;
      return this;
    }

    public void unsetNotFound() {
      this.notFound = null;
    }

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

    public void setNotFoundIsSet(boolean value) {
      if (!value) {
        this.notFound = null;
      }
    }

    public TInvocationException getServerError() {
      return this.serverError;
    }

    public requestImageReplication_result setServerError(TInvocationException serverError) {
      this.serverError = serverError;
      return this;
    }

    public void unsetServerError() {
      this.serverError = null;
    }

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

    public void setServerErrorIsSet(boolean value) {
      if (!value) {
        this.serverError = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((String)value);
        }
        break;

      case AUTH_ERROR:
        if (value == null) {
          unsetAuthError();
        } else {
          setAuthError((TAuthorizationException)value);
        }
        break;

      case NOT_FOUND:
        if (value == null) {
          unsetNotFound();
        } else {
          setNotFound((TNotFoundException)value);
        }
        break;

      case SERVER_ERROR:
        if (value == null) {
          unsetServerError();
        } else {
          setServerError((TInvocationException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case AUTH_ERROR:
        return getAuthError();

      case NOT_FOUND:
        return getNotFound();

      case SERVER_ERROR:
        return getServerError();

      }
      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 SUCCESS:
        return isSetSuccess();
      case AUTH_ERROR:
        return isSetAuthError();
      case NOT_FOUND:
        return isSetNotFound();
      case SERVER_ERROR:
        return isSetServerError();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_authError = true && this.isSetAuthError();
      boolean that_present_authError = true && that.isSetAuthError();
      if (this_present_authError || that_present_authError) {
        if (!(this_present_authError && that_present_authError))
          return false;
        if (!this.authError.equals(that.authError))
          return false;
      }

      boolean this_present_notFound = true && this.isSetNotFound();
      boolean that_present_notFound = true && that.isSetNotFound();
      if (this_present_notFound || that_present_notFound) {
        if (!(this_present_notFound && that_present_notFound))
          return false;
        if (!this.notFound.equals(that.notFound))
          return false;
      }

      boolean this_present_serverError = true && this.isSetServerError();
      boolean that_present_serverError = true && that.isSetServerError();
      if (this_present_serverError || that_present_serverError) {
        if (!(this_present_serverError && that_present_serverError))
          return false;
        if (!this.serverError.equals(that.serverError))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_authError = true && (isSetAuthError());
      list.add(present_authError);
      if (present_authError)
        list.add(authError);

      boolean present_notFound = true && (isSetNotFound());
      list.add(present_notFound);
      if (present_notFound)
        list.add(notFound);

      boolean present_serverError = true && (isSetServerError());
      list.add(present_serverError);
      if (present_serverError)
        list.add(serverError);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFound()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetServerError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError);
        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("requestImageReplication_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("authError:");
      if (this.authError == null) {
        sb.append("null");
      } else {
        sb.append(this.authError);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("notFound:");
      if (this.notFound == null) {
        sb.append("null");
      } else {
        sb.append(this.notFound);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("serverError:");
      if (this.serverError == null) {
        sb.append("null");
      } else {
        sb.append(this.serverError);
      }
      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 {
        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 requestImageReplication_resultStandardSchemeFactory implements SchemeFactory {
      public requestImageReplication_resultStandardScheme getScheme() {
        return new requestImageReplication_resultStandardScheme();
      }
    }

    private static class requestImageReplication_resultStandardScheme extends StandardScheme<requestImageReplication_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, requestImageReplication_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.success = iprot.readString();
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // AUTH_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.authError = new TAuthorizationException();
                struct.authError.read(iprot);
                struct.setAuthErrorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // NOT_FOUND
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.notFound = new TNotFoundException();
                struct.notFound.read(iprot);
                struct.setNotFoundIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // SERVER_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.serverError = new TInvocationException();
                struct.serverError.read(iprot);
                struct.setServerErrorIsSet(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, requestImageReplication_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          oprot.writeString(struct.success);
          oprot.writeFieldEnd();
        }
        if (struct.authError != null) {
          oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC);
          struct.authError.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.notFound != null) {
          oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC);
          struct.notFound.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.serverError != null) {
          oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC);
          struct.serverError.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class requestImageReplication_resultTupleSchemeFactory implements SchemeFactory {
      public requestImageReplication_resultTupleScheme getScheme() {
        return new requestImageReplication_resultTupleScheme();
      }
    }

    private static class requestImageReplication_resultTupleScheme extends TupleScheme<requestImageReplication_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, requestImageReplication_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetAuthError()) {
          optionals.set(1);
        }
        if (struct.isSetNotFound()) {
          optionals.set(2);
        }
        if (struct.isSetServerError()) {
          optionals.set(3);
        }
        oprot.writeBitSet(optionals, 4);
        if (struct.isSetSuccess()) {
          oprot.writeString(struct.success);
        }
        if (struct.isSetAuthError()) {
          struct.authError.write(oprot);
        }
        if (struct.isSetNotFound()) {
          struct.notFound.write(oprot);
        }
        if (struct.isSetServerError()) {
          struct.serverError.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, requestImageReplication_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(4);
        if (incoming.get(0)) {
          struct.success = iprot.readString();
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.authError = new TAuthorizationException();
          struct.authError.read(iprot);
          struct.setAuthErrorIsSet(true);
        }
        if (incoming.get(2)) {
          struct.notFound = new TNotFoundException();
          struct.notFound.read(iprot);
          struct.setNotFoundIsSet(true);
        }
        if (incoming.get(3)) {
          struct.serverError = new TInvocationException();
          struct.serverError.read(iprot);
          struct.setServerErrorIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField IMAGE_VERSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageVersionId", org.apache.thrift.protocol.TType.STRING, (short)2);

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

    public String userToken; // required
    public String imageVersionId; // 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 {
      USER_TOKEN((short)1, "userToken"),
      IMAGE_VERSION_ID((short)2, "imageVersionId");

      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: // USER_TOKEN
            return USER_TOKEN;
          case 2: // IMAGE_VERSION_ID
            return IMAGE_VERSION_ID;
          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
    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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "Token")));
      tmpMap.put(_Fields.IMAGE_VERSION_ID, new org.apache.thrift.meta_data.FieldMetaData("imageVersionId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "UUID")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(publishImageVersion_args.class, metaDataMap);
    }

    public publishImageVersion_args() {
    }

    public publishImageVersion_args(
      String userToken,
      String imageVersionId)
    {
      this();
      this.userToken = userToken;
      this.imageVersionId = imageVersionId;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public publishImageVersion_args(publishImageVersion_args other) {
      if (other.isSetUserToken()) {
        this.userToken = other.userToken;
      }
      if (other.isSetImageVersionId()) {
        this.imageVersionId = other.imageVersionId;
      }
    }

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

    @Override
    public void clear() {
      this.userToken = null;
      this.imageVersionId = null;
    }

    public String getUserToken() {
      return this.userToken;
    }

    public publishImageVersion_args setUserToken(String userToken) {
      this.userToken = userToken;
      return this;
    }

    public void unsetUserToken() {
      this.userToken = null;
    }

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

    public void setUserTokenIsSet(boolean value) {
      if (!value) {
        this.userToken = null;
      }
    }

    public String getImageVersionId() {
      return this.imageVersionId;
    }

    public publishImageVersion_args setImageVersionId(String imageVersionId) {
      this.imageVersionId = imageVersionId;
      return this;
    }

    public void unsetImageVersionId() {
      this.imageVersionId = null;
    }

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

    public void setImageVersionIdIsSet(boolean value) {
      if (!value) {
        this.imageVersionId = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_TOKEN:
        if (value == null) {
          unsetUserToken();
        } else {
          setUserToken((String)value);
        }
        break;

      case IMAGE_VERSION_ID:
        if (value == null) {
          unsetImageVersionId();
        } else {
          setImageVersionId((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_TOKEN:
        return getUserToken();

      case IMAGE_VERSION_ID:
        return getImageVersionId();

      }
      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 USER_TOKEN:
        return isSetUserToken();
      case IMAGE_VERSION_ID:
        return isSetImageVersionId();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_userToken = true && this.isSetUserToken();
      boolean that_present_userToken = true && that.isSetUserToken();
      if (this_present_userToken || that_present_userToken) {
        if (!(this_present_userToken && that_present_userToken))
          return false;
        if (!this.userToken.equals(that.userToken))
          return false;
      }

      boolean this_present_imageVersionId = true && this.isSetImageVersionId();
      boolean that_present_imageVersionId = true && that.isSetImageVersionId();
      if (this_present_imageVersionId || that_present_imageVersionId) {
        if (!(this_present_imageVersionId && that_present_imageVersionId))
          return false;
        if (!this.imageVersionId.equals(that.imageVersionId))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_userToken = true && (isSetUserToken());
      list.add(present_userToken);
      if (present_userToken)
        list.add(userToken);

      boolean present_imageVersionId = true && (isSetImageVersionId());
      list.add(present_imageVersionId);
      if (present_imageVersionId)
        list.add(imageVersionId);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserToken()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetImageVersionId()).compareTo(other.isSetImageVersionId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetImageVersionId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageVersionId, other.imageVersionId);
        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("publishImageVersion_args(");
      boolean first = true;

      sb.append("userToken:");
      if (this.userToken == null) {
        sb.append("null");
      } else {
        sb.append(this.userToken);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("imageVersionId:");
      if (this.imageVersionId == null) {
        sb.append("null");
      } else {
        sb.append(this.imageVersionId);
      }
      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 {
        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 publishImageVersion_argsStandardSchemeFactory implements SchemeFactory {
      public publishImageVersion_argsStandardScheme getScheme() {
        return new publishImageVersion_argsStandardScheme();
      }
    }

    private static class publishImageVersion_argsStandardScheme extends StandardScheme<publishImageVersion_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, publishImageVersion_args 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: // USER_TOKEN
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.userToken = iprot.readString();
                struct.setUserTokenIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // IMAGE_VERSION_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.imageVersionId = iprot.readString();
                struct.setImageVersionIdIsSet(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, publishImageVersion_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.userToken != null) {
          oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
          oprot.writeString(struct.userToken);
          oprot.writeFieldEnd();
        }
        if (struct.imageVersionId != null) {
          oprot.writeFieldBegin(IMAGE_VERSION_ID_FIELD_DESC);
          oprot.writeString(struct.imageVersionId);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class publishImageVersion_argsTupleSchemeFactory implements SchemeFactory {
      public publishImageVersion_argsTupleScheme getScheme() {
        return new publishImageVersion_argsTupleScheme();
      }
    }

    private static class publishImageVersion_argsTupleScheme extends TupleScheme<publishImageVersion_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, publishImageVersion_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetUserToken()) {
          optionals.set(0);
        }
        if (struct.isSetImageVersionId()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetUserToken()) {
          oprot.writeString(struct.userToken);
        }
        if (struct.isSetImageVersionId()) {
          oprot.writeString(struct.imageVersionId);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, publishImageVersion_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.userToken = iprot.readString();
          struct.setUserTokenIsSet(true);
        }
        if (incoming.get(1)) {
          struct.imageVersionId = iprot.readString();
          struct.setImageVersionIdIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
    private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3);
    private static final org.apache.thrift.protocol.TField TRE_FIELD_DESC = new org.apache.thrift.protocol.TField("tre", org.apache.thrift.protocol.TType.STRUCT, (short)4);

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

    public String success; // required
    public TAuthorizationException authError; // required
    public TNotFoundException notFound; // required
    public TInvocationException serverError; // required
    public TTransferRejectedException tre; // 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 {
      SUCCESS((short)0, "success"),
      AUTH_ERROR((short)1, "authError"),
      NOT_FOUND((short)2, "notFound"),
      SERVER_ERROR((short)3, "serverError"),
      TRE((short)4, "tre");

      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 0: // SUCCESS
            return SUCCESS;
          case 1: // AUTH_ERROR
            return AUTH_ERROR;
          case 2: // NOT_FOUND
            return NOT_FOUND;
          case 3: // SERVER_ERROR
            return SERVER_ERROR;
          case 4: // TRE
            return TRE;
          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
    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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "UUID")));
      tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.TRE, new org.apache.thrift.meta_data.FieldMetaData("tre", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(publishImageVersion_result.class, metaDataMap);
    }

    public publishImageVersion_result() {
    }

    public publishImageVersion_result(
      String success,
      TAuthorizationException authError,
      TNotFoundException notFound,
      TInvocationException serverError,
      TTransferRejectedException tre)
    {
      this();
      this.success = success;
      this.authError = authError;
      this.notFound = notFound;
      this.serverError = serverError;
      this.tre = tre;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public publishImageVersion_result(publishImageVersion_result other) {
      if (other.isSetSuccess()) {
        this.success = other.success;
      }
      if (other.isSetAuthError()) {
        this.authError = new TAuthorizationException(other.authError);
      }
      if (other.isSetNotFound()) {
        this.notFound = new TNotFoundException(other.notFound);
      }
      if (other.isSetServerError()) {
        this.serverError = new TInvocationException(other.serverError);
      }
      if (other.isSetTre()) {
        this.tre = new TTransferRejectedException(other.tre);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.authError = null;
      this.notFound = null;
      this.serverError = null;
      this.tre = null;
    }

    public String getSuccess() {
      return this.success;
    }

    public publishImageVersion_result setSuccess(String success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

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

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public TAuthorizationException getAuthError() {
      return this.authError;
    }

    public publishImageVersion_result setAuthError(TAuthorizationException authError) {
      this.authError = authError;
      return this;
    }

    public void unsetAuthError() {
      this.authError = null;
    }

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

    public void setAuthErrorIsSet(boolean value) {
      if (!value) {
        this.authError = null;
      }
    }

    public TNotFoundException getNotFound() {
      return this.notFound;
    }

    public publishImageVersion_result setNotFound(TNotFoundException notFound) {
      this.notFound = notFound;
      return this;
    }

    public void unsetNotFound() {
      this.notFound = null;
    }

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

    public void setNotFoundIsSet(boolean value) {
      if (!value) {
        this.notFound = null;
      }
    }

    public TInvocationException getServerError() {
      return this.serverError;
    }

    public publishImageVersion_result setServerError(TInvocationException serverError) {
      this.serverError = serverError;
      return this;
    }

    public void unsetServerError() {
      this.serverError = null;
    }

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

    public void setServerErrorIsSet(boolean value) {
      if (!value) {
        this.serverError = null;
      }
    }

    public TTransferRejectedException getTre() {
      return this.tre;
    }

    public publishImageVersion_result setTre(TTransferRejectedException tre) {
      this.tre = tre;
      return this;
    }

    public void unsetTre() {
      this.tre = null;
    }

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

    public void setTreIsSet(boolean value) {
      if (!value) {
        this.tre = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((String)value);
        }
        break;

      case AUTH_ERROR:
        if (value == null) {
          unsetAuthError();
        } else {
          setAuthError((TAuthorizationException)value);
        }
        break;

      case NOT_FOUND:
        if (value == null) {
          unsetNotFound();
        } else {
          setNotFound((TNotFoundException)value);
        }
        break;

      case SERVER_ERROR:
        if (value == null) {
          unsetServerError();
        } else {
          setServerError((TInvocationException)value);
        }
        break;

      case TRE:
        if (value == null) {
          unsetTre();
        } else {
          setTre((TTransferRejectedException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case AUTH_ERROR:
        return getAuthError();

      case NOT_FOUND:
        return getNotFound();

      case SERVER_ERROR:
        return getServerError();

      case TRE:
        return getTre();

      }
      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 SUCCESS:
        return isSetSuccess();
      case AUTH_ERROR:
        return isSetAuthError();
      case NOT_FOUND:
        return isSetNotFound();
      case SERVER_ERROR:
        return isSetServerError();
      case TRE:
        return isSetTre();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_authError = true && this.isSetAuthError();
      boolean that_present_authError = true && that.isSetAuthError();
      if (this_present_authError || that_present_authError) {
        if (!(this_present_authError && that_present_authError))
          return false;
        if (!this.authError.equals(that.authError))
          return false;
      }

      boolean this_present_notFound = true && this.isSetNotFound();
      boolean that_present_notFound = true && that.isSetNotFound();
      if (this_present_notFound || that_present_notFound) {
        if (!(this_present_notFound && that_present_notFound))
          return false;
        if (!this.notFound.equals(that.notFound))
          return false;
      }

      boolean this_present_serverError = true && this.isSetServerError();
      boolean that_present_serverError = true && that.isSetServerError();
      if (this_present_serverError || that_present_serverError) {
        if (!(this_present_serverError && that_present_serverError))
          return false;
        if (!this.serverError.equals(that.serverError))
          return false;
      }

      boolean this_present_tre = true && this.isSetTre();
      boolean that_present_tre = true && that.isSetTre();
      if (this_present_tre || that_present_tre) {
        if (!(this_present_tre && that_present_tre))
          return false;
        if (!this.tre.equals(that.tre))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_authError = true && (isSetAuthError());
      list.add(present_authError);
      if (present_authError)
        list.add(authError);

      boolean present_notFound = true && (isSetNotFound());
      list.add(present_notFound);
      if (present_notFound)
        list.add(notFound);

      boolean present_serverError = true && (isSetServerError());
      list.add(present_serverError);
      if (present_serverError)
        list.add(serverError);

      boolean present_tre = true && (isSetTre());
      list.add(present_tre);
      if (present_tre)
        list.add(tre);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFound()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetServerError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetTre()).compareTo(other.isSetTre());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetTre()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tre, other.tre);
        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("publishImageVersion_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("authError:");
      if (this.authError == null) {
        sb.append("null");
      } else {
        sb.append(this.authError);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("notFound:");
      if (this.notFound == null) {
        sb.append("null");
      } else {
        sb.append(this.notFound);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("serverError:");
      if (this.serverError == null) {
        sb.append("null");
      } else {
        sb.append(this.serverError);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("tre:");
      if (this.tre == null) {
        sb.append("null");
      } else {
        sb.append(this.tre);
      }
      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 {
        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 publishImageVersion_resultStandardSchemeFactory implements SchemeFactory {
      public publishImageVersion_resultStandardScheme getScheme() {
        return new publishImageVersion_resultStandardScheme();
      }
    }

    private static class publishImageVersion_resultStandardScheme extends StandardScheme<publishImageVersion_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, publishImageVersion_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.success = iprot.readString();
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // AUTH_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.authError = new TAuthorizationException();
                struct.authError.read(iprot);
                struct.setAuthErrorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // NOT_FOUND
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.notFound = new TNotFoundException();
                struct.notFound.read(iprot);
                struct.setNotFoundIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // SERVER_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.serverError = new TInvocationException();
                struct.serverError.read(iprot);
                struct.setServerErrorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 4: // TRE
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.tre = new TTransferRejectedException();
                struct.tre.read(iprot);
                struct.setTreIsSet(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, publishImageVersion_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          oprot.writeString(struct.success);
          oprot.writeFieldEnd();
        }
        if (struct.authError != null) {
          oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC);
          struct.authError.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.notFound != null) {
          oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC);
          struct.notFound.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.serverError != null) {
          oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC);
          struct.serverError.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.tre != null) {
          oprot.writeFieldBegin(TRE_FIELD_DESC);
          struct.tre.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class publishImageVersion_resultTupleSchemeFactory implements SchemeFactory {
      public publishImageVersion_resultTupleScheme getScheme() {
        return new publishImageVersion_resultTupleScheme();
      }
    }

    private static class publishImageVersion_resultTupleScheme extends TupleScheme<publishImageVersion_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, publishImageVersion_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetAuthError()) {
          optionals.set(1);
        }
        if (struct.isSetNotFound()) {
          optionals.set(2);
        }
        if (struct.isSetServerError()) {
          optionals.set(3);
        }
        if (struct.isSetTre()) {
          optionals.set(4);
        }
        oprot.writeBitSet(optionals, 5);
        if (struct.isSetSuccess()) {
          oprot.writeString(struct.success);
        }
        if (struct.isSetAuthError()) {
          struct.authError.write(oprot);
        }
        if (struct.isSetNotFound()) {
          struct.notFound.write(oprot);
        }
        if (struct.isSetServerError()) {
          struct.serverError.write(oprot);
        }
        if (struct.isSetTre()) {
          struct.tre.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, publishImageVersion_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(5);
        if (incoming.get(0)) {
          struct.success = iprot.readString();
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.authError = new TAuthorizationException();
          struct.authError.read(iprot);
          struct.setAuthErrorIsSet(true);
        }
        if (incoming.get(2)) {
          struct.notFound = new TNotFoundException();
          struct.notFound.read(iprot);
          struct.setNotFoundIsSet(true);
        }
        if (incoming.get(3)) {
          struct.serverError = new TInvocationException();
          struct.serverError.read(iprot);
          struct.setServerErrorIsSet(true);
        }
        if (incoming.get(4)) {
          struct.tre = new TTransferRejectedException();
          struct.tre.read(iprot);
          struct.setTreIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField LECTURE_FIELD_DESC = new org.apache.thrift.protocol.TField("lecture", org.apache.thrift.protocol.TType.STRUCT, (short)2);

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

    public String userToken; // required
    public LectureWrite lecture; // 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 {
      USER_TOKEN((short)1, "userToken"),
      LECTURE((short)2, "lecture");

      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: // USER_TOKEN
            return USER_TOKEN;
          case 2: // LECTURE
            return LECTURE;
          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
    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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "Token")));
      tmpMap.put(_Fields.LECTURE, new org.apache.thrift.meta_data.FieldMetaData("lecture", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LectureWrite.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createLecture_args.class, metaDataMap);
    }

    public createLecture_args() {
    }

    public createLecture_args(
      String userToken,
      LectureWrite lecture)
    {
      this();
      this.userToken = userToken;
      this.lecture = lecture;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public createLecture_args(createLecture_args other) {
      if (other.isSetUserToken()) {
        this.userToken = other.userToken;
      }
      if (other.isSetLecture()) {
        this.lecture = new LectureWrite(other.lecture);
      }
    }

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

    @Override
    public void clear() {
      this.userToken = null;
      this.lecture = null;
    }

    public String getUserToken() {
      return this.userToken;
    }

    public createLecture_args setUserToken(String userToken) {
      this.userToken = userToken;
      return this;
    }

    public void unsetUserToken() {
      this.userToken = null;
    }

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

    public void setUserTokenIsSet(boolean value) {
      if (!value) {
        this.userToken = null;
      }
    }

    public LectureWrite getLecture() {
      return this.lecture;
    }

    public createLecture_args setLecture(LectureWrite lecture) {
      this.lecture = lecture;
      return this;
    }

    public void unsetLecture() {
      this.lecture = null;
    }

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

    public void setLectureIsSet(boolean value) {
      if (!value) {
        this.lecture = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_TOKEN:
        if (value == null) {
          unsetUserToken();
        } else {
          setUserToken((String)value);
        }
        break;

      case LECTURE:
        if (value == null) {
          unsetLecture();
        } else {
          setLecture((LectureWrite)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_TOKEN:
        return getUserToken();

      case LECTURE:
        return getLecture();

      }
      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 USER_TOKEN:
        return isSetUserToken();
      case LECTURE:
        return isSetLecture();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_userToken = true && this.isSetUserToken();
      boolean that_present_userToken = true && that.isSetUserToken();
      if (this_present_userToken || that_present_userToken) {
        if (!(this_present_userToken && that_present_userToken))
          return false;
        if (!this.userToken.equals(that.userToken))
          return false;
      }

      boolean this_present_lecture = true && this.isSetLecture();
      boolean that_present_lecture = true && that.isSetLecture();
      if (this_present_lecture || that_present_lecture) {
        if (!(this_present_lecture && that_present_lecture))
          return false;
        if (!this.lecture.equals(that.lecture))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_userToken = true && (isSetUserToken());
      list.add(present_userToken);
      if (present_userToken)
        list.add(userToken);

      boolean present_lecture = true && (isSetLecture());
      list.add(present_lecture);
      if (present_lecture)
        list.add(lecture);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserToken()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetLecture()).compareTo(other.isSetLecture());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetLecture()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lecture, other.lecture);
        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("createLecture_args(");
      boolean first = true;

      sb.append("userToken:");
      if (this.userToken == null) {
        sb.append("null");
      } else {
        sb.append(this.userToken);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("lecture:");
      if (this.lecture == null) {
        sb.append("null");
      } else {
        sb.append(this.lecture);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (lecture != null) {
        lecture.validate();
      }
    }

    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 {
        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 createLecture_argsStandardSchemeFactory implements SchemeFactory {
      public createLecture_argsStandardScheme getScheme() {
        return new createLecture_argsStandardScheme();
      }
    }

    private static class createLecture_argsStandardScheme extends StandardScheme<createLecture_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, createLecture_args 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: // USER_TOKEN
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.userToken = iprot.readString();
                struct.setUserTokenIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // LECTURE
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.lecture = new LectureWrite();
                struct.lecture.read(iprot);
                struct.setLectureIsSet(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, createLecture_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.userToken != null) {
          oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
          oprot.writeString(struct.userToken);
          oprot.writeFieldEnd();
        }
        if (struct.lecture != null) {
          oprot.writeFieldBegin(LECTURE_FIELD_DESC);
          struct.lecture.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class createLecture_argsTupleSchemeFactory implements SchemeFactory {
      public createLecture_argsTupleScheme getScheme() {
        return new createLecture_argsTupleScheme();
      }
    }

    private static class createLecture_argsTupleScheme extends TupleScheme<createLecture_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, createLecture_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetUserToken()) {
          optionals.set(0);
        }
        if (struct.isSetLecture()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetUserToken()) {
          oprot.writeString(struct.userToken);
        }
        if (struct.isSetLecture()) {
          struct.lecture.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, createLecture_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.userToken = iprot.readString();
          struct.setUserTokenIsSet(true);
        }
        if (incoming.get(1)) {
          struct.lecture = new LectureWrite();
          struct.lecture.read(iprot);
          struct.setLectureIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
    private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField DATE_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("dateError", org.apache.thrift.protocol.TType.STRUCT, (short)3);
    private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)4);

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

    public String success; // required
    public TAuthorizationException authError; // required
    public TInvocationException serverError; // required
    public TInvalidDateParam dateError; // required
    public TNotFoundException notFound; // 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 {
      SUCCESS((short)0, "success"),
      AUTH_ERROR((short)1, "authError"),
      SERVER_ERROR((short)2, "serverError"),
      DATE_ERROR((short)3, "dateError"),
      NOT_FOUND((short)4, "notFound");

      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 0: // SUCCESS
            return SUCCESS;
          case 1: // AUTH_ERROR
            return AUTH_ERROR;
          case 2: // SERVER_ERROR
            return SERVER_ERROR;
          case 3: // DATE_ERROR
            return DATE_ERROR;
          case 4: // NOT_FOUND
            return NOT_FOUND;
          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
    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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "UUID")));
      tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.DATE_ERROR, new org.apache.thrift.meta_data.FieldMetaData("dateError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createLecture_result.class, metaDataMap);
    }

    public createLecture_result() {
    }

    public createLecture_result(
      String success,
      TAuthorizationException authError,
      TInvocationException serverError,
      TInvalidDateParam dateError,
      TNotFoundException notFound)
    {
      this();
      this.success = success;
      this.authError = authError;
      this.serverError = serverError;
      this.dateError = dateError;
      this.notFound = notFound;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public createLecture_result(createLecture_result other) {
      if (other.isSetSuccess()) {
        this.success = other.success;
      }
      if (other.isSetAuthError()) {
        this.authError = new TAuthorizationException(other.authError);
      }
      if (other.isSetServerError()) {
        this.serverError = new TInvocationException(other.serverError);
      }
      if (other.isSetDateError()) {
        this.dateError = new TInvalidDateParam(other.dateError);
      }
      if (other.isSetNotFound()) {
        this.notFound = new TNotFoundException(other.notFound);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.authError = null;
      this.serverError = null;
      this.dateError = null;
      this.notFound = null;
    }

    public String getSuccess() {
      return this.success;
    }

    public createLecture_result setSuccess(String success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

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

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public TAuthorizationException getAuthError() {
      return this.authError;
    }

    public createLecture_result setAuthError(TAuthorizationException authError) {
      this.authError = authError;
      return this;
    }

    public void unsetAuthError() {
      this.authError = null;
    }

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

    public void setAuthErrorIsSet(boolean value) {
      if (!value) {
        this.authError = null;
      }
    }

    public TInvocationException getServerError() {
      return this.serverError;
    }

    public createLecture_result setServerError(TInvocationException serverError) {
      this.serverError = serverError;
      return this;
    }

    public void unsetServerError() {
      this.serverError = null;
    }

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

    public void setServerErrorIsSet(boolean value) {
      if (!value) {
        this.serverError = null;
      }
    }

    public TInvalidDateParam getDateError() {
      return this.dateError;
    }

    public createLecture_result setDateError(TInvalidDateParam dateError) {
      this.dateError = dateError;
      return this;
    }

    public void unsetDateError() {
      this.dateError = null;
    }

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

    public void setDateErrorIsSet(boolean value) {
      if (!value) {
        this.dateError = null;
      }
    }

    public TNotFoundException getNotFound() {
      return this.notFound;
    }

    public createLecture_result setNotFound(TNotFoundException notFound) {
      this.notFound = notFound;
      return this;
    }

    public void unsetNotFound() {
      this.notFound = null;
    }

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

    public void setNotFoundIsSet(boolean value) {
      if (!value) {
        this.notFound = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((String)value);
        }
        break;

      case AUTH_ERROR:
        if (value == null) {
          unsetAuthError();
        } else {
          setAuthError((TAuthorizationException)value);
        }
        break;

      case SERVER_ERROR:
        if (value == null) {
          unsetServerError();
        } else {
          setServerError((TInvocationException)value);
        }
        break;

      case DATE_ERROR:
        if (value == null) {
          unsetDateError();
        } else {
          setDateError((TInvalidDateParam)value);
        }
        break;

      case NOT_FOUND:
        if (value == null) {
          unsetNotFound();
        } else {
          setNotFound((TNotFoundException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case AUTH_ERROR:
        return getAuthError();

      case SERVER_ERROR:
        return getServerError();

      case DATE_ERROR:
        return getDateError();

      case NOT_FOUND:
        return getNotFound();

      }
      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 SUCCESS:
        return isSetSuccess();
      case AUTH_ERROR:
        return isSetAuthError();
      case SERVER_ERROR:
        return isSetServerError();
      case DATE_ERROR:
        return isSetDateError();
      case NOT_FOUND:
        return isSetNotFound();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_authError = true && this.isSetAuthError();
      boolean that_present_authError = true && that.isSetAuthError();
      if (this_present_authError || that_present_authError) {
        if (!(this_present_authError && that_present_authError))
          return false;
        if (!this.authError.equals(that.authError))
          return false;
      }

      boolean this_present_serverError = true && this.isSetServerError();
      boolean that_present_serverError = true && that.isSetServerError();
      if (this_present_serverError || that_present_serverError) {
        if (!(this_present_serverError && that_present_serverError))
          return false;
        if (!this.serverError.equals(that.serverError))
          return false;
      }

      boolean this_present_dateError = true && this.isSetDateError();
      boolean that_present_dateError = true && that.isSetDateError();
      if (this_present_dateError || that_present_dateError) {
        if (!(this_present_dateError && that_present_dateError))
          return false;
        if (!this.dateError.equals(that.dateError))
          return false;
      }

      boolean this_present_notFound = true && this.isSetNotFound();
      boolean that_present_notFound = true && that.isSetNotFound();
      if (this_present_notFound || that_present_notFound) {
        if (!(this_present_notFound && that_present_notFound))
          return false;
        if (!this.notFound.equals(that.notFound))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_authError = true && (isSetAuthError());
      list.add(present_authError);
      if (present_authError)
        list.add(authError);

      boolean present_serverError = true && (isSetServerError());
      list.add(present_serverError);
      if (present_serverError)
        list.add(serverError);

      boolean present_dateError = true && (isSetDateError());
      list.add(present_dateError);
      if (present_dateError)
        list.add(dateError);

      boolean present_notFound = true && (isSetNotFound());
      list.add(present_notFound);
      if (present_notFound)
        list.add(notFound);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetServerError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetDateError()).compareTo(other.isSetDateError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetDateError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dateError, other.dateError);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFound()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound);
        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("createLecture_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("authError:");
      if (this.authError == null) {
        sb.append("null");
      } else {
        sb.append(this.authError);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("serverError:");
      if (this.serverError == null) {
        sb.append("null");
      } else {
        sb.append(this.serverError);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("dateError:");
      if (this.dateError == null) {
        sb.append("null");
      } else {
        sb.append(this.dateError);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("notFound:");
      if (this.notFound == null) {
        sb.append("null");
      } else {
        sb.append(this.notFound);
      }
      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 {
        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 createLecture_resultStandardSchemeFactory implements SchemeFactory {
      public createLecture_resultStandardScheme getScheme() {
        return new createLecture_resultStandardScheme();
      }
    }

    private static class createLecture_resultStandardScheme extends StandardScheme<createLecture_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, createLecture_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.success = iprot.readString();
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // AUTH_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.authError = new TAuthorizationException();
                struct.authError.read(iprot);
                struct.setAuthErrorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // SERVER_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.serverError = new TInvocationException();
                struct.serverError.read(iprot);
                struct.setServerErrorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // DATE_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.dateError = new TInvalidDateParam();
                struct.dateError.read(iprot);
                struct.setDateErrorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 4: // NOT_FOUND
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.notFound = new TNotFoundException();
                struct.notFound.read(iprot);
                struct.setNotFoundIsSet(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, createLecture_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          oprot.writeString(struct.success);
          oprot.writeFieldEnd();
        }
        if (struct.authError != null) {
          oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC);
          struct.authError.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.serverError != null) {
          oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC);
          struct.serverError.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.dateError != null) {
          oprot.writeFieldBegin(DATE_ERROR_FIELD_DESC);
          struct.dateError.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.notFound != null) {
          oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC);
          struct.notFound.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class createLecture_resultTupleSchemeFactory implements SchemeFactory {
      public createLecture_resultTupleScheme getScheme() {
        return new createLecture_resultTupleScheme();
      }
    }

    private static class createLecture_resultTupleScheme extends TupleScheme<createLecture_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, createLecture_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetAuthError()) {
          optionals.set(1);
        }
        if (struct.isSetServerError()) {
          optionals.set(2);
        }
        if (struct.isSetDateError()) {
          optionals.set(3);
        }
        if (struct.isSetNotFound()) {
          optionals.set(4);
        }
        oprot.writeBitSet(optionals, 5);
        if (struct.isSetSuccess()) {
          oprot.writeString(struct.success);
        }
        if (struct.isSetAuthError()) {
          struct.authError.write(oprot);
        }
        if (struct.isSetServerError()) {
          struct.serverError.write(oprot);
        }
        if (struct.isSetDateError()) {
          struct.dateError.write(oprot);
        }
        if (struct.isSetNotFound()) {
          struct.notFound.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, createLecture_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(5);
        if (incoming.get(0)) {
          struct.success = iprot.readString();
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.authError = new TAuthorizationException();
          struct.authError.read(iprot);
          struct.setAuthErrorIsSet(true);
        }
        if (incoming.get(2)) {
          struct.serverError = new TInvocationException();
          struct.serverError.read(iprot);
          struct.setServerErrorIsSet(true);
        }
        if (incoming.get(3)) {
          struct.dateError = new TInvalidDateParam();
          struct.dateError.read(iprot);
          struct.setDateErrorIsSet(true);
        }
        if (incoming.get(4)) {
          struct.notFound = new TNotFoundException();
          struct.notFound.read(iprot);
          struct.setNotFoundIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField LECTURE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureId", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField LECTURE_FIELD_DESC = new org.apache.thrift.protocol.TField("lecture", org.apache.thrift.protocol.TType.STRUCT, (short)3);

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

    public String userToken; // required
    public String lectureId; // required
    public LectureWrite lecture; // 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 {
      USER_TOKEN((short)1, "userToken"),
      LECTURE_ID((short)2, "lectureId"),
      LECTURE((short)3, "lecture");

      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: // USER_TOKEN
            return USER_TOKEN;
          case 2: // LECTURE_ID
            return LECTURE_ID;
          case 3: // LECTURE
            return LECTURE;
          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
    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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "Token")));
      tmpMap.put(_Fields.LECTURE_ID, new org.apache.thrift.meta_data.FieldMetaData("lectureId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "UUID")));
      tmpMap.put(_Fields.LECTURE, new org.apache.thrift.meta_data.FieldMetaData("lecture", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LectureWrite.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateLecture_args.class, metaDataMap);
    }

    public updateLecture_args() {
    }

    public updateLecture_args(
      String userToken,
      String lectureId,
      LectureWrite lecture)
    {
      this();
      this.userToken = userToken;
      this.lectureId = lectureId;
      this.lecture = lecture;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updateLecture_args(updateLecture_args other) {
      if (other.isSetUserToken()) {
        this.userToken = other.userToken;
      }
      if (other.isSetLectureId()) {
        this.lectureId = other.lectureId;
      }
      if (other.isSetLecture()) {
        this.lecture = new LectureWrite(other.lecture);
      }
    }

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

    @Override
    public void clear() {
      this.userToken = null;
      this.lectureId = null;
      this.lecture = null;
    }

    public String getUserToken() {
      return this.userToken;
    }

    public updateLecture_args setUserToken(String userToken) {
      this.userToken = userToken;
      return this;
    }

    public void unsetUserToken() {
      this.userToken = null;
    }

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

    public void setUserTokenIsSet(boolean value) {
      if (!value) {
        this.userToken = null;
      }
    }

    public String getLectureId() {
      return this.lectureId;
    }

    public updateLecture_args setLectureId(String lectureId) {
      this.lectureId = lectureId;
      return this;
    }

    public void unsetLectureId() {
      this.lectureId = null;
    }

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

    public void setLectureIdIsSet(boolean value) {
      if (!value) {
        this.lectureId = null;
      }
    }

    public LectureWrite getLecture() {
      return this.lecture;
    }

    public updateLecture_args setLecture(LectureWrite lecture) {
      this.lecture = lecture;
      return this;
    }

    public void unsetLecture() {
      this.lecture = null;
    }

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

    public void setLectureIsSet(boolean value) {
      if (!value) {
        this.lecture = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_TOKEN:
        if (value == null) {
          unsetUserToken();
        } else {
          setUserToken((String)value);
        }
        break;

      case LECTURE_ID:
        if (value == null) {
          unsetLectureId();
        } else {
          setLectureId((String)value);
        }
        break;

      case LECTURE:
        if (value == null) {
          unsetLecture();
        } else {
          setLecture((LectureWrite)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_TOKEN:
        return getUserToken();

      case LECTURE_ID:
        return getLectureId();

      case LECTURE:
        return getLecture();

      }
      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 USER_TOKEN:
        return isSetUserToken();
      case LECTURE_ID:
        return isSetLectureId();
      case LECTURE:
        return isSetLecture();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_userToken = true && this.isSetUserToken();
      boolean that_present_userToken = true && that.isSetUserToken();
      if (this_present_userToken || that_present_userToken) {
        if (!(this_present_userToken && that_present_userToken))
          return false;
        if (!this.userToken.equals(that.userToken))
          return false;
      }

      boolean this_present_lectureId = true && this.isSetLectureId();
      boolean that_present_lectureId = true && that.isSetLectureId();
      if (this_present_lectureId || that_present_lectureId) {
        if (!(this_present_lectureId && that_present_lectureId))
          return false;
        if (!this.lectureId.equals(that.lectureId))
          return false;
      }

      boolean this_present_lecture = true && this.isSetLecture();
      boolean that_present_lecture = true && that.isSetLecture();
      if (this_present_lecture || that_present_lecture) {
        if (!(this_present_lecture && that_present_lecture))
          return false;
        if (!this.lecture.equals(that.lecture))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_userToken = true && (isSetUserToken());
      list.add(present_userToken);
      if (present_userToken)
        list.add(userToken);

      boolean present_lectureId = true && (isSetLectureId());
      list.add(present_lectureId);
      if (present_lectureId)
        list.add(lectureId);

      boolean present_lecture = true && (isSetLecture());
      list.add(present_lecture);
      if (present_lecture)
        list.add(lecture);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserToken()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetLectureId()).compareTo(other.isSetLectureId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetLectureId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lectureId, other.lectureId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetLecture()).compareTo(other.isSetLecture());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetLecture()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lecture, other.lecture);
        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("updateLecture_args(");
      boolean first = true;

      sb.append("userToken:");
      if (this.userToken == null) {
        sb.append("null");
      } else {
        sb.append(this.userToken);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("lectureId:");
      if (this.lectureId == null) {
        sb.append("null");
      } else {
        sb.append(this.lectureId);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("lecture:");
      if (this.lecture == null) {
        sb.append("null");
      } else {
        sb.append(this.lecture);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (lecture != null) {
        lecture.validate();
      }
    }

    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 {
        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 updateLecture_argsStandardSchemeFactory implements SchemeFactory {
      public updateLecture_argsStandardScheme getScheme() {
        return new updateLecture_argsStandardScheme();
      }
    }

    private static class updateLecture_argsStandardScheme extends StandardScheme<updateLecture_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, updateLecture_args 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: // USER_TOKEN
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.userToken = iprot.readString();
                struct.setUserTokenIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // LECTURE_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.lectureId = iprot.readString();
                struct.setLectureIdIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // LECTURE
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.lecture = new LectureWrite();
                struct.lecture.read(iprot);
                struct.setLectureIsSet(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, updateLecture_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.userToken != null) {
          oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
          oprot.writeString(struct.userToken);
          oprot.writeFieldEnd();
        }
        if (struct.lectureId != null) {
          oprot.writeFieldBegin(LECTURE_ID_FIELD_DESC);
          oprot.writeString(struct.lectureId);
          oprot.writeFieldEnd();
        }
        if (struct.lecture != null) {
          oprot.writeFieldBegin(LECTURE_FIELD_DESC);
          struct.lecture.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class updateLecture_argsTupleSchemeFactory implements SchemeFactory {
      public updateLecture_argsTupleScheme getScheme() {
        return new updateLecture_argsTupleScheme();
      }
    }

    private static class updateLecture_argsTupleScheme extends TupleScheme<updateLecture_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, updateLecture_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetUserToken()) {
          optionals.set(0);
        }
        if (struct.isSetLectureId()) {
          optionals.set(1);
        }
        if (struct.isSetLecture()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetUserToken()) {
          oprot.writeString(struct.userToken);
        }
        if (struct.isSetLectureId()) {
          oprot.writeString(struct.lectureId);
        }
        if (struct.isSetLecture()) {
          struct.lecture.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, updateLecture_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.userToken = iprot.readString();
          struct.setUserTokenIsSet(true);
        }
        if (incoming.get(1)) {
          struct.lectureId = iprot.readString();
          struct.setLectureIdIsSet(true);
        }
        if (incoming.get(2)) {
          struct.lecture = new LectureWrite();
          struct.lecture.read(iprot);
          struct.setLectureIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3);
    private static final org.apache.thrift.protocol.TField DATE_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("dateError", org.apache.thrift.protocol.TType.STRUCT, (short)4);

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

    public TAuthorizationException authError; // required
    public TNotFoundException notFound; // required
    public TInvocationException serverError; // required
    public TInvalidDateParam dateError; // 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 {
      AUTH_ERROR((short)1, "authError"),
      NOT_FOUND((short)2, "notFound"),
      SERVER_ERROR((short)3, "serverError"),
      DATE_ERROR((short)4, "dateError");

      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: // AUTH_ERROR
            return AUTH_ERROR;
          case 2: // NOT_FOUND
            return NOT_FOUND;
          case 3: // SERVER_ERROR
            return SERVER_ERROR;
          case 4: // DATE_ERROR
            return DATE_ERROR;
          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
    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.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.DATE_ERROR, new org.apache.thrift.meta_data.FieldMetaData("dateError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateLecture_result.class, metaDataMap);
    }

    public updateLecture_result() {
    }

    public updateLecture_result(
      TAuthorizationException authError,
      TNotFoundException notFound,
      TInvocationException serverError,
      TInvalidDateParam dateError)
    {
      this();
      this.authError = authError;
      this.notFound = notFound;
      this.serverError = serverError;
      this.dateError = dateError;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updateLecture_result(updateLecture_result other) {
      if (other.isSetAuthError()) {
        this.authError = new TAuthorizationException(other.authError);
      }
      if (other.isSetNotFound()) {
        this.notFound = new TNotFoundException(other.notFound);
      }
      if (other.isSetServerError()) {
        this.serverError = new TInvocationException(other.serverError);
      }
      if (other.isSetDateError()) {
        this.dateError = new TInvalidDateParam(other.dateError);
      }
    }

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

    @Override
    public void clear() {
      this.authError = null;
      this.notFound = null;
      this.serverError = null;
      this.dateError = null;
    }

    public TAuthorizationException getAuthError() {
      return this.authError;
    }

    public updateLecture_result setAuthError(TAuthorizationException authError) {
      this.authError = authError;
      return this;
    }

    public void unsetAuthError() {
      this.authError = null;
    }

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

    public void setAuthErrorIsSet(boolean value) {
      if (!value) {
        this.authError = null;
      }
    }

    public TNotFoundException getNotFound() {
      return this.notFound;
    }

    public updateLecture_result setNotFound(TNotFoundException notFound) {
      this.notFound = notFound;
      return this;
    }

    public void unsetNotFound() {
      this.notFound = null;
    }

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

    public void setNotFoundIsSet(boolean value) {
      if (!value) {
        this.notFound = null;
      }
    }

    public TInvocationException getServerError() {
      return this.serverError;
    }

    public updateLecture_result setServerError(TInvocationException serverError) {
      this.serverError = serverError;
      return this;
    }

    public void unsetServerError() {
      this.serverError = null;
    }

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

    public void setServerErrorIsSet(boolean value) {
      if (!value) {
        this.serverError = null;
      }
    }

    public TInvalidDateParam getDateError() {
      return this.dateError;
    }

    public updateLecture_result setDateError(TInvalidDateParam dateError) {
      this.dateError = dateError;
      return this;
    }

    public void unsetDateError() {
      this.dateError = null;
    }

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

    public void setDateErrorIsSet(boolean value) {
      if (!value) {
        this.dateError = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case AUTH_ERROR:
        if (value == null) {
          unsetAuthError();
        } else {
          setAuthError((TAuthorizationException)value);
        }
        break;

      case NOT_FOUND:
        if (value == null) {
          unsetNotFound();
        } else {
          setNotFound((TNotFoundException)value);
        }
        break;

      case SERVER_ERROR:
        if (value == null) {
          unsetServerError();
        } else {
          setServerError((TInvocationException)value);
        }
        break;

      case DATE_ERROR:
        if (value == null) {
          unsetDateError();
        } else {
          setDateError((TInvalidDateParam)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case AUTH_ERROR:
        return getAuthError();

      case NOT_FOUND:
        return getNotFound();

      case SERVER_ERROR:
        return getServerError();

      case DATE_ERROR:
        return getDateError();

      }
      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 AUTH_ERROR:
        return isSetAuthError();
      case NOT_FOUND:
        return isSetNotFound();
      case SERVER_ERROR:
        return isSetServerError();
      case DATE_ERROR:
        return isSetDateError();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_authError = true && this.isSetAuthError();
      boolean that_present_authError = true && that.isSetAuthError();
      if (this_present_authError || that_present_authError) {
        if (!(this_present_authError && that_present_authError))
          return false;
        if (!this.authError.equals(that.authError))
          return false;
      }

      boolean this_present_notFound = true && this.isSetNotFound();
      boolean that_present_notFound = true && that.isSetNotFound();
      if (this_present_notFound || that_present_notFound) {
        if (!(this_present_notFound && that_present_notFound))
          return false;
        if (!this.notFound.equals(that.notFound))
          return false;
      }

      boolean this_present_serverError = true && this.isSetServerError();
      boolean that_present_serverError = true && that.isSetServerError();
      if (this_present_serverError || that_present_serverError) {
        if (!(this_present_serverError && that_present_serverError))
          return false;
        if (!this.serverError.equals(that.serverError))
          return false;
      }

      boolean this_present_dateError = true && this.isSetDateError();
      boolean that_present_dateError = true && that.isSetDateError();
      if (this_present_dateError || that_present_dateError) {
        if (!(this_present_dateError && that_present_dateError))
          return false;
        if (!this.dateError.equals(that.dateError))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_authError = true && (isSetAuthError());
      list.add(present_authError);
      if (present_authError)
        list.add(authError);

      boolean present_notFound = true && (isSetNotFound());
      list.add(present_notFound);
      if (present_notFound)
        list.add(notFound);

      boolean present_serverError = true && (isSetServerError());
      list.add(present_serverError);
      if (present_serverError)
        list.add(serverError);

      boolean present_dateError = true && (isSetDateError());
      list.add(present_dateError);
      if (present_dateError)
        list.add(dateError);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFound()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetServerError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetDateError()).compareTo(other.isSetDateError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetDateError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dateError, other.dateError);
        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("updateLecture_result(");
      boolean first = true;

      sb.append("authError:");
      if (this.authError == null) {
        sb.append("null");
      } else {
        sb.append(this.authError);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("notFound:");
      if (this.notFound == null) {
        sb.append("null");
      } else {
        sb.append(this.notFound);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("serverError:");
      if (this.serverError == null) {
        sb.append("null");
      } else {
        sb.append(this.serverError);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("dateError:");
      if (this.dateError == null) {
        sb.append("null");
      } else {
        sb.append(this.dateError);
      }
      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 {
        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 updateLecture_resultStandardSchemeFactory implements SchemeFactory {
      public updateLecture_resultStandardScheme getScheme() {
        return new updateLecture_resultStandardScheme();
      }
    }

    private static class updateLecture_resultStandardScheme extends StandardScheme<updateLecture_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, updateLecture_result 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: // AUTH_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.authError = new TAuthorizationException();
                struct.authError.read(iprot);
                struct.setAuthErrorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // NOT_FOUND
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.notFound = new TNotFoundException();
                struct.notFound.read(iprot);
                struct.setNotFoundIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // SERVER_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.serverError = new TInvocationException();
                struct.serverError.read(iprot);
                struct.setServerErrorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 4: // DATE_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.dateError = new TInvalidDateParam();
                struct.dateError.read(iprot);
                struct.setDateErrorIsSet(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, updateLecture_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.authError != null) {
          oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC);
          struct.authError.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.notFound != null) {
          oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC);
          struct.notFound.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.serverError != null) {
          oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC);
          struct.serverError.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.dateError != null) {
          oprot.writeFieldBegin(DATE_ERROR_FIELD_DESC);
          struct.dateError.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class updateLecture_resultTupleSchemeFactory implements SchemeFactory {
      public updateLecture_resultTupleScheme getScheme() {
        return new updateLecture_resultTupleScheme();
      }
    }

    private static class updateLecture_resultTupleScheme extends TupleScheme<updateLecture_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, updateLecture_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetAuthError()) {
          optionals.set(0);
        }
        if (struct.isSetNotFound()) {
          optionals.set(1);
        }
        if (struct.isSetServerError()) {
          optionals.set(2);
        }
        if (struct.isSetDateError()) {
          optionals.set(3);
        }
        oprot.writeBitSet(optionals, 4);
        if (struct.isSetAuthError()) {
          struct.authError.write(oprot);
        }
        if (struct.isSetNotFound()) {
          struct.notFound.write(oprot);
        }
        if (struct.isSetServerError()) {
          struct.serverError.write(oprot);
        }
        if (struct.isSetDateError()) {
          struct.dateError.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, updateLecture_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(4);
        if (incoming.get(0)) {
          struct.authError = new TAuthorizationException();
          struct.authError.read(iprot);
          struct.setAuthErrorIsSet(true);
        }
        if (incoming.get(1)) {
          struct.notFound = new TNotFoundException();
          struct.notFound.read(iprot);
          struct.setNotFoundIsSet(true);
        }
        if (incoming.get(2)) {
          struct.serverError = new TInvocationException();
          struct.serverError.read(iprot);
          struct.setServerErrorIsSet(true);
        }
        if (incoming.get(3)) {
          struct.dateError = new TInvalidDateParam();
          struct.dateError.read(iprot);
          struct.setDateErrorIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField PAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("page", org.apache.thrift.protocol.TType.I32, (short)2);

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

    public String userToken; // required
    public int page; // 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 {
      USER_TOKEN((short)1, "userToken"),
      PAGE((short)2, "page");

      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: // USER_TOKEN
            return USER_TOKEN;
          case 2: // PAGE
            return PAGE;
          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 __PAGE_ISSET_ID = 0;
    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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "Token")));
      tmpMap.put(_Fields.PAGE, new org.apache.thrift.meta_data.FieldMetaData("page", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureList_args.class, metaDataMap);
    }

    public getLectureList_args() {
    }

    public getLectureList_args(
      String userToken,
      int page)
    {
      this();
      this.userToken = userToken;
      this.page = page;
      setPageIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getLectureList_args(getLectureList_args other) {
      __isset_bitfield = other.__isset_bitfield;
      if (other.isSetUserToken()) {
        this.userToken = other.userToken;
      }
      this.page = other.page;
    }

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

    @Override
    public void clear() {
      this.userToken = null;
      setPageIsSet(false);
      this.page = 0;
    }

    public String getUserToken() {
      return this.userToken;
    }

    public getLectureList_args setUserToken(String userToken) {
      this.userToken = userToken;
      return this;
    }

    public void unsetUserToken() {
      this.userToken = null;
    }

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

    public void setUserTokenIsSet(boolean value) {
      if (!value) {
        this.userToken = null;
      }
    }

    public int getPage() {
      return this.page;
    }

    public getLectureList_args setPage(int page) {
      this.page = page;
      setPageIsSet(true);
      return this;
    }

    public void unsetPage() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PAGE_ISSET_ID);
    }

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

    public void setPageIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PAGE_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_TOKEN:
        if (value == null) {
          unsetUserToken();
        } else {
          setUserToken((String)value);
        }
        break;

      case PAGE:
        if (value == null) {
          unsetPage();
        } else {
          setPage((Integer)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_TOKEN:
        return getUserToken();

      case PAGE:
        return getPage();

      }
      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 USER_TOKEN:
        return isSetUserToken();
      case PAGE:
        return isSetPage();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_userToken = true && this.isSetUserToken();
      boolean that_present_userToken = true && that.isSetUserToken();
      if (this_present_userToken || that_present_userToken) {
        if (!(this_present_userToken && that_present_userToken))
          return false;
        if (!this.userToken.equals(that.userToken))
          return false;
      }

      boolean this_present_page = true;
      boolean that_present_page = true;
      if (this_present_page || that_present_page) {
        if (!(this_present_page && that_present_page))
          return false;
        if (this.page != that.page)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_userToken = true && (isSetUserToken());
      list.add(present_userToken);
      if (present_userToken)
        list.add(userToken);

      boolean present_page = true;
      list.add(present_page);
      if (present_page)
        list.add(page);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserToken()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetPage()).compareTo(other.isSetPage());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetPage()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.page, other.page);
        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("getLectureList_args(");
      boolean first = true;

      sb.append("userToken:");
      if (this.userToken == null) {
        sb.append("null");
      } else {
        sb.append(this.userToken);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("page:");
      sb.append(this.page);
      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 getLectureList_argsStandardSchemeFactory implements SchemeFactory {
      public getLectureList_argsStandardScheme getScheme() {
        return new getLectureList_argsStandardScheme();
      }
    }

    private static class getLectureList_argsStandardScheme extends StandardScheme<getLectureList_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureList_args 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: // USER_TOKEN
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.userToken = iprot.readString();
                struct.setUserTokenIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // PAGE
              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
                struct.page = iprot.readI32();
                struct.setPageIsSet(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, getLectureList_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.userToken != null) {
          oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
          oprot.writeString(struct.userToken);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldBegin(PAGE_FIELD_DESC);
        oprot.writeI32(struct.page);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getLectureList_argsTupleSchemeFactory implements SchemeFactory {
      public getLectureList_argsTupleScheme getScheme() {
        return new getLectureList_argsTupleScheme();
      }
    }

    private static class getLectureList_argsTupleScheme extends TupleScheme<getLectureList_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getLectureList_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetUserToken()) {
          optionals.set(0);
        }
        if (struct.isSetPage()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetUserToken()) {
          oprot.writeString(struct.userToken);
        }
        if (struct.isSetPage()) {
          oprot.writeI32(struct.page);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getLectureList_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.userToken = iprot.readString();
          struct.setUserTokenIsSet(true);
        }
        if (incoming.get(1)) {
          struct.page = iprot.readI32();
          struct.setPageIsSet(true);
        }
      }
    }

  }

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

    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);
    private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)2);

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

    public List<LectureSummary> success; // required
    public TAuthorizationException authError; // required
    public TInvocationException serverError; // 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 {
      SUCCESS((short)0, "success"),
      AUTH_ERROR((short)1, "authError"),
      SERVER_ERROR((short)2, "serverError");

      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 0: // SUCCESS
            return SUCCESS;
          case 1: // AUTH_ERROR
            return AUTH_ERROR;
          case 2: // SERVER_ERROR
            return SERVER_ERROR;
          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
    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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LectureSummary.class))));
      tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureList_result.class, metaDataMap);
    }

    public getLectureList_result() {
    }

    public getLectureList_result(
      List<LectureSummary> success,
      TAuthorizationException authError,
      TInvocationException serverError)
    {
      this();
      this.success = success;
      this.authError = authError;
      this.serverError = serverError;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getLectureList_result(getLectureList_result other) {
      if (other.isSetSuccess()) {
        List<LectureSummary> __this__success = new ArrayList<LectureSummary>(other.success.size());
        for (LectureSummary other_element : other.success) {
          __this__success.add(new LectureSummary(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetAuthError()) {
        this.authError = new TAuthorizationException(other.authError);
      }
      if (other.isSetServerError()) {
        this.serverError = new TInvocationException(other.serverError);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.authError = null;
      this.serverError = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<LectureSummary> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(LectureSummary elem) {
      if (this.success == null) {
        this.success = new ArrayList<LectureSummary>();
      }
      this.success.add(elem);
    }

    public List<LectureSummary> getSuccess() {
      return this.success;
    }

    public getLectureList_result setSuccess(List<LectureSummary> success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

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

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public TAuthorizationException getAuthError() {
      return this.authError;
    }

    public getLectureList_result setAuthError(TAuthorizationException authError) {
      this.authError = authError;
      return this;
    }

    public void unsetAuthError() {
      this.authError = null;
    }

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

    public void setAuthErrorIsSet(boolean value) {
      if (!value) {
        this.authError = null;
      }
    }

    public TInvocationException getServerError() {
      return this.serverError;
    }

    public getLectureList_result setServerError(TInvocationException serverError) {
      this.serverError = serverError;
      return this;
    }

    public void unsetServerError() {
      this.serverError = null;
    }

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

    public void setServerErrorIsSet(boolean value) {
      if (!value) {
        this.serverError = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<LectureSummary>)value);
        }
        break;

      case AUTH_ERROR:
        if (value == null) {
          unsetAuthError();
        } else {
          setAuthError((TAuthorizationException)value);
        }
        break;

      case SERVER_ERROR:
        if (value == null) {
          unsetServerError();
        } else {
          setServerError((TInvocationException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case AUTH_ERROR:
        return getAuthError();

      case SERVER_ERROR:
        return getServerError();

      }
      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 SUCCESS:
        return isSetSuccess();
      case AUTH_ERROR:
        return isSetAuthError();
      case SERVER_ERROR:
        return isSetServerError();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_authError = true && this.isSetAuthError();
      boolean that_present_authError = true && that.isSetAuthError();
      if (this_present_authError || that_present_authError) {
        if (!(this_present_authError && that_present_authError))
          return false;
        if (!this.authError.equals(that.authError))
          return false;
      }

      boolean this_present_serverError = true && this.isSetServerError();
      boolean that_present_serverError = true && that.isSetServerError();
      if (this_present_serverError || that_present_serverError) {
        if (!(this_present_serverError && that_present_serverError))
          return false;
        if (!this.serverError.equals(that.serverError))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_authError = true && (isSetAuthError());
      list.add(present_authError);
      if (present_authError)
        list.add(authError);

      boolean present_serverError = true && (isSetServerError());
      list.add(present_serverError);
      if (present_serverError)
        list.add(serverError);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetServerError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError);
        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("getLectureList_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("authError:");
      if (this.authError == null) {
        sb.append("null");
      } else {
        sb.append(this.authError);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("serverError:");
      if (this.serverError == null) {
        sb.append("null");
      } else {
        sb.append(this.serverError);
      }
      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 {
        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 getLectureList_resultStandardSchemeFactory implements SchemeFactory {
      public getLectureList_resultStandardScheme getScheme() {
        return new getLectureList_resultStandardScheme();
      }
    }

    private static class getLectureList_resultStandardScheme extends StandardScheme<getLectureList_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureList_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                {
                  org.apache.thrift.protocol.TList _list310 = iprot.readListBegin();
                  struct.success = new ArrayList<LectureSummary>(_list310.size);
                  LectureSummary _elem311;
                  for (int _i312 = 0; _i312 < _list310.size; ++_i312)
                  {
                    _elem311 = new LectureSummary();
                    _elem311.read(iprot);
                    struct.success.add(_elem311);
                  }
                  iprot.readListEnd();
                }
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // AUTH_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.authError = new TAuthorizationException();
                struct.authError.read(iprot);
                struct.setAuthErrorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // SERVER_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.serverError = new TInvocationException();
                struct.serverError.read(iprot);
                struct.setServerErrorIsSet(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, getLectureList_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
            for (LectureSummary _iter313 : struct.success)
            {
              _iter313.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.authError != null) {
          oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC);
          struct.authError.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.serverError != null) {
          oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC);
          struct.serverError.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getLectureList_resultTupleSchemeFactory implements SchemeFactory {
      public getLectureList_resultTupleScheme getScheme() {
        return new getLectureList_resultTupleScheme();
      }
    }

    private static class getLectureList_resultTupleScheme extends TupleScheme<getLectureList_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getLectureList_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetAuthError()) {
          optionals.set(1);
        }
        if (struct.isSetServerError()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (LectureSummary _iter314 : struct.success)
            {
              _iter314.write(oprot);
            }
          }
        }
        if (struct.isSetAuthError()) {
          struct.authError.write(oprot);
        }
        if (struct.isSetServerError()) {
          struct.serverError.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getLectureList_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          {
            org.apache.thrift.protocol.TList _list315 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
            struct.success = new ArrayList<LectureSummary>(_list315.size);
            LectureSummary _elem316;
            for (int _i317 = 0; _i317 < _list315.size; ++_i317)
            {
              _elem316 = new LectureSummary();
              _elem316.read(iprot);
              struct.success.add(_elem316);
            }
          }
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.authError = new TAuthorizationException();
          struct.authError.read(iprot);
          struct.setAuthErrorIsSet(true);
        }
        if (incoming.get(2)) {
          struct.serverError = new TInvocationException();
          struct.serverError.read(iprot);
          struct.setServerErrorIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField LECTURE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureId", org.apache.thrift.protocol.TType.STRING, (short)2);

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

    public String userToken; // required
    public String lectureId; // 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 {
      USER_TOKEN((short)1, "userToken"),
      LECTURE_ID((short)2, "lectureId");

      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: // USER_TOKEN
            return USER_TOKEN;
          case 2: // LECTURE_ID
            return LECTURE_ID;
          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
    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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "Token")));
      tmpMap.put(_Fields.LECTURE_ID, new org.apache.thrift.meta_data.FieldMetaData("lectureId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "UUID")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureDetails_args.class, metaDataMap);
    }

    public getLectureDetails_args() {
    }

    public getLectureDetails_args(
      String userToken,
      String lectureId)
    {
      this();
      this.userToken = userToken;
      this.lectureId = lectureId;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getLectureDetails_args(getLectureDetails_args other) {
      if (other.isSetUserToken()) {
        this.userToken = other.userToken;
      }
      if (other.isSetLectureId()) {
        this.lectureId = other.lectureId;
      }
    }

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

    @Override
    public void clear() {
      this.userToken = null;
      this.lectureId = null;
    }

    public String getUserToken() {
      return this.userToken;
    }

    public getLectureDetails_args setUserToken(String userToken) {
      this.userToken = userToken;
      return this;
    }

    public void unsetUserToken() {
      this.userToken = null;
    }

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

    public void setUserTokenIsSet(boolean value) {
      if (!value) {
        this.userToken = null;
      }
    }

    public String getLectureId() {
      return this.lectureId;
    }

    public getLectureDetails_args setLectureId(String lectureId) {
      this.lectureId = lectureId;
      return this;
    }

    public void unsetLectureId() {
      this.lectureId = null;
    }

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

    public void setLectureIdIsSet(boolean value) {
      if (!value) {
        this.lectureId = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_TOKEN:
        if (value == null) {
          unsetUserToken();
        } else {
          setUserToken((String)value);
        }
        break;

      case LECTURE_ID:
        if (value == null) {
          unsetLectureId();
        } else {
          setLectureId((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_TOKEN:
        return getUserToken();

      case LECTURE_ID:
        return getLectureId();

      }
      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 USER_TOKEN:
        return isSetUserToken();
      case LECTURE_ID:
        return isSetLectureId();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_userToken = true && this.isSetUserToken();
      boolean that_present_userToken = true && that.isSetUserToken();
      if (this_present_userToken || that_present_userToken) {
        if (!(this_present_userToken && that_present_userToken))
          return false;
        if (!this.userToken.equals(that.userToken))
          return false;
      }

      boolean this_present_lectureId = true && this.isSetLectureId();
      boolean that_present_lectureId = true && that.isSetLectureId();
      if (this_present_lectureId || that_present_lectureId) {
        if (!(this_present_lectureId && that_present_lectureId))
          return false;
        if (!this.lectureId.equals(that.lectureId))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_userToken = true && (isSetUserToken());
      list.add(present_userToken);
      if (present_userToken)
        list.add(userToken);

      boolean present_lectureId = true && (isSetLectureId());
      list.add(present_lectureId);
      if (present_lectureId)
        list.add(lectureId);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserToken()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetLectureId()).compareTo(other.isSetLectureId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetLectureId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lectureId, other.lectureId);
        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("getLectureDetails_args(");
      boolean first = true;

      sb.append("userToken:");
      if (this.userToken == null) {
        sb.append("null");
      } else {
        sb.append(this.userToken);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("lectureId:");
      if (this.lectureId == null) {
        sb.append("null");
      } else {
        sb.append(this.lectureId);
      }
      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 {
        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 getLectureDetails_argsStandardSchemeFactory implements SchemeFactory {
      public getLectureDetails_argsStandardScheme getScheme() {
        return new getLectureDetails_argsStandardScheme();
      }
    }

    private static class getLectureDetails_argsStandardScheme extends StandardScheme<getLectureDetails_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureDetails_args 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: // USER_TOKEN
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.userToken = iprot.readString();
                struct.setUserTokenIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // LECTURE_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.lectureId = iprot.readString();
                struct.setLectureIdIsSet(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, getLectureDetails_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.userToken != null) {
          oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
          oprot.writeString(struct.userToken);
          oprot.writeFieldEnd();
        }
        if (struct.lectureId != null) {
          oprot.writeFieldBegin(LECTURE_ID_FIELD_DESC);
          oprot.writeString(struct.lectureId);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getLectureDetails_argsTupleSchemeFactory implements SchemeFactory {
      public getLectureDetails_argsTupleScheme getScheme() {
        return new getLectureDetails_argsTupleScheme();
      }
    }

    private static class getLectureDetails_argsTupleScheme extends TupleScheme<getLectureDetails_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getLectureDetails_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetUserToken()) {
          optionals.set(0);
        }
        if (struct.isSetLectureId()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetUserToken()) {
          oprot.writeString(struct.userToken);
        }
        if (struct.isSetLectureId()) {
          oprot.writeString(struct.lectureId);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getLectureDetails_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.userToken = iprot.readString();
          struct.setUserTokenIsSet(true);
        }
        if (incoming.get(1)) {
          struct.lectureId = iprot.readString();
          struct.setLectureIdIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3);

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

    public LectureRead success; // required
    public TAuthorizationException authError; // required
    public TNotFoundException notFound; // required
    public TInvocationException serverError; // 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 {
      SUCCESS((short)0, "success"),
      AUTH_ERROR((short)1, "authError"),
      NOT_FOUND((short)2, "notFound"),
      SERVER_ERROR((short)3, "serverError");

      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 0: // SUCCESS
            return SUCCESS;
          case 1: // AUTH_ERROR
            return AUTH_ERROR;
          case 2: // NOT_FOUND
            return NOT_FOUND;
          case 3: // SERVER_ERROR
            return SERVER_ERROR;
          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
    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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LectureRead.class)));
      tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureDetails_result.class, metaDataMap);
    }

    public getLectureDetails_result() {
    }

    public getLectureDetails_result(
      LectureRead success,
      TAuthorizationException authError,
      TNotFoundException notFound,
      TInvocationException serverError)
    {
      this();
      this.success = success;
      this.authError = authError;
      this.notFound = notFound;
      this.serverError = serverError;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getLectureDetails_result(getLectureDetails_result other) {
      if (other.isSetSuccess()) {
        this.success = new LectureRead(other.success);
      }
      if (other.isSetAuthError()) {
        this.authError = new TAuthorizationException(other.authError);
      }
      if (other.isSetNotFound()) {
        this.notFound = new TNotFoundException(other.notFound);
      }
      if (other.isSetServerError()) {
        this.serverError = new TInvocationException(other.serverError);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.authError = null;
      this.notFound = null;
      this.serverError = null;
    }

    public LectureRead getSuccess() {
      return this.success;
    }

    public getLectureDetails_result setSuccess(LectureRead success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

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

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public TAuthorizationException getAuthError() {
      return this.authError;
    }

    public getLectureDetails_result setAuthError(TAuthorizationException authError) {
      this.authError = authError;
      return this;
    }

    public void unsetAuthError() {
      this.authError = null;
    }

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

    public void setAuthErrorIsSet(boolean value) {
      if (!value) {
        this.authError = null;
      }
    }

    public TNotFoundException getNotFound() {
      return this.notFound;
    }

    public getLectureDetails_result setNotFound(TNotFoundException notFound) {
      this.notFound = notFound;
      return this;
    }

    public void unsetNotFound() {
      this.notFound = null;
    }

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

    public void setNotFoundIsSet(boolean value) {
      if (!value) {
        this.notFound = null;
      }
    }

    public TInvocationException getServerError() {
      return this.serverError;
    }

    public getLectureDetails_result setServerError(TInvocationException serverError) {
      this.serverError = serverError;
      return this;
    }

    public void unsetServerError() {
      this.serverError = null;
    }

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

    public void setServerErrorIsSet(boolean value) {
      if (!value) {
        this.serverError = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((LectureRead)value);
        }
        break;

      case AUTH_ERROR:
        if (value == null) {
          unsetAuthError();
        } else {
          setAuthError((TAuthorizationException)value);
        }
        break;

      case NOT_FOUND:
        if (value == null) {
          unsetNotFound();
        } else {
          setNotFound((TNotFoundException)value);
        }
        break;

      case SERVER_ERROR:
        if (value == null) {
          unsetServerError();
        } else {
          setServerError((TInvocationException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case AUTH_ERROR:
        return getAuthError();

      case NOT_FOUND:
        return getNotFound();

      case SERVER_ERROR:
        return getServerError();

      }
      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 SUCCESS:
        return isSetSuccess();
      case AUTH_ERROR:
        return isSetAuthError();
      case NOT_FOUND:
        return isSetNotFound();
      case SERVER_ERROR:
        return isSetServerError();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_authError = true && this.isSetAuthError();
      boolean that_present_authError = true && that.isSetAuthError();
      if (this_present_authError || that_present_authError) {
        if (!(this_present_authError && that_present_authError))
          return false;
        if (!this.authError.equals(that.authError))
          return false;
      }

      boolean this_present_notFound = true && this.isSetNotFound();
      boolean that_present_notFound = true && that.isSetNotFound();
      if (this_present_notFound || that_present_notFound) {
        if (!(this_present_notFound && that_present_notFound))
          return false;
        if (!this.notFound.equals(that.notFound))
          return false;
      }

      boolean this_present_serverError = true && this.isSetServerError();
      boolean that_present_serverError = true && that.isSetServerError();
      if (this_present_serverError || that_present_serverError) {
        if (!(this_present_serverError && that_present_serverError))
          return false;
        if (!this.serverError.equals(that.serverError))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_authError = true && (isSetAuthError());
      list.add(present_authError);
      if (present_authError)
        list.add(authError);

      boolean present_notFound = true && (isSetNotFound());
      list.add(present_notFound);
      if (present_notFound)
        list.add(notFound);

      boolean present_serverError = true && (isSetServerError());
      list.add(present_serverError);
      if (present_serverError)
        list.add(serverError);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFound()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetServerError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError);
        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("getLectureDetails_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("authError:");
      if (this.authError == null) {
        sb.append("null");
      } else {
        sb.append(this.authError);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("notFound:");
      if (this.notFound == null) {
        sb.append("null");
      } else {
        sb.append(this.notFound);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("serverError:");
      if (this.serverError == null) {
        sb.append("null");
      } else {
        sb.append(this.serverError);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (success != null) {
        success.validate();
      }
    }

    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 {
        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 getLectureDetails_resultStandardSchemeFactory implements SchemeFactory {
      public getLectureDetails_resultStandardScheme getScheme() {
        return new getLectureDetails_resultStandardScheme();
      }
    }

    private static class getLectureDetails_resultStandardScheme extends StandardScheme<getLectureDetails_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureDetails_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new LectureRead();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // AUTH_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.authError = new TAuthorizationException();
                struct.authError.read(iprot);
                struct.setAuthErrorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // NOT_FOUND
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.notFound = new TNotFoundException();
                struct.notFound.read(iprot);
                struct.setNotFoundIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // SERVER_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.serverError = new TInvocationException();
                struct.serverError.read(iprot);
                struct.setServerErrorIsSet(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, getLectureDetails_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.authError != null) {
          oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC);
          struct.authError.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.notFound != null) {
          oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC);
          struct.notFound.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.serverError != null) {
          oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC);
          struct.serverError.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getLectureDetails_resultTupleSchemeFactory implements SchemeFactory {
      public getLectureDetails_resultTupleScheme getScheme() {
        return new getLectureDetails_resultTupleScheme();
      }
    }

    private static class getLectureDetails_resultTupleScheme extends TupleScheme<getLectureDetails_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getLectureDetails_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetAuthError()) {
          optionals.set(1);
        }
        if (struct.isSetNotFound()) {
          optionals.set(2);
        }
        if (struct.isSetServerError()) {
          optionals.set(3);
        }
        oprot.writeBitSet(optionals, 4);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetAuthError()) {
          struct.authError.write(oprot);
        }
        if (struct.isSetNotFound()) {
          struct.notFound.write(oprot);
        }
        if (struct.isSetServerError()) {
          struct.serverError.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getLectureDetails_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(4);
        if (incoming.get(0)) {
          struct.success = new LectureRead();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.authError = new TAuthorizationException();
          struct.authError.read(iprot);
          struct.setAuthErrorIsSet(true);
        }
        if (incoming.get(2)) {
          struct.notFound = new TNotFoundException();
          struct.notFound.read(iprot);
          struct.setNotFoundIsSet(true);
        }
        if (incoming.get(3)) {
          struct.serverError = new TInvocationException();
          struct.serverError.read(iprot);
          struct.setServerErrorIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField LECTURE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureId", org.apache.thrift.protocol.TType.STRING, (short)2);

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

    public String userToken; // required
    public String lectureId; // 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 {
      USER_TOKEN((short)1, "userToken"),
      LECTURE_ID((short)2, "lectureId");

      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: // USER_TOKEN
            return USER_TOKEN;
          case 2: // LECTURE_ID
            return LECTURE_ID;
          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
    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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "Token")));
      tmpMap.put(_Fields.LECTURE_ID, new org.apache.thrift.meta_data.FieldMetaData("lectureId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "UUID")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteLecture_args.class, metaDataMap);
    }

    public deleteLecture_args() {
    }

    public deleteLecture_args(
      String userToken,
      String lectureId)
    {
      this();
      this.userToken = userToken;
      this.lectureId = lectureId;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public deleteLecture_args(deleteLecture_args other) {
      if (other.isSetUserToken()) {
        this.userToken = other.userToken;
      }
      if (other.isSetLectureId()) {
        this.lectureId = other.lectureId;
      }
    }

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

    @Override
    public void clear() {
      this.userToken = null;
      this.lectureId = null;
    }

    public String getUserToken() {
      return this.userToken;
    }

    public deleteLecture_args setUserToken(String userToken) {
      this.userToken = userToken;
      return this;
    }

    public void unsetUserToken() {
      this.userToken = null;
    }

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

    public void setUserTokenIsSet(boolean value) {
      if (!value) {
        this.userToken = null;
      }
    }

    public String getLectureId() {
      return this.lectureId;
    }

    public deleteLecture_args setLectureId(String lectureId) {
      this.lectureId = lectureId;
      return this;
    }

    public void unsetLectureId() {
      this.lectureId = null;
    }

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

    public void setLectureIdIsSet(boolean value) {
      if (!value) {
        this.lectureId = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_TOKEN:
        if (value == null) {
          unsetUserToken();
        } else {
          setUserToken((String)value);
        }
        break;

      case LECTURE_ID:
        if (value == null) {
          unsetLectureId();
        } else {
          setLectureId((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_TOKEN:
        return getUserToken();

      case LECTURE_ID:
        return getLectureId();

      }
      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 USER_TOKEN:
        return isSetUserToken();
      case LECTURE_ID:
        return isSetLectureId();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_userToken = true && this.isSetUserToken();
      boolean that_present_userToken = true && that.isSetUserToken();
      if (this_present_userToken || that_present_userToken) {
        if (!(this_present_userToken && that_present_userToken))
          return false;
        if (!this.userToken.equals(that.userToken))
          return false;
      }

      boolean this_present_lectureId = true && this.isSetLectureId();
      boolean that_present_lectureId = true && that.isSetLectureId();
      if (this_present_lectureId || that_present_lectureId) {
        if (!(this_present_lectureId && that_present_lectureId))
          return false;
        if (!this.lectureId.equals(that.lectureId))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_userToken = true && (isSetUserToken());
      list.add(present_userToken);
      if (present_userToken)
        list.add(userToken);

      boolean present_lectureId = true && (isSetLectureId());
      list.add(present_lectureId);
      if (present_lectureId)
        list.add(lectureId);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserToken()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetLectureId()).compareTo(other.isSetLectureId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetLectureId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lectureId, other.lectureId);
        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("deleteLecture_args(");
      boolean first = true;

      sb.append("userToken:");
      if (this.userToken == null) {
        sb.append("null");
      } else {
        sb.append(this.userToken);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("lectureId:");
      if (this.lectureId == null) {
        sb.append("null");
      } else {
        sb.append(this.lectureId);
      }
      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 {
        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 deleteLecture_argsStandardSchemeFactory implements SchemeFactory {
      public deleteLecture_argsStandardScheme getScheme() {
        return new deleteLecture_argsStandardScheme();
      }
    }

    private static class deleteLecture_argsStandardScheme extends StandardScheme<deleteLecture_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, deleteLecture_args 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: // USER_TOKEN
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.userToken = iprot.readString();
                struct.setUserTokenIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // LECTURE_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.lectureId = iprot.readString();
                struct.setLectureIdIsSet(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, deleteLecture_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.userToken != null) {
          oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
          oprot.writeString(struct.userToken);
          oprot.writeFieldEnd();
        }
        if (struct.lectureId != null) {
          oprot.writeFieldBegin(LECTURE_ID_FIELD_DESC);
          oprot.writeString(struct.lectureId);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class deleteLecture_argsTupleSchemeFactory implements SchemeFactory {
      public deleteLecture_argsTupleScheme getScheme() {
        return new deleteLecture_argsTupleScheme();
      }
    }

    private static class deleteLecture_argsTupleScheme extends TupleScheme<deleteLecture_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, deleteLecture_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetUserToken()) {
          optionals.set(0);
        }
        if (struct.isSetLectureId()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetUserToken()) {
          oprot.writeString(struct.userToken);
        }
        if (struct.isSetLectureId()) {
          oprot.writeString(struct.lectureId);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, deleteLecture_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.userToken = iprot.readString();
          struct.setUserTokenIsSet(true);
        }
        if (incoming.get(1)) {
          struct.lectureId = iprot.readString();
          struct.setLectureIdIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3);

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

    public TAuthorizationException authError; // required
    public TNotFoundException notFound; // required
    public TInvocationException serverError; // 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 {
      AUTH_ERROR((short)1, "authError"),
      NOT_FOUND((short)2, "notFound"),
      SERVER_ERROR((short)3, "serverError");

      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: // AUTH_ERROR
            return AUTH_ERROR;
          case 2: // NOT_FOUND
            return NOT_FOUND;
          case 3: // SERVER_ERROR
            return SERVER_ERROR;
          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
    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.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteLecture_result.class, metaDataMap);
    }

    public deleteLecture_result() {
    }

    public deleteLecture_result(
      TAuthorizationException authError,
      TNotFoundException notFound,
      TInvocationException serverError)
    {
      this();
      this.authError = authError;
      this.notFound = notFound;
      this.serverError = serverError;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public deleteLecture_result(deleteLecture_result other) {
      if (other.isSetAuthError()) {
        this.authError = new TAuthorizationException(other.authError);
      }
      if (other.isSetNotFound()) {
        this.notFound = new TNotFoundException(other.notFound);
      }
      if (other.isSetServerError()) {
        this.serverError = new TInvocationException(other.serverError);
      }
    }

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

    @Override
    public void clear() {
      this.authError = null;
      this.notFound = null;
      this.serverError = null;
    }

    public TAuthorizationException getAuthError() {
      return this.authError;
    }

    public deleteLecture_result setAuthError(TAuthorizationException authError) {
      this.authError = authError;
      return this;
    }

    public void unsetAuthError() {
      this.authError = null;
    }

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

    public void setAuthErrorIsSet(boolean value) {
      if (!value) {
        this.authError = null;
      }
    }

    public TNotFoundException getNotFound() {
      return this.notFound;
    }

    public deleteLecture_result setNotFound(TNotFoundException notFound) {
      this.notFound = notFound;
      return this;
    }

    public void unsetNotFound() {
      this.notFound = null;
    }

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

    public void setNotFoundIsSet(boolean value) {
      if (!value) {
        this.notFound = null;
      }
    }

    public TInvocationException getServerError() {
      return this.serverError;
    }

    public deleteLecture_result setServerError(TInvocationException serverError) {
      this.serverError = serverError;
      return this;
    }

    public void unsetServerError() {
      this.serverError = null;
    }

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

    public void setServerErrorIsSet(boolean value) {
      if (!value) {
        this.serverError = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case AUTH_ERROR:
        if (value == null) {
          unsetAuthError();
        } else {
          setAuthError((TAuthorizationException)value);
        }
        break;

      case NOT_FOUND:
        if (value == null) {
          unsetNotFound();
        } else {
          setNotFound((TNotFoundException)value);
        }
        break;

      case SERVER_ERROR:
        if (value == null) {
          unsetServerError();
        } else {
          setServerError((TInvocationException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case AUTH_ERROR:
        return getAuthError();

      case NOT_FOUND:
        return getNotFound();

      case SERVER_ERROR:
        return getServerError();

      }
      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 AUTH_ERROR:
        return isSetAuthError();
      case NOT_FOUND:
        return isSetNotFound();
      case SERVER_ERROR:
        return isSetServerError();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_authError = true && this.isSetAuthError();
      boolean that_present_authError = true && that.isSetAuthError();
      if (this_present_authError || that_present_authError) {
        if (!(this_present_authError && that_present_authError))
          return false;
        if (!this.authError.equals(that.authError))
          return false;
      }

      boolean this_present_notFound = true && this.isSetNotFound();
      boolean that_present_notFound = true && that.isSetNotFound();
      if (this_present_notFound || that_present_notFound) {
        if (!(this_present_notFound && that_present_notFound))
          return false;
        if (!this.notFound.equals(that.notFound))
          return false;
      }

      boolean this_present_serverError = true && this.isSetServerError();
      boolean that_present_serverError = true && that.isSetServerError();
      if (this_present_serverError || that_present_serverError) {
        if (!(this_present_serverError && that_present_serverError))
          return false;
        if (!this.serverError.equals(that.serverError))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_authError = true && (isSetAuthError());
      list.add(present_authError);
      if (present_authError)
        list.add(authError);

      boolean present_notFound = true && (isSetNotFound());
      list.add(present_notFound);
      if (present_notFound)
        list.add(notFound);

      boolean present_serverError = true && (isSetServerError());
      list.add(present_serverError);
      if (present_serverError)
        list.add(serverError);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFound()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetServerError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError);
        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("deleteLecture_result(");
      boolean first = true;

      sb.append("authError:");
      if (this.authError == null) {
        sb.append("null");
      } else {
        sb.append(this.authError);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("notFound:");
      if (this.notFound == null) {
        sb.append("null");
      } else {
        sb.append(this.notFound);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("serverError:");
      if (this.serverError == null) {
        sb.append("null");
      } else {
        sb.append(this.serverError);
      }
      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 {
        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 deleteLecture_resultStandardSchemeFactory implements SchemeFactory {
      public deleteLecture_resultStandardScheme getScheme() {
        return new deleteLecture_resultStandardScheme();
      }
    }

    private static class deleteLecture_resultStandardScheme extends StandardScheme<deleteLecture_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, deleteLecture_result 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: // AUTH_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.authError = new TAuthorizationException();
                struct.authError.read(iprot);
                struct.setAuthErrorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // NOT_FOUND
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.notFound = new TNotFoundException();
                struct.notFound.read(iprot);
                struct.setNotFoundIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // SERVER_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.serverError = new TInvocationException();
                struct.serverError.read(iprot);
                struct.setServerErrorIsSet(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, deleteLecture_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.authError != null) {
          oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC);
          struct.authError.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.notFound != null) {
          oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC);
          struct.notFound.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.serverError != null) {
          oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC);
          struct.serverError.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class deleteLecture_resultTupleSchemeFactory implements SchemeFactory {
      public deleteLecture_resultTupleScheme getScheme() {
        return new deleteLecture_resultTupleScheme();
      }
    }

    private static class deleteLecture_resultTupleScheme extends TupleScheme<deleteLecture_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, deleteLecture_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetAuthError()) {
          optionals.set(0);
        }
        if (struct.isSetNotFound()) {
          optionals.set(1);
        }
        if (struct.isSetServerError()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetAuthError()) {
          struct.authError.write(oprot);
        }
        if (struct.isSetNotFound()) {
          struct.notFound.write(oprot);
        }
        if (struct.isSetServerError()) {
          struct.serverError.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, deleteLecture_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.authError = new TAuthorizationException();
          struct.authError.read(iprot);
          struct.setAuthErrorIsSet(true);
        }
        if (incoming.get(1)) {
          struct.notFound = new TNotFoundException();
          struct.notFound.read(iprot);
          struct.setNotFoundIsSet(true);
        }
        if (incoming.get(2)) {
          struct.serverError = new TInvocationException();
          struct.serverError.read(iprot);
          struct.setServerErrorIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField LECTURE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureId", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField PERMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("permissions", org.apache.thrift.protocol.TType.MAP, (short)3);

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

    public String userToken; // required
    public String lectureId; // required
    public Map<String,LecturePermissions> permissions; // 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 {
      USER_TOKEN((short)1, "userToken"),
      LECTURE_ID((short)2, "lectureId"),
      PERMISSIONS((short)3, "permissions");

      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: // USER_TOKEN
            return USER_TOKEN;
          case 2: // LECTURE_ID
            return LECTURE_ID;
          case 3: // PERMISSIONS
            return PERMISSIONS;
          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
    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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "Token")));
      tmpMap.put(_Fields.LECTURE_ID, new org.apache.thrift.meta_data.FieldMetaData("lectureId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "UUID")));
      tmpMap.put(_Fields.PERMISSIONS, new org.apache.thrift.meta_data.FieldMetaData("permissions", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING              , "UUID"), 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LecturePermissions.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(writeLecturePermissions_args.class, metaDataMap);
    }

    public writeLecturePermissions_args() {
    }

    public writeLecturePermissions_args(
      String userToken,
      String lectureId,
      Map<String,LecturePermissions> permissions)
    {
      this();
      this.userToken = userToken;
      this.lectureId = lectureId;
      this.permissions = permissions;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public writeLecturePermissions_args(writeLecturePermissions_args other) {
      if (other.isSetUserToken()) {
        this.userToken = other.userToken;
      }
      if (other.isSetLectureId()) {
        this.lectureId = other.lectureId;
      }
      if (other.isSetPermissions()) {
        Map<String,LecturePermissions> __this__permissions = new HashMap<String,LecturePermissions>(other.permissions.size());
        for (Map.Entry<String, LecturePermissions> other_element : other.permissions.entrySet()) {

          String other_element_key = other_element.getKey();
          LecturePermissions other_element_value = other_element.getValue();

          String __this__permissions_copy_key = other_element_key;

          LecturePermissions __this__permissions_copy_value = new LecturePermissions(other_element_value);

          __this__permissions.put(__this__permissions_copy_key, __this__permissions_copy_value);
        }
        this.permissions = __this__permissions;
      }
    }

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

    @Override
    public void clear() {
      this.userToken = null;
      this.lectureId = null;
      this.permissions = null;
    }

    public String getUserToken() {
      return this.userToken;
    }

    public writeLecturePermissions_args setUserToken(String userToken) {
      this.userToken = userToken;
      return this;
    }

    public void unsetUserToken() {
      this.userToken = null;
    }

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

    public void setUserTokenIsSet(boolean value) {
      if (!value) {
        this.userToken = null;
      }
    }

    public String getLectureId() {
      return this.lectureId;
    }

    public writeLecturePermissions_args setLectureId(String lectureId) {
      this.lectureId = lectureId;
      return this;
    }

    public void unsetLectureId() {
      this.lectureId = null;
    }

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

    public void setLectureIdIsSet(boolean value) {
      if (!value) {
        this.lectureId = null;
      }
    }

    public int getPermissionsSize() {
      return (this.permissions == null) ? 0 : this.permissions.size();
    }

    public void putToPermissions(String key, LecturePermissions val) {
      if (this.permissions == null) {
        this.permissions = new HashMap<String,LecturePermissions>();
      }
      this.permissions.put(key, val);
    }

    public Map<String,LecturePermissions> getPermissions() {
      return this.permissions;
    }

    public writeLecturePermissions_args setPermissions(Map<String,LecturePermissions> permissions) {
      this.permissions = permissions;
      return this;
    }

    public void unsetPermissions() {
      this.permissions = null;
    }

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

    public void setPermissionsIsSet(boolean value) {
      if (!value) {
        this.permissions = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_TOKEN:
        if (value == null) {
          unsetUserToken();
        } else {
          setUserToken((String)value);
        }
        break;

      case LECTURE_ID:
        if (value == null) {
          unsetLectureId();
        } else {
          setLectureId((String)value);
        }
        break;

      case PERMISSIONS:
        if (value == null) {
          unsetPermissions();
        } else {
          setPermissions((Map<String,LecturePermissions>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_TOKEN:
        return getUserToken();

      case LECTURE_ID:
        return getLectureId();

      case PERMISSIONS:
        return getPermissions();

      }
      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 USER_TOKEN:
        return isSetUserToken();
      case LECTURE_ID:
        return isSetLectureId();
      case PERMISSIONS:
        return isSetPermissions();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_userToken = true && this.isSetUserToken();
      boolean that_present_userToken = true && that.isSetUserToken();
      if (this_present_userToken || that_present_userToken) {
        if (!(this_present_userToken && that_present_userToken))
          return false;
        if (!this.userToken.equals(that.userToken))
          return false;
      }

      boolean this_present_lectureId = true && this.isSetLectureId();
      boolean that_present_lectureId = true && that.isSetLectureId();
      if (this_present_lectureId || that_present_lectureId) {
        if (!(this_present_lectureId && that_present_lectureId))
          return false;
        if (!this.lectureId.equals(that.lectureId))
          return false;
      }

      boolean this_present_permissions = true && this.isSetPermissions();
      boolean that_present_permissions = true && that.isSetPermissions();
      if (this_present_permissions || that_present_permissions) {
        if (!(this_present_permissions && that_present_permissions))
          return false;
        if (!this.permissions.equals(that.permissions))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_userToken = true && (isSetUserToken());
      list.add(present_userToken);
      if (present_userToken)
        list.add(userToken);

      boolean present_lectureId = true && (isSetLectureId());
      list.add(present_lectureId);
      if (present_lectureId)
        list.add(lectureId);

      boolean present_permissions = true && (isSetPermissions());
      list.add(present_permissions);
      if (present_permissions)
        list.add(permissions);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserToken()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetLectureId()).compareTo(other.isSetLectureId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetLectureId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lectureId, other.lectureId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetPermissions()).compareTo(other.isSetPermissions());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetPermissions()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.permissions, other.permissions);
        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("writeLecturePermissions_args(");
      boolean first = true;

      sb.append("userToken:");
      if (this.userToken == null) {
        sb.append("null");
      } else {
        sb.append(this.userToken);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("lectureId:");
      if (this.lectureId == null) {
        sb.append("null");
      } else {
        sb.append(this.lectureId);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("permissions:");
      if (this.permissions == null) {
        sb.append("null");
      } else {
        sb.append(this.permissions);
      }
      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 {
        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 writeLecturePermissions_argsStandardSchemeFactory implements SchemeFactory {
      public writeLecturePermissions_argsStandardScheme getScheme() {
        return new writeLecturePermissions_argsStandardScheme();
      }
    }

    private static class writeLecturePermissions_argsStandardScheme extends StandardScheme<writeLecturePermissions_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, writeLecturePermissions_args 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: // USER_TOKEN
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.userToken = iprot.readString();
                struct.setUserTokenIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // LECTURE_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.lectureId = iprot.readString();
                struct.setLectureIdIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // PERMISSIONS
              if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
                {
                  org.apache.thrift.protocol.TMap _map318 = iprot.readMapBegin();
                  struct.permissions = new HashMap<String,LecturePermissions>(2*_map318.size);
                  String _key319;
                  LecturePermissions _val320;
                  for (int _i321 = 0; _i321 < _map318.size; ++_i321)
                  {
                    _key319 = iprot.readString();
                    _val320 = new LecturePermissions();
                    _val320.read(iprot);
                    struct.permissions.put(_key319, _val320);
                  }
                  iprot.readMapEnd();
                }
                struct.setPermissionsIsSet(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, writeLecturePermissions_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.userToken != null) {
          oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
          oprot.writeString(struct.userToken);
          oprot.writeFieldEnd();
        }
        if (struct.lectureId != null) {
          oprot.writeFieldBegin(LECTURE_ID_FIELD_DESC);
          oprot.writeString(struct.lectureId);
          oprot.writeFieldEnd();
        }
        if (struct.permissions != null) {
          oprot.writeFieldBegin(PERMISSIONS_FIELD_DESC);
          {
            oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.permissions.size()));
            for (Map.Entry<String, LecturePermissions> _iter322 : struct.permissions.entrySet())
            {
              oprot.writeString(_iter322.getKey());
              _iter322.getValue().write(oprot);
            }
            oprot.writeMapEnd();
          }
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class writeLecturePermissions_argsTupleSchemeFactory implements SchemeFactory {
      public writeLecturePermissions_argsTupleScheme getScheme() {
        return new writeLecturePermissions_argsTupleScheme();
      }
    }

    private static class writeLecturePermissions_argsTupleScheme extends TupleScheme<writeLecturePermissions_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, writeLecturePermissions_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetUserToken()) {
          optionals.set(0);
        }
        if (struct.isSetLectureId()) {
          optionals.set(1);
        }
        if (struct.isSetPermissions()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetUserToken()) {
          oprot.writeString(struct.userToken);
        }
        if (struct.isSetLectureId()) {
          oprot.writeString(struct.lectureId);
        }
        if (struct.isSetPermissions()) {
          {
            oprot.writeI32(struct.permissions.size());
            for (Map.Entry<String, LecturePermissions> _iter323 : struct.permissions.entrySet())
            {
              oprot.writeString(_iter323.getKey());
              _iter323.getValue().write(oprot);
            }
          }
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, writeLecturePermissions_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.userToken = iprot.readString();
          struct.setUserTokenIsSet(true);
        }
        if (incoming.get(1)) {
          struct.lectureId = iprot.readString();
          struct.setLectureIdIsSet(true);
        }
        if (incoming.get(2)) {
          {
            org.apache.thrift.protocol.TMap _map324 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
            struct.permissions = new HashMap<String,LecturePermissions>(2*_map324.size);
            String _key325;
            LecturePermissions _val326;
            for (int _i327 = 0; _i327 < _map324.size; ++_i327)
            {
              _key325 = iprot.readString();
              _val326 = new LecturePermissions();
              _val326.read(iprot);
              struct.permissions.put(_key325, _val326);
            }
          }
          struct.setPermissionsIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3);

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

    public TAuthorizationException authError; // required
    public TNotFoundException notFound; // required
    public TInvocationException serverError; // 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 {
      AUTH_ERROR((short)1, "authError"),
      NOT_FOUND((short)2, "notFound"),
      SERVER_ERROR((short)3, "serverError");

      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: // AUTH_ERROR
            return AUTH_ERROR;
          case 2: // NOT_FOUND
            return NOT_FOUND;
          case 3: // SERVER_ERROR
            return SERVER_ERROR;
          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
    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.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(writeLecturePermissions_result.class, metaDataMap);
    }

    public writeLecturePermissions_result() {
    }

    public writeLecturePermissions_result(
      TAuthorizationException authError,
      TNotFoundException notFound,
      TInvocationException serverError)
    {
      this();
      this.authError = authError;
      this.notFound = notFound;
      this.serverError = serverError;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public writeLecturePermissions_result(writeLecturePermissions_result other) {
      if (other.isSetAuthError()) {
        this.authError = new TAuthorizationException(other.authError);
      }
      if (other.isSetNotFound()) {
        this.notFound = new TNotFoundException(other.notFound);
      }
      if (other.isSetServerError()) {
        this.serverError = new TInvocationException(other.serverError);
      }
    }

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

    @Override
    public void clear() {
      this.authError = null;
      this.notFound = null;
      this.serverError = null;
    }

    public TAuthorizationException getAuthError() {
      return this.authError;
    }

    public writeLecturePermissions_result setAuthError(TAuthorizationException authError) {
      this.authError = authError;
      return this;
    }

    public void unsetAuthError() {
      this.authError = null;
    }

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

    public void setAuthErrorIsSet(boolean value) {
      if (!value) {
        this.authError = null;
      }
    }

    public TNotFoundException getNotFound() {
      return this.notFound;
    }

    public writeLecturePermissions_result setNotFound(TNotFoundException notFound) {
      this.notFound = notFound;
      return this;
    }

    public void unsetNotFound() {
      this.notFound = null;
    }

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

    public void setNotFoundIsSet(boolean value) {
      if (!value) {
        this.notFound = null;
      }
    }

    public TInvocationException getServerError() {
      return this.serverError;
    }

    public writeLecturePermissions_result setServerError(TInvocationException serverError) {
      this.serverError = serverError;
      return this;
    }

    public void unsetServerError() {
      this.serverError = null;
    }

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

    public void setServerErrorIsSet(boolean value) {
      if (!value) {
        this.serverError = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case AUTH_ERROR:
        if (value == null) {
          unsetAuthError();
        } else {
          setAuthError((TAuthorizationException)value);
        }
        break;

      case NOT_FOUND:
        if (value == null) {
          unsetNotFound();
        } else {
          setNotFound((TNotFoundException)value);
        }
        break;

      case SERVER_ERROR:
        if (value == null) {
          unsetServerError();
        } else {
          setServerError((TInvocationException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case AUTH_ERROR:
        return getAuthError();

      case NOT_FOUND:
        return getNotFound();

      case SERVER_ERROR:
        return getServerError();

      }
      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 AUTH_ERROR:
        return isSetAuthError();
      case NOT_FOUND:
        return isSetNotFound();
      case SERVER_ERROR:
        return isSetServerError();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_authError = true && this.isSetAuthError();
      boolean that_present_authError = true && that.isSetAuthError();
      if (this_present_authError || that_present_authError) {
        if (!(this_present_authError && that_present_authError))
          return false;
        if (!this.authError.equals(that.authError))
          return false;
      }

      boolean this_present_notFound = true && this.isSetNotFound();
      boolean that_present_notFound = true && that.isSetNotFound();
      if (this_present_notFound || that_present_notFound) {
        if (!(this_present_notFound && that_present_notFound))
          return false;
        if (!this.notFound.equals(that.notFound))
          return false;
      }

      boolean this_present_serverError = true && this.isSetServerError();
      boolean that_present_serverError = true && that.isSetServerError();
      if (this_present_serverError || that_present_serverError) {
        if (!(this_present_serverError && that_present_serverError))
          return false;
        if (!this.serverError.equals(that.serverError))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_authError = true && (isSetAuthError());
      list.add(present_authError);
      if (present_authError)
        list.add(authError);

      boolean present_notFound = true && (isSetNotFound());
      list.add(present_notFound);
      if (present_notFound)
        list.add(notFound);

      boolean present_serverError = true && (isSetServerError());
      list.add(present_serverError);
      if (present_serverError)
        list.add(serverError);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFound()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetServerError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError);
        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("writeLecturePermissions_result(");
      boolean first = true;

      sb.append("authError:");
      if (this.authError == null) {
        sb.append("null");
      } else {
        sb.append(this.authError);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("notFound:");
      if (this.notFound == null) {
        sb.append("null");
      } else {
        sb.append(this.notFound);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("serverError:");
      if (this.serverError == null) {
        sb.append("null");
      } else {
        sb.append(this.serverError);
      }
      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 {
        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 writeLecturePermissions_resultStandardSchemeFactory implements SchemeFactory {
      public writeLecturePermissions_resultStandardScheme getScheme() {
        return new writeLecturePermissions_resultStandardScheme();
      }
    }

    private static class writeLecturePermissions_resultStandardScheme extends StandardScheme<writeLecturePermissions_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, writeLecturePermissions_result 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: // AUTH_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.authError = new TAuthorizationException();
                struct.authError.read(iprot);
                struct.setAuthErrorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // NOT_FOUND
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.notFound = new TNotFoundException();
                struct.notFound.read(iprot);
                struct.setNotFoundIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // SERVER_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.serverError = new TInvocationException();
                struct.serverError.read(iprot);
                struct.setServerErrorIsSet(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, writeLecturePermissions_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.authError != null) {
          oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC);
          struct.authError.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.notFound != null) {
          oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC);
          struct.notFound.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.serverError != null) {
          oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC);
          struct.serverError.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class writeLecturePermissions_resultTupleSchemeFactory implements SchemeFactory {
      public writeLecturePermissions_resultTupleScheme getScheme() {
        return new writeLecturePermissions_resultTupleScheme();
      }
    }

    private static class writeLecturePermissions_resultTupleScheme extends TupleScheme<writeLecturePermissions_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, writeLecturePermissions_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetAuthError()) {
          optionals.set(0);
        }
        if (struct.isSetNotFound()) {
          optionals.set(1);
        }
        if (struct.isSetServerError()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetAuthError()) {
          struct.authError.write(oprot);
        }
        if (struct.isSetNotFound()) {
          struct.notFound.write(oprot);
        }
        if (struct.isSetServerError()) {
          struct.serverError.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, writeLecturePermissions_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.authError = new TAuthorizationException();
          struct.authError.read(iprot);
          struct.setAuthErrorIsSet(true);
        }
        if (incoming.get(1)) {
          struct.notFound = new TNotFoundException();
          struct.notFound.read(iprot);
          struct.setNotFoundIsSet(true);
        }
        if (incoming.get(2)) {
          struct.serverError = new TInvocationException();
          struct.serverError.read(iprot);
          struct.setServerErrorIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField LECTURE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureId", org.apache.thrift.protocol.TType.STRING, (short)2);

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

    public String userToken; // required
    public String lectureId; // 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 {
      USER_TOKEN((short)1, "userToken"),
      LECTURE_ID((short)2, "lectureId");

      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: // USER_TOKEN
            return USER_TOKEN;
          case 2: // LECTURE_ID
            return LECTURE_ID;
          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
    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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "Token")));
      tmpMap.put(_Fields.LECTURE_ID, new org.apache.thrift.meta_data.FieldMetaData("lectureId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "UUID")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLecturePermissions_args.class, metaDataMap);
    }

    public getLecturePermissions_args() {
    }

    public getLecturePermissions_args(
      String userToken,
      String lectureId)
    {
      this();
      this.userToken = userToken;
      this.lectureId = lectureId;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getLecturePermissions_args(getLecturePermissions_args other) {
      if (other.isSetUserToken()) {
        this.userToken = other.userToken;
      }
      if (other.isSetLectureId()) {
        this.lectureId = other.lectureId;
      }
    }

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

    @Override
    public void clear() {
      this.userToken = null;
      this.lectureId = null;
    }

    public String getUserToken() {
      return this.userToken;
    }

    public getLecturePermissions_args setUserToken(String userToken) {
      this.userToken = userToken;
      return this;
    }

    public void unsetUserToken() {
      this.userToken = null;
    }

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

    public void setUserTokenIsSet(boolean value) {
      if (!value) {
        this.userToken = null;
      }
    }

    public String getLectureId() {
      return this.lectureId;
    }

    public getLecturePermissions_args setLectureId(String lectureId) {
      this.lectureId = lectureId;
      return this;
    }

    public void unsetLectureId() {
      this.lectureId = null;
    }

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

    public void setLectureIdIsSet(boolean value) {
      if (!value) {
        this.lectureId = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_TOKEN:
        if (value == null) {
          unsetUserToken();
        } else {
          setUserToken((String)value);
        }
        break;

      case LECTURE_ID:
        if (value == null) {
          unsetLectureId();
        } else {
          setLectureId((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_TOKEN:
        return getUserToken();

      case LECTURE_ID:
        return getLectureId();

      }
      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 USER_TOKEN:
        return isSetUserToken();
      case LECTURE_ID:
        return isSetLectureId();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_userToken = true && this.isSetUserToken();
      boolean that_present_userToken = true && that.isSetUserToken();
      if (this_present_userToken || that_present_userToken) {
        if (!(this_present_userToken && that_present_userToken))
          return false;
        if (!this.userToken.equals(that.userToken))
          return false;
      }

      boolean this_present_lectureId = true && this.isSetLectureId();
      boolean that_present_lectureId = true && that.isSetLectureId();
      if (this_present_lectureId || that_present_lectureId) {
        if (!(this_present_lectureId && that_present_lectureId))
          return false;
        if (!this.lectureId.equals(that.lectureId))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_userToken = true && (isSetUserToken());
      list.add(present_userToken);
      if (present_userToken)
        list.add(userToken);

      boolean present_lectureId = true && (isSetLectureId());
      list.add(present_lectureId);
      if (present_lectureId)
        list.add(lectureId);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserToken()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetLectureId()).compareTo(other.isSetLectureId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetLectureId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lectureId, other.lectureId);
        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("getLecturePermissions_args(");
      boolean first = true;

      sb.append("userToken:");
      if (this.userToken == null) {
        sb.append("null");
      } else {
        sb.append(this.userToken);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("lectureId:");
      if (this.lectureId == null) {
        sb.append("null");
      } else {
        sb.append(this.lectureId);
      }
      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 {
        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 getLecturePermissions_argsStandardSchemeFactory implements SchemeFactory {
      public getLecturePermissions_argsStandardScheme getScheme() {
        return new getLecturePermissions_argsStandardScheme();
      }
    }

    private static class getLecturePermissions_argsStandardScheme extends StandardScheme<getLecturePermissions_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getLecturePermissions_args 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: // USER_TOKEN
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.userToken = iprot.readString();
                struct.setUserTokenIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // LECTURE_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.lectureId = iprot.readString();
                struct.setLectureIdIsSet(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, getLecturePermissions_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.userToken != null) {
          oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
          oprot.writeString(struct.userToken);
          oprot.writeFieldEnd();
        }
        if (struct.lectureId != null) {
          oprot.writeFieldBegin(LECTURE_ID_FIELD_DESC);
          oprot.writeString(struct.lectureId);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getLecturePermissions_argsTupleSchemeFactory implements SchemeFactory {
      public getLecturePermissions_argsTupleScheme getScheme() {
        return new getLecturePermissions_argsTupleScheme();
      }
    }

    private static class getLecturePermissions_argsTupleScheme extends TupleScheme<getLecturePermissions_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getLecturePermissions_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetUserToken()) {
          optionals.set(0);
        }
        if (struct.isSetLectureId()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetUserToken()) {
          oprot.writeString(struct.userToken);
        }
        if (struct.isSetLectureId()) {
          oprot.writeString(struct.lectureId);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getLecturePermissions_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.userToken = iprot.readString();
          struct.setUserTokenIsSet(true);
        }
        if (incoming.get(1)) {
          struct.lectureId = iprot.readString();
          struct.setLectureIdIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0);
    private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3);

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

    public Map<String,LecturePermissions> success; // required
    public TAuthorizationException authError; // required
    public TNotFoundException notFound; // required
    public TInvocationException serverError; // 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 {
      SUCCESS((short)0, "success"),
      AUTH_ERROR((short)1, "authError"),
      NOT_FOUND((short)2, "notFound"),
      SERVER_ERROR((short)3, "serverError");

      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 0: // SUCCESS
            return SUCCESS;
          case 1: // AUTH_ERROR
            return AUTH_ERROR;
          case 2: // NOT_FOUND
            return NOT_FOUND;
          case 3: // SERVER_ERROR
            return SERVER_ERROR;
          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
    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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING              , "UUID"), 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LecturePermissions.class))));
      tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLecturePermissions_result.class, metaDataMap);
    }

    public getLecturePermissions_result() {
    }

    public getLecturePermissions_result(
      Map<String,LecturePermissions> success,
      TAuthorizationException authError,
      TNotFoundException notFound,
      TInvocationException serverError)
    {
      this();
      this.success = success;
      this.authError = authError;
      this.notFound = notFound;
      this.serverError = serverError;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getLecturePermissions_result(getLecturePermissions_result other) {
      if (other.isSetSuccess()) {
        Map<String,LecturePermissions> __this__success = new HashMap<String,LecturePermissions>(other.success.size());
        for (Map.Entry<String, LecturePermissions> other_element : other.success.entrySet()) {

          String other_element_key = other_element.getKey();
          LecturePermissions other_element_value = other_element.getValue();

          String __this__success_copy_key = other_element_key;

          LecturePermissions __this__success_copy_value = new LecturePermissions(other_element_value);

          __this__success.put(__this__success_copy_key, __this__success_copy_value);
        }
        this.success = __this__success;
      }
      if (other.isSetAuthError()) {
        this.authError = new TAuthorizationException(other.authError);
      }
      if (other.isSetNotFound()) {
        this.notFound = new TNotFoundException(other.notFound);
      }
      if (other.isSetServerError()) {
        this.serverError = new TInvocationException(other.serverError);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.authError = null;
      this.notFound = null;
      this.serverError = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public void putToSuccess(String key, LecturePermissions val) {
      if (this.success == null) {
        this.success = new HashMap<String,LecturePermissions>();
      }
      this.success.put(key, val);
    }

    public Map<String,LecturePermissions> getSuccess() {
      return this.success;
    }

    public getLecturePermissions_result setSuccess(Map<String,LecturePermissions> success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

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

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public TAuthorizationException getAuthError() {
      return this.authError;
    }

    public getLecturePermissions_result setAuthError(TAuthorizationException authError) {
      this.authError = authError;
      return this;
    }

    public void unsetAuthError() {
      this.authError = null;
    }

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

    public void setAuthErrorIsSet(boolean value) {
      if (!value) {
        this.authError = null;
      }
    }

    public TNotFoundException getNotFound() {
      return this.notFound;
    }

    public getLecturePermissions_result setNotFound(TNotFoundException notFound) {
      this.notFound = notFound;
      return this;
    }

    public void unsetNotFound() {
      this.notFound = null;
    }

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

    public void setNotFoundIsSet(boolean value) {
      if (!value) {
        this.notFound = null;
      }
    }

    public TInvocationException getServerError() {
      return this.serverError;
    }

    public getLecturePermissions_result setServerError(TInvocationException serverError) {
      this.serverError = serverError;
      return this;
    }

    public void unsetServerError() {
      this.serverError = null;
    }

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

    public void setServerErrorIsSet(boolean value) {
      if (!value) {
        this.serverError = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Map<String,LecturePermissions>)value);
        }
        break;

      case AUTH_ERROR:
        if (value == null) {
          unsetAuthError();
        } else {
          setAuthError((TAuthorizationException)value);
        }
        break;

      case NOT_FOUND:
        if (value == null) {
          unsetNotFound();
        } else {
          setNotFound((TNotFoundException)value);
        }
        break;

      case SERVER_ERROR:
        if (value == null) {
          unsetServerError();
        } else {
          setServerError((TInvocationException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case AUTH_ERROR:
        return getAuthError();

      case NOT_FOUND:
        return getNotFound();

      case SERVER_ERROR:
        return getServerError();

      }
      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 SUCCESS:
        return isSetSuccess();
      case AUTH_ERROR:
        return isSetAuthError();
      case NOT_FOUND:
        return isSetNotFound();
      case SERVER_ERROR:
        return isSetServerError();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_authError = true && this.isSetAuthError();
      boolean that_present_authError = true && that.isSetAuthError();
      if (this_present_authError || that_present_authError) {
        if (!(this_present_authError && that_present_authError))
          return false;
        if (!this.authError.equals(that.authError))
          return false;
      }

      boolean this_present_notFound = true && this.isSetNotFound();
      boolean that_present_notFound = true && that.isSetNotFound();
      if (this_present_notFound || that_present_notFound) {
        if (!(this_present_notFound && that_present_notFound))
          return false;
        if (!this.notFound.equals(that.notFound))
          return false;
      }

      boolean this_present_serverError = true && this.isSetServerError();
      boolean that_present_serverError = true && that.isSetServerError();
      if (this_present_serverError || that_present_serverError) {
        if (!(this_present_serverError && that_present_serverError))
          return false;
        if (!this.serverError.equals(that.serverError))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_authError = true && (isSetAuthError());
      list.add(present_authError);
      if (present_authError)
        list.add(authError);

      boolean present_notFound = true && (isSetNotFound());
      list.add(present_notFound);
      if (present_notFound)
        list.add(notFound);

      boolean present_serverError = true && (isSetServerError());
      list.add(present_serverError);
      if (present_serverError)
        list.add(serverError);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFound()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetServerError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError);
        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("getLecturePermissions_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("authError:");
      if (this.authError == null) {
        sb.append("null");
      } else {
        sb.append(this.authError);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("notFound:");
      if (this.notFound == null) {
        sb.append("null");
      } else {
        sb.append(this.notFound);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("serverError:");
      if (this.serverError == null) {
        sb.append("null");
      } else {
        sb.append(this.serverError);
      }
      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 {
        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 getLecturePermissions_resultStandardSchemeFactory implements SchemeFactory {
      public getLecturePermissions_resultStandardScheme getScheme() {
        return new getLecturePermissions_resultStandardScheme();
      }
    }

    private static class getLecturePermissions_resultStandardScheme extends StandardScheme<getLecturePermissions_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getLecturePermissions_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
                {
                  org.apache.thrift.protocol.TMap _map328 = iprot.readMapBegin();
                  struct.success = new HashMap<String,LecturePermissions>(2*_map328.size);
                  String _key329;
                  LecturePermissions _val330;
                  for (int _i331 = 0; _i331 < _map328.size; ++_i331)
                  {
                    _key329 = iprot.readString();
                    _val330 = new LecturePermissions();
                    _val330.read(iprot);
                    struct.success.put(_key329, _val330);
                  }
                  iprot.readMapEnd();
                }
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // AUTH_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.authError = new TAuthorizationException();
                struct.authError.read(iprot);
                struct.setAuthErrorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // NOT_FOUND
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.notFound = new TNotFoundException();
                struct.notFound.read(iprot);
                struct.setNotFoundIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // SERVER_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.serverError = new TInvocationException();
                struct.serverError.read(iprot);
                struct.setServerErrorIsSet(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, getLecturePermissions_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          {
            oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
            for (Map.Entry<String, LecturePermissions> _iter332 : struct.success.entrySet())
            {
              oprot.writeString(_iter332.getKey());
              _iter332.getValue().write(oprot);
            }
            oprot.writeMapEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.authError != null) {
          oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC);
          struct.authError.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.notFound != null) {
          oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC);
          struct.notFound.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.serverError != null) {
          oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC);
          struct.serverError.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getLecturePermissions_resultTupleSchemeFactory implements SchemeFactory {
      public getLecturePermissions_resultTupleScheme getScheme() {
        return new getLecturePermissions_resultTupleScheme();
      }
    }

    private static class getLecturePermissions_resultTupleScheme extends TupleScheme<getLecturePermissions_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getLecturePermissions_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetAuthError()) {
          optionals.set(1);
        }
        if (struct.isSetNotFound()) {
          optionals.set(2);
        }
        if (struct.isSetServerError()) {
          optionals.set(3);
        }
        oprot.writeBitSet(optionals, 4);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (Map.Entry<String, LecturePermissions> _iter333 : struct.success.entrySet())
            {
              oprot.writeString(_iter333.getKey());
              _iter333.getValue().write(oprot);
            }
          }
        }
        if (struct.isSetAuthError()) {
          struct.authError.write(oprot);
        }
        if (struct.isSetNotFound()) {
          struct.notFound.write(oprot);
        }
        if (struct.isSetServerError()) {
          struct.serverError.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getLecturePermissions_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(4);
        if (incoming.get(0)) {
          {
            org.apache.thrift.protocol.TMap _map334 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
            struct.success = new HashMap<String,LecturePermissions>(2*_map334.size);
            String _key335;
            LecturePermissions _val336;
            for (int _i337 = 0; _i337 < _map334.size; ++_i337)
            {
              _key335 = iprot.readString();
              _val336 = new LecturePermissions();
              _val336.read(iprot);
              struct.success.put(_key335, _val336);
            }
          }
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.authError = new TAuthorizationException();
          struct.authError.read(iprot);
          struct.setAuthErrorIsSet(true);
        }
        if (incoming.get(2)) {
          struct.notFound = new TNotFoundException();
          struct.notFound.read(iprot);
          struct.setNotFoundIsSet(true);
        }
        if (incoming.get(3)) {
          struct.serverError = new TInvocationException();
          struct.serverError.read(iprot);
          struct.setServerErrorIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField LECTURE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureId", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField NEW_OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("newOwnerId", org.apache.thrift.protocol.TType.STRING, (short)3);

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

    public String userToken; // required
    public String lectureId; // required
    public String newOwnerId; // 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 {
      USER_TOKEN((short)1, "userToken"),
      LECTURE_ID((short)2, "lectureId"),
      NEW_OWNER_ID((short)3, "newOwnerId");

      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: // USER_TOKEN
            return USER_TOKEN;
          case 2: // LECTURE_ID
            return LECTURE_ID;
          case 3: // NEW_OWNER_ID
            return NEW_OWNER_ID;
          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
    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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "Token")));
      tmpMap.put(_Fields.LECTURE_ID, new org.apache.thrift.meta_data.FieldMetaData("lectureId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "UUID")));
      tmpMap.put(_Fields.NEW_OWNER_ID, new org.apache.thrift.meta_data.FieldMetaData("newOwnerId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "UUID")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setLectureOwner_args.class, metaDataMap);
    }

    public setLectureOwner_args() {
    }

    public setLectureOwner_args(
      String userToken,
      String lectureId,
      String newOwnerId)
    {
      this();
      this.userToken = userToken;
      this.lectureId = lectureId;
      this.newOwnerId = newOwnerId;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public setLectureOwner_args(setLectureOwner_args other) {
      if (other.isSetUserToken()) {
        this.userToken = other.userToken;
      }
      if (other.isSetLectureId()) {
        this.lectureId = other.lectureId;
      }
      if (other.isSetNewOwnerId()) {
        this.newOwnerId = other.newOwnerId;
      }
    }

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

    @Override
    public void clear() {
      this.userToken = null;
      this.lectureId = null;
      this.newOwnerId = null;
    }

    public String getUserToken() {
      return this.userToken;
    }

    public setLectureOwner_args setUserToken(String userToken) {
      this.userToken = userToken;
      return this;
    }

    public void unsetUserToken() {
      this.userToken = null;
    }

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

    public void setUserTokenIsSet(boolean value) {
      if (!value) {
        this.userToken = null;
      }
    }

    public String getLectureId() {
      return this.lectureId;
    }

    public setLectureOwner_args setLectureId(String lectureId) {
      this.lectureId = lectureId;
      return this;
    }

    public void unsetLectureId() {
      this.lectureId = null;
    }

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

    public void setLectureIdIsSet(boolean value) {
      if (!value) {
        this.lectureId = null;
      }
    }

    public String getNewOwnerId() {
      return this.newOwnerId;
    }

    public setLectureOwner_args setNewOwnerId(String newOwnerId) {
      this.newOwnerId = newOwnerId;
      return this;
    }

    public void unsetNewOwnerId() {
      this.newOwnerId = null;
    }

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

    public void setNewOwnerIdIsSet(boolean value) {
      if (!value) {
        this.newOwnerId = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_TOKEN:
        if (value == null) {
          unsetUserToken();
        } else {
          setUserToken((String)value);
        }
        break;

      case LECTURE_ID:
        if (value == null) {
          unsetLectureId();
        } else {
          setLectureId((String)value);
        }
        break;

      case NEW_OWNER_ID:
        if (value == null) {
          unsetNewOwnerId();
        } else {
          setNewOwnerId((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_TOKEN:
        return getUserToken();

      case LECTURE_ID:
        return getLectureId();

      case NEW_OWNER_ID:
        return getNewOwnerId();

      }
      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 USER_TOKEN:
        return isSetUserToken();
      case LECTURE_ID:
        return isSetLectureId();
      case NEW_OWNER_ID:
        return isSetNewOwnerId();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_userToken = true && this.isSetUserToken();
      boolean that_present_userToken = true && that.isSetUserToken();
      if (this_present_userToken || that_present_userToken) {
        if (!(this_present_userToken && that_present_userToken))
          return false;
        if (!this.userToken.equals(that.userToken))
          return false;
      }

      boolean this_present_lectureId = true && this.isSetLectureId();
      boolean that_present_lectureId = true && that.isSetLectureId();
      if (this_present_lectureId || that_present_lectureId) {
        if (!(this_present_lectureId && that_present_lectureId))
          return false;
        if (!this.lectureId.equals(that.lectureId))
          return false;
      }

      boolean this_present_newOwnerId = true && this.isSetNewOwnerId();
      boolean that_present_newOwnerId = true && that.isSetNewOwnerId();
      if (this_present_newOwnerId || that_present_newOwnerId) {
        if (!(this_present_newOwnerId && that_present_newOwnerId))
          return false;
        if (!this.newOwnerId.equals(that.newOwnerId))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_userToken = true && (isSetUserToken());
      list.add(present_userToken);
      if (present_userToken)
        list.add(userToken);

      boolean present_lectureId = true && (isSetLectureId());
      list.add(present_lectureId);
      if (present_lectureId)
        list.add(lectureId);

      boolean present_newOwnerId = true && (isSetNewOwnerId());
      list.add(present_newOwnerId);
      if (present_newOwnerId)
        list.add(newOwnerId);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserToken()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetLectureId()).compareTo(other.isSetLectureId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetLectureId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lectureId, other.lectureId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNewOwnerId()).compareTo(other.isSetNewOwnerId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNewOwnerId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.newOwnerId, other.newOwnerId);
        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("setLectureOwner_args(");
      boolean first = true;

      sb.append("userToken:");
      if (this.userToken == null) {
        sb.append("null");
      } else {
        sb.append(this.userToken);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("lectureId:");
      if (this.lectureId == null) {
        sb.append("null");
      } else {
        sb.append(this.lectureId);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("newOwnerId:");
      if (this.newOwnerId == null) {
        sb.append("null");
      } else {
        sb.append(this.newOwnerId);
      }
      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 {
        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 setLectureOwner_argsStandardSchemeFactory implements SchemeFactory {
      public setLectureOwner_argsStandardScheme getScheme() {
        return new setLectureOwner_argsStandardScheme();
      }
    }

    private static class setLectureOwner_argsStandardScheme extends StandardScheme<setLectureOwner_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, setLectureOwner_args 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: // USER_TOKEN
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.userToken = iprot.readString();
                struct.setUserTokenIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // LECTURE_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.lectureId = iprot.readString();
                struct.setLectureIdIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // NEW_OWNER_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.newOwnerId = iprot.readString();
                struct.setNewOwnerIdIsSet(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, setLectureOwner_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.userToken != null) {
          oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
          oprot.writeString(struct.userToken);
          oprot.writeFieldEnd();
        }
        if (struct.lectureId != null) {
          oprot.writeFieldBegin(LECTURE_ID_FIELD_DESC);
          oprot.writeString(struct.lectureId);
          oprot.writeFieldEnd();
        }
        if (struct.newOwnerId != null) {
          oprot.writeFieldBegin(NEW_OWNER_ID_FIELD_DESC);
          oprot.writeString(struct.newOwnerId);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class setLectureOwner_argsTupleSchemeFactory implements SchemeFactory {
      public setLectureOwner_argsTupleScheme getScheme() {
        return new setLectureOwner_argsTupleScheme();
      }
    }

    private static class setLectureOwner_argsTupleScheme extends TupleScheme<setLectureOwner_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, setLectureOwner_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetUserToken()) {
          optionals.set(0);
        }
        if (struct.isSetLectureId()) {
          optionals.set(1);
        }
        if (struct.isSetNewOwnerId()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetUserToken()) {
          oprot.writeString(struct.userToken);
        }
        if (struct.isSetLectureId()) {
          oprot.writeString(struct.lectureId);
        }
        if (struct.isSetNewOwnerId()) {
          oprot.writeString(struct.newOwnerId);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, setLectureOwner_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.userToken = iprot.readString();
          struct.setUserTokenIsSet(true);
        }
        if (incoming.get(1)) {
          struct.lectureId = iprot.readString();
          struct.setLectureIdIsSet(true);
        }
        if (incoming.get(2)) {
          struct.newOwnerId = iprot.readString();
          struct.setNewOwnerIdIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3);

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

    public TAuthorizationException authError; // required
    public TNotFoundException notFound; // required
    public TInvocationException serverError; // 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 {
      AUTH_ERROR((short)1, "authError"),
      NOT_FOUND((short)2, "notFound"),
      SERVER_ERROR((short)3, "serverError");

      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: // AUTH_ERROR
            return AUTH_ERROR;
          case 2: // NOT_FOUND
            return NOT_FOUND;
          case 3: // SERVER_ERROR
            return SERVER_ERROR;
          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
    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.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setLectureOwner_result.class, metaDataMap);
    }

    public setLectureOwner_result() {
    }

    public setLectureOwner_result(
      TAuthorizationException authError,
      TNotFoundException notFound,
      TInvocationException serverError)
    {
      this();
      this.authError = authError;
      this.notFound = notFound;
      this.serverError = serverError;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public setLectureOwner_result(setLectureOwner_result other) {
      if (other.isSetAuthError()) {
        this.authError = new TAuthorizationException(other.authError);
      }
      if (other.isSetNotFound()) {
        this.notFound = new TNotFoundException(other.notFound);
      }
      if (other.isSetServerError()) {
        this.serverError = new TInvocationException(other.serverError);
      }
    }

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

    @Override
    public void clear() {
      this.authError = null;
      this.notFound = null;
      this.serverError = null;
    }

    public TAuthorizationException getAuthError() {
      return this.authError;
    }

    public setLectureOwner_result setAuthError(TAuthorizationException authError) {
      this.authError = authError;
      return this;
    }

    public void unsetAuthError() {
      this.authError = null;
    }

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

    public void setAuthErrorIsSet(boolean value) {
      if (!value) {
        this.authError = null;
      }
    }

    public TNotFoundException getNotFound() {
      return this.notFound;
    }

    public setLectureOwner_result setNotFound(TNotFoundException notFound) {
      this.notFound = notFound;
      return this;
    }

    public void unsetNotFound() {
      this.notFound = null;
    }

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

    public void setNotFoundIsSet(boolean value) {
      if (!value) {
        this.notFound = null;
      }
    }

    public TInvocationException getServerError() {
      return this.serverError;
    }

    public setLectureOwner_result setServerError(TInvocationException serverError) {
      this.serverError = serverError;
      return this;
    }

    public void unsetServerError() {
      this.serverError = null;
    }

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

    public void setServerErrorIsSet(boolean value) {
      if (!value) {
        this.serverError = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case AUTH_ERROR:
        if (value == null) {
          unsetAuthError();
        } else {
          setAuthError((TAuthorizationException)value);
        }
        break;

      case NOT_FOUND:
        if (value == null) {
          unsetNotFound();
        } else {
          setNotFound((TNotFoundException)value);
        }
        break;

      case SERVER_ERROR:
        if (value == null) {
          unsetServerError();
        } else {
          setServerError((TInvocationException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case AUTH_ERROR:
        return getAuthError();

      case NOT_FOUND:
        return getNotFound();

      case SERVER_ERROR:
        return getServerError();

      }
      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 AUTH_ERROR:
        return isSetAuthError();
      case NOT_FOUND:
        return isSetNotFound();
      case SERVER_ERROR:
        return isSetServerError();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_authError = true && this.isSetAuthError();
      boolean that_present_authError = true && that.isSetAuthError();
      if (this_present_authError || that_present_authError) {
        if (!(this_present_authError && that_present_authError))
          return false;
        if (!this.authError.equals(that.authError))
          return false;
      }

      boolean this_present_notFound = true && this.isSetNotFound();
      boolean that_present_notFound = true && that.isSetNotFound();
      if (this_present_notFound || that_present_notFound) {
        if (!(this_present_notFound && that_present_notFound))
          return false;
        if (!this.notFound.equals(that.notFound))
          return false;
      }

      boolean this_present_serverError = true && this.isSetServerError();
      boolean that_present_serverError = true && that.isSetServerError();
      if (this_present_serverError || that_present_serverError) {
        if (!(this_present_serverError && that_present_serverError))
          return false;
        if (!this.serverError.equals(that.serverError))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_authError = true && (isSetAuthError());
      list.add(present_authError);
      if (present_authError)
        list.add(authError);

      boolean present_notFound = true && (isSetNotFound());
      list.add(present_notFound);
      if (present_notFound)
        list.add(notFound);

      boolean present_serverError = true && (isSetServerError());
      list.add(present_serverError);
      if (present_serverError)
        list.add(serverError);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFound()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetServerError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError);
        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("setLectureOwner_result(");
      boolean first = true;

      sb.append("authError:");
      if (this.authError == null) {
        sb.append("null");
      } else {
        sb.append(this.authError);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("notFound:");
      if (this.notFound == null) {
        sb.append("null");
      } else {
        sb.append(this.notFound);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("serverError:");
      if (this.serverError == null) {
        sb.append("null");
      } else {
        sb.append(this.serverError);
      }
      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 {
        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 setLectureOwner_resultStandardSchemeFactory implements SchemeFactory {
      public setLectureOwner_resultStandardScheme getScheme() {
        return new setLectureOwner_resultStandardScheme();
      }
    }

    private static class setLectureOwner_resultStandardScheme extends StandardScheme<setLectureOwner_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, setLectureOwner_result 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: // AUTH_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.authError = new TAuthorizationException();
                struct.authError.read(iprot);
                struct.setAuthErrorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // NOT_FOUND
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.notFound = new TNotFoundException();
                struct.notFound.read(iprot);
                struct.setNotFoundIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // SERVER_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.serverError = new TInvocationException();
                struct.serverError.read(iprot);
                struct.setServerErrorIsSet(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, setLectureOwner_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.authError != null) {
          oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC);
          struct.authError.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.notFound != null) {
          oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC);
          struct.notFound.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.serverError != null) {
          oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC);
          struct.serverError.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class setLectureOwner_resultTupleSchemeFactory implements SchemeFactory {
      public setLectureOwner_resultTupleScheme getScheme() {
        return new setLectureOwner_resultTupleScheme();
      }
    }

    private static class setLectureOwner_resultTupleScheme extends TupleScheme<setLectureOwner_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, setLectureOwner_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetAuthError()) {
          optionals.set(0);
        }
        if (struct.isSetNotFound()) {
          optionals.set(1);
        }
        if (struct.isSetServerError()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetAuthError()) {
          struct.authError.write(oprot);
        }
        if (struct.isSetNotFound()) {
          struct.notFound.write(oprot);
        }
        if (struct.isSetServerError()) {
          struct.serverError.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, setLectureOwner_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.authError = new TAuthorizationException();
          struct.authError.read(iprot);
          struct.setAuthErrorIsSet(true);
        }
        if (incoming.get(1)) {
          struct.notFound = new TNotFoundException();
          struct.notFound.read(iprot);
          struct.setNotFoundIsSet(true);
        }
        if (incoming.get(2)) {
          struct.serverError = new TInvocationException();
          struct.serverError.read(iprot);
          struct.setServerErrorIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);

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

    public String userToken; // 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 {
      USER_TOKEN((short)1, "userToken");

      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: // USER_TOKEN
            return USER_TOKEN;
          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
    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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "Token")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPredefinedData_args.class, metaDataMap);
    }

    public getPredefinedData_args() {
    }

    public getPredefinedData_args(
      String userToken)
    {
      this();
      this.userToken = userToken;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getPredefinedData_args(getPredefinedData_args other) {
      if (other.isSetUserToken()) {
        this.userToken = other.userToken;
      }
    }

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

    @Override
    public void clear() {
      this.userToken = null;
    }

    public String getUserToken() {
      return this.userToken;
    }

    public getPredefinedData_args setUserToken(String userToken) {
      this.userToken = userToken;
      return this;
    }

    public void unsetUserToken() {
      this.userToken = null;
    }

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

    public void setUserTokenIsSet(boolean value) {
      if (!value) {
        this.userToken = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_TOKEN:
        if (value == null) {
          unsetUserToken();
        } else {
          setUserToken((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_TOKEN:
        return getUserToken();

      }
      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 USER_TOKEN:
        return isSetUserToken();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_userToken = true && this.isSetUserToken();
      boolean that_present_userToken = true && that.isSetUserToken();
      if (this_present_userToken || that_present_userToken) {
        if (!(this_present_userToken && that_present_userToken))
          return false;
        if (!this.userToken.equals(that.userToken))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_userToken = true && (isSetUserToken());
      list.add(present_userToken);
      if (present_userToken)
        list.add(userToken);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserToken()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken);
        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("getPredefinedData_args(");
      boolean first = true;

      sb.append("userToken:");
      if (this.userToken == null) {
        sb.append("null");
      } else {
        sb.append(this.userToken);
      }
      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 {
        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 getPredefinedData_argsStandardSchemeFactory implements SchemeFactory {
      public getPredefinedData_argsStandardScheme getScheme() {
        return new getPredefinedData_argsStandardScheme();
      }
    }

    private static class getPredefinedData_argsStandardScheme extends StandardScheme<getPredefinedData_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getPredefinedData_args 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: // USER_TOKEN
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.userToken = iprot.readString();
                struct.setUserTokenIsSet(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, getPredefinedData_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.userToken != null) {
          oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC);
          oprot.writeString(struct.userToken);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getPredefinedData_argsTupleSchemeFactory implements SchemeFactory {
      public getPredefinedData_argsTupleScheme getScheme() {
        return new getPredefinedData_argsTupleScheme();
      }
    }

    private static class getPredefinedData_argsTupleScheme extends TupleScheme<getPredefinedData_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getPredefinedData_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetUserToken()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetUserToken()) {
          oprot.writeString(struct.userToken);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getPredefinedData_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.userToken = iprot.readString();
          struct.setUserTokenIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)2);

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

    public PredefinedData success; // required
    public TAuthorizationException authError; // required
    public TInvocationException serverError; // 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 {
      SUCCESS((short)0, "success"),
      AUTH_ERROR((short)1, "authError"),
      SERVER_ERROR((short)2, "serverError");

      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 0: // SUCCESS
            return SUCCESS;
          case 1: // AUTH_ERROR
            return AUTH_ERROR;
          case 2: // SERVER_ERROR
            return SERVER_ERROR;
          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
    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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PredefinedData.class)));
      tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPredefinedData_result.class, metaDataMap);
    }

    public getPredefinedData_result() {
    }

    public getPredefinedData_result(
      PredefinedData success,
      TAuthorizationException authError,
      TInvocationException serverError)
    {
      this();
      this.success = success;
      this.authError = authError;
      this.serverError = serverError;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getPredefinedData_result(getPredefinedData_result other) {
      if (other.isSetSuccess()) {
        this.success = new PredefinedData(other.success);
      }
      if (other.isSetAuthError()) {
        this.authError = new TAuthorizationException(other.authError);
      }
      if (other.isSetServerError()) {
        this.serverError = new TInvocationException(other.serverError);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.authError = null;
      this.serverError = null;
    }

    public PredefinedData getSuccess() {
      return this.success;
    }

    public getPredefinedData_result setSuccess(PredefinedData success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

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

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public TAuthorizationException getAuthError() {
      return this.authError;
    }

    public getPredefinedData_result setAuthError(TAuthorizationException authError) {
      this.authError = authError;
      return this;
    }

    public void unsetAuthError() {
      this.authError = null;
    }

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

    public void setAuthErrorIsSet(boolean value) {
      if (!value) {
        this.authError = null;
      }
    }

    public TInvocationException getServerError() {
      return this.serverError;
    }

    public getPredefinedData_result setServerError(TInvocationException serverError) {
      this.serverError = serverError;
      return this;
    }

    public void unsetServerError() {
      this.serverError = null;
    }

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

    public void setServerErrorIsSet(boolean value) {
      if (!value) {
        this.serverError = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((PredefinedData)value);
        }
        break;

      case AUTH_ERROR:
        if (value == null) {
          unsetAuthError();
        } else {
          setAuthError((TAuthorizationException)value);
        }
        break;

      case SERVER_ERROR:
        if (value == null) {
          unsetServerError();
        } else {
          setServerError((TInvocationException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case AUTH_ERROR:
        return getAuthError();

      case SERVER_ERROR:
        return getServerError();

      }
      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 SUCCESS:
        return isSetSuccess();
      case AUTH_ERROR:
        return isSetAuthError();
      case SERVER_ERROR:
        return isSetServerError();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_authError = true && this.isSetAuthError();
      boolean that_present_authError = true && that.isSetAuthError();
      if (this_present_authError || that_present_authError) {
        if (!(this_present_authError && that_present_authError))
          return false;
        if (!this.authError.equals(that.authError))
          return false;
      }

      boolean this_present_serverError = true && this.isSetServerError();
      boolean that_present_serverError = true && that.isSetServerError();
      if (this_present_serverError || that_present_serverError) {
        if (!(this_present_serverError && that_present_serverError))
          return false;
        if (!this.serverError.equals(that.serverError))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_authError = true && (isSetAuthError());
      list.add(present_authError);
      if (present_authError)
        list.add(authError);

      boolean present_serverError = true && (isSetServerError());
      list.add(present_serverError);
      if (present_serverError)
        list.add(serverError);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetServerError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError);
        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("getPredefinedData_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("authError:");
      if (this.authError == null) {
        sb.append("null");
      } else {
        sb.append(this.authError);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("serverError:");
      if (this.serverError == null) {
        sb.append("null");
      } else {
        sb.append(this.serverError);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (success != null) {
        success.validate();
      }
    }

    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 {
        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 getPredefinedData_resultStandardSchemeFactory implements SchemeFactory {
      public getPredefinedData_resultStandardScheme getScheme() {
        return new getPredefinedData_resultStandardScheme();
      }
    }

    private static class getPredefinedData_resultStandardScheme extends StandardScheme<getPredefinedData_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getPredefinedData_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new PredefinedData();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // AUTH_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.authError = new TAuthorizationException();
                struct.authError.read(iprot);
                struct.setAuthErrorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // SERVER_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.serverError = new TInvocationException();
                struct.serverError.read(iprot);
                struct.setServerErrorIsSet(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, getPredefinedData_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.authError != null) {
          oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC);
          struct.authError.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.serverError != null) {
          oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC);
          struct.serverError.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getPredefinedData_resultTupleSchemeFactory implements SchemeFactory {
      public getPredefinedData_resultTupleScheme getScheme() {
        return new getPredefinedData_resultTupleScheme();
      }
    }

    private static class getPredefinedData_resultTupleScheme extends TupleScheme<getPredefinedData_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getPredefinedData_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetAuthError()) {
          optionals.set(1);
        }
        if (struct.isSetServerError()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetAuthError()) {
          struct.authError.write(oprot);
        }
        if (struct.isSetServerError()) {
          struct.serverError.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getPredefinedData_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.success = new PredefinedData();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.authError = new TAuthorizationException();
          struct.authError.read(iprot);
          struct.setAuthErrorIsSet(true);
        }
        if (incoming.get(2)) {
          struct.serverError = new TInvocationException();
          struct.serverError.read(iprot);
          struct.setServerErrorIsSet(true);
        }
      }
    }

  }

}