summaryrefslogblamecommitdiffstats
path: root/src/main/java/org/openslx/bwlp/thrift/iface/MasterServer.java
blob: 47334191b12a98f14828c8f59017915633e924ce (plain) (tree)
1
2
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
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
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275
11276
11277
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297
11298
11299
11300
11301
11302
11303
11304
11305
11306
11307
11308
11309
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
11442
11443
11444
11445
11446
11447
11448
11449
11450
11451
11452
11453
11454
11455
11456
11457
11458
11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472
11473
11474
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621
11622
11623
11624
11625
11626
11627
11628
11629
11630
11631
11632
11633
11634
11635
11636
11637
11638
11639
11640
11641
11642
11643
11644
11645
11646
11647
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
11668
11669
11670
11671
11672
11673
11674
11675
11676
11677
11678
11679
11680
11681
11682
11683
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710
11711
11712
11713
11714
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
11730
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
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
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
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
12933
12934
12935
12936
12937
12938
12939
12940
12941
12942
12943
12944
12945
12946
12947
12948
12949
12950
12951
12952
12953
12954
12955
12956
12957
12958
12959
12960
12961
12962
12963
12964
12965
12966
12967
12968
12969
12970
12971
12972
12973
12974
12975
12976
12977
12978
12979
12980
12981
12982
12983
12984
12985
12986
12987
12988
12989
12990
12991
12992
12993
12994
12995
12996
12997
12998
12999
13000
13001
13002
13003
13004
13005
13006
13007
13008
13009
13010
13011
13012
13013
13014
13015
13016
13017
13018
13019
13020
13021
13022
13023
13024
13025
13026
13027
13028
13029
13030
13031
13032
13033
13034
13035
13036
13037
13038
13039
13040
13041
13042
13043
13044
13045
13046
13047
13048
13049
13050
13051
13052
13053
13054
13055
13056
13057
13058
13059
13060
13061
13062
13063
13064
13065
13066
13067
13068
13069
13070
13071
13072
13073
13074
13075
13076
13077
13078
13079
13080
13081
13082
13083
13084
13085
13086
13087
13088
13089
13090
13091
13092
13093
13094
13095
13096
13097
13098
13099
13100
13101
13102
13103
13104
13105
13106
13107
13108
13109
13110
13111
13112
13113
13114
13115
13116
13117
13118
13119
13120
13121
13122
13123
13124
13125
13126
13127
13128
13129
13130
13131
13132
13133
13134
13135
13136
13137
13138
13139
13140
13141
13142
13143
13144
13145
13146
13147
13161
13162
13163
13164
13165
13166
13167
13168
13169
13170
13171
13172
13173
13174
13175
13176
13177
13178
13179
13180
13181
13182
13183
13184
13185
13186
13187
13188
13189
13190
13191
13192
13193
13194
13195
13196
13197
13198
13199
13200
13201
13202
13203
13204
13205
13206
13207
13208
13209
13210
13211
13212
13213
13214
13215
13216
13217
13218
13219
13220
13221
13222
13223
13224
13225
13226
13227
13228
13229
13230
13231
13232
13233
13234
13235
13236
13237
13238
13239
13240
13241
13242
13243
13244
13245
13246
13247
13248
13249
13250
13251
13252
13253
13254
13255
13256
13257
13258
13259
13260
13261
13262
13263
13264
13265
13266
13267
13268
13269
13270
13271
13272
13273
13274
13275
13276
13277
13278
13279
13280
13281
13282
13283
13284
13285
13286
13287
13288
13289
13290
13291
13292
13293
13294
13295
13296
13297
13298
13299
13300
13301
13302
13303
13304
13305
13306
13307
13308
13309
13310
13311
13312
13313
13314
13315
13316
13317
13318
13319
13320
13321
13322
13323
13324
13325
13326
13327
13328
13329
13330
13331
13332
13333
13334
13335
13336
13337
13338
13339
13340
13341
13342
13343
13344
13345
13346
13347
13348
13349
13350
13351
13352
13353
13354
13355
13356
13357
13358
13359
13360
13361
13362
13363
13364
13365
13366
13367
13368
13369
13370
13371
13372
13373
13374
13375
13376
13377
13378
13379
13380
13381
13382
13383
13384
13385
13386
13387
13388
13389
13390
13391
13392
13393
13394
13395
13396
13397
13398
13399
13400
13401
13402
13403
13404
13405
13406
13407
13408
13409
13410
13411
13412
13413
13414
13415
13416
13417
13418
13419
13420
13421
13422
13423
13424
13425
13426
13427
13428
13429
13430
13431
13432
13433
13434
13435
13436
13437
13438
13439
13440
13441
13442
13443
13444
13445
13446
13447
13448
13449
13450
13451
13452
13453
13454
13455
13456
13457
13458
13459
13460
13461
13462
13463
13464
13465
13466
13467
13468
13469
13470
13471
13472
13473
13474
13475
13476
13477
13478
13479
13480
13481
13482
13483
13484
13485
13486
13487
13488
13489
13490
13491
13492
13493
13494
13495
13496
13497
13498
13499
13500
13501
13502
13503
13504
13505
13506
13507
13508
13509
13510
13511
13512
13513
13514
13515
13516
13517
13518
13519
13520
13521
13522
13523
13524
13525
13526
13527
13528
13529
13530
13531
13532
13533
13534
13535
13536
13537
13538
13539
13540
13541
13542
13543
13544
13545
13546
13547
13548
13549
13550
13551
13552
13553
13554
13555
13556
13557
13558
13559
13560
13561
13570
13571
13572
13573
13574
13575
13576
13577
13578
13579
13580
13581
13582
13583
13584
13585
13586
13587
13588
13589
13590
13591
13592
13593
13594
13595
13596
13597
13598
13599
13600
13601
13602
13603
13604
13605
13606
13607
13608
13609
13610
13611
13612
13613
13614
13615
13616
13617
13618
13619
13620
13621
13622
13623
13624
13625
13626
13627
13628
13629
13630
13631
13632
13633
13634
13635
13636
13637
13638
13639
13640
13641
13642
13643
13644
13645
13646
13647
13648
13649
13650
13651
13652
13653
13654
13655
13656
13657
13658
13659
13660
13661
13662
13663
13664
13665
13666
13667
13668
13669
13670
13671
13672
13673
13674
13675
13676
13677
13678
13679
13680
13681
13682
13683
13684
13685
13686
13687
13688
13689
13690
13691
13692
13693
13694
13695
13696
13697
13698
13699
13700
13701
13702
13703
13704
13705
13706
13707
13708
13709
13710
13711
13712
13713
13714
13715
13716
13717
13718
13719
13720
13721
13722
13723
13724
13725
13726
13727
13728
13729
13730
13731
13732
13733
13734
13735
13736
13737
13738
13739
13740
13741
13742
13743
13744
13745
13746
13747
13748
13749
13750
13751
13752
13753
13754
13755
13756
13757
13758
13759
13760
13761
13762
13763
13764
13765
13766
13767
13768
13769
13770
13771
13772
13773
13774
13775
13776
13777
13778
13779
13780
13781
13782
13783
13784
13785
13786
13787
13788
13789
13790
13791
13792
13793
13794
13795
13796
13797
13798
13799
13800
13801
13802
13803
13804
13805
13806
13807
13808
13809
13810
13811
13812
13813
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
13851
13852
13853
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868
13869
13870
13871
13872
13873
13874
13875
13876
13877
13878
26385
26386
26387
26388
26389
26390
26391
26392
26393
26394
26395
26396
26397
26398
26399
26400
26401
26402
26403
26404
26405
26406
26407
26408
26409
26410
26411
26412
26413
26414
26415
26416
26417
26418
26419
26420
26421
26422
26423
26424
26425
26426
26427
26428
26429
26430
26431
26432
26433
26434
26435
26436
26437
26438
26439
26440
26441
26442
26443
26444
26445
26446
26447
26448
26449
26450
26451
26452
26453
26454
26455
26456
26457
26458
26459
26460
26461
26462
26463
26464
26465
26466
26467
26468
26469
26470
26471
26472
26473
26474
26475
26476
26477
26478
26479
26480
26481
26482
26483
26484
26485
26486
26487
26488
26489
26490
26491
26492
26493
26494
26495
26496
26497
26498
26499
26500
26501
26502
26503
26504
26505
26506
26507
26508
26509
26510
26511
26512
26513
26514
26515
26516
26517
26518
26519
26520
26521
26522
26523
26524
26525
26526
26527
26528
26529
26530
26531
26532
26533
26534
26535
26536
26537
26538
26539
26540
26541
26542
26543
26544
26545
26546
26547
26548
26549
26550
26551
26552
26553
26554
26555
26556
26557
26558
26559
26560
26561
26562
26563
26564
26565
26566
26567
26568
26569
26570
26571
26572
26573
26574
26575
26576
26577
26578
26579
26580
26581
26582
26583
26584
26585
26586
26587
26588
26589
26590
26591
26592
26593
26594
26595
26596
26597
26598
26599
26600
26601
26602
26603
26604
26605
26606
26607
26608
26609
26610
26611
26612
26613
26614
26615
26616
26617
26618
26619
26620
26621
26622
26623
26624
26625
26626
26627
26628
26629
26630
26631
26632
26633
26634
26635
26636
26637
26638
26639
26640
26641
26642
26643
26644
26645
26646
26647
26648
26649
26650
26651
26652
26653
26654
26655
26656
26657
26658
26659
26660
26661
26662
26663
26664
26665
26666
26667
26668
26669
26670
26671
26672
26673
26674
26675
26676
26677
26678
26679
26680
26681
26682
26683
26684
26685
26686
26687
26688
26689
26690
26691
26692
26693
26694
26695
26696
26697
26698
26699
26700
26701
26702
26703
26704
26705
26706
26707
26708
26709
26710
26711
26712
26713
26714
26715
26716
26717
26718
26719
26720
26721
26722
26723
26724
26725
26726
26727
26728
26729
26730
26731
26732
26733
26734
26735
26736
26737
26738
26739
26740
26741
26742
26743
26744
26745
26746
26747
26748
26749
26750
26751
26752
26753
26754
26755
26756
26757
26758
26759
26760
26761
26762
26763
26764
26765
26766
26767
26768
26769
26770
26771
26772
26773
26774
26775
26776
26777
26778
26779
26780
26781
26782
26783
26784
26785
26786
26787
26788
26789
26790
26791
26792
26793
26794
26795
26796
26797
26798
26799
26800
26801
26802
26803
26804
26805
26806
26807
26808
26809
26810
26811
26812
26813
26814
26815
26816
26817
26818
26819
26820
26821
26822
26823
26824
26825
26826
26827
26828
26829
26830
26831
26832
26833
26834
26835
26836
26837
26838
26839
26840
26841
26842
26843
26844
26845
26846
26847
26848
26849
26850
26851
26852
26853
26854
26855
26856
26857
26858
26859
26860
26861
26862
26863
26864
26865
26866
26867
26868
26869
26870
26871
26872
26873
26874
26875
26876
26877
26878
26879
26880
26881
26882
26883
26884
26885
26886
26887
26888
26889
26890
26891
26892
26893
26894
26895
26896
26897
26898
26899
26900
26901
26902
26903
26904
26905
26906
26907
26908
26909
26910
26911
26912
26913
26914
26915
26916
26917
26918
26919
26920
26921
26922
26923
26924
26925
26926
26927
26928
26929
26930
26931
26932
26933
26934
26935
26936
26937
26938
26939
26940
26941
26942
26943
26944
26945
26946
26947
26948
26949
26950
26951
26952
26953
26954
26955
26956
26957
26958
26959
26960
26961
26962
26963
26964
26965
26966
26967
26968
26969
26970
26971
26972
26973
26974
26975
26976
26977
26978
26979
26980
26981
26982
26983
26984
26985
26986
26987
26988
26989
26990
26991
26992
26993
26994
26995
26996
26997
26998
26999
27000
27001
27002
27003
27004
27005
27006
27007
27008
27009
27010
27011
27012
27013
27014
27015
27016
27017
27018
27019
27020
27021
27022
27023
27024
27025
27026
27027
27028
27029
27030
27031
27032
27033
27034
27035
27036
27037
27038
27039
27040
27041
27042
27043
27044
27045
27046
27047
27048
27049
27050
27051
27052
27053
27054
27055
27056
27057
27058
27059
27060
27061
27062
27063
27064
27065
27066
27067
27068
27069
27070
27071
27072
27073
27074
27075
27076
27077
27078
27079
27080
27081
27082
27083
27084
27085
27086
27087
27088
27089
27090
27091
27092
27093
27094
27095
27096
27097
27098
27099
27100
27101
27102
27103
27104
27105
27106
27107
27108
27109
27110
27111
27112
27113
27114
27115
27116
27117
27118
27119
27120
27121
27122
27123
27124
27125
27126
27127
27128
27129
27130
27131
27132
27133
27134
27135
27136
27137
27138
27139
27140
27141
27142
27143
27144
27145
27146
27147
27148
27149
27150
27151
27152
27153
27154
27155
27156
27157
27158
27159
27160
27161
27162
27163
27164
27165
27166
27167
27168
27169
27170
27171
27172
27173
27174
27175
27176
27177
27178
27179
27180
27181
27182
27183
27184
27185
27186
27187
27188
27189
27190
27191
27192
27193
27194
27195
27196
27197
27198
27199
27200
27201
27202
27203
27204
27205
27206
27207
27208
27209
27210
27211
27212
27213
27214
27215
27216
27217
27218
   
                                           




























                                                                   
                                  


                               
                                                              
                                                                                   





                                                              
                                                                                                                                                      
 
                                                                                                                                                                 
 

                                                                                                             
                                                                                                                                                                                  
 




                                                                                                                                                                                         

                                                                                                                




                                                                                                               
                                                                                                                                                    
 
                                                                                                                                                                                  
 
                                                                                                                                                                                               
 
                                                                                                                                                                                                                                             
 
                                                                                                                                                                                                                 
 
                                                                                                                                                                                          
 

                                                                                                                                                                                             
                                                                                                           
 
                                                                                                                 
 
                                                                                                         
 
                                                                                                             
 
                                                                                                                      
 

                                                                                                                            









                                                                                                                                                                

                                                                                                                                                                        



                                                                                                                                                                                    



                                                                                                                                                                     

                                                                                                                                                   



                                                                                                                                                             
                                                                                                                                                          
 
                                                                                                                                                                                 
 
                                                                                                                                                                           
 
                                                                                                                                                                                                              
 
                                                                                                                                                                                                                                                       
 
                                                                                                                                                                                                   
 

                                                                                                                                                                      





                                                                                                                                   



                                                                                                                                           

                                                                                                                                                     











































                                                                                                                                               
                                                                                                                                                     












                                                                                                    
                                                                                                                             








                                                             


                                 


                                                                                                                                                       
                                                                                                                                                                












                                                                                                         
                                                                                                                                        








                                                                       


                                 


                                                                                                                                                            




















                                                                                                                 
                                                                                                                                                                                 













                                                                                                                             
                                                                                                                            








                                                     


                                 


                                                                                                                                                   
                                                                                                                                                                












                                                                                                    
                                                                                                                                           








                                                                   


                                 


                                                                                                                                                          

































































                                                                                                                                                                                        






















                                                                                                               
















































                                                                                                                                                                
                                                                                                                                                   
     
                                                  


                                              
                                                                                                   

                                                                                 
                                       


                                                  
                                                                                                                                         








                                                                                       


                                 


                                                                                                                                                                    
                                                                                                                                                                                 
     
                                                              


                                       
                                                                                                                          

                                                                   
                                       



                                                   
                                                                                                                                         








                                                                         


                                


                                                                                                                                                             
                                                                                                                                                                                              
     

                                                         

     
                                                                                                                    
     
                                                       
                                               

                                             

     
                                                                                                                                                      
     

                                                             








                                    

                              
       
                                                                                                                                                       

     
                                                                                                                                                                                                                                            
     
                                                                 
                                

     
                                                                                                                                                       
     
                                                     
                                   


                                                 

     
                                                                                                                                                                
     

                                                           








                                    



                                                                                                                                                      

     
                                                                                                                                                                                                                
     
                                                                                               


                                      
                                                                                                                                                                                                

                                                                 


                                       

                                 
                                     


                                          
                                                                                                 





                                                                       


                                 


                                                                                                                                                            
                                                                                                                                                                                         
     

                                                                    

     
                                                                                                                                            
     
                                                             
                                               


                                        

     
                                                                                                                            
     

                                                                   


                                  





                                   
                                                                                                                                                          

     
































                                                                                                                                                                                            
                                                                                                          










                                                                           
                                                                                                               





                                                                     


                                       


                                                                                                                                                           
                                                                                                                










                                                                              
                                                                                                                     





                                                                           


                                       


                                                                                                                                                              
                                                                                                        










                                                                          
                                                                                                             





                                                                   


                                       


                                                                                                                                                          
                                                                                                            











                                                                                
                                                                                                   











                                                                                                                                                  
                                                                                                                     











                                                                                    
                                                                                                            











                                                                                                                                                      

























                                                                                                                                                            







































































                                                                                                                                                                                                                                                                                                                                     
                                                                                                                         

































                                                                                                                                                                                                                                                                                                                                          
                                                                                                                               








                                                                                                                                                            


































                                                                                                                                                                                                                                                                                                                                                  



























                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                            

































                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                    








                                                                                                                                                            





































































                                                                                                                                                                                                                                                                                                                                               































                                                                                                                                                                                                                                                                                                                             































































                                                                                                                                                                                                                                                                                                                                       
                                                                                                                                                           
                   
                                                                                                                                                          




                                                                                                         

                                                                                                                                                                                                                                                                                                                                    
                                                                        
                                       




                                                                                                                                                      
                                         



                               
                                                                                                                        








                                                                                                                                                            
                                                                                                                                                                                  
                   
                                                                                                                                                               




                                                                                                  
                              
                                           
                                                                                                                                                                                                                                                                                                                                                           
                                                                        
                                       





                                                                                                                                               
                                         




                                                     
                                                                                                                               








                                                                                                                                                            
                                                                                                                                                                            
                   
                                                                                                                                                    



                                          
                                                                                            
                                     

                                                                                                                                                                                                                                                                                                                                                     

                                                                        
                                             


                                                                                                             

                                                                                                                                         
                                                 
                                               



                               
                                                                                                                                                  




                                                                                                                                                            
                                                      


       
                                                                                                                                                                                                               
                   
                                                                                                                                                           



                                          
                                                                                           
                               

                                                
                                                                                                                                                                                                                                                                                                                                                                                        
                                                                        
                                   

                                                 


                                                                                                             

                                                                                                                                        
                                     

                                                   



                               
                                                                                                                                                             




                                                                                                                                                            
                                                     


       
                                                                                                                                                                                                                                                        
                   
                                                                                                                                                                                               




                                                                                                 


                                     

                              

                                                                                                                                                                                                                                                                                                                                                                                                                                 
                                                                        


                                       

                                 
                                     




                                                                                                                                              


                                         

                                   
                                       



                               
                                                                                        








                                                                                                                                                            
                                                                                                                                                                                                    
                   
                                                                                                                                                                  



                                          
                                                                                               
                                     


                                                                                                                                                                                                                                                                                                                                                                             

                                                                        

                                       


                                                                                                             

                                                                                                                                            
                                                 

                                         



                               
                                                                                                                     




                                                                                                                                                            
                                                         


       


































                                                                                                                                                                                                                                                                                                                                                


















                                                                                                                                                                                                                                                                                                          
                                                                                                       



























                                                                                                                                                                                                                                                                                                             
                                                                                                          



























                                                                                                                                                                                                                                                                                                         
                                                                                                      








                                                                                                                                                            





















                                                                                                                                                                                                                                                                                                                 
                                                                                                    






























                                                                                                                                                                                                                                                                                                                     
                                                                                                         








                                                                                                                                                            































                                                                                                                                                                                                                                                                                                                               















                                                                                                                                                                                                                                              
                                                                 

                                                               

                                                               
                                                                   



                                                                                   
                                                         
                                                       
                                                                   
                                                               
                                                           


                                                                       

                                                       
                                                                   










































                                                                                                                       

                                              























                                                                                                                                 

                                              




                      



















                                                                                                                               


















                                                                                                               

                                              























                                                                                                                             






                                              























































                                                                                                                             


















                                                                                                                                 

































































                                                                                                                                                 
                                                                             
                                                   
                                   

                                              




















                                                                                                                                   
                                                                                              
                                                   
                                   

                                             




                      


                                                                                                                       

       

                                                       





                                    

                                                                                                                 
             
                                                                                         

                                                   
                                                 
                                     

                                         




                      


                                                                                                                     

       

                                                      





                                    

                                                                                                               
             
                                                                                                      

                                                   
                                                 
                                     

                                                       



















                                                                                                                                 
             
                                                                                                                                                   



                                              



                      


                                                                                                                             

       

                                                          





                                    

                                                                                                                       
             
                                                                                                         





                                                   



                      



























                                                                                                                         














                                                                                                                               

                                                    
                                                    

                                           


















                                                                                                                                     

                                                       
                                                    

                                           


















                                                                                                                             

                                                   
                                                    






















                                                                                                             
                                                    






















                                                                                                                     
                                                    

                                           



                      























                                                                                                                                 















                                                                                                                                                                                                                                                                  
                                                                 

                                                               

                                                               
                                                                   



                                                                                   
                                                         
                                                       
                                                                   
                                                               
                                                           


                                                                       

                                                       
                                                                   






















































































                                                                                                                                                                 




                                                                     
























































                                                                                                                                                                 




                                                                     
























                                                                                                                                                                 

















































                                                                                                                                                                 































                                                                                                                                         




                                                                     
























                                                                                                                                                                 
                                                                                                                                                               







                                                          
                                                                                                                       
                                                                  

                                                                   


















                                                                                                 




                                                                     



















                                                                                                                                                                 
                                                                                                                                                                  



                                                                       





































































































































                                                                                                                                                                 























































                                                                                                                                                                 







































































































































                                                                                                                                                                       

                                                                     


                                                     




                                                                     




















                                                                                                                                                                 
                                                                        





























                                                                                                                                                                

                                                                     


                                                     




                                                                     




















                                                                                                                                                                 
                                                                                         


       


                                                                                                                                                   

       

                                                       

       
                                                                                                                 
                                                                  


                                                                   











                                                                                                 
                                                                   




                                                                     

                                                                     


                                                      


                                                                   





















                                                                                                                                                                 

                                                                                                                                                         


       


                                                                                                                                                    

       

                                                      





                                                                                                                    
                                                                 











                                                                                                 
                                                                 




                                                                     

                                                                     


                                                      




                                                                           



















                                                                                                                                                                 
                                                                                                                                                           
                                                                                                 


       
                                                                                                                                                    







                                                            
                                                                                                        
                                                                  

                                                    














                                                                                                 





                                                                


















                                                                                                                                                                 

                                                                                                                                                     


       


                                                                                                                                                

       

                                                          





                                                                                                        
                                                                         












                                                                                                 
                                                                         










                                                                     


















                                                                                                                                                                 

                                                                                                                                                   


       


































































                                                                                                                                                                 


























                                                                                                                                                             

                                                                      



                                                         


















































                                                                                                                                                                      

                                                                      



                                                         


















































                                                                                                                                                                     

                                                                      



                                                         























                                                                                                                                                                 


























                                                                                                                                        

                                                                      






















































                                                                                                                                                                 

                                                                      



























                                                                                                                                                                 
























































                                                                                                                                                                 



































































































































                                                                                                                                                            


                                                  









































































































































































































































































                                                                                                                                                                                  
                           












































                                                                                                                







                                                  

























































































































































































































































































































































































































                                                                                                                                                                                            












                                                           











































































































































































































                                                                                                                                                                                                    
                                                                                                                                                                                








                                                                                                                                       
                                                  



                                                                                                                    

                                   

















                                                                                        

                          














































                                                                                                                                                      

                                                                                                                                        








                                                                                                             

                                      



                             
                         











                                                                  


                                                           









                                           
                        

















































                                                                                               























                                                                                             

















                                                            







                                                










                                                


                          














                                                                                                                

                            


































                                                                 








                                                             




                           

















                                                         





























                                                                                              









                                                                                          


































                                                                                                       







                                  































































                                                                                                                                    








                                                                                       
























                                                                                                                                     




                                                  























                                                                                                                                    



                                        





                                      


                                    




                                                                                                                                   
                                              









                                                         




                                                    


































































































































































































































































                                                                                                                                                                                                                












                                                           











































































































































































































                                                                                                                                                                                                                        
                                                                                                                                                                                








                                                                                                                                       
                                                  



                                                                                                                    

                                   

















                                                                                        

                          














































                                                                                                                                                      

                                                                                                                                        








                                                                                                                  

                                      



                             
                         











                                                                     


                                                           









                                                
                        

















































                                                                                               























                                                                                             

















                                                            







                                                










                                                


                          










                                                                                                                































































































































































































































































































































































































































































































































































































































































































































































































































































































































                                                                                                                                                                                                                    







                                        

                                                          


                   
                                                         


                       




                           

                                                  
                             


             
                                                         





                                                                          
















                                                                                                       
                                                                       

                           






                                                                

















                                                                                                                        


                                                                                                


       
                                                                                                                
 
                                                                                                                                        








                                                                           










                                                                                                     
                                                                                                                                         


                                            





                               


                                                                                             


       
                                                                                                          

               
                                                                                                                                        
                                                     


               
                                                                                                                                       
                                                     





























































































































































































































































































































                                                                                                                                                                                                   

















                                                                       




















































































































































































































































                                                                                                                                                                                    
                                                                                                                                                                                








                                                                                                                                       
                                                  



                                                                                                                    

                                   

















                                                                                        

                          















































                                                                                                                                                      

                                                                                                                                        








                                                                                                         

                                      



                             
                         















                                                                                       


                                                           









                                       
                        
































































                                                                                               

























                                                                                             















                                                     







                                                










                                                


                          














                                                                                                                

                            


































                                                                 








                                                             




                           

















                                                         





























                                                                                              









                                                                                          


































                                                                                                       







                                  













































                                                                                                                                



                                                                                    
                   


                                                 
















                                                                                       








                                                                                       


















                                                                                                                                       
                                                    
             
                                    









                                                    




                                                  























                                                                                                                                



                                        


                                                  
                                                    
             
                                    





                                      


                                    




                                                                                                                               
                                              

                              



                                                                                                                                                       
             


                                           








                                                         




                                                    











































































































































































































                                                                                                                                                                                                        
                         























































                                                                                                                












                                                             







































































































































































































                                                                                                                                                                                                                
                                                                                                                                                                                






                                                                                                                                       
                                                      
                                                       
                                                  



                                                                                                                    

                                   

















                                                                                        

                          












































                                                                                                                                                      
                                                                                                                                 

                                                                                                                                            

                                                                                                                                        







                                                                                                                
                                     

                                      



                             
                         






                                                                 


                                                                                                       





                                                                  


                                                           









                                              
                        





                                                              
                                                                      


                                                                     
                                                     
                                 
                                                         



                             
                                                


                          
                                                                              



                             




































































                                                                                               
                                                    


































































































                                                                                                                

















                                                         
































































































































                                                                                                                                       



                                                                                    
                   


                                                      












































                                                                                                                                        
                                                            
             
                                    













































                                                                                                                                       
                                                            
             
                                    
















                                                                                                                                      



                                                                                                                                                       
             


                                                


















                                                         

































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































                                                                                                                                                                                                                


































































































































































































                                                                                                                                                                                                                







                                                             































































































































































































































































                                                                                                                                                                                                                        

     

                                                

     


                         

     

                                           

     

                                                                      


                  

                           

     


                                                                                          

     
                                           
                   
                       




                                                            
              
                            
                    
                
                                               







                                                

                       











                                                                                                                

                         







                                        

                                                           


                   
                                                          


                       



                                                       
                       
                                     







                           







                                                  


             
                                                          





                                                                          
                                                                             


                                

                                                                                    




















                                                                                                       
                                                                        

                           

                            

                          
                           


























                                                                                                                        


                                                                                                 


       
                                                                                                                  
 
                                                                                                                                         








                                                                           
                         
                                                                                


                                                         














                                                                                                     
                                                                                                                                          


                                            


                                               







                                


                                                                                              


       
                                                                                                            

               
                                                                                                                                         

                                                     
                               

                           


                                        



               
                                                                                                                                        
                                                     
                                              
                              


                                                   








































































































































































































                                                                                                                                                                                                            







                                                     



























































































































































































































































































































































































































                                                                                                                                                                                                                    












                                                         
















































































































































































































































































































































































































                                                                                                                                                                                                                                







                                                                         




















































































































































































































































































































                                                                                                                                                                                                                                        
                           












































                                                                                                                







                                                  






























































































































































                                                                                                                                                                                                                                                
                                                                                                                                                                                          






                                                                                                                                       
                                       


                                                                                                                    
                                            













                                                                                        

                                 







































                                                                                                       

                                                        


                                                                                                                                                      

                                                                                                                                                     







                                                                                                                        
                      

             

                                     





                                                                                 

                                                







                                                      

                                 

     

                                 

     


                                                                           


                  

                                                                                          

     


                                                                                                   

     

                                                                                               



                                                            
                        
                            
                             
                
                                         







                                                
                        
                                











                                                                                                                

                                  
















                                                                 



                                                                    
                       
                                                 







                           







                                                  









                                                                          
                                                                                               


                                

                                                                                                      























                                                                                                       

                                  



















                                                                                                                        

                                                                                                                                      























                                                                                                                                               



                                                                             


















                                                                                                                                                


                                                       

















                                                                                                                                               
                                        


                                        

                                             







                                                                                                                                              

                                               










                                                                                                                                                                                                                                                        
                                                                                                                                                                                







                                                                                                                                       
                                                       
                                                  



                                                                                                                    

                                   

















                                                                                        

                          














































                                                                                                                                                      

                                                                                                                                        








                                                                                                                          

                                      

             
                                                                       
                             
                         







                                                                                     

                                 
                                                                  
       


                                                           









                                                        
                        







                                                                   
                                                               


                                                                        
                                                                                                                  



                                                                            
                                                                       

















                                                                                               
                                                 


                          
                                                                                         


















                                                                                               























                                                                                             













                                                            
                                                     


              







                                                










                                                


                          














                                                                                                                

                            


































                                                                   








                                                             




                           

















                                                         





























                                                                                              









                                                                                          


































                                                                                                       







                                  




















































                                                                                                                                                 
                                                               





                                                                                       








                                                                                       
























                                                                                                                                                  




                                                  























                                                                                                                                                 



                                        





                                            


                                    




                                                                                                                                                
                                              




                                              
                                                         


                                       




                                                    







                                                                                                                                                                                                                    
                                                                                                                                                                                          







                                                                                                                                                                                                         
                                       



                                                                                                                    
                                            














                                                                                        

                                 









































                                                                                                       

                                                        


                                                                                                                                                      

                                                                                                                                                     









                                                                                                                                                                 
                      


                                   

                                     
                                                                                           





                                                                   

                                                

                                                                                                   








                                               

                                 


                                    

                                 

     


                                                                    


                  

                                                                                          

     


                                                                                                   

     

                                                                                               







                                                                                       
                                                                         


                                                                                   
                                                                                                                                                          



                                                                                       
                                                                                           



















                                                                                                         
                        
                            
                             
                
                                         















                                                  
                        
                                














                                                                                                                

                                  


















                                                          



                                                                    
                       
                                                 
















                                                                                     












                                                                             









                                                                          
                                                                                               


                                

                                                                                                      

































                                                                                                                  

                                  



























                                                                                                                        

                                                                                                                                      























                                                                                                                                        



                                                                             


























                                                                                                                                         


                                                       






















                                                                                                                                        
                                        





                                              

                                             










                                                                                                                                       

                                               














                                                                                                                                                                                                                            
                                                                                                                                                                              







                                                                                                                                       
                                                       
                                                 



                                                                                                                    

                                   

















                                                                                        

                         














































                                                                                                                                                      

                                                                                                                                      








                                                                                                                   

                                      



                             
                       









                                                                       
                                                                  
       


                                                         









                                                 
                       

























                                                                                               
                                                 


                          
                                                                                  







                                


























                                                                                               

     
                                             
                   
                         
















                                                            
                                                     


              







                                               










                                                


                         














                                                                                                                

                           


































                                                                 








                                                           




                           

















                                                         





























                                                                                              









                                                                                        


































                                                                                                       







                                  
























































                                                                                                                                          
                                                               





                                                                                       








                                                                                       
























                                                                                                                                           




                                                 























                                                                                                                                          



                                        





                                      


                                   




                                                                                                                                         
                                              





                                                   
                                                         


                                       




                                                   




       

                                                                                                                                                                                            

                                                                                                                                                                                                      
                                                                                                                                                                                                    


                                                                                                                                       

                                                                                      


                                              
                                             



                                                                                                                    
                                                   















                                                                                        

                                     












































                                                                                                                                                              

                                                                                                                                                            
                                                        
                                                                                                           

     
                                

     
                             
                             
                            


                                             
                                           




                                            
                                                       


                                                     

                                                   


       

                                         




                                  
                                 





                                        
                                                                         


















                                                                                                       

                                       

     

                                                                       


                  

                                       

     


                                                                                                      

     
                                                       
                   
                                   












                                                            
                            
                            
                                
                
                                           










                                                

                                   













                                                                                                                

                                     







                                        

                                                    


                   
                                                   











                                                                                 



                                                                               
                       
                                                             







                           












                                                                         


             
                                                   















                                                                                                              
                                                                                                     


                                

                                                                                                            




















                                                                                                       
                                                                 









                                         

                                        

                          
                                       








                                                                

















                                                                                                                        


                                                                                          


       
                                                                                                    
 
                                                                                                                                  
















                                                                                       



                                                                                














                                                                                                     
                                                                                                                                   







                                                              


                                                             







                                


                                                                                       


       
                                                                                              

               
                                                                                                                                  




                                                     
                                           

                           
                                        


                                                    

                                                   



               
                                                                                                                                 
                                                     
                                              




                                                      

                                                     





         

                                                                                                                                                                                                    



                                                                                                                                                                                      
                                                                                                                                                                          


                                                                                                                                       

                                                                                        

     
                                                
                                                       
                                                     
                                             





                                                                                                                    
                         



















                                                                                        

                       











































                                                                                                                                                      
                                                                                                                            



                                                                                                                                              
                                                                                                                                  

                                                                                                        
                                                                                                             

     
                                  

     

                               
                                      
                                    
                            




                               
                   




                                            
                                                           
                                 
                                                           




                                                                  
                                                                 
       

                                                   


       

                                           






                           
                     

     
                                          


                          
                                                                     






















                                                                                               
                                                                            


















                                                                                               
                                               


                           
                                                                           


















                                                                                                

                                       

     

                                                             


                  

                           

     


                                                                                          

     
                                           
                   
                       








                                                            
                                              














                                                     
                                                   


              
              
                            
                    
                
                                           
















                                                

                       

















                                                                                                                

                         







                                        

                                                      


                   
                                                     





























                                                                   



                                                       
                       
                                     







                           






















                                                           


             
                                                     



































                                                                                                
                                                                             


                                

                                                                                    




















                                                                                                       
                                                                   

























                                  

                            

                          
                           





























                                                                                                                        


                                                                                            


       
                                                                                                        
 
                                                                                                                                    










                                                                                
                                                        
















                                                                                       
                                                             





                                                                                       
                         
                                                                                


                                                     














                                                                                                     
                                                                                                                                     

















                                                     


                                               







                                


                                                                                         


       
                                                                                                  

               
                                                                                                                                    










                                                     
                               











                                        

                                 



               
                                                                                                                                   


                                                     
                                                  








                                                         
                                                       



                                        


                                               





         

                                                                                                                                                                                        
 
                                                                                                                                                                                         

                                                                                                                                                                                                       


                                                                                                                                       

                                                                                     

     
                                        

                                                         


                                                                                                                    
                                        

                                                      













                                                                                        

                               



                                      










































                                                                                                                                                      
                                                                                                                                                 
                                                                                                                           




                                                                                                                                                               
                                                        
                                                                                                          

     
                               

     
                            
                       

                                        

             
                                 

                                               




                                            
                                                     

                                         
       





                                                                                            


       

                                        



                         
                            

                                   

     

                                  

     

                                                            


                  

                                  

     


                                                                                                 

     
                                                  
                   
                              


       

                                                   

     

                                                                                    


                  

                                         

     


                                                                                                        

     
                                                         
                   







































                                                                                                   




                                                            
                      
                            
                           
                
                                      


              
                             
                            
                                  
                








                                                       







                                                

                              
 




                                     











                                                                                                                

                                



                                       







                                        

                                                   


                   
                                                  


                       



                                                                     
                       
                                                   


                       














                                                                                   







                           

                                                  



                                                             











                                                                           


             
                                                  





                                                                          
                                                                                           


                                

                                                                                                  



                                  
                                                                                                         


                                











                                                                                                                




















                                                                                                       
                                                                

                           

                                   

                          
                                  


                                  

                                          

                          







                                         
                                                                     








                                                                


                                     

















                                                                                                                        


                                                                                         


       
                                                                                                  
 
                                                                                                                                 








                                                                           
                                 
                                                                                

                                                      



                                                                                       











                                                                                       



                                                                                    
                   

                                                     



                                                 














                                                                                                     
                                                                                                                                  


                                            


                                                       

                                








                                                                                                                                           
                                                          
             
                                          




                                 





                               


                                                                                      


       
                                                                                            

               
                                                                                                                                 

                                                     
                                      

                           
                                             

                           



                                        

                                              
         





                                                      
                                                          
             
                                          

             



               
                                                                                                                                
                                                     
                                              
                              

                                                

                              





                                                           



                                                                                                                                                       
             

                                               


                                           





         

                                                                                                                                                                                                



                                                                                                                                                                                      
                                                                                                                                                                                      


                                                                                                                                       

                                                                                       



                                                       
                                                     
                                                           




                                                                                                                    

                                     



















                                                                                        

                             
















































                                                                                                                                                      

                                                                                                                                              
                                                        
                                                                                                            

     
                                 

     
                              

                                      

                                          




                               
                               




                                            
                                                         






                                                                  
                                                                 
       


                                                                       

     

                                          






                           
                           





                                             
                                                                       






















                                                                                               
                                                                           


















                                                                                               
                                               


                           
                                                                          


















                                                                                                























                                                                                                





















                                                            
                                                   


              







                                                         













                                                


                             
















                                                                                                                

                               







                                        

                                                     


                   
                                                    





























                                                                   








                                                                   




                           






















                                                           


             
                                                    



































                                                                                                









                                                                                                
















                                                                                                       
                                                                  
























                                  







                                  



























                                                                                                                        


                                                                                           


       
                                                                                                      
 
                                                                                                                                   




























                                                                                       
                                                             





                                                                                       








                                                                                       










                                                                                                     
                                                                                                                                    

















                                                     








                                                     

     


                                                                                        


       
                                                                                                

               
                                                                                                                                   










                                                     



                                        








                                       


                                       


               
                                                                                                                                  
                                                     
                                              










                                                         
                                                       


                                        




                                                             







                                                                                                                                                                                                                


                                                                                                                                                                                             

                                                                                                                                                                                      
                                                                                                                                                                                          






                                                                                                                                       


                                              

                                       
                                             


                                                                                                                    


                                            
                                   

                                         













                                                                                        





                                 



                             

                               










































                                                                                                                                                      


                                                                                                                                                     
                                                                                                        


                                                                                                                                                



                                                                                                                                              

                                                                                                                                                  







                                                                                                                


                             
                     

                            

             


                                     

                               
                                                                             





                                                                 




                                             
       


                                                                                






                                       

                                                                                     
       







                                              


                              

                           
                             

     

                                  

     

                                                                  


                  

                                  

     


                                                                                                 

     
                                                  
                   
                              


       

                                    

     

                                                                      


                  

                                    

     


                                                                                                   

     
                                                    
                   







































                                                                                                 


















































                                                                                                





                                                                         
                                                                  


                                                                    
                                                                                                                              



                                                                        
                                                                             

















                                                                                                  

                                                            
                      
                            
                           
                
                                      


              
                        
                            
                             
                








                                            


















                                     







                                           




                                                




                                
 

                              






                             


                               










                                                                                                                





                                  



                               

                                 
















                                                         



                                                                     
                       









                                                                         


                       



                                                                     
                       
                                                   




















                                                                   








                                                                       




                           
































                                                                 









                                                                          
                                                                                           


                                











                                                                                                      



                                  
                                                                                           


                                

                                                                                                  























                                                                                                









                                                                                                    



















                                                                                                       

                                   

                          
                                  


                                  

                                     

                          








                                    

















                                  







                                                                    










































                                                                                                                                       
                                 
                                                                                

                                                      



                                                                                       
                                   
                                                                                








                                                                                       



                                                                                    
                   

                                                   



                                               



















                                                                                       







                                                                                       














                                                                                                                                        


                                                       

                                



                                                                                                                                         
                                                    
             
                                          


                                 











                                                     









                                                         

















                                                                                                                                       
                                      

                           
                                        

                           
                                      

                           
                                    

                           

                                     
         












                                                    
                                                    
             
                                          

             
         





                                             


                                               




                                                                                                                                      
                                              
                              

                                                

                              

                                                  

                              
           



                                                                                                                                                       
             

                                             




                                         


                                              
                              


                                               



                                                 







                                                                                                                                                                                                                        
                                                                                                                                                                                 







                                                                                                                                                                                
                                   





































































                                                                                                                                                      
                                                                                                     









                                                                                                                                        
                  

























                                                                     
                       


                        
                             


                          
                                                             















































                                                                                               
                                     
















                                                
                            


























































                                                                                                                












                                                     










































































































                                                                                                                                         

                                                                             






























                                                                                                                                          
                                         
































                                                                                                                                         
                                         










                                                                                                                                        
                                           











                                                    

                                                                                                                                                                                                        

                                                                                                                                                                                                      

                                                                                                                                                                                             


                                                                                                                                       

                                                                                         


                                              

                                              



                                                                                                                    

                                            















                                                                                        



                                 












































                                                                                                                                                              
                                                                                                                                                     
                                                                                                        


                                                                                                                                                
                                                        
                                                                                                              

     
                                   

     
                                
                             

                             


                                             

                                     




                                            
                                                             


                                                     





                                                                                


       

                                            




                                  

                              





                                        
                                                                            


















                                                                                                       

























                                                                                                   

     
















                                                                         


                  

                                  

     


                                                                                                 

     
                                                  
                   
                              












                                                            
                        
                            
                             
                








                                            










                                                




                                













                                                                                                                



                                  







                                        

                                                       


                   
                                                      











                                                                                 












                                                                         
                       
                                                   







                           

















                                                                         


             
                                                      















                                                                                                              










                                                                                                      


                                

                                                                                                  




















                                                                                                       
                                                                    









                                         

                                     

                          








                                    


























                                                                                                                        


                                                                                             


       
                                                                                                          
 
                                                                                                                                     
















                                                                                       
                                   
                                                                                








                                                                                       



                                                                                    
                   

                                                   



                                               














                                                                                                     
                                                                                                                                      







                                                              








                                                                                                                                         
                                                    
             
                                          


                                 







                                


                                                                                          


       
                                                                                                    

               
                                                                                                                                     




                                                     
                                        

                           



                                        


                                                    





                                                    
                                                    
             
                                          

             
         


               
                                                                                                                                    
                                                     
                                              
                              

                                                      

                              




                                                  



                                                                                                                                                       
             

                                             


                                         
         




       

                                                                                                                                                                                                                

                                                                                                                                                                                  

                                                                                                                                                                                    


                                                                                                                                       

                                                                                           


                                       
                                                       
                                                  


                                                                                                                    
                                   

                                   















                                                                                        


                            
                         














































                                                                                                                                                      

                                                                                                                                            

                                                                                                                                        
                                                        
                                                                                                                

     
                                     

     
                                  
                      
                                      
                                 



                             
                             
                         




                                            
                                                                 

                                                


                                                                  


                                                           

     

                                              





                             
                          
                        





                                
                                                               

















                                                                                               



                                                 
                                                                               


















                                                                                               



                                            
                                                                        


















                                                                                             









                                                            







                                                     







                                                





                                                
                           
 


                            


                          












                                                                                                                

                              

                            







                                        

                                                         


                   
                                                        











                                                            








                                                                 








                                                             




                           

















                                                         


             
                                                        















                                                                                              









                                                                                              









                                                                                          
















                                                                                                       
                                                                      




                              
                                  







                                  






                               


























                                                                                                                                      


                                                                                               


       
                                                                                                              
 
                                                                                                                                       
















                                                                                       









                                                                                       







                                                                                       










                                                                                                     
                                                                                                                                        







                                                    




                                                    




                                                  





                               


                                                                                            


       
                                                                                                        

               
                                                                                                                                       




                                                     
                                    

                           



                                        


                                          


                                      


                                    


               
                                                                                                                                      
                                                     
                                              



                                            
                              




                                                         



                                                    




       

                                                                                                                                                                                                
 

                                                                                                                                                                                                    


                                                                                                                                       

                                                                                       

     

                                             


                                                                                                                    

                                                   













                                                                                        



                                     










































                                                                                                                                                      
                                                                                                                                                 
                                                                                                                           

                                                                                                                                                            
                                                        
                                                                                                            

     
                                 

     


                              

             

                                           




                                            


                                                         
       

                                                   


       

                                          



                         

                                 

     

                                  

     

                                                              


                  

                                  

     


                                                                                                 

     
                                                  
                   
                              


       

                                       

     

                                                                        


                  

                                       

     


                                                                                                      

     
                                                       
                   
                                   




                                                            
                      
                            
                           
                
                                      


              
                            
                            
                                
                
                                           







                                                

                              
 

                                   











                                                                                                                



                                     







                                        

                                                     


                   
                                                    


                       



                                                                     
                       
                                                   


                       



                                                                               
                       
                                                             







                           












                                                                       


             
                                                    





                                                                          
                                                                                           


                                

                                                                                                  



                                  
                                                                                                     


                                

                                                                                                            




















                                                                                                       
                                                                  

                           

                                   

                          
                                  


                                  

                                        

                          
                                       


























                                                                                                                        


                                                                                           


       
                                                                                                      
 
                                                                                                                                   








                                                                           
                                 
                                                                                

                                                      



                                                                                       
                                       
                                                                                

                                                           














                                                                                                     
                                                                                                                                    


                                            


                                                             

                                


                                                       







                                


                                                                                        


       
                                                                                                

               
                                                                                                                                   

                                                     
                                      

                           
                                           


                                        

                                              
         

                                                   



               
                                                                                                                                  


                                                     

                                                

                              

                                                     





         

                                                                                                                                                                                                        
 
                                                                                                                                                                                    
                                                                                                                                                                                    

                                                                                                                                                                                      


                                                                                                                                       

                                                                                         

     
                                                   
                                                       

                                                     


                                                                                                                    

                                   

                                     















                                                                                        

                            



                             







































                                                                                                       



                                                                                                                                                      
                                                                                                                               

                                                                                                                                            


                                                                                                                                              
                                                                                                        
                                                        
                                                                                                              

     
                                   

     

                                  
                                      

                                    


                             
                             

                               




                                            



                                                              


                                                                  




                                                                 
       

     

                                            



                         
                          
                          

                           

     
                                             


                          
                                                                         
                             



                                
                          



                                                                                               
                                  


                                                


                            

     



                                                 

























                                                                                               


                  

                                 

     


                                                                                                

     
                                                 
                   
                             


       

                                       

     

                                                              


                  

                           

     


                                                                                          

     
                                           
                   
                       


       





                                                            
                                                 


              







                                                     
                    
                            
                          
                








                                                   


              





                                                
                            
 


                            




                             
 












                                                                                                                

                              



                               







                                        

                                                       


                   
                                                      


                       

                                                                 


                                                            
                                               


                       








                                                                 



                                                                   
                       









                                                       


                       




                           






















                                                           


             
                                                      















                                                                                              









                                                                                              
                                                                                         


                                











                                                                                                



                                  
















                                                                                                       
                                                                    


                            




                                 
                    








                                  

                                  

                          








                                  

                    






                                                                


                            











                                                                                                                        





                                                                                                                      


                                                                                             


       
                                                                                                          
 
                                                                                                                                     









                                                                           


                                                                                




                                                                                       








                                                                                       
                               
                                                                                











                                                                                       



                                                                                       










                                                                                                     
                                                                                                                                      


                                            
                                     
                                                    
                                      

                                




                                                    







                                                     

                                





                               


                                                                                          


       
                                                                                                    

               
                                                                                                                                     




                                                     


                                    
                                     

                           



                                        
                                    
                                      
         


                                      




                                       
         


               
                                                                                                                                    
                                                     
                                              
                              

                                                     

                                       





                                                         







                                                       
         






































































































































                                                                                                                                                                                                            


                                                  






















































































































                                                                                                                                                                                                                    
                                                                                                                                                                                             







                                                                                                                                       
                                                        


                                                                                                                    

                                            















                                                                                        

                                 













































                                                                                                                                                      

                                                                                                                                                     







                                                                                                                 
                                 
                                       


                             
                                     












                                                                                               
                                     
                                                                       
       








                                               
                              








































                                                                                               
                                                  


                              
                                                                                     


















                                                                                                   









                                                            



                             
                                                      


              







                                                


                                












                                                                                                                

                                  

























                                                                 








                                                                         




                           












                                                                 



















                                                                                              













                                                                                                      






















                                                                                                       







                                     













































                                                                                                                                        



                                                                                    
                   


                                                  







                                                                                       

                                                                                
                                                                





                                                                                       


















                                                                                                                                         
                                                        
             
                                    




                                 




                                                         




















                                                                                                                                        



                                        


                                                  
                                                        
             
                                    


             


                                          




                                                                                                                                       
                                              

                              



                                                                                                                                                       
             


                                            



                                       
                              
                                                          


                                           






































































































































                                                                                                                                                                                                                        


                                                  






















































































































                                                                                                                                                                                                                                
                                                                                                                                                                                             







                                                                                                                                       
                                                        


                                                                                                                    

                                            















                                                                                        

                                 













































                                                                                                                                                      

                                                                                                                                                     







                                                                                                                    
                                    
                                       


                             
                                     












                                                                                                     
                                     
                                                                       
       








                                                  
                              








































                                                                                               
                                                  


                              
                                                                                        


















                                                                                                   









                                                            



                             
                                                      


              







                                                


                                












                                                                                                                

                                  

























                                                                 








                                                                         




                           












                                                                 



















                                                                                              









                                                                                                      


























                                                                                                       







                                     













































                                                                                                                                           



                                                                                    
                   


                                                     







                                                                                       

                                                                                
                                                                





                                                                                       


















                                                                                                                                            
                                                           
             
                                    




                                 




                                                         




















                                                                                                                                           



                                        


                                                  
                                                           
             
                                    


             


                                          




                                                                                                                                          
                                              

                              



                                                                                                                                                       
             


                                               



                                       
                              
                                                          


                                           






































































































































                                                                                                                                                                                                        


                                                  






















































































































                                                                                                                                                                                                                
                                                                                                                                                                                             







                                                                                                                                       
                                                        


                                                                                                                    

                                            















                                                                                        

                                 













































                                                                                                                                                      

                                                                                                                                                     







                                                                                                                
                                
                                       


                             
                                     












                                                                                             
                                     
                                                                       
       








                                              
                              








































                                                                                               
                                                  


                              
                                                                                    


















                                                                                                   









                                                            



                             
                                                      


              







                                                


                                












                                                                                                                

                                  

























                                                                 








                                                                         




                           












                                                                 



















                                                                                              









                                                                                                      


























                                                                                                       







                                     













































                                                                                                                                       



                                                                                    
                   


                                                 







                                                                                       

                                                                                
                                                                





                                                                                       


















                                                                                                                                        
                                                       
             
                                    




                                 




                                                         




















                                                                                                                                       



                                        


                                                  
                                                       
             
                                    


             


                                          




                                                                                                                                      
                                              

                              



                                                                                                                                                       
             


                                           



                                       
                              
                                                          






























































































































































                                                                                                                                                                                      
                              












































                                                                                                                







                                                  






































































































































































                                                                                                                                                                                             
                                                        















































































                                                                                                                                                      
                                       

















                                                                                         
                                                                       



















































                                                                                               
                                                  


                              
                                                                            
































                                                                                                   
                                                      




































































                                                                                                                












                                                                 














































































































                                                                                                                               



                                                                                    
                   


                                                 









                                                                                       
                                                                
























                                                                                                                                       
                                                     
             
                                    





































                                                                                                                               
                                                     
             
                                    













                                                                                                                              



                                                                                                                                                       
             


                                           




                                       
                                                          






























































































































































                                                                                                                                                                                        
                              












































                                                                                                                







                                                  






































































































































































                                                                                                                                                                                                
                                                        















































































                                                                                                                                                      
                                       

















                                                                                                   
                                                                       



















































                                                                                               
                                                  


                              
                                                                                
































                                                                                                   
                                                      




































































                                                                                                                












                                                                 














































































































                                                                                                                                   



                                                                                    
                   


                                                    









                                                                                       
                                                                
























                                                                                                                                       
                                                          
             
                                    





































                                                                                                                                   
                                                          
             
                                    













                                                                                                                                  



                                                                                                                                                       
             


                                              




                                       
                                                          


                                           




       

































































































































































































































































































































































































































































































































































































































































































































































































































































                                                                                                                                                                                                                        
 
/**
 * 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 = "2017-09-06")
public class MasterServer {

  public interface Iface {

    public boolean ping() throws org.apache.thrift.TException;

    public SessionData authenticate(String login, String password) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;

    public ClientSessionData localAccountLogin(String login, String password) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;

    public void setUsedSatellite(String sessionId, String satelliteName) throws org.apache.thrift.TException;

    public List<UserInfo> findUser(String sessionId, String organizationId, String searchTerm) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;

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

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

    public UserInfo getUser(String userToken, String userId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;

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

    public UserInfo getUserFromToken(String token) throws TInvalidTokenException, org.apache.thrift.TException;

    public boolean isServerAuthenticated(String serverSessionId) throws org.apache.thrift.TException;

    public ByteBuffer startServerAuthentication(int satelliteId) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;

    public ServerSessionData serverAuthenticate(int satelliteId, ByteBuffer challengeResponse) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;

    public ImagePublishData getImageData(String serverSessionId, String imageVersionId) throws TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException;

    public TransferInformation submitImage(String userToken, ImagePublishData imageDescription, List<ByteBuffer> blockHashes) throws TAuthorizationException, TInvocationException, TTransferRejectedException, org.apache.thrift.TException;

    public int registerSatellite(String userToken, String displayName, List<String> addresses, String modulus, String exponent, ByteBuffer certsha256) throws TInvocationException, org.apache.thrift.TException;

    public boolean updateSatellite(String serverSessionId, String displayName, List<String> addresses) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;

    public TransferInformation downloadImage(String sessionId, String imageVersionId) throws TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException;

    public List<Organization> getOrganizations() throws TInvocationException, org.apache.thrift.TException;

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

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

    public List<MasterTag> getTags(long startDate) throws TInvocationException, org.apache.thrift.TException;

    public List<MasterSoftware> getSoftware(long startDate) throws TInvocationException, org.apache.thrift.TException;

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

  }

  public interface AsyncIface {

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

    public void authenticate(String login, String password, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void localAccountLogin(String login, String password, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void setUsedSatellite(String sessionId, String satelliteName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void findUser(String sessionId, String organizationId, String searchTerm, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

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

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

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

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

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

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

    public void startServerAuthentication(int satelliteId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void serverAuthenticate(int satelliteId, ByteBuffer challengeResponse, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

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

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

    public void registerSatellite(String userToken, String displayName, List<String> addresses, String modulus, String exponent, ByteBuffer certsha256, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void updateSatellite(String serverSessionId, String displayName, List<String> addresses, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

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

    public void getOrganizations(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 getTags(long startDate, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void getSoftware(long startDate, 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 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 boolean ping() throws org.apache.thrift.TException
    {
      send_ping();
      return recv_ping();
    }

    public void send_ping() throws org.apache.thrift.TException
    {
      ping_args args = new ping_args();
      sendBase("ping", args);
    }

    public boolean recv_ping() throws org.apache.thrift.TException
    {
      ping_result result = new ping_result();
      receiveBase(result, "ping");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "ping failed: unknown result");
    }

    public SessionData authenticate(String login, String password) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
    {
      send_authenticate(login, password);
      return recv_authenticate();
    }

    public void send_authenticate(String login, String password) throws org.apache.thrift.TException
    {
      authenticate_args args = new authenticate_args();
      args.setLogin(login);
      args.setPassword(password);
      sendBase("authenticate", args);
    }

    public SessionData recv_authenticate() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
    {
      authenticate_result result = new authenticate_result();
      receiveBase(result, "authenticate");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.failure != null) {
        throw result.failure;
      }
      if (result.error != null) {
        throw result.error;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "authenticate failed: unknown result");
    }

    public ClientSessionData localAccountLogin(String login, String password) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
    {
      send_localAccountLogin(login, password);
      return recv_localAccountLogin();
    }

    public void send_localAccountLogin(String login, String password) throws org.apache.thrift.TException
    {
      localAccountLogin_args args = new localAccountLogin_args();
      args.setLogin(login);
      args.setPassword(password);
      sendBase("localAccountLogin", args);
    }

    public ClientSessionData recv_localAccountLogin() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
    {
      localAccountLogin_result result = new localAccountLogin_result();
      receiveBase(result, "localAccountLogin");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.failure != null) {
        throw result.failure;
      }
      if (result.error != null) {
        throw result.error;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "localAccountLogin failed: unknown result");
    }

    public void setUsedSatellite(String sessionId, String satelliteName) throws org.apache.thrift.TException
    {
      send_setUsedSatellite(sessionId, satelliteName);
      recv_setUsedSatellite();
    }

    public void send_setUsedSatellite(String sessionId, String satelliteName) throws org.apache.thrift.TException
    {
      setUsedSatellite_args args = new setUsedSatellite_args();
      args.setSessionId(sessionId);
      args.setSatelliteName(satelliteName);
      sendBase("setUsedSatellite", args);
    }

    public void recv_setUsedSatellite() throws org.apache.thrift.TException
    {
      setUsedSatellite_result result = new setUsedSatellite_result();
      receiveBase(result, "setUsedSatellite");
      return;
    }

    public List<UserInfo> findUser(String sessionId, String organizationId, String searchTerm) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
    {
      send_findUser(sessionId, organizationId, searchTerm);
      return recv_findUser();
    }

    public void send_findUser(String sessionId, String organizationId, String searchTerm) throws org.apache.thrift.TException
    {
      findUser_args args = new findUser_args();
      args.setSessionId(sessionId);
      args.setOrganizationId(organizationId);
      args.setSearchTerm(searchTerm);
      sendBase("findUser", args);
    }

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

    public List<ImageSummaryRead> getPublicImages(String sessionId, int page) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
    {
      send_getPublicImages(sessionId, page);
      return recv_getPublicImages();
    }

    public void send_getPublicImages(String sessionId, int page) throws org.apache.thrift.TException
    {
      getPublicImages_args args = new getPublicImages_args();
      args.setSessionId(sessionId);
      args.setPage(page);
      sendBase("getPublicImages", args);
    }

    public List<ImageSummaryRead> recv_getPublicImages() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
    {
      getPublicImages_result result = new getPublicImages_result();
      receiveBase(result, "getPublicImages");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.failure != null) {
        throw result.failure;
      }
      if (result.error != null) {
        throw result.error;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPublicImages failed: unknown result");
    }

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

    public void send_getImageDetails(String sessionId, String imageBaseId) throws org.apache.thrift.TException
    {
      getImageDetails_args args = new getImageDetails_args();
      args.setSessionId(sessionId);
      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 UserInfo getUser(String userToken, String userId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
    {
      send_getUser(userToken, userId);
      return recv_getUser();
    }

    public void send_getUser(String userToken, String userId) throws org.apache.thrift.TException
    {
      getUser_args args = new getUser_args();
      args.setUserToken(userToken);
      args.setUserId(userId);
      sendBase("getUser", args);
    }

    public UserInfo recv_getUser() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
    {
      getUser_result result = new getUser_result();
      receiveBase(result, "getUser");
      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, "getUser failed: unknown result");
    }

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

    public void send_invalidateSession(String sessionId) throws org.apache.thrift.TException
    {
      invalidateSession_args args = new invalidateSession_args();
      args.setSessionId(sessionId);
      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 UserInfo getUserFromToken(String token) throws TInvalidTokenException, org.apache.thrift.TException
    {
      send_getUserFromToken(token);
      return recv_getUserFromToken();
    }

    public void send_getUserFromToken(String token) throws org.apache.thrift.TException
    {
      getUserFromToken_args args = new getUserFromToken_args();
      args.setToken(token);
      sendBase("getUserFromToken", args);
    }

    public UserInfo recv_getUserFromToken() throws TInvalidTokenException, org.apache.thrift.TException
    {
      getUserFromToken_result result = new getUserFromToken_result();
      receiveBase(result, "getUserFromToken");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.failure != null) {
        throw result.failure;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUserFromToken failed: unknown result");
    }

    public boolean isServerAuthenticated(String serverSessionId) throws org.apache.thrift.TException
    {
      send_isServerAuthenticated(serverSessionId);
      return recv_isServerAuthenticated();
    }

    public void send_isServerAuthenticated(String serverSessionId) throws org.apache.thrift.TException
    {
      isServerAuthenticated_args args = new isServerAuthenticated_args();
      args.setServerSessionId(serverSessionId);
      sendBase("isServerAuthenticated", args);
    }

    public boolean recv_isServerAuthenticated() throws org.apache.thrift.TException
    {
      isServerAuthenticated_result result = new isServerAuthenticated_result();
      receiveBase(result, "isServerAuthenticated");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isServerAuthenticated failed: unknown result");
    }

    public ByteBuffer startServerAuthentication(int satelliteId) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
    {
      send_startServerAuthentication(satelliteId);
      return recv_startServerAuthentication();
    }

    public void send_startServerAuthentication(int satelliteId) throws org.apache.thrift.TException
    {
      startServerAuthentication_args args = new startServerAuthentication_args();
      args.setSatelliteId(satelliteId);
      sendBase("startServerAuthentication", args);
    }

    public ByteBuffer recv_startServerAuthentication() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
    {
      startServerAuthentication_result result = new startServerAuthentication_result();
      receiveBase(result, "startServerAuthentication");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.failure != null) {
        throw result.failure;
      }
      if (result.error != null) {
        throw result.error;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startServerAuthentication failed: unknown result");
    }

    public ServerSessionData serverAuthenticate(int satelliteId, ByteBuffer challengeResponse) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
    {
      send_serverAuthenticate(satelliteId, challengeResponse);
      return recv_serverAuthenticate();
    }

    public void send_serverAuthenticate(int satelliteId, ByteBuffer challengeResponse) throws org.apache.thrift.TException
    {
      serverAuthenticate_args args = new serverAuthenticate_args();
      args.setSatelliteId(satelliteId);
      args.setChallengeResponse(challengeResponse);
      sendBase("serverAuthenticate", args);
    }

    public ServerSessionData recv_serverAuthenticate() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
    {
      serverAuthenticate_result result = new serverAuthenticate_result();
      receiveBase(result, "serverAuthenticate");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.failure != null) {
        throw result.failure;
      }
      if (result.errr != null) {
        throw result.errr;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "serverAuthenticate failed: unknown result");
    }

    public ImagePublishData getImageData(String serverSessionId, String imageVersionId) throws TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException
    {
      send_getImageData(serverSessionId, imageVersionId);
      return recv_getImageData();
    }

    public void send_getImageData(String serverSessionId, String imageVersionId) throws org.apache.thrift.TException
    {
      getImageData_args args = new getImageData_args();
      args.setServerSessionId(serverSessionId);
      args.setImageVersionId(imageVersionId);
      sendBase("getImageData", args);
    }

    public ImagePublishData recv_getImageData() throws TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException
    {
      getImageData_result result = new getImageData_result();
      receiveBase(result, "getImageData");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.failure != null) {
        throw result.failure;
      }
      if (result.failure2 != null) {
        throw result.failure2;
      }
      if (result.f3 != null) {
        throw result.f3;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getImageData failed: unknown result");
    }

    public TransferInformation submitImage(String userToken, ImagePublishData imageDescription, List<ByteBuffer> blockHashes) throws TAuthorizationException, TInvocationException, TTransferRejectedException, org.apache.thrift.TException
    {
      send_submitImage(userToken, imageDescription, blockHashes);
      return recv_submitImage();
    }

    public void send_submitImage(String userToken, ImagePublishData imageDescription, List<ByteBuffer> blockHashes) throws org.apache.thrift.TException
    {
      submitImage_args args = new submitImage_args();
      args.setUserToken(userToken);
      args.setImageDescription(imageDescription);
      args.setBlockHashes(blockHashes);
      sendBase("submitImage", args);
    }

    public TransferInformation recv_submitImage() throws TAuthorizationException, TInvocationException, TTransferRejectedException, org.apache.thrift.TException
    {
      submitImage_result result = new submitImage_result();
      receiveBase(result, "submitImage");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.failure != null) {
        throw result.failure;
      }
      if (result.failure2 != null) {
        throw result.failure2;
      }
      if (result.failure3 != null) {
        throw result.failure3;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "submitImage failed: unknown result");
    }

    public int registerSatellite(String userToken, String displayName, List<String> addresses, String modulus, String exponent, ByteBuffer certsha256) throws TInvocationException, org.apache.thrift.TException
    {
      send_registerSatellite(userToken, displayName, addresses, modulus, exponent, certsha256);
      return recv_registerSatellite();
    }

    public void send_registerSatellite(String userToken, String displayName, List<String> addresses, String modulus, String exponent, ByteBuffer certsha256) throws org.apache.thrift.TException
    {
      registerSatellite_args args = new registerSatellite_args();
      args.setUserToken(userToken);
      args.setDisplayName(displayName);
      args.setAddresses(addresses);
      args.setModulus(modulus);
      args.setExponent(exponent);
      args.setCertsha256(certsha256);
      sendBase("registerSatellite", args);
    }

    public int recv_registerSatellite() throws TInvocationException, org.apache.thrift.TException
    {
      registerSatellite_result result = new registerSatellite_result();
      receiveBase(result, "registerSatellite");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.error != null) {
        throw result.error;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "registerSatellite failed: unknown result");
    }

    public boolean updateSatellite(String serverSessionId, String displayName, List<String> addresses) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
    {
      send_updateSatellite(serverSessionId, displayName, addresses);
      return recv_updateSatellite();
    }

    public void send_updateSatellite(String serverSessionId, String displayName, List<String> addresses) throws org.apache.thrift.TException
    {
      updateSatellite_args args = new updateSatellite_args();
      args.setServerSessionId(serverSessionId);
      args.setDisplayName(displayName);
      args.setAddresses(addresses);
      sendBase("updateSatellite", args);
    }

    public boolean recv_updateSatellite() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
    {
      updateSatellite_result result = new updateSatellite_result();
      receiveBase(result, "updateSatellite");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.failure != null) {
        throw result.failure;
      }
      if (result.error != null) {
        throw result.error;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateSatellite failed: unknown result");
    }

    public TransferInformation downloadImage(String sessionId, String imageVersionId) throws TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException
    {
      send_downloadImage(sessionId, imageVersionId);
      return recv_downloadImage();
    }

    public void send_downloadImage(String sessionId, String imageVersionId) throws org.apache.thrift.TException
    {
      downloadImage_args args = new downloadImage_args();
      args.setSessionId(sessionId);
      args.setImageVersionId(imageVersionId);
      sendBase("downloadImage", args);
    }

    public TransferInformation recv_downloadImage() throws TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException
    {
      downloadImage_result result = new downloadImage_result();
      receiveBase(result, "downloadImage");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.failure != null) {
        throw result.failure;
      }
      if (result.failure2 != null) {
        throw result.failure2;
      }
      if (result.f3 != null) {
        throw result.f3;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "downloadImage failed: unknown result");
    }

    public List<Organization> getOrganizations() throws TInvocationException, org.apache.thrift.TException
    {
      send_getOrganizations();
      return recv_getOrganizations();
    }

    public void send_getOrganizations() throws org.apache.thrift.TException
    {
      getOrganizations_args args = new getOrganizations_args();
      sendBase("getOrganizations", args);
    }

    public List<Organization> recv_getOrganizations() throws TInvocationException, org.apache.thrift.TException
    {
      getOrganizations_result result = new getOrganizations_result();
      receiveBase(result, "getOrganizations");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.serverError != null) {
        throw result.serverError;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getOrganizations failed: unknown result");
    }

    public List<OperatingSystem> getOperatingSystems() throws TInvocationException, 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 TInvocationException, org.apache.thrift.TException
    {
      getOperatingSystems_result result = new getOperatingSystems_result();
      receiveBase(result, "getOperatingSystems");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.serverError != null) {
        throw result.serverError;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getOperatingSystems failed: unknown result");
    }

    public List<Virtualizer> getVirtualizers() throws TInvocationException, 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 TInvocationException, org.apache.thrift.TException
    {
      getVirtualizers_result result = new getVirtualizers_result();
      receiveBase(result, "getVirtualizers");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.serverError != null) {
        throw result.serverError;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getVirtualizers failed: unknown result");
    }

    public List<MasterTag> getTags(long startDate) throws TInvocationException, org.apache.thrift.TException
    {
      send_getTags(startDate);
      return recv_getTags();
    }

    public void send_getTags(long startDate) throws org.apache.thrift.TException
    {
      getTags_args args = new getTags_args();
      args.setStartDate(startDate);
      sendBase("getTags", args);
    }

    public List<MasterTag> recv_getTags() throws TInvocationException, org.apache.thrift.TException
    {
      getTags_result result = new getTags_result();
      receiveBase(result, "getTags");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.serverError != null) {
        throw result.serverError;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getTags failed: unknown result");
    }

    public List<MasterSoftware> getSoftware(long startDate) throws TInvocationException, org.apache.thrift.TException
    {
      send_getSoftware(startDate);
      return recv_getSoftware();
    }

    public void send_getSoftware(long startDate) throws org.apache.thrift.TException
    {
      getSoftware_args args = new getSoftware_args();
      args.setStartDate(startDate);
      sendBase("getSoftware", args);
    }

    public List<MasterSoftware> recv_getSoftware() throws TInvocationException, org.apache.thrift.TException
    {
      getSoftware_result result = new getSoftware_result();
      receiveBase(result, "getSoftware");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.serverError != null) {
        throw result.serverError;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSoftware failed: unknown result");
    }

    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 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 ping(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      ping_call method_call = new ping_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class ping_call extends org.apache.thrift.async.TAsyncMethodCall {
      public ping_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("ping", org.apache.thrift.protocol.TMessageType.CALL, 0));
        ping_args args = new ping_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public boolean 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_ping();
      }
    }

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

    public static class authenticate_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String login;
      private String password;
      public authenticate_call(String login, String password, 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.login = login;
        this.password = password;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("authenticate", org.apache.thrift.protocol.TMessageType.CALL, 0));
        authenticate_args args = new authenticate_args();
        args.setLogin(login);
        args.setPassword(password);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public SessionData 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_authenticate();
      }
    }

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

    public static class localAccountLogin_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String login;
      private String password;
      public localAccountLogin_call(String login, String password, 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.login = login;
        this.password = password;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("localAccountLogin", org.apache.thrift.protocol.TMessageType.CALL, 0));
        localAccountLogin_args args = new localAccountLogin_args();
        args.setLogin(login);
        args.setPassword(password);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public ClientSessionData 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_localAccountLogin();
      }
    }

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

    public static class setUsedSatellite_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String sessionId;
      private String satelliteName;
      public setUsedSatellite_call(String sessionId, String satelliteName, 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.sessionId = sessionId;
        this.satelliteName = satelliteName;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setUsedSatellite", org.apache.thrift.protocol.TMessageType.CALL, 0));
        setUsedSatellite_args args = new setUsedSatellite_args();
        args.setSessionId(sessionId);
        args.setSatelliteName(satelliteName);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void 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);
        (new Client(prot)).recv_setUsedSatellite();
      }
    }

    public void findUser(String sessionId, String organizationId, String searchTerm, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      findUser_call method_call = new findUser_call(sessionId, organizationId, searchTerm, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class findUser_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String sessionId;
      private String organizationId;
      private String searchTerm;
      public findUser_call(String sessionId, String organizationId, String searchTerm, 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.sessionId = sessionId;
        this.organizationId = organizationId;
        this.searchTerm = searchTerm;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("findUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
        findUser_args args = new findUser_args();
        args.setSessionId(sessionId);
        args.setOrganizationId(organizationId);
        args.setSearchTerm(searchTerm);
        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_findUser();
      }
    }

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

    public static class getPublicImages_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String sessionId;
      private int page;
      public getPublicImages_call(String sessionId, 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.sessionId = sessionId;
        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("getPublicImages", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getPublicImages_args args = new getPublicImages_args();
        args.setSessionId(sessionId);
        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_getPublicImages();
      }
    }

    public void getImageDetails(String sessionId, String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getImageDetails_call method_call = new getImageDetails_call(sessionId, 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 sessionId;
      private String imageBaseId;
      public getImageDetails_call(String sessionId, 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.sessionId = sessionId;
        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.setSessionId(sessionId);
        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 getUser(String userToken, String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getUser_call method_call = new getUser_call(userToken, userId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getUser_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String userToken;
      private String userId;
      public getUser_call(String userToken, String userId, 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.userId = userId;
      }

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

      public UserInfo 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_getUser();
      }
    }

    public void invalidateSession(String sessionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      invalidateSession_call method_call = new invalidateSession_call(sessionId, 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 sessionId;
      public invalidateSession_call(String sessionId, 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.sessionId = sessionId;
      }

      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.setSessionId(sessionId);
        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 getUserFromToken(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getUserFromToken_call method_call = new getUserFromToken_call(token, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getUserFromToken_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String token;
      public getUserFromToken_call(String token, 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.token = token;
      }

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

      public UserInfo 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_getUserFromToken();
      }
    }

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

    public static class isServerAuthenticated_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String serverSessionId;
      public isServerAuthenticated_call(String serverSessionId, 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.serverSessionId = serverSessionId;
      }

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

      public boolean 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_isServerAuthenticated();
      }
    }

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

    public static class startServerAuthentication_call extends org.apache.thrift.async.TAsyncMethodCall {
      private int satelliteId;
      public startServerAuthentication_call(int satelliteId, 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.satelliteId = satelliteId;
      }

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

      public ByteBuffer 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_startServerAuthentication();
      }
    }

    public void serverAuthenticate(int satelliteId, ByteBuffer challengeResponse, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      serverAuthenticate_call method_call = new serverAuthenticate_call(satelliteId, challengeResponse, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class serverAuthenticate_call extends org.apache.thrift.async.TAsyncMethodCall {
      private int satelliteId;
      private ByteBuffer challengeResponse;
      public serverAuthenticate_call(int satelliteId, ByteBuffer challengeResponse, 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.satelliteId = satelliteId;
        this.challengeResponse = challengeResponse;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("serverAuthenticate", org.apache.thrift.protocol.TMessageType.CALL, 0));
        serverAuthenticate_args args = new serverAuthenticate_args();
        args.setSatelliteId(satelliteId);
        args.setChallengeResponse(challengeResponse);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public ServerSessionData 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_serverAuthenticate();
      }
    }

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

    public static class getImageData_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String serverSessionId;
      private String imageVersionId;
      public getImageData_call(String serverSessionId, 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.serverSessionId = serverSessionId;
        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("getImageData", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getImageData_args args = new getImageData_args();
        args.setServerSessionId(serverSessionId);
        args.setImageVersionId(imageVersionId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public ImagePublishData getResult() throws 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_getImageData();
      }
    }

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

    public static class submitImage_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String userToken;
      private ImagePublishData imageDescription;
      private List<ByteBuffer> blockHashes;
      public submitImage_call(String userToken, ImagePublishData imageDescription, List<ByteBuffer> blockHashes, 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.imageDescription = imageDescription;
        this.blockHashes = blockHashes;
      }

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

      public TransferInformation getResult() throws TAuthorizationException, 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_submitImage();
      }
    }

    public void registerSatellite(String userToken, String displayName, List<String> addresses, String modulus, String exponent, ByteBuffer certsha256, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      registerSatellite_call method_call = new registerSatellite_call(userToken, displayName, addresses, modulus, exponent, certsha256, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class registerSatellite_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String userToken;
      private String displayName;
      private List<String> addresses;
      private String modulus;
      private String exponent;
      private ByteBuffer certsha256;
      public registerSatellite_call(String userToken, String displayName, List<String> addresses, String modulus, String exponent, ByteBuffer certsha256, 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.displayName = displayName;
        this.addresses = addresses;
        this.modulus = modulus;
        this.exponent = exponent;
        this.certsha256 = certsha256;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("registerSatellite", org.apache.thrift.protocol.TMessageType.CALL, 0));
        registerSatellite_args args = new registerSatellite_args();
        args.setUserToken(userToken);
        args.setDisplayName(displayName);
        args.setAddresses(addresses);
        args.setModulus(modulus);
        args.setExponent(exponent);
        args.setCertsha256(certsha256);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public int getResult() throws 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_registerSatellite();
      }
    }

    public void updateSatellite(String serverSessionId, String displayName, List<String> addresses, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      updateSatellite_call method_call = new updateSatellite_call(serverSessionId, displayName, addresses, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class updateSatellite_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String serverSessionId;
      private String displayName;
      private List<String> addresses;
      public updateSatellite_call(String serverSessionId, String displayName, List<String> addresses, 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.serverSessionId = serverSessionId;
        this.displayName = displayName;
        this.addresses = addresses;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateSatellite", org.apache.thrift.protocol.TMessageType.CALL, 0));
        updateSatellite_args args = new updateSatellite_args();
        args.setServerSessionId(serverSessionId);
        args.setDisplayName(displayName);
        args.setAddresses(addresses);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public boolean 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_updateSatellite();
      }
    }

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

    public static class downloadImage_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String sessionId;
      private String imageVersionId;
      public downloadImage_call(String sessionId, 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.sessionId = sessionId;
        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("downloadImage", org.apache.thrift.protocol.TMessageType.CALL, 0));
        downloadImage_args args = new downloadImage_args();
        args.setSessionId(sessionId);
        args.setImageVersionId(imageVersionId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public TransferInformation getResult() throws 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_downloadImage();
      }
    }

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

    public static class getOrganizations_call extends org.apache.thrift.async.TAsyncMethodCall {
      public getOrganizations_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("getOrganizations", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getOrganizations_args args = new getOrganizations_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<Organization> getResult() throws 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_getOrganizations();
      }
    }

    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 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_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 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_getVirtualizers();
      }
    }

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

    public static class getTags_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long startDate;
      public getTags_call(long startDate, 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.startDate = startDate;
      }

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

      public List<MasterTag> getResult() throws 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_getTags();
      }
    }

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

    public static class getSoftware_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long startDate;
      public getSoftware_call(long startDate, 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.startDate = startDate;
      }

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

      public List<MasterSoftware> getResult() throws 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_getSoftware();
      }
    }

    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 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("ping", new ping());
      processMap.put("authenticate", new authenticate());
      processMap.put("localAccountLogin", new localAccountLogin());
      processMap.put("setUsedSatellite", new setUsedSatellite());
      processMap.put("findUser", new findUser());
      processMap.put("getPublicImages", new getPublicImages());
      processMap.put("getImageDetails", new getImageDetails());
      processMap.put("getUser", new getUser());
      processMap.put("invalidateSession", new invalidateSession());
      processMap.put("getUserFromToken", new getUserFromToken());
      processMap.put("isServerAuthenticated", new isServerAuthenticated());
      processMap.put("startServerAuthentication", new startServerAuthentication());
      processMap.put("serverAuthenticate", new serverAuthenticate());
      processMap.put("getImageData", new getImageData());
      processMap.put("submitImage", new submitImage());
      processMap.put("registerSatellite", new registerSatellite());
      processMap.put("updateSatellite", new updateSatellite());
      processMap.put("downloadImage", new downloadImage());
      processMap.put("getOrganizations", new getOrganizations());
      processMap.put("getOperatingSystems", new getOperatingSystems());
      processMap.put("getVirtualizers", new getVirtualizers());
      processMap.put("getTags", new getTags());
      processMap.put("getSoftware", new getSoftware());
      processMap.put("queryUploadStatus", new queryUploadStatus());
      return processMap;
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      public ping_result getResult(I iface, ping_args args) throws org.apache.thrift.TException {
        ping_result result = new ping_result();
        result.success = iface.ping();
        result.setSuccessIsSet(true);
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      public authenticate_result getResult(I iface, authenticate_args args) throws org.apache.thrift.TException {
        authenticate_result result = new authenticate_result();
        try {
          result.success = iface.authenticate(args.login, args.password);
        } catch (TAuthorizationException failure) {
          result.failure = failure;
        } catch (TInvocationException error) {
          result.error = error;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      public localAccountLogin_result getResult(I iface, localAccountLogin_args args) throws org.apache.thrift.TException {
        localAccountLogin_result result = new localAccountLogin_result();
        try {
          result.success = iface.localAccountLogin(args.login, args.password);
        } catch (TAuthorizationException failure) {
          result.failure = failure;
        } catch (TInvocationException error) {
          result.error = error;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      public setUsedSatellite_result getResult(I iface, setUsedSatellite_args args) throws org.apache.thrift.TException {
        setUsedSatellite_result result = new setUsedSatellite_result();
        iface.setUsedSatellite(args.sessionId, args.satelliteName);
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      public findUser_result getResult(I iface, findUser_args args) throws org.apache.thrift.TException {
        findUser_result result = new findUser_result();
        try {
          result.success = iface.findUser(args.sessionId, args.organizationId, args.searchTerm);
        } catch (TAuthorizationException failure) {
          result.failure = failure;
        } catch (TInvocationException error) {
          result.error = error;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      public getPublicImages_result getResult(I iface, getPublicImages_args args) throws org.apache.thrift.TException {
        getPublicImages_result result = new getPublicImages_result();
        try {
          result.success = iface.getPublicImages(args.sessionId, args.page);
        } catch (TAuthorizationException failure) {
          result.failure = failure;
        } catch (TInvocationException error) {
          result.error = error;
        }
        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.sessionId, 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 getUser<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getUser_args> {
      public getUser() {
        super("getUser");
      }

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

      protected boolean isOneway() {
        return false;
      }

      public getUser_result getResult(I iface, getUser_args args) throws org.apache.thrift.TException {
        getUser_result result = new getUser_result();
        try {
          result.success = iface.getUser(args.userToken, args.userId);
        } catch (TAuthorizationException authError) {
          result.authError = authError;
        } catch (TNotFoundException notFound) {
          result.notFound = notFound;
        } 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.sessionId);
        } catch (TInvalidTokenException ex) {
          result.ex = ex;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      public getUserFromToken_result getResult(I iface, getUserFromToken_args args) throws org.apache.thrift.TException {
        getUserFromToken_result result = new getUserFromToken_result();
        try {
          result.success = iface.getUserFromToken(args.token);
        } catch (TInvalidTokenException failure) {
          result.failure = failure;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      public isServerAuthenticated_result getResult(I iface, isServerAuthenticated_args args) throws org.apache.thrift.TException {
        isServerAuthenticated_result result = new isServerAuthenticated_result();
        result.success = iface.isServerAuthenticated(args.serverSessionId);
        result.setSuccessIsSet(true);
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      public startServerAuthentication_result getResult(I iface, startServerAuthentication_args args) throws org.apache.thrift.TException {
        startServerAuthentication_result result = new startServerAuthentication_result();
        try {
          result.success = iface.startServerAuthentication(args.satelliteId);
        } catch (TAuthorizationException failure) {
          result.failure = failure;
        } catch (TInvocationException error) {
          result.error = error;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      public serverAuthenticate_result getResult(I iface, serverAuthenticate_args args) throws org.apache.thrift.TException {
        serverAuthenticate_result result = new serverAuthenticate_result();
        try {
          result.success = iface.serverAuthenticate(args.satelliteId, args.challengeResponse);
        } catch (TAuthorizationException failure) {
          result.failure = failure;
        } catch (TInvocationException errr) {
          result.errr = errr;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      public getImageData_result getResult(I iface, getImageData_args args) throws org.apache.thrift.TException {
        getImageData_result result = new getImageData_result();
        try {
          result.success = iface.getImageData(args.serverSessionId, args.imageVersionId);
        } catch (TAuthorizationException failure) {
          result.failure = failure;
        } catch (TInvocationException failure2) {
          result.failure2 = failure2;
        } catch (TNotFoundException f3) {
          result.f3 = f3;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      public submitImage_result getResult(I iface, submitImage_args args) throws org.apache.thrift.TException {
        submitImage_result result = new submitImage_result();
        try {
          result.success = iface.submitImage(args.userToken, args.imageDescription, args.blockHashes);
        } catch (TAuthorizationException failure) {
          result.failure = failure;
        } catch (TInvocationException failure2) {
          result.failure2 = failure2;
        } catch (TTransferRejectedException failure3) {
          result.failure3 = failure3;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      public registerSatellite_result getResult(I iface, registerSatellite_args args) throws org.apache.thrift.TException {
        registerSatellite_result result = new registerSatellite_result();
        try {
          result.success = iface.registerSatellite(args.userToken, args.displayName, args.addresses, args.modulus, args.exponent, args.certsha256);
          result.setSuccessIsSet(true);
        } catch (TInvocationException error) {
          result.error = error;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      public updateSatellite_result getResult(I iface, updateSatellite_args args) throws org.apache.thrift.TException {
        updateSatellite_result result = new updateSatellite_result();
        try {
          result.success = iface.updateSatellite(args.serverSessionId, args.displayName, args.addresses);
          result.setSuccessIsSet(true);
        } catch (TAuthorizationException failure) {
          result.failure = failure;
        } catch (TInvocationException error) {
          result.error = error;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      public downloadImage_result getResult(I iface, downloadImage_args args) throws org.apache.thrift.TException {
        downloadImage_result result = new downloadImage_result();
        try {
          result.success = iface.downloadImage(args.sessionId, args.imageVersionId);
        } catch (TAuthorizationException failure) {
          result.failure = failure;
        } catch (TInvocationException failure2) {
          result.failure2 = failure2;
        } catch (TNotFoundException f3) {
          result.f3 = f3;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      public getOrganizations_result getResult(I iface, getOrganizations_args args) throws org.apache.thrift.TException {
        getOrganizations_result result = new getOrganizations_result();
        try {
          result.success = iface.getOrganizations();
        } 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();
        try {
          result.success = iface.getOperatingSystems();
        } catch (TInvocationException serverError) {
          result.serverError = serverError;
        }
        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();
        try {
          result.success = iface.getVirtualizers();
        } catch (TInvocationException serverError) {
          result.serverError = serverError;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      public getTags_result getResult(I iface, getTags_args args) throws org.apache.thrift.TException {
        getTags_result result = new getTags_result();
        try {
          result.success = iface.getTags(args.startDate);
        } catch (TInvocationException serverError) {
          result.serverError = serverError;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      public getSoftware_result getResult(I iface, getSoftware_args args) throws org.apache.thrift.TException {
        getSoftware_result result = new getSoftware_result();
        try {
          result.success = iface.getSoftware(args.startDate);
        } catch (TInvocationException serverError) {
          result.serverError = serverError;
        }
        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 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("ping", new ping());
      processMap.put("authenticate", new authenticate());
      processMap.put("localAccountLogin", new localAccountLogin());
      processMap.put("setUsedSatellite", new setUsedSatellite());
      processMap.put("findUser", new findUser());
      processMap.put("getPublicImages", new getPublicImages());
      processMap.put("getImageDetails", new getImageDetails());
      processMap.put("getUser", new getUser());
      processMap.put("invalidateSession", new invalidateSession());
      processMap.put("getUserFromToken", new getUserFromToken());
      processMap.put("isServerAuthenticated", new isServerAuthenticated());
      processMap.put("startServerAuthentication", new startServerAuthentication());
      processMap.put("serverAuthenticate", new serverAuthenticate());
      processMap.put("getImageData", new getImageData());
      processMap.put("submitImage", new submitImage());
      processMap.put("registerSatellite", new registerSatellite());
      processMap.put("updateSatellite", new updateSatellite());
      processMap.put("downloadImage", new downloadImage());
      processMap.put("getOrganizations", new getOrganizations());
      processMap.put("getOperatingSystems", new getOperatingSystems());
      processMap.put("getVirtualizers", new getVirtualizers());
      processMap.put("getTags", new getTags());
      processMap.put("getSoftware", new getSoftware());
      processMap.put("queryUploadStatus", new queryUploadStatus());
      return processMap;
    }

    public static class ping<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, ping_args, Boolean> {
      public ping() {
        super("ping");
      }

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

      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<Boolean>() { 
          public void onComplete(Boolean o) {
            ping_result result = new ping_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;
            ping_result result = new ping_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, ping_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
        iface.ping(resultHandler);
      }
    }

    public static class authenticate<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, authenticate_args, SessionData> {
      public authenticate() {
        super("authenticate");
      }

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

      public AsyncMethodCallback<SessionData> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<SessionData>() { 
          public void onComplete(SessionData o) {
            authenticate_result result = new authenticate_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;
            authenticate_result result = new authenticate_result();
            if (e instanceof TAuthorizationException) {
                        result.failure = (TAuthorizationException) e;
                        result.setFailureIsSet(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, authenticate_args args, org.apache.thrift.async.AsyncMethodCallback<SessionData> resultHandler) throws TException {
        iface.authenticate(args.login, args.password,resultHandler);
      }
    }

    public static class localAccountLogin<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, localAccountLogin_args, ClientSessionData> {
      public localAccountLogin() {
        super("localAccountLogin");
      }

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

      public AsyncMethodCallback<ClientSessionData> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<ClientSessionData>() { 
          public void onComplete(ClientSessionData o) {
            localAccountLogin_result result = new localAccountLogin_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;
            localAccountLogin_result result = new localAccountLogin_result();
            if (e instanceof TAuthorizationException) {
                        result.failure = (TAuthorizationException) e;
                        result.setFailureIsSet(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, localAccountLogin_args args, org.apache.thrift.async.AsyncMethodCallback<ClientSessionData> resultHandler) throws TException {
        iface.localAccountLogin(args.login, args.password,resultHandler);
      }
    }

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

      public setUsedSatellite_args getEmptyArgsInstance() {
        return new setUsedSatellite_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) {
            setUsedSatellite_result result = new setUsedSatellite_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;
            setUsedSatellite_result result = new setUsedSatellite_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, setUsedSatellite_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
        iface.setUsedSatellite(args.sessionId, args.satelliteName,resultHandler);
      }
    }

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

      public findUser_args getEmptyArgsInstance() {
        return new findUser_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) {
            findUser_result result = new findUser_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;
            findUser_result result = new findUser_result();
            if (e instanceof TAuthorizationException) {
                        result.failure = (TAuthorizationException) e;
                        result.setFailureIsSet(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, findUser_args args, org.apache.thrift.async.AsyncMethodCallback<List<UserInfo>> resultHandler) throws TException {
        iface.findUser(args.sessionId, args.organizationId, args.searchTerm,resultHandler);
      }
    }

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

      public getPublicImages_args getEmptyArgsInstance() {
        return new getPublicImages_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) {
            getPublicImages_result result = new getPublicImages_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;
            getPublicImages_result result = new getPublicImages_result();
            if (e instanceof TAuthorizationException) {
                        result.failure = (TAuthorizationException) e;
                        result.setFailureIsSet(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, getPublicImages_args args, org.apache.thrift.async.AsyncMethodCallback<List<ImageSummaryRead>> resultHandler) throws TException {
        iface.getPublicImages(args.sessionId, 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.sessionId, args.imageBaseId,resultHandler);
      }
    }

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

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

      public AsyncMethodCallback<UserInfo> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<UserInfo>() { 
          public void onComplete(UserInfo o) {
            getUser_result result = new getUser_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;
            getUser_result result = new getUser_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, getUser_args args, org.apache.thrift.async.AsyncMethodCallback<UserInfo> resultHandler) throws TException {
        iface.getUser(args.userToken, args.userId,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.sessionId,resultHandler);
      }
    }

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

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

      public AsyncMethodCallback<UserInfo> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<UserInfo>() { 
          public void onComplete(UserInfo o) {
            getUserFromToken_result result = new getUserFromToken_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;
            getUserFromToken_result result = new getUserFromToken_result();
            if (e instanceof TInvalidTokenException) {
                        result.failure = (TInvalidTokenException) e;
                        result.setFailureIsSet(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, getUserFromToken_args args, org.apache.thrift.async.AsyncMethodCallback<UserInfo> resultHandler) throws TException {
        iface.getUserFromToken(args.token,resultHandler);
      }
    }

    public static class isServerAuthenticated<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, isServerAuthenticated_args, Boolean> {
      public isServerAuthenticated() {
        super("isServerAuthenticated");
      }

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

      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<Boolean>() { 
          public void onComplete(Boolean o) {
            isServerAuthenticated_result result = new isServerAuthenticated_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;
            isServerAuthenticated_result result = new isServerAuthenticated_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, isServerAuthenticated_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
        iface.isServerAuthenticated(args.serverSessionId,resultHandler);
      }
    }

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

      public startServerAuthentication_args getEmptyArgsInstance() {
        return new startServerAuthentication_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) {
            startServerAuthentication_result result = new startServerAuthentication_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;
            startServerAuthentication_result result = new startServerAuthentication_result();
            if (e instanceof TAuthorizationException) {
                        result.failure = (TAuthorizationException) e;
                        result.setFailureIsSet(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, startServerAuthentication_args args, org.apache.thrift.async.AsyncMethodCallback<ByteBuffer> resultHandler) throws TException {
        iface.startServerAuthentication(args.satelliteId,resultHandler);
      }
    }

    public static class serverAuthenticate<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, serverAuthenticate_args, ServerSessionData> {
      public serverAuthenticate() {
        super("serverAuthenticate");
      }

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

      public AsyncMethodCallback<ServerSessionData> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<ServerSessionData>() { 
          public void onComplete(ServerSessionData o) {
            serverAuthenticate_result result = new serverAuthenticate_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;
            serverAuthenticate_result result = new serverAuthenticate_result();
            if (e instanceof TAuthorizationException) {
                        result.failure = (TAuthorizationException) e;
                        result.setFailureIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TInvocationException) {
                        result.errr = (TInvocationException) e;
                        result.setErrrIsSet(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, serverAuthenticate_args args, org.apache.thrift.async.AsyncMethodCallback<ServerSessionData> resultHandler) throws TException {
        iface.serverAuthenticate(args.satelliteId, args.challengeResponse,resultHandler);
      }
    }

    public static class getImageData<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getImageData_args, ImagePublishData> {
      public getImageData() {
        super("getImageData");
      }

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

      public AsyncMethodCallback<ImagePublishData> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<ImagePublishData>() { 
          public void onComplete(ImagePublishData o) {
            getImageData_result result = new getImageData_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;
            getImageData_result result = new getImageData_result();
            if (e instanceof TAuthorizationException) {
                        result.failure = (TAuthorizationException) e;
                        result.setFailureIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TInvocationException) {
                        result.failure2 = (TInvocationException) e;
                        result.setFailure2IsSet(true);
                        msg = result;
            }
            else             if (e instanceof TNotFoundException) {
                        result.f3 = (TNotFoundException) e;
                        result.setF3IsSet(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, getImageData_args args, org.apache.thrift.async.AsyncMethodCallback<ImagePublishData> resultHandler) throws TException {
        iface.getImageData(args.serverSessionId, args.imageVersionId,resultHandler);
      }
    }

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

      public submitImage_args getEmptyArgsInstance() {
        return new submitImage_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) {
            submitImage_result result = new submitImage_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;
            submitImage_result result = new submitImage_result();
            if (e instanceof TAuthorizationException) {
                        result.failure = (TAuthorizationException) e;
                        result.setFailureIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TInvocationException) {
                        result.failure2 = (TInvocationException) e;
                        result.setFailure2IsSet(true);
                        msg = result;
            }
            else             if (e instanceof TTransferRejectedException) {
                        result.failure3 = (TTransferRejectedException) e;
                        result.setFailure3IsSet(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, submitImage_args args, org.apache.thrift.async.AsyncMethodCallback<TransferInformation> resultHandler) throws TException {
        iface.submitImage(args.userToken, args.imageDescription, args.blockHashes,resultHandler);
      }
    }

    public static class registerSatellite<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, registerSatellite_args, Integer> {
      public registerSatellite() {
        super("registerSatellite");
      }

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

      public AsyncMethodCallback<Integer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<Integer>() { 
          public void onComplete(Integer o) {
            registerSatellite_result result = new registerSatellite_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;
            registerSatellite_result result = new registerSatellite_result();
            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, registerSatellite_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException {
        iface.registerSatellite(args.userToken, args.displayName, args.addresses, args.modulus, args.exponent, args.certsha256,resultHandler);
      }
    }

    public static class updateSatellite<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateSatellite_args, Boolean> {
      public updateSatellite() {
        super("updateSatellite");
      }

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

      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<Boolean>() { 
          public void onComplete(Boolean o) {
            updateSatellite_result result = new updateSatellite_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;
            updateSatellite_result result = new updateSatellite_result();
            if (e instanceof TAuthorizationException) {
                        result.failure = (TAuthorizationException) e;
                        result.setFailureIsSet(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, updateSatellite_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
        iface.updateSatellite(args.serverSessionId, args.displayName, args.addresses,resultHandler);
      }
    }

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

      public downloadImage_args getEmptyArgsInstance() {
        return new downloadImage_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) {
            downloadImage_result result = new downloadImage_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;
            downloadImage_result result = new downloadImage_result();
            if (e instanceof TAuthorizationException) {
                        result.failure = (TAuthorizationException) e;
                        result.setFailureIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TInvocationException) {
                        result.failure2 = (TInvocationException) e;
                        result.setFailure2IsSet(true);
                        msg = result;
            }
            else             if (e instanceof TNotFoundException) {
                        result.f3 = (TNotFoundException) e;
                        result.setF3IsSet(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, downloadImage_args args, org.apache.thrift.async.AsyncMethodCallback<TransferInformation> resultHandler) throws TException {
        iface.downloadImage(args.sessionId, args.imageVersionId,resultHandler);
      }
    }

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

      public getOrganizations_args getEmptyArgsInstance() {
        return new getOrganizations_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) {
            getOrganizations_result result = new getOrganizations_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;
            getOrganizations_result result = new getOrganizations_result();
            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, getOrganizations_args args, org.apache.thrift.async.AsyncMethodCallback<List<Organization>> resultHandler) throws TException {
        iface.getOrganizations(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();
            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, 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();
            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, getVirtualizers_args args, org.apache.thrift.async.AsyncMethodCallback<List<Virtualizer>> resultHandler) throws TException {
        iface.getVirtualizers(resultHandler);
      }
    }

    public static class getTags<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getTags_args, List<MasterTag>> {
      public getTags() {
        super("getTags");
      }

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

      public AsyncMethodCallback<List<MasterTag>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<List<MasterTag>>() { 
          public void onComplete(List<MasterTag> o) {
            getTags_result result = new getTags_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;
            getTags_result result = new getTags_result();
            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, getTags_args args, org.apache.thrift.async.AsyncMethodCallback<List<MasterTag>> resultHandler) throws TException {
        iface.getTags(args.startDate,resultHandler);
      }
    }

    public static class getSoftware<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getSoftware_args, List<MasterSoftware>> {
      public getSoftware() {
        super("getSoftware");
      }

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

      public AsyncMethodCallback<List<MasterSoftware>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<List<MasterSoftware>>() { 
          public void onComplete(List<MasterSoftware> o) {
            getSoftware_result result = new getSoftware_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;
            getSoftware_result result = new getSoftware_result();
            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, getSoftware_args args, org.apache.thrift.async.AsyncMethodCallback<List<MasterSoftware>> resultHandler) throws TException {
        iface.getSoftware(args.startDate,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 ping_args implements org.apache.thrift.TBase<ping_args, ping_args._Fields>, java.io.Serializable, Cloneable, Comparable<ping_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ping_args");


    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new ping_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new ping_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(ping_args.class, metaDataMap);
    }

    public ping_args() {
    }

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

    public ping_args deepCopy() {
      return new ping_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 ping_args)
        return this.equals((ping_args)that);
      return false;
    }

    public boolean equals(ping_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(ping_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("ping_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 ping_argsStandardSchemeFactory implements SchemeFactory {
      public ping_argsStandardScheme getScheme() {
        return new ping_argsStandardScheme();
      }
    }

    private static class ping_argsStandardScheme extends StandardScheme<ping_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, ping_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, ping_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class ping_argsTupleSchemeFactory implements SchemeFactory {
      public ping_argsTupleScheme getScheme() {
        return new ping_argsTupleScheme();
      }
    }

    private static class ping_argsTupleScheme extends TupleScheme<ping_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, ping_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, ping_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
      }
    }

  }

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

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

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

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

    public ping_result() {
    }

    public ping_result(
      boolean success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

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

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

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

    public boolean isSuccess() {
      return this.success;
    }

    public ping_result setSuccess(boolean 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((Boolean)value);
        }
        break;

      }
    }

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

      }
      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 ping_result)
        return this.equals((ping_result)that);
      return false;
    }

    public boolean equals(ping_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(ping_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("ping_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 ping_resultStandardSchemeFactory implements SchemeFactory {
      public ping_resultStandardScheme getScheme() {
        return new ping_resultStandardScheme();
      }
    }

    private static class ping_resultStandardScheme extends StandardScheme<ping_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, ping_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.BOOL) {
                struct.success = iprot.readBool();
                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, ping_result struct) throws org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class ping_resultTupleSchemeFactory implements SchemeFactory {
      public ping_resultTupleScheme getScheme() {
        return new ping_resultTupleScheme();
      }
    }

    private static class ping_resultTupleScheme extends TupleScheme<ping_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, ping_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.writeBool(struct.success);
        }
      }

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

  }

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

    private static final org.apache.thrift.protocol.TField LOGIN_FIELD_DESC = new org.apache.thrift.protocol.TField("login", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("password", 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 authenticate_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new authenticate_argsTupleSchemeFactory());
    }

    public String login; // required
    public String password; // 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 {
      LOGIN((short)1, "login"),
      PASSWORD((short)2, "password");

      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: // LOGIN
            return LOGIN;
          case 2: // PASSWORD
            return PASSWORD;
          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.LOGIN, new org.apache.thrift.meta_data.FieldMetaData("login", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.PASSWORD, new org.apache.thrift.meta_data.FieldMetaData("password", 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(authenticate_args.class, metaDataMap);
    }

    public authenticate_args() {
    }

    public authenticate_args(
      String login,
      String password)
    {
      this();
      this.login = login;
      this.password = password;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public authenticate_args(authenticate_args other) {
      if (other.isSetLogin()) {
        this.login = other.login;
      }
      if (other.isSetPassword()) {
        this.password = other.password;
      }
    }

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

    @Override
    public void clear() {
      this.login = null;
      this.password = null;
    }

    public String getLogin() {
      return this.login;
    }

    public authenticate_args setLogin(String login) {
      this.login = login;
      return this;
    }

    public void unsetLogin() {
      this.login = null;
    }

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

    public void setLoginIsSet(boolean value) {
      if (!value) {
        this.login = null;
      }
    }

    public String getPassword() {
      return this.password;
    }

    public authenticate_args setPassword(String password) {
      this.password = password;
      return this;
    }

    public void unsetPassword() {
      this.password = null;
    }

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

    public void setPasswordIsSet(boolean value) {
      if (!value) {
        this.password = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case LOGIN:
        if (value == null) {
          unsetLogin();
        } else {
          setLogin((String)value);
        }
        break;

      case PASSWORD:
        if (value == null) {
          unsetPassword();
        } else {
          setPassword((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case LOGIN:
        return getLogin();

      case PASSWORD:
        return getPassword();

      }
      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 LOGIN:
        return isSetLogin();
      case PASSWORD:
        return isSetPassword();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_login = true && this.isSetLogin();
      boolean that_present_login = true && that.isSetLogin();
      if (this_present_login || that_present_login) {
        if (!(this_present_login && that_present_login))
          return false;
        if (!this.login.equals(that.login))
          return false;
      }

      boolean this_present_password = true && this.isSetPassword();
      boolean that_present_password = true && that.isSetPassword();
      if (this_present_password || that_present_password) {
        if (!(this_present_password && that_present_password))
          return false;
        if (!this.password.equals(that.password))
          return false;
      }

      return true;
    }

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

      boolean present_login = true && (isSetLogin());
      list.add(present_login);
      if (present_login)
        list.add(login);

      boolean present_password = true && (isSetPassword());
      list.add(present_password);
      if (present_password)
        list.add(password);

      return list.hashCode();
    }

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

      int lastComparison = 0;

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

      sb.append("login:");
      if (this.login == null) {
        sb.append("null");
      } else {
        sb.append(this.login);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("password:");
      if (this.password == null) {
        sb.append("null");
      } else {
        sb.append(this.password);
      }
      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 authenticate_argsStandardSchemeFactory implements SchemeFactory {
      public authenticate_argsStandardScheme getScheme() {
        return new authenticate_argsStandardScheme();
      }
    }

    private static class authenticate_argsStandardScheme extends StandardScheme<authenticate_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, authenticate_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: // LOGIN
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.login = iprot.readString();
                struct.setLoginIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // PASSWORD
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.password = iprot.readString();
                struct.setPasswordIsSet(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, authenticate_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.login != null) {
          oprot.writeFieldBegin(LOGIN_FIELD_DESC);
          oprot.writeString(struct.login);
          oprot.writeFieldEnd();
        }
        if (struct.password != null) {
          oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
          oprot.writeString(struct.password);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class authenticate_argsTupleSchemeFactory implements SchemeFactory {
      public authenticate_argsTupleScheme getScheme() {
        return new authenticate_argsTupleScheme();
      }
    }

    private static class authenticate_argsTupleScheme extends TupleScheme<authenticate_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, authenticate_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetLogin()) {
          optionals.set(0);
        }
        if (struct.isSetPassword()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetLogin()) {
          oprot.writeString(struct.login);
        }
        if (struct.isSetPassword()) {
          oprot.writeString(struct.password);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, authenticate_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.login = iprot.readString();
          struct.setLoginIsSet(true);
        }
        if (incoming.get(1)) {
          struct.password = iprot.readString();
          struct.setPasswordIsSet(true);
        }
      }
    }

  }

  public static class authenticate_result implements org.apache.thrift.TBase<authenticate_result, authenticate_result._Fields>, java.io.Serializable, Cloneable, Comparable<authenticate_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("authenticate_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 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 authenticate_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new authenticate_resultTupleSchemeFactory());
    }

    public SessionData success; // required
    public TAuthorizationException failure; // 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"),
      FAILURE((short)1, "failure"),
      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: // FAILURE
            return FAILURE;
          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.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SessionData.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.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(authenticate_result.class, metaDataMap);
    }

    public authenticate_result() {
    }

    public authenticate_result(
      SessionData success,
      TAuthorizationException failure,
      TInvocationException error)
    {
      this();
      this.success = success;
      this.failure = failure;
      this.error = error;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public authenticate_result(authenticate_result other) {
      if (other.isSetSuccess()) {
        this.success = new SessionData(other.success);
      }
      if (other.isSetFailure()) {
        this.failure = new TAuthorizationException(other.failure);
      }
      if (other.isSetError()) {
        this.error = new TInvocationException(other.error);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.failure = null;
      this.error = null;
    }

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

    public authenticate_result setSuccess(SessionData 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 authenticate_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 getError() {
      return this.error;
    }

    public authenticate_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((SessionData)value);
        }
        break;

      case FAILURE:
        if (value == null) {
          unsetFailure();
        } else {
          setFailure((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 FAILURE:
        return getFailure();

      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 FAILURE:
        return isSetFailure();
      case ERROR:
        return isSetError();
      }
      throw new IllegalStateException();
    }

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

    public boolean equals(authenticate_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_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_failure = true && (isSetFailure());
      list.add(present_failure);
      if (present_failure)
        list.add(failure);

      boolean present_error = true && (isSetError());
      list.add(present_error);
      if (present_error)
        list.add(error);

      return list.hashCode();
    }

    @Override
    public int compareTo(authenticate_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(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("authenticate_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("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
      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 authenticate_resultStandardSchemeFactory implements SchemeFactory {
      public authenticate_resultStandardScheme getScheme() {
        return new authenticate_resultStandardScheme();
      }
    }

    private static class authenticate_resultStandardScheme extends StandardScheme<authenticate_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, authenticate_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 SessionData();
                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: // 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, authenticate_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.error != null) {
          oprot.writeFieldBegin(ERROR_FIELD_DESC);
          struct.error.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class authenticate_resultTupleSchemeFactory implements SchemeFactory {
      public authenticate_resultTupleScheme getScheme() {
        return new authenticate_resultTupleScheme();
      }
    }

    private static class authenticate_resultTupleScheme extends TupleScheme<authenticate_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, authenticate_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.isSetError()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetFailure()) {
          struct.failure.write(oprot);
        }
        if (struct.isSetError()) {
          struct.error.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, authenticate_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.success = new SessionData();
          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.error = new TInvocationException();
          struct.error.read(iprot);
          struct.setErrorIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField LOGIN_FIELD_DESC = new org.apache.thrift.protocol.TField("login", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("password", 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 localAccountLogin_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new localAccountLogin_argsTupleSchemeFactory());
    }

    public String login; // required
    public String password; // 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 {
      LOGIN((short)1, "login"),
      PASSWORD((short)2, "password");

      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: // LOGIN
            return LOGIN;
          case 2: // PASSWORD
            return PASSWORD;
          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.LOGIN, new org.apache.thrift.meta_data.FieldMetaData("login", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.PASSWORD, new org.apache.thrift.meta_data.FieldMetaData("password", 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(localAccountLogin_args.class, metaDataMap);
    }

    public localAccountLogin_args() {
    }

    public localAccountLogin_args(
      String login,
      String password)
    {
      this();
      this.login = login;
      this.password = password;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public localAccountLogin_args(localAccountLogin_args other) {
      if (other.isSetLogin()) {
        this.login = other.login;
      }
      if (other.isSetPassword()) {
        this.password = other.password;
      }
    }

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

    @Override
    public void clear() {
      this.login = null;
      this.password = null;
    }

    public String getLogin() {
      return this.login;
    }

    public localAccountLogin_args setLogin(String login) {
      this.login = login;
      return this;
    }

    public void unsetLogin() {
      this.login = null;
    }

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

    public void setLoginIsSet(boolean value) {
      if (!value) {
        this.login = null;
      }
    }

    public String getPassword() {
      return this.password;
    }

    public localAccountLogin_args setPassword(String password) {
      this.password = password;
      return this;
    }

    public void unsetPassword() {
      this.password = null;
    }

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

    public void setPasswordIsSet(boolean value) {
      if (!value) {
        this.password = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case LOGIN:
        if (value == null) {
          unsetLogin();
        } else {
          setLogin((String)value);
        }
        break;

      case PASSWORD:
        if (value == null) {
          unsetPassword();
        } else {
          setPassword((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case LOGIN:
        return getLogin();

      case PASSWORD:
        return getPassword();

      }
      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 LOGIN:
        return isSetLogin();
      case PASSWORD:
        return isSetPassword();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_login = true && this.isSetLogin();
      boolean that_present_login = true && that.isSetLogin();
      if (this_present_login || that_present_login) {
        if (!(this_present_login && that_present_login))
          return false;
        if (!this.login.equals(that.login))
          return false;
      }

      boolean this_present_password = true && this.isSetPassword();
      boolean that_present_password = true && that.isSetPassword();
      if (this_present_password || that_present_password) {
        if (!(this_present_password && that_present_password))
          return false;
        if (!this.password.equals(that.password))
          return false;
      }

      return true;
    }

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

      boolean present_login = true && (isSetLogin());
      list.add(present_login);
      if (present_login)
        list.add(login);

      boolean present_password = true && (isSetPassword());
      list.add(present_password);
      if (present_password)
        list.add(password);

      return list.hashCode();
    }

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

      int lastComparison = 0;

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

      sb.append("login:");
      if (this.login == null) {
        sb.append("null");
      } else {
        sb.append(this.login);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("password:");
      if (this.password == null) {
        sb.append("null");
      } else {
        sb.append(this.password);
      }
      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 localAccountLogin_argsStandardSchemeFactory implements SchemeFactory {
      public localAccountLogin_argsStandardScheme getScheme() {
        return new localAccountLogin_argsStandardScheme();
      }
    }

    private static class localAccountLogin_argsStandardScheme extends StandardScheme<localAccountLogin_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, localAccountLogin_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: // LOGIN
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.login = iprot.readString();
                struct.setLoginIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // PASSWORD
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.password = iprot.readString();
                struct.setPasswordIsSet(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, localAccountLogin_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.login != null) {
          oprot.writeFieldBegin(LOGIN_FIELD_DESC);
          oprot.writeString(struct.login);
          oprot.writeFieldEnd();
        }
        if (struct.password != null) {
          oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
          oprot.writeString(struct.password);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class localAccountLogin_argsTupleSchemeFactory implements SchemeFactory {
      public localAccountLogin_argsTupleScheme getScheme() {
        return new localAccountLogin_argsTupleScheme();
      }
    }

    private static class localAccountLogin_argsTupleScheme extends TupleScheme<localAccountLogin_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, localAccountLogin_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetLogin()) {
          optionals.set(0);
        }
        if (struct.isSetPassword()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetLogin()) {
          oprot.writeString(struct.login);
        }
        if (struct.isSetPassword()) {
          oprot.writeString(struct.password);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, localAccountLogin_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.login = iprot.readString();
          struct.setLoginIsSet(true);
        }
        if (incoming.get(1)) {
          struct.password = iprot.readString();
          struct.setPasswordIsSet(true);
        }
      }
    }

  }

  public static class localAccountLogin_result implements org.apache.thrift.TBase<localAccountLogin_result, localAccountLogin_result._Fields>, java.io.Serializable, Cloneable, Comparable<localAccountLogin_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("localAccountLogin_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 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 localAccountLogin_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new localAccountLogin_resultTupleSchemeFactory());
    }

    public ClientSessionData success; // required
    public TAuthorizationException failure; // 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"),
      FAILURE((short)1, "failure"),
      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: // FAILURE
            return FAILURE;
          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.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ClientSessionData.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.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(localAccountLogin_result.class, metaDataMap);
    }

    public localAccountLogin_result() {
    }

    public localAccountLogin_result(
      ClientSessionData success,
      TAuthorizationException failure,
      TInvocationException error)
    {
      this();
      this.success = success;
      this.failure = failure;
      this.error = error;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public localAccountLogin_result(localAccountLogin_result other) {
      if (other.isSetSuccess()) {
        this.success = new ClientSessionData(other.success);
      }
      if (other.isSetFailure()) {
        this.failure = new TAuthorizationException(other.failure);
      }
      if (other.isSetError()) {
        this.error = new TInvocationException(other.error);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.failure = null;
      this.error = null;
    }

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

    public localAccountLogin_result setSuccess(ClientSessionData 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 localAccountLogin_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 getError() {
      return this.error;
    }

    public localAccountLogin_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((ClientSessionData)value);
        }
        break;

      case FAILURE:
        if (value == null) {
          unsetFailure();
        } else {
          setFailure((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 FAILURE:
        return getFailure();

      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 FAILURE:
        return isSetFailure();
      case ERROR:
        return isSetError();
      }
      throw new IllegalStateException();
    }

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

    public boolean equals(localAccountLogin_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_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_failure = true && (isSetFailure());
      list.add(present_failure);
      if (present_failure)
        list.add(failure);

      boolean present_error = true && (isSetError());
      list.add(present_error);
      if (present_error)
        list.add(error);

      return list.hashCode();
    }

    @Override
    public int compareTo(localAccountLogin_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(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("localAccountLogin_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("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
      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 localAccountLogin_resultStandardSchemeFactory implements SchemeFactory {
      public localAccountLogin_resultStandardScheme getScheme() {
        return new localAccountLogin_resultStandardScheme();
      }
    }

    private static class localAccountLogin_resultStandardScheme extends StandardScheme<localAccountLogin_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, localAccountLogin_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 ClientSessionData();
                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: // 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, localAccountLogin_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.error != null) {
          oprot.writeFieldBegin(ERROR_FIELD_DESC);
          struct.error.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class localAccountLogin_resultTupleSchemeFactory implements SchemeFactory {
      public localAccountLogin_resultTupleScheme getScheme() {
        return new localAccountLogin_resultTupleScheme();
      }
    }

    private static class localAccountLogin_resultTupleScheme extends TupleScheme<localAccountLogin_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, localAccountLogin_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.isSetError()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetFailure()) {
          struct.failure.write(oprot);
        }
        if (struct.isSetError()) {
          struct.error.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, localAccountLogin_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.success = new ClientSessionData();
          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.error = new TInvocationException();
          struct.error.read(iprot);
          struct.setErrorIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField SATELLITE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("satelliteName", 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 setUsedSatellite_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new setUsedSatellite_argsTupleSchemeFactory());
    }

    public String sessionId; // required
    public String satelliteName; // 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 {
      SESSION_ID((short)1, "sessionId"),
      SATELLITE_NAME((short)2, "satelliteName");

      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: // SESSION_ID
            return SESSION_ID;
          case 2: // SATELLITE_NAME
            return SATELLITE_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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "Token")));
      tmpMap.put(_Fields.SATELLITE_NAME, new org.apache.thrift.meta_data.FieldMetaData("satelliteName", 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(setUsedSatellite_args.class, metaDataMap);
    }

    public setUsedSatellite_args() {
    }

    public setUsedSatellite_args(
      String sessionId,
      String satelliteName)
    {
      this();
      this.sessionId = sessionId;
      this.satelliteName = satelliteName;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public setUsedSatellite_args(setUsedSatellite_args other) {
      if (other.isSetSessionId()) {
        this.sessionId = other.sessionId;
      }
      if (other.isSetSatelliteName()) {
        this.satelliteName = other.satelliteName;
      }
    }

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

    @Override
    public void clear() {
      this.sessionId = null;
      this.satelliteName = null;
    }

    public String getSessionId() {
      return this.sessionId;
    }

    public setUsedSatellite_args setSessionId(String sessionId) {
      this.sessionId = sessionId;
      return this;
    }

    public void unsetSessionId() {
      this.sessionId = null;
    }

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

    public void setSessionIdIsSet(boolean value) {
      if (!value) {
        this.sessionId = null;
      }
    }

    public String getSatelliteName() {
      return this.satelliteName;
    }

    public setUsedSatellite_args setSatelliteName(String satelliteName) {
      this.satelliteName = satelliteName;
      return this;
    }

    public void unsetSatelliteName() {
      this.satelliteName = null;
    }

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

    public void setSatelliteNameIsSet(boolean value) {
      if (!value) {
        this.satelliteName = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SESSION_ID:
        if (value == null) {
          unsetSessionId();
        } else {
          setSessionId((String)value);
        }
        break;

      case SATELLITE_NAME:
        if (value == null) {
          unsetSatelliteName();
        } else {
          setSatelliteName((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SESSION_ID:
        return getSessionId();

      case SATELLITE_NAME:
        return getSatelliteName();

      }
      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 SESSION_ID:
        return isSetSessionId();
      case SATELLITE_NAME:
        return isSetSatelliteName();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_sessionId = true && this.isSetSessionId();
      boolean that_present_sessionId = true && that.isSetSessionId();
      if (this_present_sessionId || that_present_sessionId) {
        if (!(this_present_sessionId && that_present_sessionId))
          return false;
        if (!this.sessionId.equals(that.sessionId))
          return false;
      }

      boolean this_present_satelliteName = true && this.isSetSatelliteName();
      boolean that_present_satelliteName = true && that.isSetSatelliteName();
      if (this_present_satelliteName || that_present_satelliteName) {
        if (!(this_present_satelliteName && that_present_satelliteName))
          return false;
        if (!this.satelliteName.equals(that.satelliteName))
          return false;
      }

      return true;
    }

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

      boolean present_sessionId = true && (isSetSessionId());
      list.add(present_sessionId);
      if (present_sessionId)
        list.add(sessionId);

      boolean present_satelliteName = true && (isSetSatelliteName());
      list.add(present_satelliteName);
      if (present_satelliteName)
        list.add(satelliteName);

      return list.hashCode();
    }

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

      int lastComparison = 0;

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

      sb.append("sessionId:");
      if (this.sessionId == null) {
        sb.append("null");
      } else {
        sb.append(this.sessionId);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("satelliteName:");
      if (this.satelliteName == null) {
        sb.append("null");
      } else {
        sb.append(this.satelliteName);
      }
      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 setUsedSatellite_argsStandardSchemeFactory implements SchemeFactory {
      public setUsedSatellite_argsStandardScheme getScheme() {
        return new setUsedSatellite_argsStandardScheme();
      }
    }

    private static class setUsedSatellite_argsStandardScheme extends StandardScheme<setUsedSatellite_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, setUsedSatellite_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: // SESSION_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.sessionId = iprot.readString();
                struct.setSessionIdIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // SATELLITE_NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.satelliteName = iprot.readString();
                struct.setSatelliteNameIsSet(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, setUsedSatellite_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.sessionId != null) {
          oprot.writeFieldBegin(SESSION_ID_FIELD_DESC);
          oprot.writeString(struct.sessionId);
          oprot.writeFieldEnd();
        }
        if (struct.satelliteName != null) {
          oprot.writeFieldBegin(SATELLITE_NAME_FIELD_DESC);
          oprot.writeString(struct.satelliteName);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class setUsedSatellite_argsTupleSchemeFactory implements SchemeFactory {
      public setUsedSatellite_argsTupleScheme getScheme() {
        return new setUsedSatellite_argsTupleScheme();
      }
    }

    private static class setUsedSatellite_argsTupleScheme extends TupleScheme<setUsedSatellite_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, setUsedSatellite_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSessionId()) {
          optionals.set(0);
        }
        if (struct.isSetSatelliteName()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSessionId()) {
          oprot.writeString(struct.sessionId);
        }
        if (struct.isSetSatelliteName()) {
          oprot.writeString(struct.satelliteName);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, setUsedSatellite_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.sessionId = iprot.readString();
          struct.setSessionIdIsSet(true);
        }
        if (incoming.get(1)) {
          struct.satelliteName = iprot.readString();
          struct.setSatelliteNameIsSet(true);
        }
      }
    }

  }

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


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


    /** 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(setUsedSatellite_result.class, metaDataMap);
    }

    public setUsedSatellite_result() {
    }

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

    public setUsedSatellite_result deepCopy() {
      return new setUsedSatellite_result(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 setUsedSatellite_result)
        return this.equals((setUsedSatellite_result)that);
      return false;
    }

    public boolean equals(setUsedSatellite_result 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(setUsedSatellite_result 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("setUsedSatellite_result(");
      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 setUsedSatellite_resultStandardSchemeFactory implements SchemeFactory {
      public setUsedSatellite_resultStandardScheme getScheme() {
        return new setUsedSatellite_resultStandardScheme();
      }
    }

    private static class setUsedSatellite_resultStandardScheme extends StandardScheme<setUsedSatellite_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, setUsedSatellite_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) {
            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, setUsedSatellite_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class setUsedSatellite_resultTupleSchemeFactory implements SchemeFactory {
      public setUsedSatellite_resultTupleScheme getScheme() {
        return new setUsedSatellite_resultTupleScheme();
      }
    }

    private static class setUsedSatellite_resultTupleScheme extends TupleScheme<setUsedSatellite_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, setUsedSatellite_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, setUsedSatellite_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField ORGANIZATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("organizationId", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField SEARCH_TERM_FIELD_DESC = new org.apache.thrift.protocol.TField("searchTerm", 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 findUser_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new findUser_argsTupleSchemeFactory());
    }

    public String sessionId; // required
    public String organizationId; // required
    public String searchTerm; // 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 {
      SESSION_ID((short)1, "sessionId"),
      ORGANIZATION_ID((short)2, "organizationId"),
      SEARCH_TERM((short)3, "searchTerm");

      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: // SESSION_ID
            return SESSION_ID;
          case 2: // ORGANIZATION_ID
            return ORGANIZATION_ID;
          case 3: // SEARCH_TERM
            return SEARCH_TERM;
          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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "Token")));
      tmpMap.put(_Fields.ORGANIZATION_ID, new org.apache.thrift.meta_data.FieldMetaData("organizationId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.SEARCH_TERM, new org.apache.thrift.meta_data.FieldMetaData("searchTerm", 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(findUser_args.class, metaDataMap);
    }

    public findUser_args() {
    }

    public findUser_args(
      String sessionId,
      String organizationId,
      String searchTerm)
    {
      this();
      this.sessionId = sessionId;
      this.organizationId = organizationId;
      this.searchTerm = searchTerm;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public findUser_args(findUser_args other) {
      if (other.isSetSessionId()) {
        this.sessionId = other.sessionId;
      }
      if (other.isSetOrganizationId()) {
        this.organizationId = other.organizationId;
      }
      if (other.isSetSearchTerm()) {
        this.searchTerm = other.searchTerm;
      }
    }

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

    @Override
    public void clear() {
      this.sessionId = null;
      this.organizationId = null;
      this.searchTerm = null;
    }

    public String getSessionId() {
      return this.sessionId;
    }

    public findUser_args setSessionId(String sessionId) {
      this.sessionId = sessionId;
      return this;
    }

    public void unsetSessionId() {
      this.sessionId = null;
    }

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

    public void setSessionIdIsSet(boolean value) {
      if (!value) {
        this.sessionId = null;
      }
    }

    public String getOrganizationId() {
      return this.organizationId;
    }

    public findUser_args setOrganizationId(String organizationId) {
      this.organizationId = organizationId;
      return this;
    }

    public void unsetOrganizationId() {
      this.organizationId = null;
    }

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

    public void setOrganizationIdIsSet(boolean value) {
      if (!value) {
        this.organizationId = null;
      }
    }

    public String getSearchTerm() {
      return this.searchTerm;
    }

    public findUser_args setSearchTerm(String searchTerm) {
      this.searchTerm = searchTerm;
      return this;
    }

    public void unsetSearchTerm() {
      this.searchTerm = null;
    }

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

    public void setSearchTermIsSet(boolean value) {
      if (!value) {
        this.searchTerm = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SESSION_ID:
        if (value == null) {
          unsetSessionId();
        } else {
          setSessionId((String)value);
        }
        break;

      case ORGANIZATION_ID:
        if (value == null) {
          unsetOrganizationId();
        } else {
          setOrganizationId((String)value);
        }
        break;

      case SEARCH_TERM:
        if (value == null) {
          unsetSearchTerm();
        } else {
          setSearchTerm((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SESSION_ID:
        return getSessionId();

      case ORGANIZATION_ID:
        return getOrganizationId();

      case SEARCH_TERM:
        return getSearchTerm();

      }
      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 SESSION_ID:
        return isSetSessionId();
      case ORGANIZATION_ID:
        return isSetOrganizationId();
      case SEARCH_TERM:
        return isSetSearchTerm();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_sessionId = true && this.isSetSessionId();
      boolean that_present_sessionId = true && that.isSetSessionId();
      if (this_present_sessionId || that_present_sessionId) {
        if (!(this_present_sessionId && that_present_sessionId))
          return false;
        if (!this.sessionId.equals(that.sessionId))
          return false;
      }

      boolean this_present_organizationId = true && this.isSetOrganizationId();
      boolean that_present_organizationId = true && that.isSetOrganizationId();
      if (this_present_organizationId || that_present_organizationId) {
        if (!(this_present_organizationId && that_present_organizationId))
          return false;
        if (!this.organizationId.equals(that.organizationId))
          return false;
      }

      boolean this_present_searchTerm = true && this.isSetSearchTerm();
      boolean that_present_searchTerm = true && that.isSetSearchTerm();
      if (this_present_searchTerm || that_present_searchTerm) {
        if (!(this_present_searchTerm && that_present_searchTerm))
          return false;
        if (!this.searchTerm.equals(that.searchTerm))
          return false;
      }

      return true;
    }

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

      boolean present_sessionId = true && (isSetSessionId());
      list.add(present_sessionId);
      if (present_sessionId)
        list.add(sessionId);

      boolean present_organizationId = true && (isSetOrganizationId());
      list.add(present_organizationId);
      if (present_organizationId)
        list.add(organizationId);

      boolean present_searchTerm = true && (isSetSearchTerm());
      list.add(present_searchTerm);
      if (present_searchTerm)
        list.add(searchTerm);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSessionId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetOrganizationId()).compareTo(other.isSetOrganizationId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetOrganizationId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.organizationId, other.organizationId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSearchTerm()).compareTo(other.isSetSearchTerm());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSearchTerm()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.searchTerm, other.searchTerm);
        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("findUser_args(");
      boolean first = true;

      sb.append("sessionId:");
      if (this.sessionId == null) {
        sb.append("null");
      } else {
        sb.append(this.sessionId);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("organizationId:");
      if (this.organizationId == null) {
        sb.append("null");
      } else {
        sb.append(this.organizationId);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("searchTerm:");
      if (this.searchTerm == null) {
        sb.append("null");
      } else {
        sb.append(this.searchTerm);
      }
      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 findUser_argsStandardSchemeFactory implements SchemeFactory {
      public findUser_argsStandardScheme getScheme() {
        return new findUser_argsStandardScheme();
      }
    }

    private static class findUser_argsStandardScheme extends StandardScheme<findUser_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, findUser_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: // SESSION_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.sessionId = iprot.readString();
                struct.setSessionIdIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // ORGANIZATION_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.organizationId = iprot.readString();
                struct.setOrganizationIdIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // SEARCH_TERM
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.searchTerm = iprot.readString();
                struct.setSearchTermIsSet(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, findUser_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.sessionId != null) {
          oprot.writeFieldBegin(SESSION_ID_FIELD_DESC);
          oprot.writeString(struct.sessionId);
          oprot.writeFieldEnd();
        }
        if (struct.organizationId != null) {
          oprot.writeFieldBegin(ORGANIZATION_ID_FIELD_DESC);
          oprot.writeString(struct.organizationId);
          oprot.writeFieldEnd();
        }
        if (struct.searchTerm != null) {
          oprot.writeFieldBegin(SEARCH_TERM_FIELD_DESC);
          oprot.writeString(struct.searchTerm);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class findUser_argsTupleSchemeFactory implements SchemeFactory {
      public findUser_argsTupleScheme getScheme() {
        return new findUser_argsTupleScheme();
      }
    }

    private static class findUser_argsTupleScheme extends TupleScheme<findUser_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, findUser_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSessionId()) {
          optionals.set(0);
        }
        if (struct.isSetOrganizationId()) {
          optionals.set(1);
        }
        if (struct.isSetSearchTerm()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetSessionId()) {
          oprot.writeString(struct.sessionId);
        }
        if (struct.isSetOrganizationId()) {
          oprot.writeString(struct.organizationId);
        }
        if (struct.isSetSearchTerm()) {
          oprot.writeString(struct.searchTerm);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, findUser_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.sessionId = iprot.readString();
          struct.setSessionIdIsSet(true);
        }
        if (incoming.get(1)) {
          struct.organizationId = iprot.readString();
          struct.setOrganizationIdIsSet(true);
        }
        if (incoming.get(2)) {
          struct.searchTerm = iprot.readString();
          struct.setSearchTermIsSet(true);
        }
      }
    }

  }

  public static class findUser_result implements org.apache.thrift.TBase<findUser_result, findUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<findUser_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("findUser_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 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 findUser_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new findUser_resultTupleSchemeFactory());
    }

    public List<UserInfo> success; // required
    public TAuthorizationException failure; // 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"),
      FAILURE((short)1, "failure"),
      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: // FAILURE
            return FAILURE;
          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.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.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(findUser_result.class, metaDataMap);
    }

    public findUser_result() {
    }

    public findUser_result(
      List<UserInfo> success,
      TAuthorizationException failure,
      TInvocationException error)
    {
      this();
      this.success = success;
      this.failure = failure;
      this.error = error;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public findUser_result(findUser_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.isSetError()) {
        this.error = new TInvocationException(other.error);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.failure = null;
      this.error = 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 findUser_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 findUser_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 getError() {
      return this.error;
    }

    public findUser_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((List<UserInfo>)value);
        }
        break;

      case FAILURE:
        if (value == null) {
          unsetFailure();
        } else {
          setFailure((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 FAILURE:
        return getFailure();

      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 FAILURE:
        return isSetFailure();
      case ERROR:
        return isSetError();
      }
      throw new IllegalStateException();
    }

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

    public boolean equals(findUser_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_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_failure = true && (isSetFailure());
      list.add(present_failure);
      if (present_failure)
        list.add(failure);

      boolean present_error = true && (isSetError());
      list.add(present_error);
      if (present_error)
        list.add(error);

      return list.hashCode();
    }

    @Override
    public int compareTo(findUser_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(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("findUser_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("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 findUser_resultStandardSchemeFactory implements SchemeFactory {
      public findUser_resultStandardScheme getScheme() {
        return new findUser_resultStandardScheme();
      }
    }

    private static class findUser_resultStandardScheme extends StandardScheme<findUser_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, findUser_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 _list306 = iprot.readListBegin();
                  struct.success = new ArrayList<UserInfo>(_list306.size);
                  UserInfo _elem307;
                  for (int _i308 = 0; _i308 < _list306.size; ++_i308)
                  {
                    _elem307 = new UserInfo();
                    _elem307.read(iprot);
                    struct.success.add(_elem307);
                  }
                  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: // 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, findUser_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 _iter309 : struct.success)
            {
              _iter309.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.failure != null) {
          oprot.writeFieldBegin(FAILURE_FIELD_DESC);
          struct.failure.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 findUser_resultTupleSchemeFactory implements SchemeFactory {
      public findUser_resultTupleScheme getScheme() {
        return new findUser_resultTupleScheme();
      }
    }

    private static class findUser_resultTupleScheme extends TupleScheme<findUser_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, findUser_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.isSetError()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (UserInfo _iter310 : struct.success)
            {
              _iter310.write(oprot);
            }
          }
        }
        if (struct.isSetFailure()) {
          struct.failure.write(oprot);
        }
        if (struct.isSetError()) {
          struct.error.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, findUser_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 _list311 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
            struct.success = new ArrayList<UserInfo>(_list311.size);
            UserInfo _elem312;
            for (int _i313 = 0; _i313 < _list311.size; ++_i313)
            {
              _elem312 = new UserInfo();
              _elem312.read(iprot);
              struct.success.add(_elem312);
            }
          }
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.failure = new TAuthorizationException();
          struct.failure.read(iprot);
          struct.setFailureIsSet(true);
        }
        if (incoming.get(2)) {
          struct.error = new TInvocationException();
          struct.error.read(iprot);
          struct.setErrorIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", 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 getPublicImages_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getPublicImages_argsTupleSchemeFactory());
    }

    public String sessionId; // 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 {
      SESSION_ID((short)1, "sessionId"),
      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: // SESSION_ID
            return SESSION_ID;
          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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", 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(getPublicImages_args.class, metaDataMap);
    }

    public getPublicImages_args() {
    }

    public getPublicImages_args(
      String sessionId,
      int page)
    {
      this();
      this.sessionId = sessionId;
      this.page = page;
      setPageIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getPublicImages_args(getPublicImages_args other) {
      __isset_bitfield = other.__isset_bitfield;
      if (other.isSetSessionId()) {
        this.sessionId = other.sessionId;
      }
      this.page = other.page;
    }

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

    @Override
    public void clear() {
      this.sessionId = null;
      setPageIsSet(false);
      this.page = 0;
    }

    public String getSessionId() {
      return this.sessionId;
    }

    public getPublicImages_args setSessionId(String sessionId) {
      this.sessionId = sessionId;
      return this;
    }

    public void unsetSessionId() {
      this.sessionId = null;
    }

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

    public void setSessionIdIsSet(boolean value) {
      if (!value) {
        this.sessionId = null;
      }
    }

    public int getPage() {
      return this.page;
    }

    public getPublicImages_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 SESSION_ID:
        if (value == null) {
          unsetSessionId();
        } else {
          setSessionId((String)value);
        }
        break;

      case PAGE:
        if (value == null) {
          unsetPage();
        } else {
          setPage((Integer)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SESSION_ID:
        return getSessionId();

      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 SESSION_ID:
        return isSetSessionId();
      case PAGE:
        return isSetPage();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_sessionId = true && this.isSetSessionId();
      boolean that_present_sessionId = true && that.isSetSessionId();
      if (this_present_sessionId || that_present_sessionId) {
        if (!(this_present_sessionId && that_present_sessionId))
          return false;
        if (!this.sessionId.equals(that.sessionId))
          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_sessionId = true && (isSetSessionId());
      list.add(present_sessionId);
      if (present_sessionId)
        list.add(sessionId);

      boolean present_page = true;
      list.add(present_page);
      if (present_page)
        list.add(page);

      return list.hashCode();
    }

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

      int lastComparison = 0;

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

      sb.append("sessionId:");
      if (this.sessionId == null) {
        sb.append("null");
      } else {
        sb.append(this.sessionId);
      }
      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 getPublicImages_argsStandardSchemeFactory implements SchemeFactory {
      public getPublicImages_argsStandardScheme getScheme() {
        return new getPublicImages_argsStandardScheme();
      }
    }

    private static class getPublicImages_argsStandardScheme extends StandardScheme<getPublicImages_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getPublicImages_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: // SESSION_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.sessionId = iprot.readString();
                struct.setSessionIdIsSet(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, getPublicImages_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.sessionId != null) {
          oprot.writeFieldBegin(SESSION_ID_FIELD_DESC);
          oprot.writeString(struct.sessionId);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldBegin(PAGE_FIELD_DESC);
        oprot.writeI32(struct.page);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getPublicImages_argsTupleSchemeFactory implements SchemeFactory {
      public getPublicImages_argsTupleScheme getScheme() {
        return new getPublicImages_argsTupleScheme();
      }
    }

    private static class getPublicImages_argsTupleScheme extends TupleScheme<getPublicImages_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getPublicImages_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSessionId()) {
          optionals.set(0);
        }
        if (struct.isSetPage()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSessionId()) {
          oprot.writeString(struct.sessionId);
        }
        if (struct.isSetPage()) {
          oprot.writeI32(struct.page);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getPublicImages_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.sessionId = iprot.readString();
          struct.setSessionIdIsSet(true);
        }
        if (incoming.get(1)) {
          struct.page = iprot.readI32();
          struct.setPageIsSet(true);
        }
      }
    }

  }

  public static class getPublicImages_result implements org.apache.thrift.TBase<getPublicImages_result, getPublicImages_result._Fields>, java.io.Serializable, Cloneable, Comparable<getPublicImages_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPublicImages_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 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 getPublicImages_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getPublicImages_resultTupleSchemeFactory());
    }

    public List<ImageSummaryRead> success; // required
    public TAuthorizationException failure; // 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"),
      FAILURE((short)1, "failure"),
      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: // FAILURE
            return FAILURE;
          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.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.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.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(getPublicImages_result.class, metaDataMap);
    }

    public getPublicImages_result() {
    }

    public getPublicImages_result(
      List<ImageSummaryRead> success,
      TAuthorizationException failure,
      TInvocationException error)
    {
      this();
      this.success = success;
      this.failure = failure;
      this.error = error;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getPublicImages_result(getPublicImages_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.isSetFailure()) {
        this.failure = new TAuthorizationException(other.failure);
      }
      if (other.isSetError()) {
        this.error = new TInvocationException(other.error);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.failure = null;
      this.error = 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 getPublicImages_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 getFailure() {
      return this.failure;
    }

    public getPublicImages_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 getError() {
      return this.error;
    }

    public getPublicImages_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((List<ImageSummaryRead>)value);
        }
        break;

      case FAILURE:
        if (value == null) {
          unsetFailure();
        } else {
          setFailure((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 FAILURE:
        return getFailure();

      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 FAILURE:
        return isSetFailure();
      case ERROR:
        return isSetError();
      }
      throw new IllegalStateException();
    }

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

    public boolean equals(getPublicImages_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_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_failure = true && (isSetFailure());
      list.add(present_failure);
      if (present_failure)
        list.add(failure);

      boolean present_error = true && (isSetError());
      list.add(present_error);
      if (present_error)
        list.add(error);

      return list.hashCode();
    }

    @Override
    public int compareTo(getPublicImages_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(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("getPublicImages_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("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 getPublicImages_resultStandardSchemeFactory implements SchemeFactory {
      public getPublicImages_resultStandardScheme getScheme() {
        return new getPublicImages_resultStandardScheme();
      }
    }

    private static class getPublicImages_resultStandardScheme extends StandardScheme<getPublicImages_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getPublicImages_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 _list314 = iprot.readListBegin();
                  struct.success = new ArrayList<ImageSummaryRead>(_list314.size);
                  ImageSummaryRead _elem315;
                  for (int _i316 = 0; _i316 < _list314.size; ++_i316)
                  {
                    _elem315 = new ImageSummaryRead();
                    _elem315.read(iprot);
                    struct.success.add(_elem315);
                  }
                  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: // 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, getPublicImages_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 _iter317 : struct.success)
            {
              _iter317.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.failure != null) {
          oprot.writeFieldBegin(FAILURE_FIELD_DESC);
          struct.failure.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 getPublicImages_resultTupleSchemeFactory implements SchemeFactory {
      public getPublicImages_resultTupleScheme getScheme() {
        return new getPublicImages_resultTupleScheme();
      }
    }

    private static class getPublicImages_resultTupleScheme extends TupleScheme<getPublicImages_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getPublicImages_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.isSetError()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (ImageSummaryRead _iter318 : struct.success)
            {
              _iter318.write(oprot);
            }
          }
        }
        if (struct.isSetFailure()) {
          struct.failure.write(oprot);
        }
        if (struct.isSetError()) {
          struct.error.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getPublicImages_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 _list319 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
            struct.success = new ArrayList<ImageSummaryRead>(_list319.size);
            ImageSummaryRead _elem320;
            for (int _i321 = 0; _i321 < _list319.size; ++_i321)
            {
              _elem320 = new ImageSummaryRead();
              _elem320.read(iprot);
              struct.success.add(_elem320);
            }
          }
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.failure = new TAuthorizationException();
          struct.failure.read(iprot);
          struct.setFailureIsSet(true);
        }
        if (incoming.get(2)) {
          struct.error = new TInvocationException();
          struct.error.read(iprot);
          struct.setErrorIsSet(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 SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", 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 sessionId; // 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 {
      SESSION_ID((short)1, "sessionId"),
      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: // SESSION_ID
            return SESSION_ID;
          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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", 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 sessionId,
      String imageBaseId)
    {
      this();
      this.sessionId = sessionId;
      this.imageBaseId = imageBaseId;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getImageDetails_args(getImageDetails_args other) {
      if (other.isSetSessionId()) {
        this.sessionId = other.sessionId;
      }
      if (other.isSetImageBaseId()) {
        this.imageBaseId = other.imageBaseId;
      }
    }

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

    @Override
    public void clear() {
      this.sessionId = null;
      this.imageBaseId = null;
    }

    public String getSessionId() {
      return this.sessionId;
    }

    public getImageDetails_args setSessionId(String sessionId) {
      this.sessionId = sessionId;
      return this;
    }

    public void unsetSessionId() {
      this.sessionId = null;
    }

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

    public void setSessionIdIsSet(boolean value) {
      if (!value) {
        this.sessionId = 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 SESSION_ID:
        if (value == null) {
          unsetSessionId();
        } else {
          setSessionId((String)value);
        }
        break;

      case IMAGE_BASE_ID:
        if (value == null) {
          unsetImageBaseId();
        } else {
          setImageBaseId((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SESSION_ID:
        return getSessionId();

      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 SESSION_ID:
        return isSetSessionId();
      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_sessionId = true && this.isSetSessionId();
      boolean that_present_sessionId = true && that.isSetSessionId();
      if (this_present_sessionId || that_present_sessionId) {
        if (!(this_present_sessionId && that_present_sessionId))
          return false;
        if (!this.sessionId.equals(that.sessionId))
          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_sessionId = true && (isSetSessionId());
      list.add(present_sessionId);
      if (present_sessionId)
        list.add(sessionId);

      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(isSetSessionId()).compareTo(other.isSetSessionId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSessionId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId);
        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("sessionId:");
      if (this.sessionId == null) {
        sb.append("null");
      } else {
        sb.append(this.sessionId);
      }
      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: // SESSION_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.sessionId = iprot.readString();
                struct.setSessionIdIsSet(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.sessionId != null) {
          oprot.writeFieldBegin(SESSION_ID_FIELD_DESC);
          oprot.writeString(struct.sessionId);
          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.isSetSessionId()) {
          optionals.set(0);
        }
        if (struct.isSetImageBaseId()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSessionId()) {
          oprot.writeString(struct.sessionId);
        }
        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.sessionId = iprot.readString();
          struct.setSessionIdIsSet(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 getUser_args implements org.apache.thrift.TBase<getUser_args, getUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUser_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUser_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 USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", 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 getUser_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getUser_argsTupleSchemeFactory());
    }

    public String userToken; // required
    public String userId; // 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"),
      USER_ID((short)2, "userId");

      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: // USER_ID
            return USER_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.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", 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(getUser_args.class, metaDataMap);
    }

    public getUser_args() {
    }

    public getUser_args(
      String userToken,
      String userId)
    {
      this();
      this.userToken = userToken;
      this.userId = userId;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getUser_args(getUser_args other) {
      if (other.isSetUserToken()) {
        this.userToken = other.userToken;
      }
      if (other.isSetUserId()) {
        this.userId = other.userId;
      }
    }

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

    @Override
    public void clear() {
      this.userToken = null;
      this.userId = null;
    }

    public String getUserToken() {
      return this.userToken;
    }

    public getUser_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 getUserId() {
      return this.userId;
    }

    public getUser_args setUserId(String userId) {
      this.userId = userId;
      return this;
    }

    public void unsetUserId() {
      this.userId = null;
    }

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

    public void setUserIdIsSet(boolean value) {
      if (!value) {
        this.userId = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_TOKEN:
        if (value == null) {
          unsetUserToken();
        } else {
          setUserToken((String)value);
        }
        break;

      case USER_ID:
        if (value == null) {
          unsetUserId();
        } else {
          setUserId((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_TOKEN:
        return getUserToken();

      case USER_ID:
        return getUserId();

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

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

    public boolean equals(getUser_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_userId = true && this.isSetUserId();
      boolean that_present_userId = true && that.isSetUserId();
      if (this_present_userId || that_present_userId) {
        if (!(this_present_userId && that_present_userId))
          return false;
        if (!this.userId.equals(that.userId))
          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_userId = true && (isSetUserId());
      list.add(present_userId);
      if (present_userId)
        list.add(userId);

      return list.hashCode();
    }

    @Override
    public int compareTo(getUser_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(isSetUserId()).compareTo(other.isSetUserId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, other.userId);
        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("getUser_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("userId:");
      if (this.userId == null) {
        sb.append("null");
      } else {
        sb.append(this.userId);
      }
      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 getUser_argsStandardSchemeFactory implements SchemeFactory {
      public getUser_argsStandardScheme getScheme() {
        return new getUser_argsStandardScheme();
      }
    }

    private static class getUser_argsStandardScheme extends StandardScheme<getUser_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getUser_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: // USER_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.userId = iprot.readString();
                struct.setUserIdIsSet(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, getUser_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.userId != null) {
          oprot.writeFieldBegin(USER_ID_FIELD_DESC);
          oprot.writeString(struct.userId);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getUser_argsTupleSchemeFactory implements SchemeFactory {
      public getUser_argsTupleScheme getScheme() {
        return new getUser_argsTupleScheme();
      }
    }

    private static class getUser_argsTupleScheme extends TupleScheme<getUser_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getUser_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetUserToken()) {
          optionals.set(0);
        }
        if (struct.isSetUserId()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetUserToken()) {
          oprot.writeString(struct.userToken);
        }
        if (struct.isSetUserId()) {
          oprot.writeString(struct.userId);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getUser_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.userId = iprot.readString();
          struct.setUserIdIsSet(true);
        }
      }
    }

  }

  public static class getUser_result implements org.apache.thrift.TBase<getUser_result, getUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUser_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUser_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 getUser_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getUser_resultTupleSchemeFactory());
    }

    public UserInfo 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, UserInfo.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(getUser_result.class, metaDataMap);
    }

    public getUser_result() {
    }

    public getUser_result(
      UserInfo 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 getUser_result(getUser_result other) {
      if (other.isSetSuccess()) {
        this.success = new UserInfo(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 getUser_result deepCopy() {
      return new getUser_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.authError = null;
      this.notFound = null;
      this.serverError = null;
    }

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

    public getUser_result setSuccess(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 getAuthError() {
      return this.authError;
    }

    public getUser_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 getUser_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 getUser_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((UserInfo)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 getUser_result)
        return this.equals((getUser_result)that);
      return false;
    }

    public boolean equals(getUser_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(getUser_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("getUser_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 getUser_resultStandardSchemeFactory implements SchemeFactory {
      public getUser_resultStandardScheme getScheme() {
        return new getUser_resultStandardScheme();
      }
    }

    private static class getUser_resultStandardScheme extends StandardScheme<getUser_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getUser_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 UserInfo();
                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, getUser_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 getUser_resultTupleSchemeFactory implements SchemeFactory {
      public getUser_resultTupleScheme getScheme() {
        return new getUser_resultTupleScheme();
      }
    }

    private static class getUser_resultTupleScheme extends TupleScheme<getUser_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getUser_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, getUser_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(4);
        if (incoming.get(0)) {
          struct.success = new UserInfo();
          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 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 SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", 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 sessionId; // 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 {
      SESSION_ID((short)1, "sessionId");

      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: // SESSION_ID
            return SESSION_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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", 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 sessionId)
    {
      this();
      this.sessionId = sessionId;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public invalidateSession_args(invalidateSession_args other) {
      if (other.isSetSessionId()) {
        this.sessionId = other.sessionId;
      }
    }

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

    @Override
    public void clear() {
      this.sessionId = null;
    }

    public String getSessionId() {
      return this.sessionId;
    }

    public invalidateSession_args setSessionId(String sessionId) {
      this.sessionId = sessionId;
      return this;
    }

    public void unsetSessionId() {
      this.sessionId = null;
    }

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

    public void setSessionIdIsSet(boolean value) {
      if (!value) {
        this.sessionId = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SESSION_ID:
        if (value == null) {
          unsetSessionId();
        } else {
          setSessionId((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SESSION_ID:
        return getSessionId();

      }
      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 SESSION_ID:
        return isSetSessionId();
      }
      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_sessionId = true && this.isSetSessionId();
      boolean that_present_sessionId = true && that.isSetSessionId();
      if (this_present_sessionId || that_present_sessionId) {
        if (!(this_present_sessionId && that_present_sessionId))
          return false;
        if (!this.sessionId.equals(that.sessionId))
          return false;
      }

      return true;
    }

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

      boolean present_sessionId = true && (isSetSessionId());
      list.add(present_sessionId);
      if (present_sessionId)
        list.add(sessionId);

      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(isSetSessionId()).compareTo(other.isSetSessionId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSessionId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId);
        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("sessionId:");
      if (this.sessionId == null) {
        sb.append("null");
      } else {
        sb.append(this.sessionId);
      }
      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: // SESSION_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.sessionId = iprot.readString();
                struct.setSessionIdIsSet(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.sessionId != null) {
          oprot.writeFieldBegin(SESSION_ID_FIELD_DESC);
          oprot.writeString(struct.sessionId);
          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.isSetSessionId()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSessionId()) {
          oprot.writeString(struct.sessionId);
        }
      }

      @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.sessionId = iprot.readString();
          struct.setSessionIdIsSet(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 getUserFromToken_args implements org.apache.thrift.TBase<getUserFromToken_args, getUserFromToken_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserFromToken_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserFromToken_args");

    private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", 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 getUserFromToken_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getUserFromToken_argsTupleSchemeFactory());
    }

    public String token; // 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 {
      TOKEN((short)1, "token");

      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: // TOKEN
            return 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.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", 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(getUserFromToken_args.class, metaDataMap);
    }

    public getUserFromToken_args() {
    }

    public getUserFromToken_args(
      String token)
    {
      this();
      this.token = token;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getUserFromToken_args(getUserFromToken_args other) {
      if (other.isSetToken()) {
        this.token = other.token;
      }
    }

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

    @Override
    public void clear() {
      this.token = null;
    }

    public String getToken() {
      return this.token;
    }

    public getUserFromToken_args setToken(String token) {
      this.token = token;
      return this;
    }

    public void unsetToken() {
      this.token = null;
    }

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

    public void setTokenIsSet(boolean value) {
      if (!value) {
        this.token = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case TOKEN:
        if (value == null) {
          unsetToken();
        } else {
          setToken((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case TOKEN:
        return getToken();

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

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

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

      boolean this_present_token = true && this.isSetToken();
      boolean that_present_token = true && that.isSetToken();
      if (this_present_token || that_present_token) {
        if (!(this_present_token && that_present_token))
          return false;
        if (!this.token.equals(that.token))
          return false;
      }

      return true;
    }

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

      boolean present_token = true && (isSetToken());
      list.add(present_token);
      if (present_token)
        list.add(token);

      return list.hashCode();
    }

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

      int lastComparison = 0;

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

      sb.append("token:");
      if (this.token == null) {
        sb.append("null");
      } else {
        sb.append(this.token);
      }
      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 getUserFromToken_argsStandardSchemeFactory implements SchemeFactory {
      public getUserFromToken_argsStandardScheme getScheme() {
        return new getUserFromToken_argsStandardScheme();
      }
    }

    private static class getUserFromToken_argsStandardScheme extends StandardScheme<getUserFromToken_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getUserFromToken_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: // TOKEN
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.token = iprot.readString();
                struct.setTokenIsSet(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, getUserFromToken_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.token != null) {
          oprot.writeFieldBegin(TOKEN_FIELD_DESC);
          oprot.writeString(struct.token);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getUserFromToken_argsTupleSchemeFactory implements SchemeFactory {
      public getUserFromToken_argsTupleScheme getScheme() {
        return new getUserFromToken_argsTupleScheme();
      }
    }

    private static class getUserFromToken_argsTupleScheme extends TupleScheme<getUserFromToken_args> {

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

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

  }

  public static class getUserFromToken_result implements org.apache.thrift.TBase<getUserFromToken_result, getUserFromToken_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserFromToken_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserFromToken_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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new getUserFromToken_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getUserFromToken_resultTupleSchemeFactory());
    }

    public UserInfo success; // required
    public TInvalidTokenException failure; // 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");

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

    public getUserFromToken_result() {
    }

    public getUserFromToken_result(
      UserInfo success,
      TInvalidTokenException failure)
    {
      this();
      this.success = success;
      this.failure = failure;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getUserFromToken_result(getUserFromToken_result other) {
      if (other.isSetSuccess()) {
        this.success = new UserInfo(other.success);
      }
      if (other.isSetFailure()) {
        this.failure = new TInvalidTokenException(other.failure);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.failure = null;
    }

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

    public getUserFromToken_result setSuccess(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 TInvalidTokenException getFailure() {
      return this.failure;
    }

    public getUserFromToken_result setFailure(TInvalidTokenException 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 void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((UserInfo)value);
        }
        break;

      case FAILURE:
        if (value == null) {
          unsetFailure();
        } else {
          setFailure((TInvalidTokenException)value);
        }
        break;

      }
    }

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

      case FAILURE:
        return getFailure();

      }
      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();
      }
      throw new IllegalStateException();
    }

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

    public boolean equals(getUserFromToken_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;
      }

      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);

      return list.hashCode();
    }

    @Override
    public int compareTo(getUserFromToken_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;
        }
      }
      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("getUserFromToken_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;
      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 getUserFromToken_resultStandardSchemeFactory implements SchemeFactory {
      public getUserFromToken_resultStandardScheme getScheme() {
        return new getUserFromToken_resultStandardScheme();
      }
    }

    private static class getUserFromToken_resultStandardScheme extends StandardScheme<getUserFromToken_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getUserFromToken_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 UserInfo();
                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 TInvalidTokenException();
                struct.failure.read(iprot);
                struct.setFailureIsSet(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, getUserFromToken_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();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getUserFromToken_resultTupleSchemeFactory implements SchemeFactory {
      public getUserFromToken_resultTupleScheme getScheme() {
        return new getUserFromToken_resultTupleScheme();
      }
    }

    private static class getUserFromToken_resultTupleScheme extends TupleScheme<getUserFromToken_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getUserFromToken_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);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetFailure()) {
          struct.failure.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getUserFromToken_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new UserInfo();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.failure = new TInvalidTokenException();
          struct.failure.read(iprot);
          struct.setFailureIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SERVER_SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("serverSessionId", 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 isServerAuthenticated_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new isServerAuthenticated_argsTupleSchemeFactory());
    }

    public String serverSessionId; // 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 {
      SERVER_SESSION_ID((short)1, "serverSessionId");

      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: // SERVER_SESSION_ID
            return SERVER_SESSION_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.SERVER_SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("serverSessionId", 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(isServerAuthenticated_args.class, metaDataMap);
    }

    public isServerAuthenticated_args() {
    }

    public isServerAuthenticated_args(
      String serverSessionId)
    {
      this();
      this.serverSessionId = serverSessionId;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public isServerAuthenticated_args(isServerAuthenticated_args other) {
      if (other.isSetServerSessionId()) {
        this.serverSessionId = other.serverSessionId;
      }
    }

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

    @Override
    public void clear() {
      this.serverSessionId = null;
    }

    public String getServerSessionId() {
      return this.serverSessionId;
    }

    public isServerAuthenticated_args setServerSessionId(String serverSessionId) {
      this.serverSessionId = serverSessionId;
      return this;
    }

    public void unsetServerSessionId() {
      this.serverSessionId = null;
    }

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

    public void setServerSessionIdIsSet(boolean value) {
      if (!value) {
        this.serverSessionId = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SERVER_SESSION_ID:
        if (value == null) {
          unsetServerSessionId();
        } else {
          setServerSessionId((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SERVER_SESSION_ID:
        return getServerSessionId();

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

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

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

      boolean this_present_serverSessionId = true && this.isSetServerSessionId();
      boolean that_present_serverSessionId = true && that.isSetServerSessionId();
      if (this_present_serverSessionId || that_present_serverSessionId) {
        if (!(this_present_serverSessionId && that_present_serverSessionId))
          return false;
        if (!this.serverSessionId.equals(that.serverSessionId))
          return false;
      }

      return true;
    }

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

      boolean present_serverSessionId = true && (isSetServerSessionId());
      list.add(present_serverSessionId);
      if (present_serverSessionId)
        list.add(serverSessionId);

      return list.hashCode();
    }

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

      int lastComparison = 0;

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

      sb.append("serverSessionId:");
      if (this.serverSessionId == null) {
        sb.append("null");
      } else {
        sb.append(this.serverSessionId);
      }
      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 isServerAuthenticated_argsStandardSchemeFactory implements SchemeFactory {
      public isServerAuthenticated_argsStandardScheme getScheme() {
        return new isServerAuthenticated_argsStandardScheme();
      }
    }

    private static class isServerAuthenticated_argsStandardScheme extends StandardScheme<isServerAuthenticated_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, isServerAuthenticated_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: // SERVER_SESSION_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.serverSessionId = iprot.readString();
                struct.setServerSessionIdIsSet(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, isServerAuthenticated_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.serverSessionId != null) {
          oprot.writeFieldBegin(SERVER_SESSION_ID_FIELD_DESC);
          oprot.writeString(struct.serverSessionId);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class isServerAuthenticated_argsTupleSchemeFactory implements SchemeFactory {
      public isServerAuthenticated_argsTupleScheme getScheme() {
        return new isServerAuthenticated_argsTupleScheme();
      }
    }

    private static class isServerAuthenticated_argsTupleScheme extends TupleScheme<isServerAuthenticated_args> {

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

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

  }

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

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

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

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

    public isServerAuthenticated_result() {
    }

    public isServerAuthenticated_result(
      boolean success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

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

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

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

    public boolean isSuccess() {
      return this.success;
    }

    public isServerAuthenticated_result setSuccess(boolean 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((Boolean)value);
        }
        break;

      }
    }

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

      }
      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 isServerAuthenticated_result)
        return this.equals((isServerAuthenticated_result)that);
      return false;
    }

    public boolean equals(isServerAuthenticated_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(isServerAuthenticated_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("isServerAuthenticated_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 isServerAuthenticated_resultStandardSchemeFactory implements SchemeFactory {
      public isServerAuthenticated_resultStandardScheme getScheme() {
        return new isServerAuthenticated_resultStandardScheme();
      }
    }

    private static class isServerAuthenticated_resultStandardScheme extends StandardScheme<isServerAuthenticated_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, isServerAuthenticated_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.BOOL) {
                struct.success = iprot.readBool();
                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, isServerAuthenticated_result struct) throws org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class isServerAuthenticated_resultTupleSchemeFactory implements SchemeFactory {
      public isServerAuthenticated_resultTupleScheme getScheme() {
        return new isServerAuthenticated_resultTupleScheme();
      }
    }

    private static class isServerAuthenticated_resultTupleScheme extends TupleScheme<isServerAuthenticated_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, isServerAuthenticated_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.writeBool(struct.success);
        }
      }

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

  }

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

    private static final org.apache.thrift.protocol.TField SATELLITE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("satelliteId", org.apache.thrift.protocol.TType.I32, (short)1);

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

    public int satelliteId; // 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 {
      SATELLITE_ID((short)1, "satelliteId");

      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: // SATELLITE_ID
            return SATELLITE_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
    private static final int __SATELLITEID_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.SATELLITE_ID, new org.apache.thrift.meta_data.FieldMetaData("satelliteId", 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(startServerAuthentication_args.class, metaDataMap);
    }

    public startServerAuthentication_args() {
    }

    public startServerAuthentication_args(
      int satelliteId)
    {
      this();
      this.satelliteId = satelliteId;
      setSatelliteIdIsSet(true);
    }

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

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

    @Override
    public void clear() {
      setSatelliteIdIsSet(false);
      this.satelliteId = 0;
    }

    public int getSatelliteId() {
      return this.satelliteId;
    }

    public startServerAuthentication_args setSatelliteId(int satelliteId) {
      this.satelliteId = satelliteId;
      setSatelliteIdIsSet(true);
      return this;
    }

    public void unsetSatelliteId() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SATELLITEID_ISSET_ID);
    }

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

    public void setSatelliteIdIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SATELLITEID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SATELLITE_ID:
        if (value == null) {
          unsetSatelliteId();
        } else {
          setSatelliteId((Integer)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SATELLITE_ID:
        return getSatelliteId();

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

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

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

      boolean this_present_satelliteId = true;
      boolean that_present_satelliteId = true;
      if (this_present_satelliteId || that_present_satelliteId) {
        if (!(this_present_satelliteId && that_present_satelliteId))
          return false;
        if (this.satelliteId != that.satelliteId)
          return false;
      }

      return true;
    }

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

      boolean present_satelliteId = true;
      list.add(present_satelliteId);
      if (present_satelliteId)
        list.add(satelliteId);

      return list.hashCode();
    }

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

      int lastComparison = 0;

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

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

    private static class startServerAuthentication_argsStandardScheme extends StandardScheme<startServerAuthentication_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, startServerAuthentication_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: // SATELLITE_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
                struct.satelliteId = iprot.readI32();
                struct.setSatelliteIdIsSet(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, startServerAuthentication_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(SATELLITE_ID_FIELD_DESC);
        oprot.writeI32(struct.satelliteId);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class startServerAuthentication_argsTupleSchemeFactory implements SchemeFactory {
      public startServerAuthentication_argsTupleScheme getScheme() {
        return new startServerAuthentication_argsTupleScheme();
      }
    }

    private static class startServerAuthentication_argsTupleScheme extends TupleScheme<startServerAuthentication_args> {

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

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

  }

  public static class startServerAuthentication_result implements org.apache.thrift.TBase<startServerAuthentication_result, startServerAuthentication_result._Fields>, java.io.Serializable, Cloneable, Comparable<startServerAuthentication_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startServerAuthentication_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 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 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 startServerAuthentication_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new startServerAuthentication_resultTupleSchemeFactory());
    }

    public ByteBuffer success; // required
    public TAuthorizationException failure; // 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"),
      FAILURE((short)1, "failure"),
      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: // FAILURE
            return FAILURE;
          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          , true)));
      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.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(startServerAuthentication_result.class, metaDataMap);
    }

    public startServerAuthentication_result() {
    }

    public startServerAuthentication_result(
      ByteBuffer success,
      TAuthorizationException failure,
      TInvocationException error)
    {
      this();
      this.success = org.apache.thrift.TBaseHelper.copyBinary(success);
      this.failure = failure;
      this.error = error;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public startServerAuthentication_result(startServerAuthentication_result other) {
      if (other.isSetSuccess()) {
        this.success = org.apache.thrift.TBaseHelper.copyBinary(other.success);
      }
      if (other.isSetFailure()) {
        this.failure = new TAuthorizationException(other.failure);
      }
      if (other.isSetError()) {
        this.error = new TInvocationException(other.error);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.failure = null;
      this.error = 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 startServerAuthentication_result setSuccess(byte[] success) {
      this.success = success == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(success, success.length));
      return this;
    }

    public startServerAuthentication_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 getFailure() {
      return this.failure;
    }

    public startServerAuthentication_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 getError() {
      return this.error;
    }

    public startServerAuthentication_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((ByteBuffer)value);
        }
        break;

      case FAILURE:
        if (value == null) {
          unsetFailure();
        } else {
          setFailure((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 FAILURE:
        return getFailure();

      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 FAILURE:
        return isSetFailure();
      case ERROR:
        return isSetError();
      }
      throw new IllegalStateException();
    }

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

    public boolean equals(startServerAuthentication_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_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_failure = true && (isSetFailure());
      list.add(present_failure);
      if (present_failure)
        list.add(failure);

      boolean present_error = true && (isSetError());
      list.add(present_error);
      if (present_error)
        list.add(error);

      return list.hashCode();
    }

    @Override
    public int compareTo(startServerAuthentication_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(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("startServerAuthentication_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("failure:");
      if (this.failure == null) {
        sb.append("null");
      } else {
        sb.append(this.failure);
      }
      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 startServerAuthentication_resultStandardSchemeFactory implements SchemeFactory {
      public startServerAuthentication_resultStandardScheme getScheme() {
        return new startServerAuthentication_resultStandardScheme();
      }
    }

    private static class startServerAuthentication_resultStandardScheme extends StandardScheme<startServerAuthentication_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, startServerAuthentication_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: // 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: // 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, startServerAuthentication_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.failure != null) {
          oprot.writeFieldBegin(FAILURE_FIELD_DESC);
          struct.failure.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 startServerAuthentication_resultTupleSchemeFactory implements SchemeFactory {
      public startServerAuthentication_resultTupleScheme getScheme() {
        return new startServerAuthentication_resultTupleScheme();
      }
    }

    private static class startServerAuthentication_resultTupleScheme extends TupleScheme<startServerAuthentication_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, startServerAuthentication_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.isSetError()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetSuccess()) {
          oprot.writeBinary(struct.success);
        }
        if (struct.isSetFailure()) {
          struct.failure.write(oprot);
        }
        if (struct.isSetError()) {
          struct.error.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, startServerAuthentication_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.success = iprot.readBinary();
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.failure = new TAuthorizationException();
          struct.failure.read(iprot);
          struct.setFailureIsSet(true);
        }
        if (incoming.get(2)) {
          struct.error = new TInvocationException();
          struct.error.read(iprot);
          struct.setErrorIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SATELLITE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("satelliteId", org.apache.thrift.protocol.TType.I32, (short)1);
    private static final org.apache.thrift.protocol.TField CHALLENGE_RESPONSE_FIELD_DESC = new org.apache.thrift.protocol.TField("challengeResponse", 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 serverAuthenticate_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new serverAuthenticate_argsTupleSchemeFactory());
    }

    public int satelliteId; // required
    public ByteBuffer challengeResponse; // 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 {
      SATELLITE_ID((short)1, "satelliteId"),
      CHALLENGE_RESPONSE((short)2, "challengeResponse");

      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: // SATELLITE_ID
            return SATELLITE_ID;
          case 2: // CHALLENGE_RESPONSE
            return CHALLENGE_RESPONSE;
          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 __SATELLITEID_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.SATELLITE_ID, new org.apache.thrift.meta_data.FieldMetaData("satelliteId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
      tmpMap.put(_Fields.CHALLENGE_RESPONSE, new org.apache.thrift.meta_data.FieldMetaData("challengeResponse", 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(serverAuthenticate_args.class, metaDataMap);
    }

    public serverAuthenticate_args() {
    }

    public serverAuthenticate_args(
      int satelliteId,
      ByteBuffer challengeResponse)
    {
      this();
      this.satelliteId = satelliteId;
      setSatelliteIdIsSet(true);
      this.challengeResponse = org.apache.thrift.TBaseHelper.copyBinary(challengeResponse);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public serverAuthenticate_args(serverAuthenticate_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.satelliteId = other.satelliteId;
      if (other.isSetChallengeResponse()) {
        this.challengeResponse = org.apache.thrift.TBaseHelper.copyBinary(other.challengeResponse);
      }
    }

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

    @Override
    public void clear() {
      setSatelliteIdIsSet(false);
      this.satelliteId = 0;
      this.challengeResponse = null;
    }

    public int getSatelliteId() {
      return this.satelliteId;
    }

    public serverAuthenticate_args setSatelliteId(int satelliteId) {
      this.satelliteId = satelliteId;
      setSatelliteIdIsSet(true);
      return this;
    }

    public void unsetSatelliteId() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SATELLITEID_ISSET_ID);
    }

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

    public void setSatelliteIdIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SATELLITEID_ISSET_ID, value);
    }

    public byte[] getChallengeResponse() {
      setChallengeResponse(org.apache.thrift.TBaseHelper.rightSize(challengeResponse));
      return challengeResponse == null ? null : challengeResponse.array();
    }

    public ByteBuffer bufferForChallengeResponse() {
      return org.apache.thrift.TBaseHelper.copyBinary(challengeResponse);
    }

    public serverAuthenticate_args setChallengeResponse(byte[] challengeResponse) {
      this.challengeResponse = challengeResponse == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(challengeResponse, challengeResponse.length));
      return this;
    }

    public serverAuthenticate_args setChallengeResponse(ByteBuffer challengeResponse) {
      this.challengeResponse = org.apache.thrift.TBaseHelper.copyBinary(challengeResponse);
      return this;
    }

    public void unsetChallengeResponse() {
      this.challengeResponse = null;
    }

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

    public void setChallengeResponseIsSet(boolean value) {
      if (!value) {
        this.challengeResponse = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SATELLITE_ID:
        if (value == null) {
          unsetSatelliteId();
        } else {
          setSatelliteId((Integer)value);
        }
        break;

      case CHALLENGE_RESPONSE:
        if (value == null) {
          unsetChallengeResponse();
        } else {
          setChallengeResponse((ByteBuffer)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SATELLITE_ID:
        return getSatelliteId();

      case CHALLENGE_RESPONSE:
        return getChallengeResponse();

      }
      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 SATELLITE_ID:
        return isSetSatelliteId();
      case CHALLENGE_RESPONSE:
        return isSetChallengeResponse();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_satelliteId = true;
      boolean that_present_satelliteId = true;
      if (this_present_satelliteId || that_present_satelliteId) {
        if (!(this_present_satelliteId && that_present_satelliteId))
          return false;
        if (this.satelliteId != that.satelliteId)
          return false;
      }

      boolean this_present_challengeResponse = true && this.isSetChallengeResponse();
      boolean that_present_challengeResponse = true && that.isSetChallengeResponse();
      if (this_present_challengeResponse || that_present_challengeResponse) {
        if (!(this_present_challengeResponse && that_present_challengeResponse))
          return false;
        if (!this.challengeResponse.equals(that.challengeResponse))
          return false;
      }

      return true;
    }

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

      boolean present_satelliteId = true;
      list.add(present_satelliteId);
      if (present_satelliteId)
        list.add(satelliteId);

      boolean present_challengeResponse = true && (isSetChallengeResponse());
      list.add(present_challengeResponse);
      if (present_challengeResponse)
        list.add(challengeResponse);

      return list.hashCode();
    }

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

      int lastComparison = 0;

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

      sb.append("satelliteId:");
      sb.append(this.satelliteId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("challengeResponse:");
      if (this.challengeResponse == null) {
        sb.append("null");
      } else {
        org.apache.thrift.TBaseHelper.toString(this.challengeResponse, 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 serverAuthenticate_argsStandardSchemeFactory implements SchemeFactory {
      public serverAuthenticate_argsStandardScheme getScheme() {
        return new serverAuthenticate_argsStandardScheme();
      }
    }

    private static class serverAuthenticate_argsStandardScheme extends StandardScheme<serverAuthenticate_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, serverAuthenticate_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: // SATELLITE_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
                struct.satelliteId = iprot.readI32();
                struct.setSatelliteIdIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // CHALLENGE_RESPONSE
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.challengeResponse = iprot.readBinary();
                struct.setChallengeResponseIsSet(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, serverAuthenticate_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(SATELLITE_ID_FIELD_DESC);
        oprot.writeI32(struct.satelliteId);
        oprot.writeFieldEnd();
        if (struct.challengeResponse != null) {
          oprot.writeFieldBegin(CHALLENGE_RESPONSE_FIELD_DESC);
          oprot.writeBinary(struct.challengeResponse);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class serverAuthenticate_argsTupleSchemeFactory implements SchemeFactory {
      public serverAuthenticate_argsTupleScheme getScheme() {
        return new serverAuthenticate_argsTupleScheme();
      }
    }

    private static class serverAuthenticate_argsTupleScheme extends TupleScheme<serverAuthenticate_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, serverAuthenticate_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSatelliteId()) {
          optionals.set(0);
        }
        if (struct.isSetChallengeResponse()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSatelliteId()) {
          oprot.writeI32(struct.satelliteId);
        }
        if (struct.isSetChallengeResponse()) {
          oprot.writeBinary(struct.challengeResponse);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, serverAuthenticate_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.satelliteId = iprot.readI32();
          struct.setSatelliteIdIsSet(true);
        }
        if (incoming.get(1)) {
          struct.challengeResponse = iprot.readBinary();
          struct.setChallengeResponseIsSet(true);
        }
      }
    }

  }

  public static class serverAuthenticate_result implements org.apache.thrift.TBase<serverAuthenticate_result, serverAuthenticate_result._Fields>, java.io.Serializable, Cloneable, Comparable<serverAuthenticate_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("serverAuthenticate_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 ERRR_FIELD_DESC = new org.apache.thrift.protocol.TField("errr", 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 serverAuthenticate_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new serverAuthenticate_resultTupleSchemeFactory());
    }

    public ServerSessionData success; // required
    public TAuthorizationException failure; // required
    public TInvocationException errr; // 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"),
      ERRR((short)2, "errr");

      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: // ERRR
            return ERRR;
          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, ServerSessionData.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.ERRR, new org.apache.thrift.meta_data.FieldMetaData("errr", 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(serverAuthenticate_result.class, metaDataMap);
    }

    public serverAuthenticate_result() {
    }

    public serverAuthenticate_result(
      ServerSessionData success,
      TAuthorizationException failure,
      TInvocationException errr)
    {
      this();
      this.success = success;
      this.failure = failure;
      this.errr = errr;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public serverAuthenticate_result(serverAuthenticate_result other) {
      if (other.isSetSuccess()) {
        this.success = new ServerSessionData(other.success);
      }
      if (other.isSetFailure()) {
        this.failure = new TAuthorizationException(other.failure);
      }
      if (other.isSetErrr()) {
        this.errr = new TInvocationException(other.errr);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.failure = null;
      this.errr = null;
    }

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

    public serverAuthenticate_result setSuccess(ServerSessionData 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 serverAuthenticate_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 getErrr() {
      return this.errr;
    }

    public serverAuthenticate_result setErrr(TInvocationException errr) {
      this.errr = errr;
      return this;
    }

    public void unsetErrr() {
      this.errr = null;
    }

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

    public void setErrrIsSet(boolean value) {
      if (!value) {
        this.errr = null;
      }
    }

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

      case FAILURE:
        if (value == null) {
          unsetFailure();
        } else {
          setFailure((TAuthorizationException)value);
        }
        break;

      case ERRR:
        if (value == null) {
          unsetErrr();
        } else {
          setErrr((TInvocationException)value);
        }
        break;

      }
    }

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

      case FAILURE:
        return getFailure();

      case ERRR:
        return getErrr();

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

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

    public boolean equals(serverAuthenticate_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_errr = true && this.isSetErrr();
      boolean that_present_errr = true && that.isSetErrr();
      if (this_present_errr || that_present_errr) {
        if (!(this_present_errr && that_present_errr))
          return false;
        if (!this.errr.equals(that.errr))
          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_errr = true && (isSetErrr());
      list.add(present_errr);
      if (present_errr)
        list.add(errr);

      return list.hashCode();
    }

    @Override
    public int compareTo(serverAuthenticate_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(isSetErrr()).compareTo(other.isSetErrr());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErrr()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errr, other.errr);
        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("serverAuthenticate_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("errr:");
      if (this.errr == null) {
        sb.append("null");
      } else {
        sb.append(this.errr);
      }
      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 serverAuthenticate_resultStandardSchemeFactory implements SchemeFactory {
      public serverAuthenticate_resultStandardScheme getScheme() {
        return new serverAuthenticate_resultStandardScheme();
      }
    }

    private static class serverAuthenticate_resultStandardScheme extends StandardScheme<serverAuthenticate_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, serverAuthenticate_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 ServerSessionData();
                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: // ERRR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.errr = new TInvocationException();
                struct.errr.read(iprot);
                struct.setErrrIsSet(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, serverAuthenticate_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.errr != null) {
          oprot.writeFieldBegin(ERRR_FIELD_DESC);
          struct.errr.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class serverAuthenticate_resultTupleSchemeFactory implements SchemeFactory {
      public serverAuthenticate_resultTupleScheme getScheme() {
        return new serverAuthenticate_resultTupleScheme();
      }
    }

    private static class serverAuthenticate_resultTupleScheme extends TupleScheme<serverAuthenticate_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, serverAuthenticate_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.isSetErrr()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetFailure()) {
          struct.failure.write(oprot);
        }
        if (struct.isSetErrr()) {
          struct.errr.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, serverAuthenticate_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.success = new ServerSessionData();
          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.errr = new TInvocationException();
          struct.errr.read(iprot);
          struct.setErrrIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SERVER_SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("serverSessionId", 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 getImageData_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getImageData_argsTupleSchemeFactory());
    }

    public String serverSessionId; // 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 {
      SERVER_SESSION_ID((short)1, "serverSessionId"),
      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: // SERVER_SESSION_ID
            return SERVER_SESSION_ID;
          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.SERVER_SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("serverSessionId", 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(getImageData_args.class, metaDataMap);
    }

    public getImageData_args() {
    }

    public getImageData_args(
      String serverSessionId,
      String imageVersionId)
    {
      this();
      this.serverSessionId = serverSessionId;
      this.imageVersionId = imageVersionId;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getImageData_args(getImageData_args other) {
      if (other.isSetServerSessionId()) {
        this.serverSessionId = other.serverSessionId;
      }
      if (other.isSetImageVersionId()) {
        this.imageVersionId = other.imageVersionId;
      }
    }

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

    @Override
    public void clear() {
      this.serverSessionId = null;
      this.imageVersionId = null;
    }

    public String getServerSessionId() {
      return this.serverSessionId;
    }

    public getImageData_args setServerSessionId(String serverSessionId) {
      this.serverSessionId = serverSessionId;
      return this;
    }

    public void unsetServerSessionId() {
      this.serverSessionId = null;
    }

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

    public void setServerSessionIdIsSet(boolean value) {
      if (!value) {
        this.serverSessionId = null;
      }
    }

    public String getImageVersionId() {
      return this.imageVersionId;
    }

    public getImageData_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 SERVER_SESSION_ID:
        if (value == null) {
          unsetServerSessionId();
        } else {
          setServerSessionId((String)value);
        }
        break;

      case IMAGE_VERSION_ID:
        if (value == null) {
          unsetImageVersionId();
        } else {
          setImageVersionId((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SERVER_SESSION_ID:
        return getServerSessionId();

      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 SERVER_SESSION_ID:
        return isSetServerSessionId();
      case IMAGE_VERSION_ID:
        return isSetImageVersionId();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_serverSessionId = true && this.isSetServerSessionId();
      boolean that_present_serverSessionId = true && that.isSetServerSessionId();
      if (this_present_serverSessionId || that_present_serverSessionId) {
        if (!(this_present_serverSessionId && that_present_serverSessionId))
          return false;
        if (!this.serverSessionId.equals(that.serverSessionId))
          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_serverSessionId = true && (isSetServerSessionId());
      list.add(present_serverSessionId);
      if (present_serverSessionId)
        list.add(serverSessionId);

      boolean present_imageVersionId = true && (isSetImageVersionId());
      list.add(present_imageVersionId);
      if (present_imageVersionId)
        list.add(imageVersionId);

      return list.hashCode();
    }

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

      int lastComparison = 0;

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

      sb.append("serverSessionId:");
      if (this.serverSessionId == null) {
        sb.append("null");
      } else {
        sb.append(this.serverSessionId);
      }
      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 getImageData_argsStandardSchemeFactory implements SchemeFactory {
      public getImageData_argsStandardScheme getScheme() {
        return new getImageData_argsStandardScheme();
      }
    }

    private static class getImageData_argsStandardScheme extends StandardScheme<getImageData_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getImageData_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: // SERVER_SESSION_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.serverSessionId = iprot.readString();
                struct.setServerSessionIdIsSet(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, getImageData_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.serverSessionId != null) {
          oprot.writeFieldBegin(SERVER_SESSION_ID_FIELD_DESC);
          oprot.writeString(struct.serverSessionId);
          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 getImageData_argsTupleSchemeFactory implements SchemeFactory {
      public getImageData_argsTupleScheme getScheme() {
        return new getImageData_argsTupleScheme();
      }
    }

    private static class getImageData_argsTupleScheme extends TupleScheme<getImageData_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getImageData_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetServerSessionId()) {
          optionals.set(0);
        }
        if (struct.isSetImageVersionId()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetServerSessionId()) {
          oprot.writeString(struct.serverSessionId);
        }
        if (struct.isSetImageVersionId()) {
          oprot.writeString(struct.imageVersionId);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getImageData_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.serverSessionId = iprot.readString();
          struct.setServerSessionIdIsSet(true);
        }
        if (incoming.get(1)) {
          struct.imageVersionId = iprot.readString();
          struct.setImageVersionIdIsSet(true);
        }
      }
    }

  }

  public static class getImageData_result implements org.apache.thrift.TBase<getImageData_result, getImageData_result._Fields>, java.io.Serializable, Cloneable, Comparable<getImageData_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImageData_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 FAILURE2_FIELD_DESC = new org.apache.thrift.protocol.TField("failure2", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField F3_FIELD_DESC = new org.apache.thrift.protocol.TField("f3", 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 getImageData_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getImageData_resultTupleSchemeFactory());
    }

    public ImagePublishData success; // required
    public TAuthorizationException failure; // required
    public TInvocationException failure2; // required
    public TNotFoundException f3; // 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"),
      FAILURE2((short)2, "failure2"),
      F3((short)3, "f3");

      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: // FAILURE2
            return FAILURE2;
          case 3: // F3
            return F3;
          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, ImagePublishData.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.FAILURE2, new org.apache.thrift.meta_data.FieldMetaData("failure2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.F3, new org.apache.thrift.meta_data.FieldMetaData("f3", 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(getImageData_result.class, metaDataMap);
    }

    public getImageData_result() {
    }

    public getImageData_result(
      ImagePublishData success,
      TAuthorizationException failure,
      TInvocationException failure2,
      TNotFoundException f3)
    {
      this();
      this.success = success;
      this.failure = failure;
      this.failure2 = failure2;
      this.f3 = f3;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getImageData_result(getImageData_result other) {
      if (other.isSetSuccess()) {
        this.success = new ImagePublishData(other.success);
      }
      if (other.isSetFailure()) {
        this.failure = new TAuthorizationException(other.failure);
      }
      if (other.isSetFailure2()) {
        this.failure2 = new TInvocationException(other.failure2);
      }
      if (other.isSetF3()) {
        this.f3 = new TNotFoundException(other.f3);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.failure = null;
      this.failure2 = null;
      this.f3 = null;
    }

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

    public getImageData_result setSuccess(ImagePublishData 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 getImageData_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 getFailure2() {
      return this.failure2;
    }

    public getImageData_result setFailure2(TInvocationException failure2) {
      this.failure2 = failure2;
      return this;
    }

    public void unsetFailure2() {
      this.failure2 = null;
    }

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

    public void setFailure2IsSet(boolean value) {
      if (!value) {
        this.failure2 = null;
      }
    }

    public TNotFoundException getF3() {
      return this.f3;
    }

    public getImageData_result setF3(TNotFoundException f3) {
      this.f3 = f3;
      return this;
    }

    public void unsetF3() {
      this.f3 = null;
    }

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

    public void setF3IsSet(boolean value) {
      if (!value) {
        this.f3 = null;
      }
    }

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

      case FAILURE:
        if (value == null) {
          unsetFailure();
        } else {
          setFailure((TAuthorizationException)value);
        }
        break;

      case FAILURE2:
        if (value == null) {
          unsetFailure2();
        } else {
          setFailure2((TInvocationException)value);
        }
        break;

      case F3:
        if (value == null) {
          unsetF3();
        } else {
          setF3((TNotFoundException)value);
        }
        break;

      }
    }

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

      case FAILURE:
        return getFailure();

      case FAILURE2:
        return getFailure2();

      case F3:
        return getF3();

      }
      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 FAILURE2:
        return isSetFailure2();
      case F3:
        return isSetF3();
      }
      throw new IllegalStateException();
    }

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

    public boolean equals(getImageData_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_failure2 = true && this.isSetFailure2();
      boolean that_present_failure2 = true && that.isSetFailure2();
      if (this_present_failure2 || that_present_failure2) {
        if (!(this_present_failure2 && that_present_failure2))
          return false;
        if (!this.failure2.equals(that.failure2))
          return false;
      }

      boolean this_present_f3 = true && this.isSetF3();
      boolean that_present_f3 = true && that.isSetF3();
      if (this_present_f3 || that_present_f3) {
        if (!(this_present_f3 && that_present_f3))
          return false;
        if (!this.f3.equals(that.f3))
          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_failure2 = true && (isSetFailure2());
      list.add(present_failure2);
      if (present_failure2)
        list.add(failure2);

      boolean present_f3 = true && (isSetF3());
      list.add(present_f3);
      if (present_f3)
        list.add(f3);

      return list.hashCode();
    }

    @Override
    public int compareTo(getImageData_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(isSetFailure2()).compareTo(other.isSetFailure2());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetFailure2()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure2, other.failure2);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetF3()).compareTo(other.isSetF3());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetF3()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.f3, other.f3);
        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("getImageData_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("failure2:");
      if (this.failure2 == null) {
        sb.append("null");
      } else {
        sb.append(this.failure2);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("f3:");
      if (this.f3 == null) {
        sb.append("null");
      } else {
        sb.append(this.f3);
      }
      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 getImageData_resultStandardSchemeFactory implements SchemeFactory {
      public getImageData_resultStandardScheme getScheme() {
        return new getImageData_resultStandardScheme();
      }
    }

    private static class getImageData_resultStandardScheme extends StandardScheme<getImageData_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getImageData_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 ImagePublishData();
                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: // FAILURE2
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.failure2 = new TInvocationException();
                struct.failure2.read(iprot);
                struct.setFailure2IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // F3
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.f3 = new TNotFoundException();
                struct.f3.read(iprot);
                struct.setF3IsSet(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, getImageData_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.failure2 != null) {
          oprot.writeFieldBegin(FAILURE2_FIELD_DESC);
          struct.failure2.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.f3 != null) {
          oprot.writeFieldBegin(F3_FIELD_DESC);
          struct.f3.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getImageData_resultTupleSchemeFactory implements SchemeFactory {
      public getImageData_resultTupleScheme getScheme() {
        return new getImageData_resultTupleScheme();
      }
    }

    private static class getImageData_resultTupleScheme extends TupleScheme<getImageData_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getImageData_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.isSetFailure2()) {
          optionals.set(2);
        }
        if (struct.isSetF3()) {
          optionals.set(3);
        }
        oprot.writeBitSet(optionals, 4);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetFailure()) {
          struct.failure.write(oprot);
        }
        if (struct.isSetFailure2()) {
          struct.failure2.write(oprot);
        }
        if (struct.isSetF3()) {
          struct.f3.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getImageData_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(4);
        if (incoming.get(0)) {
          struct.success = new ImagePublishData();
          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.failure2 = new TInvocationException();
          struct.failure2.read(iprot);
          struct.setFailure2IsSet(true);
        }
        if (incoming.get(3)) {
          struct.f3 = new TNotFoundException();
          struct.f3.read(iprot);
          struct.setF3IsSet(true);
        }
      }
    }

  }

  public static class submitImage_args implements org.apache.thrift.TBase<submitImage_args, submitImage_args._Fields>, java.io.Serializable, Cloneable, Comparable<submitImage_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("submitImage_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_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("imageDescription", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    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)3);

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

    public String userToken; // required
    public ImagePublishData imageDescription; // required
    public List<ByteBuffer> blockHashes; // 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_DESCRIPTION((short)2, "imageDescription"),
      BLOCK_HASHES((short)3, "blockHashes");

      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_DESCRIPTION
            return IMAGE_DESCRIPTION;
          case 3: // BLOCK_HASHES
            return BLOCK_HASHES;
          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_DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("imageDescription", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ImagePublishData.class)));
      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))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(submitImage_args.class, metaDataMap);
    }

    public submitImage_args() {
    }

    public submitImage_args(
      String userToken,
      ImagePublishData imageDescription,
      List<ByteBuffer> blockHashes)
    {
      this();
      this.userToken = userToken;
      this.imageDescription = imageDescription;
      this.blockHashes = blockHashes;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public submitImage_args(submitImage_args other) {
      if (other.isSetUserToken()) {
        this.userToken = other.userToken;
      }
      if (other.isSetImageDescription()) {
        this.imageDescription = new ImagePublishData(other.imageDescription);
      }
      if (other.isSetBlockHashes()) {
        List<ByteBuffer> __this__blockHashes = new ArrayList<ByteBuffer>(other.blockHashes);
        this.blockHashes = __this__blockHashes;
      }
    }

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

    @Override
    public void clear() {
      this.userToken = null;
      this.imageDescription = null;
      this.blockHashes = null;
    }

    public String getUserToken() {
      return this.userToken;
    }

    public submitImage_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 ImagePublishData getImageDescription() {
      return this.imageDescription;
    }

    public submitImage_args setImageDescription(ImagePublishData imageDescription) {
      this.imageDescription = imageDescription;
      return this;
    }

    public void unsetImageDescription() {
      this.imageDescription = null;
    }

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

    public void setImageDescriptionIsSet(boolean value) {
      if (!value) {
        this.imageDescription = 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 submitImage_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 void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_TOKEN:
        if (value == null) {
          unsetUserToken();
        } else {
          setUserToken((String)value);
        }
        break;

      case IMAGE_DESCRIPTION:
        if (value == null) {
          unsetImageDescription();
        } else {
          setImageDescription((ImagePublishData)value);
        }
        break;

      case BLOCK_HASHES:
        if (value == null) {
          unsetBlockHashes();
        } else {
          setBlockHashes((List<ByteBuffer>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_TOKEN:
        return getUserToken();

      case IMAGE_DESCRIPTION:
        return getImageDescription();

      case BLOCK_HASHES:
        return getBlockHashes();

      }
      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_DESCRIPTION:
        return isSetImageDescription();
      case BLOCK_HASHES:
        return isSetBlockHashes();
      }
      throw new IllegalStateException();
    }

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

    public boolean equals(submitImage_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_imageDescription = true && this.isSetImageDescription();
      boolean that_present_imageDescription = true && that.isSetImageDescription();
      if (this_present_imageDescription || that_present_imageDescription) {
        if (!(this_present_imageDescription && that_present_imageDescription))
          return false;
        if (!this.imageDescription.equals(that.imageDescription))
          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;
      }

      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_imageDescription = true && (isSetImageDescription());
      list.add(present_imageDescription);
      if (present_imageDescription)
        list.add(imageDescription);

      boolean present_blockHashes = true && (isSetBlockHashes());
      list.add(present_blockHashes);
      if (present_blockHashes)
        list.add(blockHashes);

      return list.hashCode();
    }

    @Override
    public int compareTo(submitImage_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(isSetImageDescription()).compareTo(other.isSetImageDescription());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetImageDescription()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageDescription, other.imageDescription);
        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;
        }
      }
      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("submitImage_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("imageDescription:");
      if (this.imageDescription == null) {
        sb.append("null");
      } else {
        sb.append(this.imageDescription);
      }
      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;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (imageDescription != null) {
        imageDescription.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 submitImage_argsStandardSchemeFactory implements SchemeFactory {
      public submitImage_argsStandardScheme getScheme() {
        return new submitImage_argsStandardScheme();
      }
    }

    private static class submitImage_argsStandardScheme extends StandardScheme<submitImage_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, submitImage_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_DESCRIPTION
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.imageDescription = new ImagePublishData();
                struct.imageDescription.read(iprot);
                struct.setImageDescriptionIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // BLOCK_HASHES
              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                {
                  org.apache.thrift.protocol.TList _list322 = iprot.readListBegin();
                  struct.blockHashes = new ArrayList<ByteBuffer>(_list322.size);
                  ByteBuffer _elem323;
                  for (int _i324 = 0; _i324 < _list322.size; ++_i324)
                  {
                    _elem323 = iprot.readBinary();
                    struct.blockHashes.add(_elem323);
                  }
                  iprot.readListEnd();
                }
                struct.setBlockHashesIsSet(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, submitImage_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.imageDescription != null) {
          oprot.writeFieldBegin(IMAGE_DESCRIPTION_FIELD_DESC);
          struct.imageDescription.write(oprot);
          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 _iter325 : struct.blockHashes)
            {
              oprot.writeBinary(_iter325);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class submitImage_argsTupleSchemeFactory implements SchemeFactory {
      public submitImage_argsTupleScheme getScheme() {
        return new submitImage_argsTupleScheme();
      }
    }

    private static class submitImage_argsTupleScheme extends TupleScheme<submitImage_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, submitImage_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetUserToken()) {
          optionals.set(0);
        }
        if (struct.isSetImageDescription()) {
          optionals.set(1);
        }
        if (struct.isSetBlockHashes()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetUserToken()) {
          oprot.writeString(struct.userToken);
        }
        if (struct.isSetImageDescription()) {
          struct.imageDescription.write(oprot);
        }
        if (struct.isSetBlockHashes()) {
          {
            oprot.writeI32(struct.blockHashes.size());
            for (ByteBuffer _iter326 : struct.blockHashes)
            {
              oprot.writeBinary(_iter326);
            }
          }
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, submitImage_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.imageDescription = new ImagePublishData();
          struct.imageDescription.read(iprot);
          struct.setImageDescriptionIsSet(true);
        }
        if (incoming.get(2)) {
          {
            org.apache.thrift.protocol.TList _list327 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
            struct.blockHashes = new ArrayList<ByteBuffer>(_list327.size);
            ByteBuffer _elem328;
            for (int _i329 = 0; _i329 < _list327.size; ++_i329)
            {
              _elem328 = iprot.readBinary();
              struct.blockHashes.add(_elem328);
            }
          }
          struct.setBlockHashesIsSet(true);
        }
      }
    }

  }

  public static class submitImage_result implements org.apache.thrift.TBase<submitImage_result, submitImage_result._Fields>, java.io.Serializable, Cloneable, Comparable<submitImage_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("submitImage_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 FAILURE2_FIELD_DESC = new org.apache.thrift.protocol.TField("failure2", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField FAILURE3_FIELD_DESC = new org.apache.thrift.protocol.TField("failure3", 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 submitImage_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new submitImage_resultTupleSchemeFactory());
    }

    public TransferInformation success; // required
    public TAuthorizationException failure; // required
    public TInvocationException failure2; // required
    public TTransferRejectedException failure3; // 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"),
      FAILURE2((short)2, "failure2"),
      FAILURE3((short)3, "failure3");

      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: // FAILURE2
            return FAILURE2;
          case 3: // FAILURE3
            return FAILURE3;
          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.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.FAILURE2, new org.apache.thrift.meta_data.FieldMetaData("failure2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.FAILURE3, new org.apache.thrift.meta_data.FieldMetaData("failure3", 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(submitImage_result.class, metaDataMap);
    }

    public submitImage_result() {
    }

    public submitImage_result(
      TransferInformation success,
      TAuthorizationException failure,
      TInvocationException failure2,
      TTransferRejectedException failure3)
    {
      this();
      this.success = success;
      this.failure = failure;
      this.failure2 = failure2;
      this.failure3 = failure3;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public submitImage_result(submitImage_result other) {
      if (other.isSetSuccess()) {
        this.success = new TransferInformation(other.success);
      }
      if (other.isSetFailure()) {
        this.failure = new TAuthorizationException(other.failure);
      }
      if (other.isSetFailure2()) {
        this.failure2 = new TInvocationException(other.failure2);
      }
      if (other.isSetFailure3()) {
        this.failure3 = new TTransferRejectedException(other.failure3);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.failure = null;
      this.failure2 = null;
      this.failure3 = null;
    }

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

    public submitImage_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 TAuthorizationException getFailure() {
      return this.failure;
    }

    public submitImage_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 getFailure2() {
      return this.failure2;
    }

    public submitImage_result setFailure2(TInvocationException failure2) {
      this.failure2 = failure2;
      return this;
    }

    public void unsetFailure2() {
      this.failure2 = null;
    }

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

    public void setFailure2IsSet(boolean value) {
      if (!value) {
        this.failure2 = null;
      }
    }

    public TTransferRejectedException getFailure3() {
      return this.failure3;
    }

    public submitImage_result setFailure3(TTransferRejectedException failure3) {
      this.failure3 = failure3;
      return this;
    }

    public void unsetFailure3() {
      this.failure3 = null;
    }

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

    public void setFailure3IsSet(boolean value) {
      if (!value) {
        this.failure3 = null;
      }
    }

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

      case FAILURE:
        if (value == null) {
          unsetFailure();
        } else {
          setFailure((TAuthorizationException)value);
        }
        break;

      case FAILURE2:
        if (value == null) {
          unsetFailure2();
        } else {
          setFailure2((TInvocationException)value);
        }
        break;

      case FAILURE3:
        if (value == null) {
          unsetFailure3();
        } else {
          setFailure3((TTransferRejectedException)value);
        }
        break;

      }
    }

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

      case FAILURE:
        return getFailure();

      case FAILURE2:
        return getFailure2();

      case FAILURE3:
        return getFailure3();

      }
      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 FAILURE2:
        return isSetFailure2();
      case FAILURE3:
        return isSetFailure3();
      }
      throw new IllegalStateException();
    }

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

    public boolean equals(submitImage_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_failure2 = true && this.isSetFailure2();
      boolean that_present_failure2 = true && that.isSetFailure2();
      if (this_present_failure2 || that_present_failure2) {
        if (!(this_present_failure2 && that_present_failure2))
          return false;
        if (!this.failure2.equals(that.failure2))
          return false;
      }

      boolean this_present_failure3 = true && this.isSetFailure3();
      boolean that_present_failure3 = true && that.isSetFailure3();
      if (this_present_failure3 || that_present_failure3) {
        if (!(this_present_failure3 && that_present_failure3))
          return false;
        if (!this.failure3.equals(that.failure3))
          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_failure2 = true && (isSetFailure2());
      list.add(present_failure2);
      if (present_failure2)
        list.add(failure2);

      boolean present_failure3 = true && (isSetFailure3());
      list.add(present_failure3);
      if (present_failure3)
        list.add(failure3);

      return list.hashCode();
    }

    @Override
    public int compareTo(submitImage_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(isSetFailure2()).compareTo(other.isSetFailure2());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetFailure2()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure2, other.failure2);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetFailure3()).compareTo(other.isSetFailure3());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetFailure3()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure3, other.failure3);
        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("submitImage_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("failure2:");
      if (this.failure2 == null) {
        sb.append("null");
      } else {
        sb.append(this.failure2);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("failure3:");
      if (this.failure3 == null) {
        sb.append("null");
      } else {
        sb.append(this.failure3);
      }
      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 submitImage_resultStandardSchemeFactory implements SchemeFactory {
      public submitImage_resultStandardScheme getScheme() {
        return new submitImage_resultStandardScheme();
      }
    }

    private static class submitImage_resultStandardScheme extends StandardScheme<submitImage_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, submitImage_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: // 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: // FAILURE2
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.failure2 = new TInvocationException();
                struct.failure2.read(iprot);
                struct.setFailure2IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // FAILURE3
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.failure3 = new TTransferRejectedException();
                struct.failure3.read(iprot);
                struct.setFailure3IsSet(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, submitImage_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.failure2 != null) {
          oprot.writeFieldBegin(FAILURE2_FIELD_DESC);
          struct.failure2.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.failure3 != null) {
          oprot.writeFieldBegin(FAILURE3_FIELD_DESC);
          struct.failure3.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class submitImage_resultTupleSchemeFactory implements SchemeFactory {
      public submitImage_resultTupleScheme getScheme() {
        return new submitImage_resultTupleScheme();
      }
    }

    private static class submitImage_resultTupleScheme extends TupleScheme<submitImage_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, submitImage_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.isSetFailure2()) {
          optionals.set(2);
        }
        if (struct.isSetFailure3()) {
          optionals.set(3);
        }
        oprot.writeBitSet(optionals, 4);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetFailure()) {
          struct.failure.write(oprot);
        }
        if (struct.isSetFailure2()) {
          struct.failure2.write(oprot);
        }
        if (struct.isSetFailure3()) {
          struct.failure3.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, submitImage_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(4);
        if (incoming.get(0)) {
          struct.success = new TransferInformation();
          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.failure2 = new TInvocationException();
          struct.failure2.read(iprot);
          struct.setFailure2IsSet(true);
        }
        if (incoming.get(3)) {
          struct.failure3 = new TTransferRejectedException();
          struct.failure3.read(iprot);
          struct.setFailure3IsSet(true);
        }
      }
    }

  }

  public static class registerSatellite_args implements org.apache.thrift.TBase<registerSatellite_args, registerSatellite_args._Fields>, java.io.Serializable, Cloneable, Comparable<registerSatellite_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("registerSatellite_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)6);
    private static final org.apache.thrift.protocol.TField DISPLAY_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("displayName", org.apache.thrift.protocol.TType.STRING, (short)5);
    private static final org.apache.thrift.protocol.TField ADDRESSES_FIELD_DESC = new org.apache.thrift.protocol.TField("addresses", org.apache.thrift.protocol.TType.LIST, (short)2);
    private static final org.apache.thrift.protocol.TField MODULUS_FIELD_DESC = new org.apache.thrift.protocol.TField("modulus", org.apache.thrift.protocol.TType.STRING, (short)3);
    private static final org.apache.thrift.protocol.TField EXPONENT_FIELD_DESC = new org.apache.thrift.protocol.TField("exponent", org.apache.thrift.protocol.TType.STRING, (short)4);
    private static final org.apache.thrift.protocol.TField CERTSHA256_FIELD_DESC = new org.apache.thrift.protocol.TField("certsha256", 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 registerSatellite_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new registerSatellite_argsTupleSchemeFactory());
    }

    public String userToken; // required
    public String displayName; // required
    public List<String> addresses; // required
    public String modulus; // required
    public String exponent; // required
    public ByteBuffer certsha256; // 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)6, "userToken"),
      DISPLAY_NAME((short)5, "displayName"),
      ADDRESSES((short)2, "addresses"),
      MODULUS((short)3, "modulus"),
      EXPONENT((short)4, "exponent"),
      CERTSHA256((short)1, "certsha256");

      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 6: // USER_TOKEN
            return USER_TOKEN;
          case 5: // DISPLAY_NAME
            return DISPLAY_NAME;
          case 2: // ADDRESSES
            return ADDRESSES;
          case 3: // MODULUS
            return MODULUS;
          case 4: // EXPONENT
            return EXPONENT;
          case 1: // CERTSHA256
            return CERTSHA256;
          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.DISPLAY_NAME, new org.apache.thrift.meta_data.FieldMetaData("displayName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.ADDRESSES, new org.apache.thrift.meta_data.FieldMetaData("addresses", 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.MODULUS, new org.apache.thrift.meta_data.FieldMetaData("modulus", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.EXPONENT, new org.apache.thrift.meta_data.FieldMetaData("exponent", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.CERTSHA256, new org.apache.thrift.meta_data.FieldMetaData("certsha256", 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(registerSatellite_args.class, metaDataMap);
    }

    public registerSatellite_args() {
    }

    public registerSatellite_args(
      String userToken,
      String displayName,
      List<String> addresses,
      String modulus,
      String exponent,
      ByteBuffer certsha256)
    {
      this();
      this.userToken = userToken;
      this.displayName = displayName;
      this.addresses = addresses;
      this.modulus = modulus;
      this.exponent = exponent;
      this.certsha256 = org.apache.thrift.TBaseHelper.copyBinary(certsha256);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public registerSatellite_args(registerSatellite_args other) {
      if (other.isSetUserToken()) {
        this.userToken = other.userToken;
      }
      if (other.isSetDisplayName()) {
        this.displayName = other.displayName;
      }
      if (other.isSetAddresses()) {
        List<String> __this__addresses = new ArrayList<String>(other.addresses);
        this.addresses = __this__addresses;
      }
      if (other.isSetModulus()) {
        this.modulus = other.modulus;
      }
      if (other.isSetExponent()) {
        this.exponent = other.exponent;
      }
      if (other.isSetCertsha256()) {
        this.certsha256 = org.apache.thrift.TBaseHelper.copyBinary(other.certsha256);
      }
    }

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

    @Override
    public void clear() {
      this.userToken = null;
      this.displayName = null;
      this.addresses = null;
      this.modulus = null;
      this.exponent = null;
      this.certsha256 = null;
    }

    public String getUserToken() {
      return this.userToken;
    }

    public registerSatellite_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 getDisplayName() {
      return this.displayName;
    }

    public registerSatellite_args setDisplayName(String displayName) {
      this.displayName = displayName;
      return this;
    }

    public void unsetDisplayName() {
      this.displayName = null;
    }

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

    public void setDisplayNameIsSet(boolean value) {
      if (!value) {
        this.displayName = null;
      }
    }

    public int getAddressesSize() {
      return (this.addresses == null) ? 0 : this.addresses.size();
    }

    public java.util.Iterator<String> getAddressesIterator() {
      return (this.addresses == null) ? null : this.addresses.iterator();
    }

    public void addToAddresses(String elem) {
      if (this.addresses == null) {
        this.addresses = new ArrayList<String>();
      }
      this.addresses.add(elem);
    }

    public List<String> getAddresses() {
      return this.addresses;
    }

    public registerSatellite_args setAddresses(List<String> addresses) {
      this.addresses = addresses;
      return this;
    }

    public void unsetAddresses() {
      this.addresses = null;
    }

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

    public void setAddressesIsSet(boolean value) {
      if (!value) {
        this.addresses = null;
      }
    }

    public String getModulus() {
      return this.modulus;
    }

    public registerSatellite_args setModulus(String modulus) {
      this.modulus = modulus;
      return this;
    }

    public void unsetModulus() {
      this.modulus = null;
    }

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

    public void setModulusIsSet(boolean value) {
      if (!value) {
        this.modulus = null;
      }
    }

    public String getExponent() {
      return this.exponent;
    }

    public registerSatellite_args setExponent(String exponent) {
      this.exponent = exponent;
      return this;
    }

    public void unsetExponent() {
      this.exponent = null;
    }

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

    public void setExponentIsSet(boolean value) {
      if (!value) {
        this.exponent = null;
      }
    }

    public byte[] getCertsha256() {
      setCertsha256(org.apache.thrift.TBaseHelper.rightSize(certsha256));
      return certsha256 == null ? null : certsha256.array();
    }

    public ByteBuffer bufferForCertsha256() {
      return org.apache.thrift.TBaseHelper.copyBinary(certsha256);
    }

    public registerSatellite_args setCertsha256(byte[] certsha256) {
      this.certsha256 = certsha256 == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(certsha256, certsha256.length));
      return this;
    }

    public registerSatellite_args setCertsha256(ByteBuffer certsha256) {
      this.certsha256 = org.apache.thrift.TBaseHelper.copyBinary(certsha256);
      return this;
    }

    public void unsetCertsha256() {
      this.certsha256 = null;
    }

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

    public void setCertsha256IsSet(boolean value) {
      if (!value) {
        this.certsha256 = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case USER_TOKEN:
        if (value == null) {
          unsetUserToken();
        } else {
          setUserToken((String)value);
        }
        break;

      case DISPLAY_NAME:
        if (value == null) {
          unsetDisplayName();
        } else {
          setDisplayName((String)value);
        }
        break;

      case ADDRESSES:
        if (value == null) {
          unsetAddresses();
        } else {
          setAddresses((List<String>)value);
        }
        break;

      case MODULUS:
        if (value == null) {
          unsetModulus();
        } else {
          setModulus((String)value);
        }
        break;

      case EXPONENT:
        if (value == null) {
          unsetExponent();
        } else {
          setExponent((String)value);
        }
        break;

      case CERTSHA256:
        if (value == null) {
          unsetCertsha256();
        } else {
          setCertsha256((ByteBuffer)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case USER_TOKEN:
        return getUserToken();

      case DISPLAY_NAME:
        return getDisplayName();

      case ADDRESSES:
        return getAddresses();

      case MODULUS:
        return getModulus();

      case EXPONENT:
        return getExponent();

      case CERTSHA256:
        return getCertsha256();

      }
      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 DISPLAY_NAME:
        return isSetDisplayName();
      case ADDRESSES:
        return isSetAddresses();
      case MODULUS:
        return isSetModulus();
      case EXPONENT:
        return isSetExponent();
      case CERTSHA256:
        return isSetCertsha256();
      }
      throw new IllegalStateException();
    }

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

    public boolean equals(registerSatellite_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_displayName = true && this.isSetDisplayName();
      boolean that_present_displayName = true && that.isSetDisplayName();
      if (this_present_displayName || that_present_displayName) {
        if (!(this_present_displayName && that_present_displayName))
          return false;
        if (!this.displayName.equals(that.displayName))
          return false;
      }

      boolean this_present_addresses = true && this.isSetAddresses();
      boolean that_present_addresses = true && that.isSetAddresses();
      if (this_present_addresses || that_present_addresses) {
        if (!(this_present_addresses && that_present_addresses))
          return false;
        if (!this.addresses.equals(that.addresses))
          return false;
      }

      boolean this_present_modulus = true && this.isSetModulus();
      boolean that_present_modulus = true && that.isSetModulus();
      if (this_present_modulus || that_present_modulus) {
        if (!(this_present_modulus && that_present_modulus))
          return false;
        if (!this.modulus.equals(that.modulus))
          return false;
      }

      boolean this_present_exponent = true && this.isSetExponent();
      boolean that_present_exponent = true && that.isSetExponent();
      if (this_present_exponent || that_present_exponent) {
        if (!(this_present_exponent && that_present_exponent))
          return false;
        if (!this.exponent.equals(that.exponent))
          return false;
      }

      boolean this_present_certsha256 = true && this.isSetCertsha256();
      boolean that_present_certsha256 = true && that.isSetCertsha256();
      if (this_present_certsha256 || that_present_certsha256) {
        if (!(this_present_certsha256 && that_present_certsha256))
          return false;
        if (!this.certsha256.equals(that.certsha256))
          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_displayName = true && (isSetDisplayName());
      list.add(present_displayName);
      if (present_displayName)
        list.add(displayName);

      boolean present_addresses = true && (isSetAddresses());
      list.add(present_addresses);
      if (present_addresses)
        list.add(addresses);

      boolean present_modulus = true && (isSetModulus());
      list.add(present_modulus);
      if (present_modulus)
        list.add(modulus);

      boolean present_exponent = true && (isSetExponent());
      list.add(present_exponent);
      if (present_exponent)
        list.add(exponent);

      boolean present_certsha256 = true && (isSetCertsha256());
      list.add(present_certsha256);
      if (present_certsha256)
        list.add(certsha256);

      return list.hashCode();
    }

    @Override
    public int compareTo(registerSatellite_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(isSetDisplayName()).compareTo(other.isSetDisplayName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetDisplayName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.displayName, other.displayName);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetAddresses()).compareTo(other.isSetAddresses());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAddresses()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.addresses, other.addresses);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetModulus()).compareTo(other.isSetModulus());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetModulus()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.modulus, other.modulus);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetExponent()).compareTo(other.isSetExponent());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetExponent()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.exponent, other.exponent);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetCertsha256()).compareTo(other.isSetCertsha256());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCertsha256()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.certsha256, other.certsha256);
        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("registerSatellite_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("displayName:");
      if (this.displayName == null) {
        sb.append("null");
      } else {
        sb.append(this.displayName);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("addresses:");
      if (this.addresses == null) {
        sb.append("null");
      } else {
        sb.append(this.addresses);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("modulus:");
      if (this.modulus == null) {
        sb.append("null");
      } else {
        sb.append(this.modulus);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("exponent:");
      if (this.exponent == null) {
        sb.append("null");
      } else {
        sb.append(this.exponent);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("certsha256:");
      if (this.certsha256 == null) {
        sb.append("null");
      } else {
        org.apache.thrift.TBaseHelper.toString(this.certsha256, 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 registerSatellite_argsStandardSchemeFactory implements SchemeFactory {
      public registerSatellite_argsStandardScheme getScheme() {
        return new registerSatellite_argsStandardScheme();
      }
    }

    private static class registerSatellite_argsStandardScheme extends StandardScheme<registerSatellite_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, registerSatellite_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 6: // 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 5: // DISPLAY_NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.displayName = iprot.readString();
                struct.setDisplayNameIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // ADDRESSES
              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                {
                  org.apache.thrift.protocol.TList _list330 = iprot.readListBegin();
                  struct.addresses = new ArrayList<String>(_list330.size);
                  String _elem331;
                  for (int _i332 = 0; _i332 < _list330.size; ++_i332)
                  {
                    _elem331 = iprot.readString();
                    struct.addresses.add(_elem331);
                  }
                  iprot.readListEnd();
                }
                struct.setAddressesIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // MODULUS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.modulus = iprot.readString();
                struct.setModulusIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 4: // EXPONENT
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.exponent = iprot.readString();
                struct.setExponentIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // CERTSHA256
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.certsha256 = iprot.readBinary();
                struct.setCertsha256IsSet(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, registerSatellite_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.certsha256 != null) {
          oprot.writeFieldBegin(CERTSHA256_FIELD_DESC);
          oprot.writeBinary(struct.certsha256);
          oprot.writeFieldEnd();
        }
        if (struct.addresses != null) {
          oprot.writeFieldBegin(ADDRESSES_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.addresses.size()));
            for (String _iter333 : struct.addresses)
            {
              oprot.writeString(_iter333);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.modulus != null) {
          oprot.writeFieldBegin(MODULUS_FIELD_DESC);
          oprot.writeString(struct.modulus);
          oprot.writeFieldEnd();
        }
        if (struct.exponent != null) {
          oprot.writeFieldBegin(EXPONENT_FIELD_DESC);
          oprot.writeString(struct.exponent);
          oprot.writeFieldEnd();
        }
        if (struct.displayName != null) {
          oprot.writeFieldBegin(DISPLAY_NAME_FIELD_DESC);
          oprot.writeString(struct.displayName);
          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 registerSatellite_argsTupleSchemeFactory implements SchemeFactory {
      public registerSatellite_argsTupleScheme getScheme() {
        return new registerSatellite_argsTupleScheme();
      }
    }

    private static class registerSatellite_argsTupleScheme extends TupleScheme<registerSatellite_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, registerSatellite_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetUserToken()) {
          optionals.set(0);
        }
        if (struct.isSetDisplayName()) {
          optionals.set(1);
        }
        if (struct.isSetAddresses()) {
          optionals.set(2);
        }
        if (struct.isSetModulus()) {
          optionals.set(3);
        }
        if (struct.isSetExponent()) {
          optionals.set(4);
        }
        if (struct.isSetCertsha256()) {
          optionals.set(5);
        }
        oprot.writeBitSet(optionals, 6);
        if (struct.isSetUserToken()) {
          oprot.writeString(struct.userToken);
        }
        if (struct.isSetDisplayName()) {
          oprot.writeString(struct.displayName);
        }
        if (struct.isSetAddresses()) {
          {
            oprot.writeI32(struct.addresses.size());
            for (String _iter334 : struct.addresses)
            {
              oprot.writeString(_iter334);
            }
          }
        }
        if (struct.isSetModulus()) {
          oprot.writeString(struct.modulus);
        }
        if (struct.isSetExponent()) {
          oprot.writeString(struct.exponent);
        }
        if (struct.isSetCertsha256()) {
          oprot.writeBinary(struct.certsha256);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, registerSatellite_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(6);
        if (incoming.get(0)) {
          struct.userToken = iprot.readString();
          struct.setUserTokenIsSet(true);
        }
        if (incoming.get(1)) {
          struct.displayName = iprot.readString();
          struct.setDisplayNameIsSet(true);
        }
        if (incoming.get(2)) {
          {
            org.apache.thrift.protocol.TList _list335 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
            struct.addresses = new ArrayList<String>(_list335.size);
            String _elem336;
            for (int _i337 = 0; _i337 < _list335.size; ++_i337)
            {
              _elem336 = iprot.readString();
              struct.addresses.add(_elem336);
            }
          }
          struct.setAddressesIsSet(true);
        }
        if (incoming.get(3)) {
          struct.modulus = iprot.readString();
          struct.setModulusIsSet(true);
        }
        if (incoming.get(4)) {
          struct.exponent = iprot.readString();
          struct.setExponentIsSet(true);
        }
        if (incoming.get(5)) {
          struct.certsha256 = iprot.readBinary();
          struct.setCertsha256IsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
    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)1);

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

    public int success; // 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"),
      ERROR((short)1, "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: // 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
    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.I32)));
      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(registerSatellite_result.class, metaDataMap);
    }

    public registerSatellite_result() {
    }

    public registerSatellite_result(
      int success,
      TInvocationException error)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
      this.error = error;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public registerSatellite_result(registerSatellite_result other) {
      __isset_bitfield = other.__isset_bitfield;
      this.success = other.success;
      if (other.isSetError()) {
        this.error = new TInvocationException(other.error);
      }
    }

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

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

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

    public registerSatellite_result setSuccess(int 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 TInvocationException getError() {
      return this.error;
    }

    public registerSatellite_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((Integer)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 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 ERROR:
        return isSetError();
      }
      throw new IllegalStateException();
    }

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

    public boolean equals(registerSatellite_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;
      }

      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;
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_error = true && (isSetError());
      list.add(present_error);
      if (present_error)
        list.add(error);

      return list.hashCode();
    }

    @Override
    public int compareTo(registerSatellite_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(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("registerSatellite_result(");
      boolean first = true;

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

    private static class registerSatellite_resultStandardScheme extends StandardScheme<registerSatellite_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, registerSatellite_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.I32) {
                struct.success = iprot.readI32();
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // 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, registerSatellite_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.isSetSuccess()) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          oprot.writeI32(struct.success);
          oprot.writeFieldEnd();
        }
        if (struct.error != null) {
          oprot.writeFieldBegin(ERROR_FIELD_DESC);
          struct.error.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class registerSatellite_resultTupleSchemeFactory implements SchemeFactory {
      public registerSatellite_resultTupleScheme getScheme() {
        return new registerSatellite_resultTupleScheme();
      }
    }

    private static class registerSatellite_resultTupleScheme extends TupleScheme<registerSatellite_result> {

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

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, registerSatellite_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = iprot.readI32();
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.error = new TInvocationException();
          struct.error.read(iprot);
          struct.setErrorIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SERVER_SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("serverSessionId", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField DISPLAY_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("displayName", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField ADDRESSES_FIELD_DESC = new org.apache.thrift.protocol.TField("addresses", org.apache.thrift.protocol.TType.LIST, (short)3);

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

    public String serverSessionId; // required
    public String displayName; // required
    public List<String> addresses; // 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 {
      SERVER_SESSION_ID((short)1, "serverSessionId"),
      DISPLAY_NAME((short)2, "displayName"),
      ADDRESSES((short)3, "addresses");

      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: // SERVER_SESSION_ID
            return SERVER_SESSION_ID;
          case 2: // DISPLAY_NAME
            return DISPLAY_NAME;
          case 3: // ADDRESSES
            return ADDRESSES;
          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.SERVER_SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("serverSessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , "Token")));
      tmpMap.put(_Fields.DISPLAY_NAME, new org.apache.thrift.meta_data.FieldMetaData("displayName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.ADDRESSES, new org.apache.thrift.meta_data.FieldMetaData("addresses", 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))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateSatellite_args.class, metaDataMap);
    }

    public updateSatellite_args() {
    }

    public updateSatellite_args(
      String serverSessionId,
      String displayName,
      List<String> addresses)
    {
      this();
      this.serverSessionId = serverSessionId;
      this.displayName = displayName;
      this.addresses = addresses;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updateSatellite_args(updateSatellite_args other) {
      if (other.isSetServerSessionId()) {
        this.serverSessionId = other.serverSessionId;
      }
      if (other.isSetDisplayName()) {
        this.displayName = other.displayName;
      }
      if (other.isSetAddresses()) {
        List<String> __this__addresses = new ArrayList<String>(other.addresses);
        this.addresses = __this__addresses;
      }
    }

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

    @Override
    public void clear() {
      this.serverSessionId = null;
      this.displayName = null;
      this.addresses = null;
    }

    public String getServerSessionId() {
      return this.serverSessionId;
    }

    public updateSatellite_args setServerSessionId(String serverSessionId) {
      this.serverSessionId = serverSessionId;
      return this;
    }

    public void unsetServerSessionId() {
      this.serverSessionId = null;
    }

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

    public void setServerSessionIdIsSet(boolean value) {
      if (!value) {
        this.serverSessionId = null;
      }
    }

    public String getDisplayName() {
      return this.displayName;
    }

    public updateSatellite_args setDisplayName(String displayName) {
      this.displayName = displayName;
      return this;
    }

    public void unsetDisplayName() {
      this.displayName = null;
    }

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

    public void setDisplayNameIsSet(boolean value) {
      if (!value) {
        this.displayName = null;
      }
    }

    public int getAddressesSize() {
      return (this.addresses == null) ? 0 : this.addresses.size();
    }

    public java.util.Iterator<String> getAddressesIterator() {
      return (this.addresses == null) ? null : this.addresses.iterator();
    }

    public void addToAddresses(String elem) {
      if (this.addresses == null) {
        this.addresses = new ArrayList<String>();
      }
      this.addresses.add(elem);
    }

    public List<String> getAddresses() {
      return this.addresses;
    }

    public updateSatellite_args setAddresses(List<String> addresses) {
      this.addresses = addresses;
      return this;
    }

    public void unsetAddresses() {
      this.addresses = null;
    }

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

    public void setAddressesIsSet(boolean value) {
      if (!value) {
        this.addresses = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SERVER_SESSION_ID:
        if (value == null) {
          unsetServerSessionId();
        } else {
          setServerSessionId((String)value);
        }
        break;

      case DISPLAY_NAME:
        if (value == null) {
          unsetDisplayName();
        } else {
          setDisplayName((String)value);
        }
        break;

      case ADDRESSES:
        if (value == null) {
          unsetAddresses();
        } else {
          setAddresses((List<String>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SERVER_SESSION_ID:
        return getServerSessionId();

      case DISPLAY_NAME:
        return getDisplayName();

      case ADDRESSES:
        return getAddresses();

      }
      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 SERVER_SESSION_ID:
        return isSetServerSessionId();
      case DISPLAY_NAME:
        return isSetDisplayName();
      case ADDRESSES:
        return isSetAddresses();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_serverSessionId = true && this.isSetServerSessionId();
      boolean that_present_serverSessionId = true && that.isSetServerSessionId();
      if (this_present_serverSessionId || that_present_serverSessionId) {
        if (!(this_present_serverSessionId && that_present_serverSessionId))
          return false;
        if (!this.serverSessionId.equals(that.serverSessionId))
          return false;
      }

      boolean this_present_displayName = true && this.isSetDisplayName();
      boolean that_present_displayName = true && that.isSetDisplayName();
      if (this_present_displayName || that_present_displayName) {
        if (!(this_present_displayName && that_present_displayName))
          return false;
        if (!this.displayName.equals(that.displayName))
          return false;
      }

      boolean this_present_addresses = true && this.isSetAddresses();
      boolean that_present_addresses = true && that.isSetAddresses();
      if (this_present_addresses || that_present_addresses) {
        if (!(this_present_addresses && that_present_addresses))
          return false;
        if (!this.addresses.equals(that.addresses))
          return false;
      }

      return true;
    }

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

      boolean present_serverSessionId = true && (isSetServerSessionId());
      list.add(present_serverSessionId);
      if (present_serverSessionId)
        list.add(serverSessionId);

      boolean present_displayName = true && (isSetDisplayName());
      list.add(present_displayName);
      if (present_displayName)
        list.add(displayName);

      boolean present_addresses = true && (isSetAddresses());
      list.add(present_addresses);
      if (present_addresses)
        list.add(addresses);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetServerSessionId()).compareTo(other.isSetServerSessionId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetServerSessionId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverSessionId, other.serverSessionId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetDisplayName()).compareTo(other.isSetDisplayName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetDisplayName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.displayName, other.displayName);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetAddresses()).compareTo(other.isSetAddresses());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAddresses()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.addresses, other.addresses);
        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("updateSatellite_args(");
      boolean first = true;

      sb.append("serverSessionId:");
      if (this.serverSessionId == null) {
        sb.append("null");
      } else {
        sb.append(this.serverSessionId);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("displayName:");
      if (this.displayName == null) {
        sb.append("null");
      } else {
        sb.append(this.displayName);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("addresses:");
      if (this.addresses == null) {
        sb.append("null");
      } else {
        sb.append(this.addresses);
      }
      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 updateSatellite_argsStandardSchemeFactory implements SchemeFactory {
      public updateSatellite_argsStandardScheme getScheme() {
        return new updateSatellite_argsStandardScheme();
      }
    }

    private static class updateSatellite_argsStandardScheme extends StandardScheme<updateSatellite_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, updateSatellite_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: // SERVER_SESSION_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.serverSessionId = iprot.readString();
                struct.setServerSessionIdIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // DISPLAY_NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.displayName = iprot.readString();
                struct.setDisplayNameIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // ADDRESSES
              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                {
                  org.apache.thrift.protocol.TList _list338 = iprot.readListBegin();
                  struct.addresses = new ArrayList<String>(_list338.size);
                  String _elem339;
                  for (int _i340 = 0; _i340 < _list338.size; ++_i340)
                  {
                    _elem339 = iprot.readString();
                    struct.addresses.add(_elem339);
                  }
                  iprot.readListEnd();
                }
                struct.setAddressesIsSet(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, updateSatellite_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.serverSessionId != null) {
          oprot.writeFieldBegin(SERVER_SESSION_ID_FIELD_DESC);
          oprot.writeString(struct.serverSessionId);
          oprot.writeFieldEnd();
        }
        if (struct.displayName != null) {
          oprot.writeFieldBegin(DISPLAY_NAME_FIELD_DESC);
          oprot.writeString(struct.displayName);
          oprot.writeFieldEnd();
        }
        if (struct.addresses != null) {
          oprot.writeFieldBegin(ADDRESSES_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.addresses.size()));
            for (String _iter341 : struct.addresses)
            {
              oprot.writeString(_iter341);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class updateSatellite_argsTupleSchemeFactory implements SchemeFactory {
      public updateSatellite_argsTupleScheme getScheme() {
        return new updateSatellite_argsTupleScheme();
      }
    }

    private static class updateSatellite_argsTupleScheme extends TupleScheme<updateSatellite_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, updateSatellite_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetServerSessionId()) {
          optionals.set(0);
        }
        if (struct.isSetDisplayName()) {
          optionals.set(1);
        }
        if (struct.isSetAddresses()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetServerSessionId()) {
          oprot.writeString(struct.serverSessionId);
        }
        if (struct.isSetDisplayName()) {
          oprot.writeString(struct.displayName);
        }
        if (struct.isSetAddresses()) {
          {
            oprot.writeI32(struct.addresses.size());
            for (String _iter342 : struct.addresses)
            {
              oprot.writeString(_iter342);
            }
          }
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, updateSatellite_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.serverSessionId = iprot.readString();
          struct.setServerSessionIdIsSet(true);
        }
        if (incoming.get(1)) {
          struct.displayName = iprot.readString();
          struct.setDisplayNameIsSet(true);
        }
        if (incoming.get(2)) {
          {
            org.apache.thrift.protocol.TList _list343 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
            struct.addresses = new ArrayList<String>(_list343.size);
            String _elem344;
            for (int _i345 = 0; _i345 < _list343.size; ++_i345)
            {
              _elem344 = iprot.readString();
              struct.addresses.add(_elem344);
            }
          }
          struct.setAddressesIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
    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 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 updateSatellite_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new updateSatellite_resultTupleSchemeFactory());
    }

    public boolean success; // required
    public TAuthorizationException failure; // 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"),
      FAILURE((short)1, "failure"),
      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: // FAILURE
            return FAILURE;
          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
    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.BOOL)));
      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.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(updateSatellite_result.class, metaDataMap);
    }

    public updateSatellite_result() {
    }

    public updateSatellite_result(
      boolean success,
      TAuthorizationException failure,
      TInvocationException error)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
      this.failure = failure;
      this.error = error;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updateSatellite_result(updateSatellite_result other) {
      __isset_bitfield = other.__isset_bitfield;
      this.success = other.success;
      if (other.isSetFailure()) {
        this.failure = new TAuthorizationException(other.failure);
      }
      if (other.isSetError()) {
        this.error = new TInvocationException(other.error);
      }
    }

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

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

    public boolean isSuccess() {
      return this.success;
    }

    public updateSatellite_result setSuccess(boolean 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 TAuthorizationException getFailure() {
      return this.failure;
    }

    public updateSatellite_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 getError() {
      return this.error;
    }

    public updateSatellite_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((Boolean)value);
        }
        break;

      case FAILURE:
        if (value == null) {
          unsetFailure();
        } else {
          setFailure((TAuthorizationException)value);
        }
        break;

      case ERROR:
        if (value == null) {
          unsetError();
        } else {
          setError((TInvocationException)value);
        }
        break;

      }
    }

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

      case FAILURE:
        return getFailure();

      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 FAILURE:
        return isSetFailure();
      case ERROR:
        return isSetError();
      }
      throw new IllegalStateException();
    }

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

    public boolean equals(updateSatellite_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;
      }

      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_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;
      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_error = true && (isSetError());
      list.add(present_error);
      if (present_error)
        list.add(error);

      return list.hashCode();
    }

    @Override
    public int compareTo(updateSatellite_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(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("updateSatellite_result(");
      boolean first = true;

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

    private static class updateSatellite_resultStandardScheme extends StandardScheme<updateSatellite_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, updateSatellite_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.BOOL) {
                struct.success = iprot.readBool();
                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: // 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, updateSatellite_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.isSetSuccess()) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          oprot.writeBool(struct.success);
          oprot.writeFieldEnd();
        }
        if (struct.failure != null) {
          oprot.writeFieldBegin(FAILURE_FIELD_DESC);
          struct.failure.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 updateSatellite_resultTupleSchemeFactory implements SchemeFactory {
      public updateSatellite_resultTupleScheme getScheme() {
        return new updateSatellite_resultTupleScheme();
      }
    }

    private static class updateSatellite_resultTupleScheme extends TupleScheme<updateSatellite_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, updateSatellite_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.isSetError()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetSuccess()) {
          oprot.writeBool(struct.success);
        }
        if (struct.isSetFailure()) {
          struct.failure.write(oprot);
        }
        if (struct.isSetError()) {
          struct.error.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, updateSatellite_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.success = iprot.readBool();
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.failure = new TAuthorizationException();
          struct.failure.read(iprot);
          struct.setFailureIsSet(true);
        }
        if (incoming.get(2)) {
          struct.error = new TInvocationException();
          struct.error.read(iprot);
          struct.setErrorIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.STRING, (short)2);
    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)1);

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

    public String sessionId; // 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 {
      SESSION_ID((short)2, "sessionId"),
      IMAGE_VERSION_ID((short)1, "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 2: // SESSION_ID
            return SESSION_ID;
          case 1: // 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", 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(downloadImage_args.class, metaDataMap);
    }

    public downloadImage_args() {
    }

    public downloadImage_args(
      String sessionId,
      String imageVersionId)
    {
      this();
      this.sessionId = sessionId;
      this.imageVersionId = imageVersionId;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public downloadImage_args(downloadImage_args other) {
      if (other.isSetSessionId()) {
        this.sessionId = other.sessionId;
      }
      if (other.isSetImageVersionId()) {
        this.imageVersionId = other.imageVersionId;
      }
    }

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

    @Override
    public void clear() {
      this.sessionId = null;
      this.imageVersionId = null;
    }

    public String getSessionId() {
      return this.sessionId;
    }

    public downloadImage_args setSessionId(String sessionId) {
      this.sessionId = sessionId;
      return this;
    }

    public void unsetSessionId() {
      this.sessionId = null;
    }

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

    public void setSessionIdIsSet(boolean value) {
      if (!value) {
        this.sessionId = null;
      }
    }

    public String getImageVersionId() {
      return this.imageVersionId;
    }

    public downloadImage_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 SESSION_ID:
        if (value == null) {
          unsetSessionId();
        } else {
          setSessionId((String)value);
        }
        break;

      case IMAGE_VERSION_ID:
        if (value == null) {
          unsetImageVersionId();
        } else {
          setImageVersionId((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SESSION_ID:
        return getSessionId();

      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 SESSION_ID:
        return isSetSessionId();
      case IMAGE_VERSION_ID:
        return isSetImageVersionId();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_sessionId = true && this.isSetSessionId();
      boolean that_present_sessionId = true && that.isSetSessionId();
      if (this_present_sessionId || that_present_sessionId) {
        if (!(this_present_sessionId && that_present_sessionId))
          return false;
        if (!this.sessionId.equals(that.sessionId))
          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_sessionId = true && (isSetSessionId());
      list.add(present_sessionId);
      if (present_sessionId)
        list.add(sessionId);

      boolean present_imageVersionId = true && (isSetImageVersionId());
      list.add(present_imageVersionId);
      if (present_imageVersionId)
        list.add(imageVersionId);

      return list.hashCode();
    }

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

      int lastComparison = 0;

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

      sb.append("sessionId:");
      if (this.sessionId == null) {
        sb.append("null");
      } else {
        sb.append(this.sessionId);
      }
      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 downloadImage_argsStandardSchemeFactory implements SchemeFactory {
      public downloadImage_argsStandardScheme getScheme() {
        return new downloadImage_argsStandardScheme();
      }
    }

    private static class downloadImage_argsStandardScheme extends StandardScheme<downloadImage_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, downloadImage_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 2: // SESSION_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.sessionId = iprot.readString();
                struct.setSessionIdIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // 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, downloadImage_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.imageVersionId != null) {
          oprot.writeFieldBegin(IMAGE_VERSION_ID_FIELD_DESC);
          oprot.writeString(struct.imageVersionId);
          oprot.writeFieldEnd();
        }
        if (struct.sessionId != null) {
          oprot.writeFieldBegin(SESSION_ID_FIELD_DESC);
          oprot.writeString(struct.sessionId);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class downloadImage_argsTupleSchemeFactory implements SchemeFactory {
      public downloadImage_argsTupleScheme getScheme() {
        return new downloadImage_argsTupleScheme();
      }
    }

    private static class downloadImage_argsTupleScheme extends TupleScheme<downloadImage_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, downloadImage_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSessionId()) {
          optionals.set(0);
        }
        if (struct.isSetImageVersionId()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSessionId()) {
          oprot.writeString(struct.sessionId);
        }
        if (struct.isSetImageVersionId()) {
          oprot.writeString(struct.imageVersionId);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, downloadImage_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.sessionId = iprot.readString();
          struct.setSessionIdIsSet(true);
        }
        if (incoming.get(1)) {
          struct.imageVersionId = iprot.readString();
          struct.setImageVersionIdIsSet(true);
        }
      }
    }

  }

  public static class downloadImage_result implements org.apache.thrift.TBase<downloadImage_result, downloadImage_result._Fields>, java.io.Serializable, Cloneable, Comparable<downloadImage_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("downloadImage_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 FAILURE2_FIELD_DESC = new org.apache.thrift.protocol.TField("failure2", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField F3_FIELD_DESC = new org.apache.thrift.protocol.TField("f3", 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 downloadImage_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new downloadImage_resultTupleSchemeFactory());
    }

    public TransferInformation success; // required
    public TAuthorizationException failure; // required
    public TInvocationException failure2; // required
    public TNotFoundException f3; // 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"),
      FAILURE2((short)2, "failure2"),
      F3((short)3, "f3");

      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: // FAILURE2
            return FAILURE2;
          case 3: // F3
            return F3;
          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.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.FAILURE2, new org.apache.thrift.meta_data.FieldMetaData("failure2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.F3, new org.apache.thrift.meta_data.FieldMetaData("f3", 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(downloadImage_result.class, metaDataMap);
    }

    public downloadImage_result() {
    }

    public downloadImage_result(
      TransferInformation success,
      TAuthorizationException failure,
      TInvocationException failure2,
      TNotFoundException f3)
    {
      this();
      this.success = success;
      this.failure = failure;
      this.failure2 = failure2;
      this.f3 = f3;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public downloadImage_result(downloadImage_result other) {
      if (other.isSetSuccess()) {
        this.success = new TransferInformation(other.success);
      }
      if (other.isSetFailure()) {
        this.failure = new TAuthorizationException(other.failure);
      }
      if (other.isSetFailure2()) {
        this.failure2 = new TInvocationException(other.failure2);
      }
      if (other.isSetF3()) {
        this.f3 = new TNotFoundException(other.f3);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.failure = null;
      this.failure2 = null;
      this.f3 = null;
    }

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

    public downloadImage_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 TAuthorizationException getFailure() {
      return this.failure;
    }

    public downloadImage_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 getFailure2() {
      return this.failure2;
    }

    public downloadImage_result setFailure2(TInvocationException failure2) {
      this.failure2 = failure2;
      return this;
    }

    public void unsetFailure2() {
      this.failure2 = null;
    }

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

    public void setFailure2IsSet(boolean value) {
      if (!value) {
        this.failure2 = null;
      }
    }

    public TNotFoundException getF3() {
      return this.f3;
    }

    public downloadImage_result setF3(TNotFoundException f3) {
      this.f3 = f3;
      return this;
    }

    public void unsetF3() {
      this.f3 = null;
    }

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

    public void setF3IsSet(boolean value) {
      if (!value) {
        this.f3 = null;
      }
    }

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

      case FAILURE:
        if (value == null) {
          unsetFailure();
        } else {
          setFailure((TAuthorizationException)value);
        }
        break;

      case FAILURE2:
        if (value == null) {
          unsetFailure2();
        } else {
          setFailure2((TInvocationException)value);
        }
        break;

      case F3:
        if (value == null) {
          unsetF3();
        } else {
          setF3((TNotFoundException)value);
        }
        break;

      }
    }

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

      case FAILURE:
        return getFailure();

      case FAILURE2:
        return getFailure2();

      case F3:
        return getF3();

      }
      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 FAILURE2:
        return isSetFailure2();
      case F3:
        return isSetF3();
      }
      throw new IllegalStateException();
    }

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

    public boolean equals(downloadImage_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_failure2 = true && this.isSetFailure2();
      boolean that_present_failure2 = true && that.isSetFailure2();
      if (this_present_failure2 || that_present_failure2) {
        if (!(this_present_failure2 && that_present_failure2))
          return false;
        if (!this.failure2.equals(that.failure2))
          return false;
      }

      boolean this_present_f3 = true && this.isSetF3();
      boolean that_present_f3 = true && that.isSetF3();
      if (this_present_f3 || that_present_f3) {
        if (!(this_present_f3 && that_present_f3))
          return false;
        if (!this.f3.equals(that.f3))
          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_failure2 = true && (isSetFailure2());
      list.add(present_failure2);
      if (present_failure2)
        list.add(failure2);

      boolean present_f3 = true && (isSetF3());
      list.add(present_f3);
      if (present_f3)
        list.add(f3);

      return list.hashCode();
    }

    @Override
    public int compareTo(downloadImage_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(isSetFailure2()).compareTo(other.isSetFailure2());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetFailure2()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure2, other.failure2);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetF3()).compareTo(other.isSetF3());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetF3()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.f3, other.f3);
        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("downloadImage_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("failure2:");
      if (this.failure2 == null) {
        sb.append("null");
      } else {
        sb.append(this.failure2);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("f3:");
      if (this.f3 == null) {
        sb.append("null");
      } else {
        sb.append(this.f3);
      }
      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 downloadImage_resultStandardSchemeFactory implements SchemeFactory {
      public downloadImage_resultStandardScheme getScheme() {
        return new downloadImage_resultStandardScheme();
      }
    }

    private static class downloadImage_resultStandardScheme extends StandardScheme<downloadImage_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, downloadImage_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: // 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: // FAILURE2
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.failure2 = new TInvocationException();
                struct.failure2.read(iprot);
                struct.setFailure2IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // F3
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.f3 = new TNotFoundException();
                struct.f3.read(iprot);
                struct.setF3IsSet(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, downloadImage_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.failure2 != null) {
          oprot.writeFieldBegin(FAILURE2_FIELD_DESC);
          struct.failure2.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.f3 != null) {
          oprot.writeFieldBegin(F3_FIELD_DESC);
          struct.f3.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class downloadImage_resultTupleSchemeFactory implements SchemeFactory {
      public downloadImage_resultTupleScheme getScheme() {
        return new downloadImage_resultTupleScheme();
      }
    }

    private static class downloadImage_resultTupleScheme extends TupleScheme<downloadImage_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, downloadImage_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.isSetFailure2()) {
          optionals.set(2);
        }
        if (struct.isSetF3()) {
          optionals.set(3);
        }
        oprot.writeBitSet(optionals, 4);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetFailure()) {
          struct.failure.write(oprot);
        }
        if (struct.isSetFailure2()) {
          struct.failure2.write(oprot);
        }
        if (struct.isSetF3()) {
          struct.f3.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, downloadImage_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(4);
        if (incoming.get(0)) {
          struct.success = new TransferInformation();
          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.failure2 = new TInvocationException();
          struct.failure2.read(iprot);
          struct.setFailure2IsSet(true);
        }
        if (incoming.get(3)) {
          struct.f3 = new TNotFoundException();
          struct.f3.read(iprot);
          struct.setF3IsSet(true);
        }
      }
    }

  }

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


    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new getOrganizations_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getOrganizations_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(getOrganizations_args.class, metaDataMap);
    }

    public getOrganizations_args() {
    }

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

    public getOrganizations_args deepCopy() {
      return new getOrganizations_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 getOrganizations_args)
        return this.equals((getOrganizations_args)that);
      return false;
    }

    public boolean equals(getOrganizations_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(getOrganizations_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("getOrganizations_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 getOrganizations_argsStandardSchemeFactory implements SchemeFactory {
      public getOrganizations_argsStandardScheme getScheme() {
        return new getOrganizations_argsStandardScheme();
      }
    }

    private static class getOrganizations_argsStandardScheme extends StandardScheme<getOrganizations_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getOrganizations_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, getOrganizations_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getOrganizations_argsTupleSchemeFactory implements SchemeFactory {
      public getOrganizations_argsTupleScheme getScheme() {
        return new getOrganizations_argsTupleScheme();
      }
    }

    private static class getOrganizations_argsTupleScheme extends TupleScheme<getOrganizations_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getOrganizations_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getOrganizations_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
      }
    }

  }

  public static class getOrganizations_result implements org.apache.thrift.TBase<getOrganizations_result, getOrganizations_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrganizations_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getOrganizations_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 SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", 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 getOrganizations_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getOrganizations_resultTupleSchemeFactory());
    }

    public List<Organization> success; // 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"),
      SERVER_ERROR((short)1, "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: // 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, Organization.class))));
      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(getOrganizations_result.class, metaDataMap);
    }

    public getOrganizations_result() {
    }

    public getOrganizations_result(
      List<Organization> success,
      TInvocationException serverError)
    {
      this();
      this.success = success;
      this.serverError = serverError;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getOrganizations_result(getOrganizations_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;
      }
      if (other.isSetServerError()) {
        this.serverError = new TInvocationException(other.serverError);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.serverError = 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 getOrganizations_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 TInvocationException getServerError() {
      return this.serverError;
    }

    public getOrganizations_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<Organization>)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 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 SERVER_ERROR:
        return isSetServerError();
      }
      throw new IllegalStateException();
    }

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

    public boolean equals(getOrganizations_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_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_serverError = true && (isSetServerError());
      list.add(present_serverError);
      if (present_serverError)
        list.add(serverError);

      return list.hashCode();
    }

    @Override
    public int compareTo(getOrganizations_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(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("getOrganizations_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("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 getOrganizations_resultStandardSchemeFactory implements SchemeFactory {
      public getOrganizations_resultStandardScheme getScheme() {
        return new getOrganizations_resultStandardScheme();
      }
    }

    private static class getOrganizations_resultStandardScheme extends StandardScheme<getOrganizations_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getOrganizations_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 _list346 = iprot.readListBegin();
                  struct.success = new ArrayList<Organization>(_list346.size);
                  Organization _elem347;
                  for (int _i348 = 0; _i348 < _list346.size; ++_i348)
                  {
                    _elem347 = new Organization();
                    _elem347.read(iprot);
                    struct.success.add(_elem347);
                  }
                  iprot.readListEnd();
                }
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // 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, getOrganizations_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 _iter349 : struct.success)
            {
              _iter349.write(oprot);
            }
            oprot.writeListEnd();
          }
          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 getOrganizations_resultTupleSchemeFactory implements SchemeFactory {
      public getOrganizations_resultTupleScheme getScheme() {
        return new getOrganizations_resultTupleScheme();
      }
    }

    private static class getOrganizations_resultTupleScheme extends TupleScheme<getOrganizations_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getOrganizations_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetServerError()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (Organization _iter350 : struct.success)
            {
              _iter350.write(oprot);
            }
          }
        }
        if (struct.isSetServerError()) {
          struct.serverError.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getOrganizations_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          {
            org.apache.thrift.protocol.TList _list351 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
            struct.success = new ArrayList<Organization>(_list351.size);
            Organization _elem352;
            for (int _i353 = 0; _i353 < _list351.size; ++_i353)
            {
              _elem352 = new Organization();
              _elem352.read(iprot);
              struct.success.add(_elem352);
            }
          }
          struct.setSuccessIsSet(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 org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", 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 getOperatingSystems_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getOperatingSystems_resultTupleSchemeFactory());
    }

    public List<OperatingSystem> success; // 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"),
      SERVER_ERROR((short)1, "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: // 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, OperatingSystem.class))));
      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(getOperatingSystems_result.class, metaDataMap);
    }

    public getOperatingSystems_result() {
    }

    public getOperatingSystems_result(
      List<OperatingSystem> success,
      TInvocationException serverError)
    {
      this();
      this.success = success;
      this.serverError = serverError;
    }

    /**
     * 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;
      }
      if (other.isSetServerError()) {
        this.serverError = new TInvocationException(other.serverError);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.serverError = 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 TInvocationException getServerError() {
      return this.serverError;
    }

    public getOperatingSystems_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<OperatingSystem>)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 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 SERVER_ERROR:
        return isSetServerError();
      }
      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;
      }

      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_serverError = true && (isSetServerError());
      list.add(present_serverError);
      if (present_serverError)
        list.add(serverError);

      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;
        }
      }
      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("getOperatingSystems_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("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 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 _list354 = iprot.readListBegin();
                  struct.success = new ArrayList<OperatingSystem>(_list354.size);
                  OperatingSystem _elem355;
                  for (int _i356 = 0; _i356 < _list354.size; ++_i356)
                  {
                    _elem355 = new OperatingSystem();
                    _elem355.read(iprot);
                    struct.success.add(_elem355);
                  }
                  iprot.readListEnd();
                }
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // 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, 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 _iter357 : struct.success)
            {
              _iter357.write(oprot);
            }
            oprot.writeListEnd();
          }
          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 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);
        }
        if (struct.isSetServerError()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (OperatingSystem _iter358 : struct.success)
            {
              _iter358.write(oprot);
            }
          }
        }
        if (struct.isSetServerError()) {
          struct.serverError.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(2);
        if (incoming.get(0)) {
          {
            org.apache.thrift.protocol.TList _list359 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
            struct.success = new ArrayList<OperatingSystem>(_list359.size);
            OperatingSystem _elem360;
            for (int _i361 = 0; _i361 < _list359.size; ++_i361)
            {
              _elem360 = new OperatingSystem();
              _elem360.read(iprot);
              struct.success.add(_elem360);
            }
          }
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.serverError = new TInvocationException();
          struct.serverError.read(iprot);
          struct.setServerErrorIsSet(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 org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", 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 getVirtualizers_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getVirtualizers_resultTupleSchemeFactory());
    }

    public List<Virtualizer> success; // 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"),
      SERVER_ERROR((short)1, "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: // 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, Virtualizer.class))));
      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(getVirtualizers_result.class, metaDataMap);
    }

    public getVirtualizers_result() {
    }

    public getVirtualizers_result(
      List<Virtualizer> success,
      TInvocationException serverError)
    {
      this();
      this.success = success;
      this.serverError = serverError;
    }

    /**
     * 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;
      }
      if (other.isSetServerError()) {
        this.serverError = new TInvocationException(other.serverError);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.serverError = 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 TInvocationException getServerError() {
      return this.serverError;
    }

    public getVirtualizers_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<Virtualizer>)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 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 SERVER_ERROR:
        return isSetServerError();
      }
      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;
      }

      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_serverError = true && (isSetServerError());
      list.add(present_serverError);
      if (present_serverError)
        list.add(serverError);

      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;
        }
      }
      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("getVirtualizers_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("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 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 _list362 = iprot.readListBegin();
                  struct.success = new ArrayList<Virtualizer>(_list362.size);
                  Virtualizer _elem363;
                  for (int _i364 = 0; _i364 < _list362.size; ++_i364)
                  {
                    _elem363 = new Virtualizer();
                    _elem363.read(iprot);
                    struct.success.add(_elem363);
                  }
                  iprot.readListEnd();
                }
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // 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, 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 _iter365 : struct.success)
            {
              _iter365.write(oprot);
            }
            oprot.writeListEnd();
          }
          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 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);
        }
        if (struct.isSetServerError()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (Virtualizer _iter366 : struct.success)
            {
              _iter366.write(oprot);
            }
          }
        }
        if (struct.isSetServerError()) {
          struct.serverError.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(2);
        if (incoming.get(0)) {
          {
            org.apache.thrift.protocol.TList _list367 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
            struct.success = new ArrayList<Virtualizer>(_list367.size);
            Virtualizer _elem368;
            for (int _i369 = 0; _i369 < _list367.size; ++_i369)
            {
              _elem368 = new Virtualizer();
              _elem368.read(iprot);
              struct.success.add(_elem368);
            }
          }
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.serverError = new TInvocationException();
          struct.serverError.read(iprot);
          struct.setServerErrorIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField START_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("startDate", 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 getTags_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getTags_argsTupleSchemeFactory());
    }

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

      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: // START_DATE
            return START_DATE;
          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 __STARTDATE_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.START_DATE, new org.apache.thrift.meta_data.FieldMetaData("startDate", 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(getTags_args.class, metaDataMap);
    }

    public getTags_args() {
    }

    public getTags_args(
      long startDate)
    {
      this();
      this.startDate = startDate;
      setStartDateIsSet(true);
    }

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

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

    @Override
    public void clear() {
      setStartDateIsSet(false);
      this.startDate = 0;
    }

    public long getStartDate() {
      return this.startDate;
    }

    public getTags_args setStartDate(long startDate) {
      this.startDate = startDate;
      setStartDateIsSet(true);
      return this;
    }

    public void unsetStartDate() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTDATE_ISSET_ID);
    }

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

    public void setStartDateIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTDATE_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case START_DATE:
        if (value == null) {
          unsetStartDate();
        } else {
          setStartDate((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case START_DATE:
        return getStartDate();

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

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

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

      boolean this_present_startDate = true;
      boolean that_present_startDate = true;
      if (this_present_startDate || that_present_startDate) {
        if (!(this_present_startDate && that_present_startDate))
          return false;
        if (this.startDate != that.startDate)
          return false;
      }

      return true;
    }

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

      boolean present_startDate = true;
      list.add(present_startDate);
      if (present_startDate)
        list.add(startDate);

      return list.hashCode();
    }

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

      int lastComparison = 0;

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

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

    private static class getTags_argsStandardScheme extends StandardScheme<getTags_args> {

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

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(START_DATE_FIELD_DESC);
        oprot.writeI64(struct.startDate);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getTags_argsTupleSchemeFactory implements SchemeFactory {
      public getTags_argsTupleScheme getScheme() {
        return new getTags_argsTupleScheme();
      }
    }

    private static class getTags_argsTupleScheme extends TupleScheme<getTags_args> {

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

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

  }

  public static class getTags_result implements org.apache.thrift.TBase<getTags_result, getTags_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTags_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTags_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 SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", 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 getTags_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getTags_resultTupleSchemeFactory());
    }

    public List<MasterTag> success; // 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"),
      SERVER_ERROR((short)1, "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: // 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, MasterTag.class))));
      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(getTags_result.class, metaDataMap);
    }

    public getTags_result() {
    }

    public getTags_result(
      List<MasterTag> success,
      TInvocationException serverError)
    {
      this();
      this.success = success;
      this.serverError = serverError;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getTags_result(getTags_result other) {
      if (other.isSetSuccess()) {
        List<MasterTag> __this__success = new ArrayList<MasterTag>(other.success.size());
        for (MasterTag other_element : other.success) {
          __this__success.add(new MasterTag(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetServerError()) {
        this.serverError = new TInvocationException(other.serverError);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.serverError = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<MasterTag> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(MasterTag elem) {
      if (this.success == null) {
        this.success = new ArrayList<MasterTag>();
      }
      this.success.add(elem);
    }

    public List<MasterTag> getSuccess() {
      return this.success;
    }

    public getTags_result setSuccess(List<MasterTag> 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 TInvocationException getServerError() {
      return this.serverError;
    }

    public getTags_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<MasterTag>)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 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 SERVER_ERROR:
        return isSetServerError();
      }
      throw new IllegalStateException();
    }

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

    public boolean equals(getTags_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_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_serverError = true && (isSetServerError());
      list.add(present_serverError);
      if (present_serverError)
        list.add(serverError);

      return list.hashCode();
    }

    @Override
    public int compareTo(getTags_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(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("getTags_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("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 getTags_resultStandardSchemeFactory implements SchemeFactory {
      public getTags_resultStandardScheme getScheme() {
        return new getTags_resultStandardScheme();
      }
    }

    private static class getTags_resultStandardScheme extends StandardScheme<getTags_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getTags_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 _list370 = iprot.readListBegin();
                  struct.success = new ArrayList<MasterTag>(_list370.size);
                  MasterTag _elem371;
                  for (int _i372 = 0; _i372 < _list370.size; ++_i372)
                  {
                    _elem371 = new MasterTag();
                    _elem371.read(iprot);
                    struct.success.add(_elem371);
                  }
                  iprot.readListEnd();
                }
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // 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, getTags_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 (MasterTag _iter373 : struct.success)
            {
              _iter373.write(oprot);
            }
            oprot.writeListEnd();
          }
          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 getTags_resultTupleSchemeFactory implements SchemeFactory {
      public getTags_resultTupleScheme getScheme() {
        return new getTags_resultTupleScheme();
      }
    }

    private static class getTags_resultTupleScheme extends TupleScheme<getTags_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getTags_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetServerError()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (MasterTag _iter374 : struct.success)
            {
              _iter374.write(oprot);
            }
          }
        }
        if (struct.isSetServerError()) {
          struct.serverError.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getTags_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          {
            org.apache.thrift.protocol.TList _list375 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
            struct.success = new ArrayList<MasterTag>(_list375.size);
            MasterTag _elem376;
            for (int _i377 = 0; _i377 < _list375.size; ++_i377)
            {
              _elem376 = new MasterTag();
              _elem376.read(iprot);
              struct.success.add(_elem376);
            }
          }
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.serverError = new TInvocationException();
          struct.serverError.read(iprot);
          struct.setServerErrorIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField START_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("startDate", 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 getSoftware_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getSoftware_argsTupleSchemeFactory());
    }

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

      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: // START_DATE
            return START_DATE;
          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 __STARTDATE_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.START_DATE, new org.apache.thrift.meta_data.FieldMetaData("startDate", 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(getSoftware_args.class, metaDataMap);
    }

    public getSoftware_args() {
    }

    public getSoftware_args(
      long startDate)
    {
      this();
      this.startDate = startDate;
      setStartDateIsSet(true);
    }

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

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

    @Override
    public void clear() {
      setStartDateIsSet(false);
      this.startDate = 0;
    }

    public long getStartDate() {
      return this.startDate;
    }

    public getSoftware_args setStartDate(long startDate) {
      this.startDate = startDate;
      setStartDateIsSet(true);
      return this;
    }

    public void unsetStartDate() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTDATE_ISSET_ID);
    }

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

    public void setStartDateIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTDATE_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case START_DATE:
        if (value == null) {
          unsetStartDate();
        } else {
          setStartDate((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case START_DATE:
        return getStartDate();

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

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

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

      boolean this_present_startDate = true;
      boolean that_present_startDate = true;
      if (this_present_startDate || that_present_startDate) {
        if (!(this_present_startDate && that_present_startDate))
          return false;
        if (this.startDate != that.startDate)
          return false;
      }

      return true;
    }

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

      boolean present_startDate = true;
      list.add(present_startDate);
      if (present_startDate)
        list.add(startDate);

      return list.hashCode();
    }

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

      int lastComparison = 0;

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

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

    private static class getSoftware_argsStandardScheme extends StandardScheme<getSoftware_args> {

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

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(START_DATE_FIELD_DESC);
        oprot.writeI64(struct.startDate);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getSoftware_argsTupleSchemeFactory implements SchemeFactory {
      public getSoftware_argsTupleScheme getScheme() {
        return new getSoftware_argsTupleScheme();
      }
    }

    private static class getSoftware_argsTupleScheme extends TupleScheme<getSoftware_args> {

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

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

  }

  public static class getSoftware_result implements org.apache.thrift.TBase<getSoftware_result, getSoftware_result._Fields>, java.io.Serializable, Cloneable, Comparable<getSoftware_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSoftware_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 SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", 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 getSoftware_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getSoftware_resultTupleSchemeFactory());
    }

    public List<MasterSoftware> success; // 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"),
      SERVER_ERROR((short)1, "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: // 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, MasterSoftware.class))));
      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(getSoftware_result.class, metaDataMap);
    }

    public getSoftware_result() {
    }

    public getSoftware_result(
      List<MasterSoftware> success,
      TInvocationException serverError)
    {
      this();
      this.success = success;
      this.serverError = serverError;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getSoftware_result(getSoftware_result other) {
      if (other.isSetSuccess()) {
        List<MasterSoftware> __this__success = new ArrayList<MasterSoftware>(other.success.size());
        for (MasterSoftware other_element : other.success) {
          __this__success.add(new MasterSoftware(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetServerError()) {
        this.serverError = new TInvocationException(other.serverError);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.serverError = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<MasterSoftware> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(MasterSoftware elem) {
      if (this.success == null) {
        this.success = new ArrayList<MasterSoftware>();
      }
      this.success.add(elem);
    }

    public List<MasterSoftware> getSuccess() {
      return this.success;
    }

    public getSoftware_result setSuccess(List<MasterSoftware> 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 TInvocationException getServerError() {
      return this.serverError;
    }

    public getSoftware_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<MasterSoftware>)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 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 SERVER_ERROR:
        return isSetServerError();
      }
      throw new IllegalStateException();
    }

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

    public boolean equals(getSoftware_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_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_serverError = true && (isSetServerError());
      list.add(present_serverError);
      if (present_serverError)
        list.add(serverError);

      return list.hashCode();
    }

    @Override
    public int compareTo(getSoftware_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(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("getSoftware_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("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 getSoftware_resultStandardSchemeFactory implements SchemeFactory {
      public getSoftware_resultStandardScheme getScheme() {
        return new getSoftware_resultStandardScheme();
      }
    }

    private static class getSoftware_resultStandardScheme extends StandardScheme<getSoftware_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getSoftware_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 _list378 = iprot.readListBegin();
                  struct.success = new ArrayList<MasterSoftware>(_list378.size);
                  MasterSoftware _elem379;
                  for (int _i380 = 0; _i380 < _list378.size; ++_i380)
                  {
                    _elem379 = new MasterSoftware();
                    _elem379.read(iprot);
                    struct.success.add(_elem379);
                  }
                  iprot.readListEnd();
                }
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // 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, getSoftware_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 (MasterSoftware _iter381 : struct.success)
            {
              _iter381.write(oprot);
            }
            oprot.writeListEnd();
          }
          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 getSoftware_resultTupleSchemeFactory implements SchemeFactory {
      public getSoftware_resultTupleScheme getScheme() {
        return new getSoftware_resultTupleScheme();
      }
    }

    private static class getSoftware_resultTupleScheme extends TupleScheme<getSoftware_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getSoftware_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetServerError()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (MasterSoftware _iter382 : struct.success)
            {
              _iter382.write(oprot);
            }
          }
        }
        if (struct.isSetServerError()) {
          struct.serverError.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getSoftware_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          {
            org.apache.thrift.protocol.TList _list383 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
            struct.success = new ArrayList<MasterSoftware>(_list383.size);
            MasterSoftware _elem384;
            for (int _i385 = 0; _i385 < _list383.size; ++_i385)
            {
              _elem384 = new MasterSoftware();
              _elem384.read(iprot);
              struct.success.add(_elem384);
            }
          }
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.serverError = new TInvocationException();
          struct.serverError.read(iprot);
          struct.setServerErrorIsSet(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);
        }
      }
    }

  }

}