From c121d65bb33a42c324b746f6dc5300aee68487dd Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 9 Jun 2015 18:57:14 +0200 Subject: Unified thrift definitions for master and satellite --- .../openslx/bwlp/thrift/iface/SatelliteServer.java | 27610 +++++++++++++++++++ 1 file changed, 27610 insertions(+) create mode 100644 src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java (limited to 'src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java') diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java b/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java new file mode 100644 index 0000000..64578d6 --- /dev/null +++ b/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java @@ -0,0 +1,27610 @@ +/** + * Autogenerated by Thrift Compiler (0.9.1) + * + * 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 org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class SatelliteServer { + + public interface Iface { + + public long getVersion() throws org.apache.thrift.TException; + + public TransferInformation requestImageVersionUpload(String userToken, String imageBaseId, long fileSize, List blockHashes) throws TTransferRejectedException, TAuthorizationException, org.apache.thrift.TException; + + public void cancelUpload(String uploadToken) throws org.apache.thrift.TException; + + public UploadStatus queryUploadStatus(String uploadToken) throws TInvalidTokenException, org.apache.thrift.TException; + + public TransferInformation requestDownload(String userToken, String imageVersionId) throws TAuthorizationException, org.apache.thrift.TException; + + public void cancelDownload(String downloadToken) throws org.apache.thrift.TException; + + public boolean isAuthenticated(String userToken) throws org.apache.thrift.TException; + + public void invalidateSession(String userToken) throws org.apache.thrift.TException; + + public List getOperatingSystems() throws org.apache.thrift.TException; + + public List getVirtualizers() throws org.apache.thrift.TException; + + public List getAllOrganizations() throws org.apache.thrift.TException; + + public List getImageList(String userToken, List tagSearch) throws TAuthorizationException, org.apache.thrift.TException; + + public ImageDetailsRead getImageDetails(String userToken, String imageBaseId) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException; + + public boolean updateImageBase(String userToken, String imageBaseId, ImageBaseWrite image) throws TAuthorizationException, org.apache.thrift.TException; + + public boolean updateImageVersion(String userToken, String imageVersionId, ImageVersionWrite image) throws TAuthorizationException, org.apache.thrift.TException; + + public boolean deleteImageVersion(String userToken, String imageVersionId) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException; + + public boolean writeImagePermissions(String userToken, String imageId, Map permissions) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException; + + public Map getImagePermissions(String userToken, String imageBaseId) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException; + + public String createLecture(String userToken, LectureWrite lecture) throws TAuthorizationException, org.apache.thrift.TException; + + public boolean updateLecture(String userToken, String lectureId, LectureWrite lecture) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException; + + public List getLectureList(String userToken) throws TAuthorizationException, org.apache.thrift.TException; + + public LectureRead getLectureDetails(String userToken, String lectureId) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException; + + public List getLecturesByImageVersion(String userToken, String imageVersionId) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException; + + public boolean deleteLecture(String userToken, String lectureId) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException; + + public boolean writeLecturePermissions(String userToken, String lectureId, Map permissions) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException; + + public Map getLecturePermissions(String userToken, String lectureId) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException; + + } + + public interface AsyncIface { + + public void getVersion(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void requestImageVersionUpload(String userToken, String imageBaseId, long fileSize, List blockHashes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void cancelUpload(String uploadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void queryUploadStatus(String uploadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void requestDownload(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void cancelDownload(String downloadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void isAuthenticated(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void invalidateSession(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getOperatingSystems(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getVirtualizers(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getAllOrganizations(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getImageList(String userToken, List tagSearch, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getImageDetails(String userToken, String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void updateImageBase(String userToken, String imageBaseId, ImageBaseWrite image, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void updateImageVersion(String userToken, String imageVersionId, ImageVersionWrite image, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void deleteImageVersion(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void writeImagePermissions(String userToken, String imageId, Map permissions, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getImagePermissions(String userToken, String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void createLecture(String userToken, LectureWrite lecture, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void updateLecture(String userToken, String lectureId, LectureWrite lecture, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getLectureList(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getLectureDetails(String userToken, String lectureId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getLecturesByImageVersion(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void deleteLecture(String userToken, String lectureId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void writeLecturePermissions(String userToken, String lectureId, Map permissions, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getLecturePermissions(String userToken, String lectureId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + } + + public static class Client extends org.apache.thrift.TServiceClient implements Iface { + public static class Factory implements org.apache.thrift.TServiceClientFactory { + public Factory() {} + public Client getClient(org.apache.thrift.protocol.TProtocol prot) { + return new Client(prot); + } + public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { + return new Client(iprot, oprot); + } + } + + public Client(org.apache.thrift.protocol.TProtocol prot) + { + super(prot, prot); + } + + public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { + super(iprot, oprot); + } + + public long getVersion() throws org.apache.thrift.TException + { + send_getVersion(); + return recv_getVersion(); + } + + public void send_getVersion() throws org.apache.thrift.TException + { + getVersion_args args = new getVersion_args(); + sendBase("getVersion", args); + } + + public long recv_getVersion() throws org.apache.thrift.TException + { + getVersion_result result = new getVersion_result(); + receiveBase(result, "getVersion"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getVersion failed: unknown result"); + } + + public TransferInformation requestImageVersionUpload(String userToken, String imageBaseId, long fileSize, List blockHashes) throws TTransferRejectedException, TAuthorizationException, org.apache.thrift.TException + { + send_requestImageVersionUpload(userToken, imageBaseId, fileSize, blockHashes); + return recv_requestImageVersionUpload(); + } + + public void send_requestImageVersionUpload(String userToken, String imageBaseId, long fileSize, List blockHashes) throws org.apache.thrift.TException + { + requestImageVersionUpload_args args = new requestImageVersionUpload_args(); + args.setUserToken(userToken); + args.setImageBaseId(imageBaseId); + args.setFileSize(fileSize); + args.setBlockHashes(blockHashes); + sendBase("requestImageVersionUpload", args); + } + + public TransferInformation recv_requestImageVersionUpload() throws TTransferRejectedException, TAuthorizationException, org.apache.thrift.TException + { + requestImageVersionUpload_result result = new requestImageVersionUpload_result(); + receiveBase(result, "requestImageVersionUpload"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.rejection != null) { + throw result.rejection; + } + if (result.authError != null) { + throw result.authError; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "requestImageVersionUpload failed: unknown result"); + } + + public void cancelUpload(String uploadToken) throws org.apache.thrift.TException + { + send_cancelUpload(uploadToken); + recv_cancelUpload(); + } + + public void send_cancelUpload(String uploadToken) throws org.apache.thrift.TException + { + cancelUpload_args args = new cancelUpload_args(); + args.setUploadToken(uploadToken); + sendBase("cancelUpload", args); + } + + public void recv_cancelUpload() throws org.apache.thrift.TException + { + cancelUpload_result result = new cancelUpload_result(); + receiveBase(result, "cancelUpload"); + return; + } + + public UploadStatus 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 UploadStatus recv_queryUploadStatus() throws TInvalidTokenException, org.apache.thrift.TException + { + queryUploadStatus_result result = new queryUploadStatus_result(); + receiveBase(result, "queryUploadStatus"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.ex1 != null) { + throw result.ex1; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "queryUploadStatus failed: unknown result"); + } + + public TransferInformation requestDownload(String userToken, String imageVersionId) throws TAuthorizationException, org.apache.thrift.TException + { + send_requestDownload(userToken, imageVersionId); + return recv_requestDownload(); + } + + public void send_requestDownload(String userToken, String imageVersionId) throws org.apache.thrift.TException + { + requestDownload_args args = new requestDownload_args(); + args.setUserToken(userToken); + args.setImageVersionId(imageVersionId); + sendBase("requestDownload", args); + } + + public TransferInformation recv_requestDownload() throws TAuthorizationException, org.apache.thrift.TException + { + requestDownload_result result = new requestDownload_result(); + receiveBase(result, "requestDownload"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.authError != null) { + throw result.authError; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "requestDownload failed: unknown result"); + } + + public void cancelDownload(String downloadToken) throws org.apache.thrift.TException + { + send_cancelDownload(downloadToken); + recv_cancelDownload(); + } + + public void send_cancelDownload(String downloadToken) throws org.apache.thrift.TException + { + cancelDownload_args args = new cancelDownload_args(); + args.setDownloadToken(downloadToken); + sendBase("cancelDownload", args); + } + + public void recv_cancelDownload() throws org.apache.thrift.TException + { + cancelDownload_result result = new cancelDownload_result(); + receiveBase(result, "cancelDownload"); + return; + } + + public boolean isAuthenticated(String userToken) throws org.apache.thrift.TException + { + send_isAuthenticated(userToken); + return recv_isAuthenticated(); + } + + public void send_isAuthenticated(String userToken) throws org.apache.thrift.TException + { + isAuthenticated_args args = new isAuthenticated_args(); + args.setUserToken(userToken); + sendBase("isAuthenticated", args); + } + + public boolean recv_isAuthenticated() throws org.apache.thrift.TException + { + isAuthenticated_result result = new isAuthenticated_result(); + receiveBase(result, "isAuthenticated"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isAuthenticated failed: unknown result"); + } + + public void invalidateSession(String userToken) throws org.apache.thrift.TException + { + send_invalidateSession(userToken); + recv_invalidateSession(); + } + + public void send_invalidateSession(String userToken) throws org.apache.thrift.TException + { + invalidateSession_args args = new invalidateSession_args(); + args.setUserToken(userToken); + sendBase("invalidateSession", args); + } + + public void recv_invalidateSession() throws org.apache.thrift.TException + { + invalidateSession_result result = new invalidateSession_result(); + receiveBase(result, "invalidateSession"); + return; + } + + public List getOperatingSystems() throws org.apache.thrift.TException + { + send_getOperatingSystems(); + return recv_getOperatingSystems(); + } + + public void send_getOperatingSystems() throws org.apache.thrift.TException + { + getOperatingSystems_args args = new getOperatingSystems_args(); + sendBase("getOperatingSystems", args); + } + + public List recv_getOperatingSystems() throws org.apache.thrift.TException + { + getOperatingSystems_result result = new getOperatingSystems_result(); + receiveBase(result, "getOperatingSystems"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getOperatingSystems failed: unknown result"); + } + + public List getVirtualizers() throws org.apache.thrift.TException + { + send_getVirtualizers(); + return recv_getVirtualizers(); + } + + public void send_getVirtualizers() throws org.apache.thrift.TException + { + getVirtualizers_args args = new getVirtualizers_args(); + sendBase("getVirtualizers", args); + } + + public List recv_getVirtualizers() throws org.apache.thrift.TException + { + getVirtualizers_result result = new getVirtualizers_result(); + receiveBase(result, "getVirtualizers"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getVirtualizers failed: unknown result"); + } + + public List getAllOrganizations() throws org.apache.thrift.TException + { + send_getAllOrganizations(); + return recv_getAllOrganizations(); + } + + public void send_getAllOrganizations() throws org.apache.thrift.TException + { + getAllOrganizations_args args = new getAllOrganizations_args(); + sendBase("getAllOrganizations", args); + } + + public List recv_getAllOrganizations() throws org.apache.thrift.TException + { + getAllOrganizations_result result = new getAllOrganizations_result(); + receiveBase(result, "getAllOrganizations"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllOrganizations failed: unknown result"); + } + + public List getImageList(String userToken, List tagSearch) throws TAuthorizationException, org.apache.thrift.TException + { + send_getImageList(userToken, tagSearch); + return recv_getImageList(); + } + + public void send_getImageList(String userToken, List tagSearch) throws org.apache.thrift.TException + { + getImageList_args args = new getImageList_args(); + args.setUserToken(userToken); + args.setTagSearch(tagSearch); + sendBase("getImageList", args); + } + + public List recv_getImageList() throws TAuthorizationException, org.apache.thrift.TException + { + getImageList_result result = new getImageList_result(); + receiveBase(result, "getImageList"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.authError != null) { + throw result.authError; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getImageList failed: unknown result"); + } + + public ImageDetailsRead getImageDetails(String userToken, String imageBaseId) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException + { + send_getImageDetails(userToken, imageBaseId); + return recv_getImageDetails(); + } + + public void send_getImageDetails(String userToken, String imageBaseId) throws org.apache.thrift.TException + { + getImageDetails_args args = new getImageDetails_args(); + args.setUserToken(userToken); + args.setImageBaseId(imageBaseId); + sendBase("getImageDetails", args); + } + + public ImageDetailsRead recv_getImageDetails() throws TAuthorizationException, TNotFoundException, 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; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getImageDetails failed: unknown result"); + } + + public boolean updateImageBase(String userToken, String imageBaseId, ImageBaseWrite image) throws TAuthorizationException, org.apache.thrift.TException + { + send_updateImageBase(userToken, imageBaseId, image); + return recv_updateImageBase(); + } + + public void send_updateImageBase(String userToken, String imageBaseId, ImageBaseWrite image) throws org.apache.thrift.TException + { + updateImageBase_args args = new updateImageBase_args(); + args.setUserToken(userToken); + args.setImageBaseId(imageBaseId); + args.setImage(image); + sendBase("updateImageBase", args); + } + + public boolean recv_updateImageBase() throws TAuthorizationException, org.apache.thrift.TException + { + updateImageBase_result result = new updateImageBase_result(); + receiveBase(result, "updateImageBase"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.authError != null) { + throw result.authError; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateImageBase failed: unknown result"); + } + + public boolean updateImageVersion(String userToken, String imageVersionId, ImageVersionWrite image) throws TAuthorizationException, org.apache.thrift.TException + { + send_updateImageVersion(userToken, imageVersionId, image); + return recv_updateImageVersion(); + } + + public void send_updateImageVersion(String userToken, String imageVersionId, ImageVersionWrite image) throws org.apache.thrift.TException + { + updateImageVersion_args args = new updateImageVersion_args(); + args.setUserToken(userToken); + args.setImageVersionId(imageVersionId); + args.setImage(image); + sendBase("updateImageVersion", args); + } + + public boolean recv_updateImageVersion() throws TAuthorizationException, org.apache.thrift.TException + { + updateImageVersion_result result = new updateImageVersion_result(); + receiveBase(result, "updateImageVersion"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.authError != null) { + throw result.authError; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateImageVersion failed: unknown result"); + } + + public boolean deleteImageVersion(String userToken, String imageVersionId) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException + { + send_deleteImageVersion(userToken, imageVersionId); + return recv_deleteImageVersion(); + } + + public void send_deleteImageVersion(String userToken, String imageVersionId) throws org.apache.thrift.TException + { + deleteImageVersion_args args = new deleteImageVersion_args(); + args.setUserToken(userToken); + args.setImageVersionId(imageVersionId); + sendBase("deleteImageVersion", args); + } + + public boolean recv_deleteImageVersion() throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException + { + deleteImageVersion_result result = new deleteImageVersion_result(); + receiveBase(result, "deleteImageVersion"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.authError != null) { + throw result.authError; + } + if (result.notFound != null) { + throw result.notFound; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteImageVersion failed: unknown result"); + } + + public boolean writeImagePermissions(String userToken, String imageId, Map permissions) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException + { + send_writeImagePermissions(userToken, imageId, permissions); + return recv_writeImagePermissions(); + } + + public void send_writeImagePermissions(String userToken, String imageId, Map permissions) throws org.apache.thrift.TException + { + writeImagePermissions_args args = new writeImagePermissions_args(); + args.setUserToken(userToken); + args.setImageId(imageId); + args.setPermissions(permissions); + sendBase("writeImagePermissions", args); + } + + public boolean recv_writeImagePermissions() throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException + { + writeImagePermissions_result result = new writeImagePermissions_result(); + receiveBase(result, "writeImagePermissions"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.authError != null) { + throw result.authError; + } + if (result.notFound != null) { + throw result.notFound; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "writeImagePermissions failed: unknown result"); + } + + public Map getImagePermissions(String userToken, String imageBaseId) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException + { + send_getImagePermissions(userToken, imageBaseId); + return recv_getImagePermissions(); + } + + public void send_getImagePermissions(String userToken, String imageBaseId) throws org.apache.thrift.TException + { + getImagePermissions_args args = new getImagePermissions_args(); + args.setUserToken(userToken); + args.setImageBaseId(imageBaseId); + sendBase("getImagePermissions", args); + } + + public Map recv_getImagePermissions() throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException + { + getImagePermissions_result result = new getImagePermissions_result(); + receiveBase(result, "getImagePermissions"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.authError != null) { + throw result.authError; + } + if (result.notFound != null) { + throw result.notFound; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getImagePermissions failed: unknown result"); + } + + public String createLecture(String userToken, LectureWrite lecture) throws TAuthorizationException, org.apache.thrift.TException + { + send_createLecture(userToken, lecture); + return recv_createLecture(); + } + + public void send_createLecture(String userToken, LectureWrite lecture) throws org.apache.thrift.TException + { + createLecture_args args = new createLecture_args(); + args.setUserToken(userToken); + args.setLecture(lecture); + sendBase("createLecture", args); + } + + public String recv_createLecture() throws TAuthorizationException, org.apache.thrift.TException + { + createLecture_result result = new createLecture_result(); + receiveBase(result, "createLecture"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.authError != null) { + throw result.authError; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createLecture failed: unknown result"); + } + + public boolean updateLecture(String userToken, String lectureId, LectureWrite lecture) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException + { + send_updateLecture(userToken, lectureId, lecture); + return recv_updateLecture(); + } + + public void send_updateLecture(String userToken, String lectureId, LectureWrite lecture) throws org.apache.thrift.TException + { + updateLecture_args args = new updateLecture_args(); + args.setUserToken(userToken); + args.setLectureId(lectureId); + args.setLecture(lecture); + sendBase("updateLecture", args); + } + + public boolean recv_updateLecture() throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException + { + updateLecture_result result = new updateLecture_result(); + receiveBase(result, "updateLecture"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.authError != null) { + throw result.authError; + } + if (result.notFound != null) { + throw result.notFound; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateLecture failed: unknown result"); + } + + public List getLectureList(String userToken) throws TAuthorizationException, org.apache.thrift.TException + { + send_getLectureList(userToken); + return recv_getLectureList(); + } + + public void send_getLectureList(String userToken) throws org.apache.thrift.TException + { + getLectureList_args args = new getLectureList_args(); + args.setUserToken(userToken); + sendBase("getLectureList", args); + } + + public List recv_getLectureList() throws TAuthorizationException, org.apache.thrift.TException + { + getLectureList_result result = new getLectureList_result(); + receiveBase(result, "getLectureList"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.authError != null) { + throw result.authError; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLectureList failed: unknown result"); + } + + public LectureRead getLectureDetails(String userToken, String lectureId) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException + { + send_getLectureDetails(userToken, lectureId); + return recv_getLectureDetails(); + } + + public void send_getLectureDetails(String userToken, String lectureId) throws org.apache.thrift.TException + { + getLectureDetails_args args = new getLectureDetails_args(); + args.setUserToken(userToken); + args.setLectureId(lectureId); + sendBase("getLectureDetails", args); + } + + public LectureRead recv_getLectureDetails() throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException + { + getLectureDetails_result result = new getLectureDetails_result(); + receiveBase(result, "getLectureDetails"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.authError != null) { + throw result.authError; + } + if (result.notFound != null) { + throw result.notFound; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLectureDetails failed: unknown result"); + } + + public List getLecturesByImageVersion(String userToken, String imageVersionId) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException + { + send_getLecturesByImageVersion(userToken, imageVersionId); + return recv_getLecturesByImageVersion(); + } + + public void send_getLecturesByImageVersion(String userToken, String imageVersionId) throws org.apache.thrift.TException + { + getLecturesByImageVersion_args args = new getLecturesByImageVersion_args(); + args.setUserToken(userToken); + args.setImageVersionId(imageVersionId); + sendBase("getLecturesByImageVersion", args); + } + + public List recv_getLecturesByImageVersion() throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException + { + getLecturesByImageVersion_result result = new getLecturesByImageVersion_result(); + receiveBase(result, "getLecturesByImageVersion"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.authError != null) { + throw result.authError; + } + if (result.notFound != null) { + throw result.notFound; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLecturesByImageVersion failed: unknown result"); + } + + public boolean deleteLecture(String userToken, String lectureId) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException + { + send_deleteLecture(userToken, lectureId); + return recv_deleteLecture(); + } + + public void send_deleteLecture(String userToken, String lectureId) throws org.apache.thrift.TException + { + deleteLecture_args args = new deleteLecture_args(); + args.setUserToken(userToken); + args.setLectureId(lectureId); + sendBase("deleteLecture", args); + } + + public boolean recv_deleteLecture() throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException + { + deleteLecture_result result = new deleteLecture_result(); + receiveBase(result, "deleteLecture"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.authError != null) { + throw result.authError; + } + if (result.notFound != null) { + throw result.notFound; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteLecture failed: unknown result"); + } + + public boolean writeLecturePermissions(String userToken, String lectureId, Map permissions) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException + { + send_writeLecturePermissions(userToken, lectureId, permissions); + return recv_writeLecturePermissions(); + } + + public void send_writeLecturePermissions(String userToken, String lectureId, Map permissions) throws org.apache.thrift.TException + { + writeLecturePermissions_args args = new writeLecturePermissions_args(); + args.setUserToken(userToken); + args.setLectureId(lectureId); + args.setPermissions(permissions); + sendBase("writeLecturePermissions", args); + } + + public boolean recv_writeLecturePermissions() throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException + { + writeLecturePermissions_result result = new writeLecturePermissions_result(); + receiveBase(result, "writeLecturePermissions"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.authError != null) { + throw result.authError; + } + if (result.notFound != null) { + throw result.notFound; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "writeLecturePermissions failed: unknown result"); + } + + public Map getLecturePermissions(String userToken, String lectureId) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException + { + send_getLecturePermissions(userToken, lectureId); + return recv_getLecturePermissions(); + } + + public void send_getLecturePermissions(String userToken, String lectureId) throws org.apache.thrift.TException + { + getLecturePermissions_args args = new getLecturePermissions_args(); + args.setUserToken(userToken); + args.setLectureId(lectureId); + sendBase("getLecturePermissions", args); + } + + public Map recv_getLecturePermissions() throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException + { + getLecturePermissions_result result = new getLecturePermissions_result(); + receiveBase(result, "getLecturePermissions"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.authError != null) { + throw result.authError; + } + if (result.notFound != null) { + throw result.notFound; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLecturePermissions 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 { + private org.apache.thrift.async.TAsyncClientManager clientManager; + private org.apache.thrift.protocol.TProtocolFactory protocolFactory; + public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) { + this.clientManager = clientManager; + this.protocolFactory = protocolFactory; + } + public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) { + return new AsyncClient(protocolFactory, clientManager, transport); + } + } + + public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) { + super(protocolFactory, clientManager, transport); + } + + public void getVersion(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getVersion_call method_call = new getVersion_call(resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getVersion_call extends org.apache.thrift.async.TAsyncMethodCall { + public getVersion_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("getVersion", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getVersion_args args = new getVersion_args(); + args.write(prot); + prot.writeMessageEnd(); + } + + public long getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getVersion(); + } + } + + public void requestImageVersionUpload(String userToken, String imageBaseId, long fileSize, List blockHashes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + requestImageVersionUpload_call method_call = new requestImageVersionUpload_call(userToken, imageBaseId, fileSize, blockHashes, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class requestImageVersionUpload_call extends org.apache.thrift.async.TAsyncMethodCall { + private String userToken; + private String imageBaseId; + private long fileSize; + private List blockHashes; + public requestImageVersionUpload_call(String userToken, String imageBaseId, long fileSize, List 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.imageBaseId = imageBaseId; + this.fileSize = fileSize; + 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("requestImageVersionUpload", org.apache.thrift.protocol.TMessageType.CALL, 0)); + requestImageVersionUpload_args args = new requestImageVersionUpload_args(); + args.setUserToken(userToken); + args.setImageBaseId(imageBaseId); + args.setFileSize(fileSize); + args.setBlockHashes(blockHashes); + args.write(prot); + prot.writeMessageEnd(); + } + + public TransferInformation getResult() throws TTransferRejectedException, TAuthorizationException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_requestImageVersionUpload(); + } + } + + public void cancelUpload(String uploadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + cancelUpload_call method_call = new cancelUpload_call(uploadToken, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class cancelUpload_call extends org.apache.thrift.async.TAsyncMethodCall { + private String uploadToken; + public cancelUpload_call(String uploadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.uploadToken = uploadToken; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("cancelUpload", org.apache.thrift.protocol.TMessageType.CALL, 0)); + cancelUpload_args args = new cancelUpload_args(); + args.setUploadToken(uploadToken); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_cancelUpload(); + } + } + + public void queryUploadStatus(String uploadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + queryUploadStatus_call method_call = new queryUploadStatus_call(uploadToken, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class queryUploadStatus_call extends org.apache.thrift.async.TAsyncMethodCall { + private String uploadToken; + public queryUploadStatus_call(String uploadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.uploadToken = uploadToken; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("queryUploadStatus", org.apache.thrift.protocol.TMessageType.CALL, 0)); + queryUploadStatus_args args = new queryUploadStatus_args(); + args.setUploadToken(uploadToken); + args.write(prot); + prot.writeMessageEnd(); + } + + public UploadStatus getResult() throws TInvalidTokenException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_queryUploadStatus(); + } + } + + public void requestDownload(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + requestDownload_call method_call = new requestDownload_call(userToken, imageVersionId, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class requestDownload_call extends org.apache.thrift.async.TAsyncMethodCall { + private String userToken; + private String imageVersionId; + public requestDownload_call(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.userToken = userToken; + this.imageVersionId = imageVersionId; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("requestDownload", org.apache.thrift.protocol.TMessageType.CALL, 0)); + requestDownload_args args = new requestDownload_args(); + args.setUserToken(userToken); + args.setImageVersionId(imageVersionId); + args.write(prot); + prot.writeMessageEnd(); + } + + public TransferInformation getResult() throws TAuthorizationException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_requestDownload(); + } + } + + public void cancelDownload(String downloadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + cancelDownload_call method_call = new cancelDownload_call(downloadToken, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class cancelDownload_call extends org.apache.thrift.async.TAsyncMethodCall { + private String downloadToken; + public cancelDownload_call(String downloadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.downloadToken = downloadToken; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("cancelDownload", org.apache.thrift.protocol.TMessageType.CALL, 0)); + cancelDownload_args args = new cancelDownload_args(); + args.setDownloadToken(downloadToken); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_cancelDownload(); + } + } + + public void isAuthenticated(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + isAuthenticated_call method_call = new isAuthenticated_call(userToken, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class isAuthenticated_call extends org.apache.thrift.async.TAsyncMethodCall { + private String userToken; + public isAuthenticated_call(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.userToken = userToken; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isAuthenticated", org.apache.thrift.protocol.TMessageType.CALL, 0)); + isAuthenticated_args args = new isAuthenticated_args(); + args.setUserToken(userToken); + args.write(prot); + prot.writeMessageEnd(); + } + + public 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_isAuthenticated(); + } + } + + public void invalidateSession(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + invalidateSession_call method_call = new invalidateSession_call(userToken, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class invalidateSession_call extends org.apache.thrift.async.TAsyncMethodCall { + private String userToken; + public invalidateSession_call(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.userToken = userToken; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("invalidateSession", org.apache.thrift.protocol.TMessageType.CALL, 0)); + invalidateSession_args args = new invalidateSession_args(); + args.setUserToken(userToken); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws 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 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 getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getOperatingSystems(); + } + } + + public void getVirtualizers(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getVirtualizers_call method_call = new getVirtualizers_call(resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getVirtualizers_call extends org.apache.thrift.async.TAsyncMethodCall { + public getVirtualizers_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getVirtualizers", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getVirtualizers_args args = new getVirtualizers_args(); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getVirtualizers(); + } + } + + public void getAllOrganizations(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getAllOrganizations_call method_call = new getAllOrganizations_call(resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getAllOrganizations_call extends org.apache.thrift.async.TAsyncMethodCall { + public getAllOrganizations_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllOrganizations", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getAllOrganizations_args args = new getAllOrganizations_args(); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getAllOrganizations(); + } + } + + public void getImageList(String userToken, List tagSearch, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getImageList_call method_call = new getImageList_call(userToken, tagSearch, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getImageList_call extends org.apache.thrift.async.TAsyncMethodCall { + private String userToken; + private List tagSearch; + public getImageList_call(String userToken, List tagSearch, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.userToken = userToken; + this.tagSearch = tagSearch; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getImageList", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getImageList_args args = new getImageList_args(); + args.setUserToken(userToken); + args.setTagSearch(tagSearch); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws TAuthorizationException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getImageList(); + } + } + + public void getImageDetails(String userToken, String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getImageDetails_call method_call = new getImageDetails_call(userToken, imageBaseId, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getImageDetails_call extends org.apache.thrift.async.TAsyncMethodCall { + private String userToken; + private String imageBaseId; + public getImageDetails_call(String userToken, String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.userToken = userToken; + this.imageBaseId = imageBaseId; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getImageDetails", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getImageDetails_args args = new getImageDetails_args(); + args.setUserToken(userToken); + args.setImageBaseId(imageBaseId); + args.write(prot); + prot.writeMessageEnd(); + } + + public ImageDetailsRead getResult() throws TAuthorizationException, TNotFoundException, 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 updateImageBase(String userToken, String imageBaseId, ImageBaseWrite image, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + updateImageBase_call method_call = new updateImageBase_call(userToken, imageBaseId, image, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class updateImageBase_call extends org.apache.thrift.async.TAsyncMethodCall { + private String userToken; + private String imageBaseId; + private ImageBaseWrite image; + public updateImageBase_call(String userToken, String imageBaseId, ImageBaseWrite image, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.userToken = userToken; + this.imageBaseId = imageBaseId; + this.image = image; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateImageBase", org.apache.thrift.protocol.TMessageType.CALL, 0)); + updateImageBase_args args = new updateImageBase_args(); + args.setUserToken(userToken); + args.setImageBaseId(imageBaseId); + args.setImage(image); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws TAuthorizationException, 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_updateImageBase(); + } + } + + public void updateImageVersion(String userToken, String imageVersionId, ImageVersionWrite image, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + updateImageVersion_call method_call = new updateImageVersion_call(userToken, imageVersionId, image, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class updateImageVersion_call extends org.apache.thrift.async.TAsyncMethodCall { + private String userToken; + private String imageVersionId; + private ImageVersionWrite image; + public updateImageVersion_call(String userToken, String imageVersionId, ImageVersionWrite image, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.userToken = userToken; + this.imageVersionId = imageVersionId; + this.image = image; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateImageVersion", org.apache.thrift.protocol.TMessageType.CALL, 0)); + updateImageVersion_args args = new updateImageVersion_args(); + args.setUserToken(userToken); + args.setImageVersionId(imageVersionId); + args.setImage(image); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws TAuthorizationException, 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_updateImageVersion(); + } + } + + public void deleteImageVersion(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + deleteImageVersion_call method_call = new deleteImageVersion_call(userToken, imageVersionId, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class deleteImageVersion_call extends org.apache.thrift.async.TAsyncMethodCall { + private String userToken; + private String imageVersionId; + public deleteImageVersion_call(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.userToken = userToken; + this.imageVersionId = imageVersionId; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteImageVersion", org.apache.thrift.protocol.TMessageType.CALL, 0)); + deleteImageVersion_args args = new deleteImageVersion_args(); + args.setUserToken(userToken); + args.setImageVersionId(imageVersionId); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws TAuthorizationException, 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_deleteImageVersion(); + } + } + + public void writeImagePermissions(String userToken, String imageId, Map permissions, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + writeImagePermissions_call method_call = new writeImagePermissions_call(userToken, imageId, permissions, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class writeImagePermissions_call extends org.apache.thrift.async.TAsyncMethodCall { + private String userToken; + private String imageId; + private Map permissions; + public writeImagePermissions_call(String userToken, String imageId, Map permissions, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.userToken = userToken; + this.imageId = imageId; + this.permissions = permissions; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("writeImagePermissions", org.apache.thrift.protocol.TMessageType.CALL, 0)); + writeImagePermissions_args args = new writeImagePermissions_args(); + args.setUserToken(userToken); + args.setImageId(imageId); + args.setPermissions(permissions); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws TAuthorizationException, 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_writeImagePermissions(); + } + } + + public void getImagePermissions(String userToken, String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getImagePermissions_call method_call = new getImagePermissions_call(userToken, imageBaseId, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getImagePermissions_call extends org.apache.thrift.async.TAsyncMethodCall { + private String userToken; + private String imageBaseId; + public getImagePermissions_call(String userToken, String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.userToken = userToken; + this.imageBaseId = imageBaseId; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getImagePermissions", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getImagePermissions_args args = new getImagePermissions_args(); + args.setUserToken(userToken); + args.setImageBaseId(imageBaseId); + args.write(prot); + prot.writeMessageEnd(); + } + + public Map getResult() throws TAuthorizationException, 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_getImagePermissions(); + } + } + + public void createLecture(String userToken, LectureWrite lecture, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + createLecture_call method_call = new createLecture_call(userToken, lecture, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class createLecture_call extends org.apache.thrift.async.TAsyncMethodCall { + private String userToken; + private LectureWrite lecture; + public createLecture_call(String userToken, LectureWrite lecture, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.userToken = userToken; + this.lecture = lecture; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createLecture", org.apache.thrift.protocol.TMessageType.CALL, 0)); + createLecture_args args = new createLecture_args(); + args.setUserToken(userToken); + args.setLecture(lecture); + args.write(prot); + prot.writeMessageEnd(); + } + + public String getResult() throws TAuthorizationException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_createLecture(); + } + } + + public void updateLecture(String userToken, String lectureId, LectureWrite lecture, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + updateLecture_call method_call = new updateLecture_call(userToken, lectureId, lecture, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class updateLecture_call extends org.apache.thrift.async.TAsyncMethodCall { + private String userToken; + private String lectureId; + private LectureWrite lecture; + public updateLecture_call(String userToken, String lectureId, LectureWrite lecture, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.userToken = userToken; + this.lectureId = lectureId; + this.lecture = lecture; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateLecture", org.apache.thrift.protocol.TMessageType.CALL, 0)); + updateLecture_args args = new updateLecture_args(); + args.setUserToken(userToken); + args.setLectureId(lectureId); + args.setLecture(lecture); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws TAuthorizationException, 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_updateLecture(); + } + } + + public void getLectureList(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getLectureList_call method_call = new getLectureList_call(userToken, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getLectureList_call extends org.apache.thrift.async.TAsyncMethodCall { + private String userToken; + public getLectureList_call(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.userToken = userToken; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getLectureList", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getLectureList_args args = new getLectureList_args(); + args.setUserToken(userToken); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws TAuthorizationException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getLectureList(); + } + } + + public void getLectureDetails(String userToken, String lectureId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getLectureDetails_call method_call = new getLectureDetails_call(userToken, lectureId, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getLectureDetails_call extends org.apache.thrift.async.TAsyncMethodCall { + private String userToken; + private String lectureId; + public getLectureDetails_call(String userToken, String lectureId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.userToken = userToken; + this.lectureId = lectureId; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getLectureDetails", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getLectureDetails_args args = new getLectureDetails_args(); + args.setUserToken(userToken); + args.setLectureId(lectureId); + args.write(prot); + prot.writeMessageEnd(); + } + + public LectureRead getResult() throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getLectureDetails(); + } + } + + public void getLecturesByImageVersion(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getLecturesByImageVersion_call method_call = new getLecturesByImageVersion_call(userToken, imageVersionId, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getLecturesByImageVersion_call extends org.apache.thrift.async.TAsyncMethodCall { + private String userToken; + private String imageVersionId; + public getLecturesByImageVersion_call(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.userToken = userToken; + this.imageVersionId = imageVersionId; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getLecturesByImageVersion", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getLecturesByImageVersion_args args = new getLecturesByImageVersion_args(); + args.setUserToken(userToken); + args.setImageVersionId(imageVersionId); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws TAuthorizationException, 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_getLecturesByImageVersion(); + } + } + + public void deleteLecture(String userToken, String lectureId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + deleteLecture_call method_call = new deleteLecture_call(userToken, lectureId, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class deleteLecture_call extends org.apache.thrift.async.TAsyncMethodCall { + private String userToken; + private String lectureId; + public deleteLecture_call(String userToken, String lectureId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.userToken = userToken; + this.lectureId = lectureId; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteLecture", org.apache.thrift.protocol.TMessageType.CALL, 0)); + deleteLecture_args args = new deleteLecture_args(); + args.setUserToken(userToken); + args.setLectureId(lectureId); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws TAuthorizationException, 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_deleteLecture(); + } + } + + public void writeLecturePermissions(String userToken, String lectureId, Map permissions, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + writeLecturePermissions_call method_call = new writeLecturePermissions_call(userToken, lectureId, permissions, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class writeLecturePermissions_call extends org.apache.thrift.async.TAsyncMethodCall { + private String userToken; + private String lectureId; + private Map permissions; + public writeLecturePermissions_call(String userToken, String lectureId, Map permissions, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.userToken = userToken; + this.lectureId = lectureId; + this.permissions = permissions; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("writeLecturePermissions", org.apache.thrift.protocol.TMessageType.CALL, 0)); + writeLecturePermissions_args args = new writeLecturePermissions_args(); + args.setUserToken(userToken); + args.setLectureId(lectureId); + args.setPermissions(permissions); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws TAuthorizationException, 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_writeLecturePermissions(); + } + } + + public void getLecturePermissions(String userToken, String lectureId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getLecturePermissions_call method_call = new getLecturePermissions_call(userToken, lectureId, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getLecturePermissions_call extends org.apache.thrift.async.TAsyncMethodCall { + private String userToken; + private String lectureId; + public getLecturePermissions_call(String userToken, String lectureId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.userToken = userToken; + this.lectureId = lectureId; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getLecturePermissions", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getLecturePermissions_args args = new getLecturePermissions_args(); + args.setUserToken(userToken); + args.setLectureId(lectureId); + args.write(prot); + prot.writeMessageEnd(); + } + + public Map getResult() throws TAuthorizationException, 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_getLecturePermissions(); + } + } + + } + + public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor { + private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); + public Processor(I iface) { + super(iface, getProcessMap(new HashMap>())); + } + + protected Processor(I iface, Map> processMap) { + super(iface, getProcessMap(processMap)); + } + + private static Map> getProcessMap(Map> processMap) { + processMap.put("getVersion", new getVersion()); + processMap.put("requestImageVersionUpload", new requestImageVersionUpload()); + processMap.put("cancelUpload", new cancelUpload()); + processMap.put("queryUploadStatus", new queryUploadStatus()); + processMap.put("requestDownload", new requestDownload()); + processMap.put("cancelDownload", new cancelDownload()); + processMap.put("isAuthenticated", new isAuthenticated()); + processMap.put("invalidateSession", new invalidateSession()); + processMap.put("getOperatingSystems", new getOperatingSystems()); + processMap.put("getVirtualizers", new getVirtualizers()); + processMap.put("getAllOrganizations", new getAllOrganizations()); + processMap.put("getImageList", new getImageList()); + processMap.put("getImageDetails", new getImageDetails()); + processMap.put("updateImageBase", new updateImageBase()); + processMap.put("updateImageVersion", new updateImageVersion()); + processMap.put("deleteImageVersion", new deleteImageVersion()); + processMap.put("writeImagePermissions", new writeImagePermissions()); + processMap.put("getImagePermissions", new getImagePermissions()); + processMap.put("createLecture", new createLecture()); + processMap.put("updateLecture", new updateLecture()); + processMap.put("getLectureList", new getLectureList()); + processMap.put("getLectureDetails", new getLectureDetails()); + processMap.put("getLecturesByImageVersion", new getLecturesByImageVersion()); + processMap.put("deleteLecture", new deleteLecture()); + processMap.put("writeLecturePermissions", new writeLecturePermissions()); + processMap.put("getLecturePermissions", new getLecturePermissions()); + return processMap; + } + + public static class getVersion extends org.apache.thrift.ProcessFunction { + public getVersion() { + super("getVersion"); + } + + public getVersion_args getEmptyArgsInstance() { + return new getVersion_args(); + } + + protected boolean isOneway() { + return false; + } + + public getVersion_result getResult(I iface, getVersion_args args) throws org.apache.thrift.TException { + getVersion_result result = new getVersion_result(); + result.success = iface.getVersion(); + result.setSuccessIsSet(true); + return result; + } + } + + public static class requestImageVersionUpload extends org.apache.thrift.ProcessFunction { + public requestImageVersionUpload() { + super("requestImageVersionUpload"); + } + + public requestImageVersionUpload_args getEmptyArgsInstance() { + return new requestImageVersionUpload_args(); + } + + protected boolean isOneway() { + return false; + } + + public requestImageVersionUpload_result getResult(I iface, requestImageVersionUpload_args args) throws org.apache.thrift.TException { + requestImageVersionUpload_result result = new requestImageVersionUpload_result(); + try { + result.success = iface.requestImageVersionUpload(args.userToken, args.imageBaseId, args.fileSize, args.blockHashes); + } catch (TTransferRejectedException rejection) { + result.rejection = rejection; + } catch (TAuthorizationException authError) { + result.authError = authError; + } + return result; + } + } + + public static class cancelUpload extends org.apache.thrift.ProcessFunction { + public cancelUpload() { + super("cancelUpload"); + } + + public cancelUpload_args getEmptyArgsInstance() { + return new cancelUpload_args(); + } + + protected boolean isOneway() { + return false; + } + + public cancelUpload_result getResult(I iface, cancelUpload_args args) throws org.apache.thrift.TException { + cancelUpload_result result = new cancelUpload_result(); + iface.cancelUpload(args.uploadToken); + return result; + } + } + + public static class queryUploadStatus extends org.apache.thrift.ProcessFunction { + public queryUploadStatus() { + super("queryUploadStatus"); + } + + public queryUploadStatus_args getEmptyArgsInstance() { + return new queryUploadStatus_args(); + } + + protected boolean isOneway() { + return false; + } + + public queryUploadStatus_result getResult(I iface, queryUploadStatus_args args) throws org.apache.thrift.TException { + queryUploadStatus_result result = new queryUploadStatus_result(); + try { + result.success = iface.queryUploadStatus(args.uploadToken); + } catch (TInvalidTokenException ex1) { + result.ex1 = ex1; + } + return result; + } + } + + public static class requestDownload extends org.apache.thrift.ProcessFunction { + public requestDownload() { + super("requestDownload"); + } + + public requestDownload_args getEmptyArgsInstance() { + return new requestDownload_args(); + } + + protected boolean isOneway() { + return false; + } + + public requestDownload_result getResult(I iface, requestDownload_args args) throws org.apache.thrift.TException { + requestDownload_result result = new requestDownload_result(); + try { + result.success = iface.requestDownload(args.userToken, args.imageVersionId); + } catch (TAuthorizationException authError) { + result.authError = authError; + } + return result; + } + } + + public static class cancelDownload extends org.apache.thrift.ProcessFunction { + public cancelDownload() { + super("cancelDownload"); + } + + public cancelDownload_args getEmptyArgsInstance() { + return new cancelDownload_args(); + } + + protected boolean isOneway() { + return false; + } + + public cancelDownload_result getResult(I iface, cancelDownload_args args) throws org.apache.thrift.TException { + cancelDownload_result result = new cancelDownload_result(); + iface.cancelDownload(args.downloadToken); + return result; + } + } + + public static class isAuthenticated extends org.apache.thrift.ProcessFunction { + public isAuthenticated() { + super("isAuthenticated"); + } + + public isAuthenticated_args getEmptyArgsInstance() { + return new isAuthenticated_args(); + } + + protected boolean isOneway() { + return false; + } + + public isAuthenticated_result getResult(I iface, isAuthenticated_args args) throws org.apache.thrift.TException { + isAuthenticated_result result = new isAuthenticated_result(); + result.success = iface.isAuthenticated(args.userToken); + result.setSuccessIsSet(true); + return result; + } + } + + public static class invalidateSession extends org.apache.thrift.ProcessFunction { + 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(); + iface.invalidateSession(args.userToken); + return result; + } + } + + public static class getOperatingSystems extends org.apache.thrift.ProcessFunction { + public getOperatingSystems() { + super("getOperatingSystems"); + } + + public getOperatingSystems_args getEmptyArgsInstance() { + return new getOperatingSystems_args(); + } + + protected boolean isOneway() { + return false; + } + + public getOperatingSystems_result getResult(I iface, getOperatingSystems_args args) throws org.apache.thrift.TException { + getOperatingSystems_result result = new getOperatingSystems_result(); + result.success = iface.getOperatingSystems(); + return result; + } + } + + public static class getVirtualizers extends org.apache.thrift.ProcessFunction { + public getVirtualizers() { + super("getVirtualizers"); + } + + public getVirtualizers_args getEmptyArgsInstance() { + return new getVirtualizers_args(); + } + + protected boolean isOneway() { + return false; + } + + public getVirtualizers_result getResult(I iface, getVirtualizers_args args) throws org.apache.thrift.TException { + getVirtualizers_result result = new getVirtualizers_result(); + result.success = iface.getVirtualizers(); + return result; + } + } + + public static class getAllOrganizations extends org.apache.thrift.ProcessFunction { + public getAllOrganizations() { + super("getAllOrganizations"); + } + + public getAllOrganizations_args getEmptyArgsInstance() { + return new getAllOrganizations_args(); + } + + protected boolean isOneway() { + return false; + } + + public getAllOrganizations_result getResult(I iface, getAllOrganizations_args args) throws org.apache.thrift.TException { + getAllOrganizations_result result = new getAllOrganizations_result(); + result.success = iface.getAllOrganizations(); + return result; + } + } + + public static class getImageList extends org.apache.thrift.ProcessFunction { + public getImageList() { + super("getImageList"); + } + + public getImageList_args getEmptyArgsInstance() { + return new getImageList_args(); + } + + protected boolean isOneway() { + return false; + } + + public getImageList_result getResult(I iface, getImageList_args args) throws org.apache.thrift.TException { + getImageList_result result = new getImageList_result(); + try { + result.success = iface.getImageList(args.userToken, args.tagSearch); + } catch (TAuthorizationException authError) { + result.authError = authError; + } + return result; + } + } + + public static class getImageDetails extends org.apache.thrift.ProcessFunction { + public getImageDetails() { + super("getImageDetails"); + } + + public getImageDetails_args getEmptyArgsInstance() { + return new getImageDetails_args(); + } + + protected boolean isOneway() { + return false; + } + + public getImageDetails_result getResult(I iface, getImageDetails_args args) throws org.apache.thrift.TException { + getImageDetails_result result = new getImageDetails_result(); + try { + result.success = iface.getImageDetails(args.userToken, args.imageBaseId); + } catch (TAuthorizationException authError) { + result.authError = authError; + } catch (TNotFoundException notFound) { + result.notFound = notFound; + } + return result; + } + } + + public static class updateImageBase extends org.apache.thrift.ProcessFunction { + public updateImageBase() { + super("updateImageBase"); + } + + public updateImageBase_args getEmptyArgsInstance() { + return new updateImageBase_args(); + } + + protected boolean isOneway() { + return false; + } + + public updateImageBase_result getResult(I iface, updateImageBase_args args) throws org.apache.thrift.TException { + updateImageBase_result result = new updateImageBase_result(); + try { + result.success = iface.updateImageBase(args.userToken, args.imageBaseId, args.image); + result.setSuccessIsSet(true); + } catch (TAuthorizationException authError) { + result.authError = authError; + } + return result; + } + } + + public static class updateImageVersion extends org.apache.thrift.ProcessFunction { + public updateImageVersion() { + super("updateImageVersion"); + } + + public updateImageVersion_args getEmptyArgsInstance() { + return new updateImageVersion_args(); + } + + protected boolean isOneway() { + return false; + } + + public updateImageVersion_result getResult(I iface, updateImageVersion_args args) throws org.apache.thrift.TException { + updateImageVersion_result result = new updateImageVersion_result(); + try { + result.success = iface.updateImageVersion(args.userToken, args.imageVersionId, args.image); + result.setSuccessIsSet(true); + } catch (TAuthorizationException authError) { + result.authError = authError; + } + return result; + } + } + + public static class deleteImageVersion extends org.apache.thrift.ProcessFunction { + public deleteImageVersion() { + super("deleteImageVersion"); + } + + public deleteImageVersion_args getEmptyArgsInstance() { + return new deleteImageVersion_args(); + } + + protected boolean isOneway() { + return false; + } + + public deleteImageVersion_result getResult(I iface, deleteImageVersion_args args) throws org.apache.thrift.TException { + deleteImageVersion_result result = new deleteImageVersion_result(); + try { + result.success = iface.deleteImageVersion(args.userToken, args.imageVersionId); + result.setSuccessIsSet(true); + } catch (TAuthorizationException authError) { + result.authError = authError; + } catch (TNotFoundException notFound) { + result.notFound = notFound; + } + return result; + } + } + + public static class writeImagePermissions extends org.apache.thrift.ProcessFunction { + public writeImagePermissions() { + super("writeImagePermissions"); + } + + public writeImagePermissions_args getEmptyArgsInstance() { + return new writeImagePermissions_args(); + } + + protected boolean isOneway() { + return false; + } + + public writeImagePermissions_result getResult(I iface, writeImagePermissions_args args) throws org.apache.thrift.TException { + writeImagePermissions_result result = new writeImagePermissions_result(); + try { + result.success = iface.writeImagePermissions(args.userToken, args.imageId, args.permissions); + result.setSuccessIsSet(true); + } catch (TAuthorizationException authError) { + result.authError = authError; + } catch (TNotFoundException notFound) { + result.notFound = notFound; + } + return result; + } + } + + public static class getImagePermissions extends org.apache.thrift.ProcessFunction { + public getImagePermissions() { + super("getImagePermissions"); + } + + public getImagePermissions_args getEmptyArgsInstance() { + return new getImagePermissions_args(); + } + + protected boolean isOneway() { + return false; + } + + public getImagePermissions_result getResult(I iface, getImagePermissions_args args) throws org.apache.thrift.TException { + getImagePermissions_result result = new getImagePermissions_result(); + try { + result.success = iface.getImagePermissions(args.userToken, args.imageBaseId); + } catch (TAuthorizationException authError) { + result.authError = authError; + } catch (TNotFoundException notFound) { + result.notFound = notFound; + } + return result; + } + } + + public static class createLecture extends org.apache.thrift.ProcessFunction { + public createLecture() { + super("createLecture"); + } + + public createLecture_args getEmptyArgsInstance() { + return new createLecture_args(); + } + + protected boolean isOneway() { + return false; + } + + public createLecture_result getResult(I iface, createLecture_args args) throws org.apache.thrift.TException { + createLecture_result result = new createLecture_result(); + try { + result.success = iface.createLecture(args.userToken, args.lecture); + } catch (TAuthorizationException authError) { + result.authError = authError; + } + return result; + } + } + + public static class updateLecture extends org.apache.thrift.ProcessFunction { + public updateLecture() { + super("updateLecture"); + } + + public updateLecture_args getEmptyArgsInstance() { + return new updateLecture_args(); + } + + protected boolean isOneway() { + return false; + } + + public updateLecture_result getResult(I iface, updateLecture_args args) throws org.apache.thrift.TException { + updateLecture_result result = new updateLecture_result(); + try { + result.success = iface.updateLecture(args.userToken, args.lectureId, args.lecture); + result.setSuccessIsSet(true); + } catch (TAuthorizationException authError) { + result.authError = authError; + } catch (TNotFoundException notFound) { + result.notFound = notFound; + } + return result; + } + } + + public static class getLectureList extends org.apache.thrift.ProcessFunction { + public getLectureList() { + super("getLectureList"); + } + + public getLectureList_args getEmptyArgsInstance() { + return new getLectureList_args(); + } + + protected boolean isOneway() { + return false; + } + + public getLectureList_result getResult(I iface, getLectureList_args args) throws org.apache.thrift.TException { + getLectureList_result result = new getLectureList_result(); + try { + result.success = iface.getLectureList(args.userToken); + } catch (TAuthorizationException authError) { + result.authError = authError; + } + return result; + } + } + + public static class getLectureDetails extends org.apache.thrift.ProcessFunction { + public getLectureDetails() { + super("getLectureDetails"); + } + + public getLectureDetails_args getEmptyArgsInstance() { + return new getLectureDetails_args(); + } + + protected boolean isOneway() { + return false; + } + + public getLectureDetails_result getResult(I iface, getLectureDetails_args args) throws org.apache.thrift.TException { + getLectureDetails_result result = new getLectureDetails_result(); + try { + result.success = iface.getLectureDetails(args.userToken, args.lectureId); + } catch (TAuthorizationException authError) { + result.authError = authError; + } catch (TNotFoundException notFound) { + result.notFound = notFound; + } + return result; + } + } + + public static class getLecturesByImageVersion extends org.apache.thrift.ProcessFunction { + public getLecturesByImageVersion() { + super("getLecturesByImageVersion"); + } + + public getLecturesByImageVersion_args getEmptyArgsInstance() { + return new getLecturesByImageVersion_args(); + } + + protected boolean isOneway() { + return false; + } + + public getLecturesByImageVersion_result getResult(I iface, getLecturesByImageVersion_args args) throws org.apache.thrift.TException { + getLecturesByImageVersion_result result = new getLecturesByImageVersion_result(); + try { + result.success = iface.getLecturesByImageVersion(args.userToken, args.imageVersionId); + } catch (TAuthorizationException authError) { + result.authError = authError; + } catch (TNotFoundException notFound) { + result.notFound = notFound; + } + return result; + } + } + + public static class deleteLecture extends org.apache.thrift.ProcessFunction { + public deleteLecture() { + super("deleteLecture"); + } + + public deleteLecture_args getEmptyArgsInstance() { + return new deleteLecture_args(); + } + + protected boolean isOneway() { + return false; + } + + public deleteLecture_result getResult(I iface, deleteLecture_args args) throws org.apache.thrift.TException { + deleteLecture_result result = new deleteLecture_result(); + try { + result.success = iface.deleteLecture(args.userToken, args.lectureId); + result.setSuccessIsSet(true); + } catch (TAuthorizationException authError) { + result.authError = authError; + } catch (TNotFoundException notFound) { + result.notFound = notFound; + } + return result; + } + } + + public static class writeLecturePermissions extends org.apache.thrift.ProcessFunction { + public writeLecturePermissions() { + super("writeLecturePermissions"); + } + + public writeLecturePermissions_args getEmptyArgsInstance() { + return new writeLecturePermissions_args(); + } + + protected boolean isOneway() { + return false; + } + + public writeLecturePermissions_result getResult(I iface, writeLecturePermissions_args args) throws org.apache.thrift.TException { + writeLecturePermissions_result result = new writeLecturePermissions_result(); + try { + result.success = iface.writeLecturePermissions(args.userToken, args.lectureId, args.permissions); + result.setSuccessIsSet(true); + } catch (TAuthorizationException authError) { + result.authError = authError; + } catch (TNotFoundException notFound) { + result.notFound = notFound; + } + return result; + } + } + + public static class getLecturePermissions extends org.apache.thrift.ProcessFunction { + public getLecturePermissions() { + super("getLecturePermissions"); + } + + public getLecturePermissions_args getEmptyArgsInstance() { + return new getLecturePermissions_args(); + } + + protected boolean isOneway() { + return false; + } + + public getLecturePermissions_result getResult(I iface, getLecturePermissions_args args) throws org.apache.thrift.TException { + getLecturePermissions_result result = new getLecturePermissions_result(); + try { + result.success = iface.getLecturePermissions(args.userToken, args.lectureId); + } catch (TAuthorizationException authError) { + result.authError = authError; + } catch (TNotFoundException notFound) { + result.notFound = notFound; + } + return result; + } + } + + } + + public static class AsyncProcessor extends org.apache.thrift.TBaseAsyncProcessor { + private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName()); + public AsyncProcessor(I iface) { + super(iface, getProcessMap(new HashMap>())); + } + + protected AsyncProcessor(I iface, Map> processMap) { + super(iface, getProcessMap(processMap)); + } + + private static Map> getProcessMap(Map> processMap) { + processMap.put("getVersion", new getVersion()); + processMap.put("requestImageVersionUpload", new requestImageVersionUpload()); + processMap.put("cancelUpload", new cancelUpload()); + processMap.put("queryUploadStatus", new queryUploadStatus()); + processMap.put("requestDownload", new requestDownload()); + processMap.put("cancelDownload", new cancelDownload()); + processMap.put("isAuthenticated", new isAuthenticated()); + processMap.put("invalidateSession", new invalidateSession()); + processMap.put("getOperatingSystems", new getOperatingSystems()); + processMap.put("getVirtualizers", new getVirtualizers()); + processMap.put("getAllOrganizations", new getAllOrganizations()); + processMap.put("getImageList", new getImageList()); + processMap.put("getImageDetails", new getImageDetails()); + processMap.put("updateImageBase", new updateImageBase()); + processMap.put("updateImageVersion", new updateImageVersion()); + processMap.put("deleteImageVersion", new deleteImageVersion()); + processMap.put("writeImagePermissions", new writeImagePermissions()); + processMap.put("getImagePermissions", new getImagePermissions()); + processMap.put("createLecture", new createLecture()); + processMap.put("updateLecture", new updateLecture()); + processMap.put("getLectureList", new getLectureList()); + processMap.put("getLectureDetails", new getLectureDetails()); + processMap.put("getLecturesByImageVersion", new getLecturesByImageVersion()); + processMap.put("deleteLecture", new deleteLecture()); + processMap.put("writeLecturePermissions", new writeLecturePermissions()); + processMap.put("getLecturePermissions", new getLecturePermissions()); + return processMap; + } + + public static class getVersion extends org.apache.thrift.AsyncProcessFunction { + public getVersion() { + super("getVersion"); + } + + public getVersion_args getEmptyArgsInstance() { + return new getVersion_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Long o) { + getVersion_result result = new getVersion_result(); + result.success = o; + result.setSuccessIsSet(true); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + getVersion_result result = new getVersion_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, getVersion_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.getVersion(resultHandler); + } + } + + public static class requestImageVersionUpload extends org.apache.thrift.AsyncProcessFunction { + public requestImageVersionUpload() { + super("requestImageVersionUpload"); + } + + public requestImageVersionUpload_args getEmptyArgsInstance() { + return new requestImageVersionUpload_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(TransferInformation o) { + requestImageVersionUpload_result result = new requestImageVersionUpload_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + requestImageVersionUpload_result result = new requestImageVersionUpload_result(); + if (e instanceof TTransferRejectedException) { + result.rejection = (TTransferRejectedException) e; + result.setRejectionIsSet(true); + msg = result; + } + else if (e instanceof TAuthorizationException) { + result.authError = (TAuthorizationException) e; + result.setAuthErrorIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, requestImageVersionUpload_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.requestImageVersionUpload(args.userToken, args.imageBaseId, args.fileSize, args.blockHashes,resultHandler); + } + } + + public static class cancelUpload extends org.apache.thrift.AsyncProcessFunction { + public cancelUpload() { + super("cancelUpload"); + } + + public cancelUpload_args getEmptyArgsInstance() { + return new cancelUpload_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + cancelUpload_result result = new cancelUpload_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + cancelUpload_result result = new cancelUpload_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, cancelUpload_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.cancelUpload(args.uploadToken,resultHandler); + } + } + + public static class queryUploadStatus extends org.apache.thrift.AsyncProcessFunction { + public queryUploadStatus() { + super("queryUploadStatus"); + } + + public queryUploadStatus_args getEmptyArgsInstance() { + return new queryUploadStatus_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(UploadStatus 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 resultHandler) throws TException { + iface.queryUploadStatus(args.uploadToken,resultHandler); + } + } + + public static class requestDownload extends org.apache.thrift.AsyncProcessFunction { + public requestDownload() { + super("requestDownload"); + } + + public requestDownload_args getEmptyArgsInstance() { + return new requestDownload_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(TransferInformation o) { + requestDownload_result result = new requestDownload_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + requestDownload_result result = new requestDownload_result(); + if (e instanceof TAuthorizationException) { + result.authError = (TAuthorizationException) e; + result.setAuthErrorIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, requestDownload_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.requestDownload(args.userToken, args.imageVersionId,resultHandler); + } + } + + public static class cancelDownload extends org.apache.thrift.AsyncProcessFunction { + public cancelDownload() { + super("cancelDownload"); + } + + public cancelDownload_args getEmptyArgsInstance() { + return new cancelDownload_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Void o) { + cancelDownload_result result = new cancelDownload_result(); + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + cancelDownload_result result = new cancelDownload_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, cancelDownload_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.cancelDownload(args.downloadToken,resultHandler); + } + } + + public static class isAuthenticated extends org.apache.thrift.AsyncProcessFunction { + public isAuthenticated() { + super("isAuthenticated"); + } + + public isAuthenticated_args getEmptyArgsInstance() { + return new isAuthenticated_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + isAuthenticated_result result = new isAuthenticated_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; + isAuthenticated_result result = new isAuthenticated_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, isAuthenticated_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.isAuthenticated(args.userToken,resultHandler); + } + } + + public static class invalidateSession extends org.apache.thrift.AsyncProcessFunction { + public invalidateSession() { + super("invalidateSession"); + } + + public invalidateSession_args getEmptyArgsInstance() { + return new invalidateSession_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + 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(); + { + 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 resultHandler) throws TException { + iface.invalidateSession(args.userToken,resultHandler); + } + } + + public static class getOperatingSystems extends org.apache.thrift.AsyncProcessFunction> { + public getOperatingSystems() { + super("getOperatingSystems"); + } + + public getOperatingSystems_args getEmptyArgsInstance() { + return new getOperatingSystems_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + getOperatingSystems_result result = new getOperatingSystems_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + getOperatingSystems_result result = new getOperatingSystems_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, getOperatingSystems_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.getOperatingSystems(resultHandler); + } + } + + public static class getVirtualizers extends org.apache.thrift.AsyncProcessFunction> { + public getVirtualizers() { + super("getVirtualizers"); + } + + public getVirtualizers_args getEmptyArgsInstance() { + return new getVirtualizers_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + getVirtualizers_result result = new getVirtualizers_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + getVirtualizers_result result = new getVirtualizers_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, getVirtualizers_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.getVirtualizers(resultHandler); + } + } + + public static class getAllOrganizations extends org.apache.thrift.AsyncProcessFunction> { + public getAllOrganizations() { + super("getAllOrganizations"); + } + + public getAllOrganizations_args getEmptyArgsInstance() { + return new getAllOrganizations_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + getAllOrganizations_result result = new getAllOrganizations_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + getAllOrganizations_result result = new getAllOrganizations_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, getAllOrganizations_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.getAllOrganizations(resultHandler); + } + } + + public static class getImageList extends org.apache.thrift.AsyncProcessFunction> { + public getImageList() { + super("getImageList"); + } + + public getImageList_args getEmptyArgsInstance() { + return new getImageList_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + getImageList_result result = new getImageList_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + getImageList_result result = new getImageList_result(); + if (e instanceof TAuthorizationException) { + result.authError = (TAuthorizationException) e; + result.setAuthErrorIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, getImageList_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.getImageList(args.userToken, args.tagSearch,resultHandler); + } + } + + public static class getImageDetails extends org.apache.thrift.AsyncProcessFunction { + public getImageDetails() { + super("getImageDetails"); + } + + public getImageDetails_args getEmptyArgsInstance() { + return new getImageDetails_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + 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 + { + 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 resultHandler) throws TException { + iface.getImageDetails(args.userToken, args.imageBaseId,resultHandler); + } + } + + public static class updateImageBase extends org.apache.thrift.AsyncProcessFunction { + public updateImageBase() { + super("updateImageBase"); + } + + public updateImageBase_args getEmptyArgsInstance() { + return new updateImageBase_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + updateImageBase_result result = new updateImageBase_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; + updateImageBase_result result = new updateImageBase_result(); + if (e instanceof TAuthorizationException) { + result.authError = (TAuthorizationException) e; + result.setAuthErrorIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, updateImageBase_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.updateImageBase(args.userToken, args.imageBaseId, args.image,resultHandler); + } + } + + public static class updateImageVersion extends org.apache.thrift.AsyncProcessFunction { + public updateImageVersion() { + super("updateImageVersion"); + } + + public updateImageVersion_args getEmptyArgsInstance() { + return new updateImageVersion_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + updateImageVersion_result result = new updateImageVersion_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; + updateImageVersion_result result = new updateImageVersion_result(); + if (e instanceof TAuthorizationException) { + result.authError = (TAuthorizationException) e; + result.setAuthErrorIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, updateImageVersion_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.updateImageVersion(args.userToken, args.imageVersionId, args.image,resultHandler); + } + } + + public static class deleteImageVersion extends org.apache.thrift.AsyncProcessFunction { + public deleteImageVersion() { + super("deleteImageVersion"); + } + + public deleteImageVersion_args getEmptyArgsInstance() { + return new deleteImageVersion_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + deleteImageVersion_result result = new deleteImageVersion_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; + deleteImageVersion_result result = new deleteImageVersion_result(); + if (e instanceof TAuthorizationException) { + result.authError = (TAuthorizationException) e; + result.setAuthErrorIsSet(true); + msg = result; + } + else if (e instanceof TNotFoundException) { + result.notFound = (TNotFoundException) e; + result.setNotFoundIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, deleteImageVersion_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.deleteImageVersion(args.userToken, args.imageVersionId,resultHandler); + } + } + + public static class writeImagePermissions extends org.apache.thrift.AsyncProcessFunction { + public writeImagePermissions() { + super("writeImagePermissions"); + } + + public writeImagePermissions_args getEmptyArgsInstance() { + return new writeImagePermissions_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + writeImagePermissions_result result = new writeImagePermissions_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; + writeImagePermissions_result result = new writeImagePermissions_result(); + if (e instanceof TAuthorizationException) { + result.authError = (TAuthorizationException) e; + result.setAuthErrorIsSet(true); + msg = result; + } + else if (e instanceof TNotFoundException) { + result.notFound = (TNotFoundException) e; + result.setNotFoundIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, writeImagePermissions_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.writeImagePermissions(args.userToken, args.imageId, args.permissions,resultHandler); + } + } + + public static class getImagePermissions extends org.apache.thrift.AsyncProcessFunction> { + public getImagePermissions() { + super("getImagePermissions"); + } + + public getImagePermissions_args getEmptyArgsInstance() { + return new getImagePermissions_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(Map o) { + getImagePermissions_result result = new getImagePermissions_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + getImagePermissions_result result = new getImagePermissions_result(); + if (e instanceof TAuthorizationException) { + result.authError = (TAuthorizationException) e; + result.setAuthErrorIsSet(true); + msg = result; + } + else if (e instanceof TNotFoundException) { + result.notFound = (TNotFoundException) e; + result.setNotFoundIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, getImagePermissions_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.getImagePermissions(args.userToken, args.imageBaseId,resultHandler); + } + } + + public static class createLecture extends org.apache.thrift.AsyncProcessFunction { + public createLecture() { + super("createLecture"); + } + + public createLecture_args getEmptyArgsInstance() { + return new createLecture_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(String o) { + createLecture_result result = new createLecture_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + createLecture_result result = new createLecture_result(); + if (e instanceof TAuthorizationException) { + result.authError = (TAuthorizationException) e; + result.setAuthErrorIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, createLecture_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.createLecture(args.userToken, args.lecture,resultHandler); + } + } + + public static class updateLecture extends org.apache.thrift.AsyncProcessFunction { + public updateLecture() { + super("updateLecture"); + } + + public updateLecture_args getEmptyArgsInstance() { + return new updateLecture_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + updateLecture_result result = new updateLecture_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; + updateLecture_result result = new updateLecture_result(); + if (e instanceof TAuthorizationException) { + result.authError = (TAuthorizationException) e; + result.setAuthErrorIsSet(true); + msg = result; + } + else if (e instanceof TNotFoundException) { + result.notFound = (TNotFoundException) e; + result.setNotFoundIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, updateLecture_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.updateLecture(args.userToken, args.lectureId, args.lecture,resultHandler); + } + } + + public static class getLectureList extends org.apache.thrift.AsyncProcessFunction> { + public getLectureList() { + super("getLectureList"); + } + + public getLectureList_args getEmptyArgsInstance() { + return new getLectureList_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + getLectureList_result result = new getLectureList_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + getLectureList_result result = new getLectureList_result(); + if (e instanceof TAuthorizationException) { + result.authError = (TAuthorizationException) e; + result.setAuthErrorIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, getLectureList_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.getLectureList(args.userToken,resultHandler); + } + } + + public static class getLectureDetails extends org.apache.thrift.AsyncProcessFunction { + public getLectureDetails() { + super("getLectureDetails"); + } + + public getLectureDetails_args getEmptyArgsInstance() { + return new getLectureDetails_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(LectureRead o) { + getLectureDetails_result result = new getLectureDetails_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + getLectureDetails_result result = new getLectureDetails_result(); + if (e instanceof TAuthorizationException) { + result.authError = (TAuthorizationException) e; + result.setAuthErrorIsSet(true); + msg = result; + } + else if (e instanceof TNotFoundException) { + result.notFound = (TNotFoundException) e; + result.setNotFoundIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, getLectureDetails_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.getLectureDetails(args.userToken, args.lectureId,resultHandler); + } + } + + public static class getLecturesByImageVersion extends org.apache.thrift.AsyncProcessFunction> { + public getLecturesByImageVersion() { + super("getLecturesByImageVersion"); + } + + public getLecturesByImageVersion_args getEmptyArgsInstance() { + return new getLecturesByImageVersion_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + getLecturesByImageVersion_result result = new getLecturesByImageVersion_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; + getLecturesByImageVersion_result result = new getLecturesByImageVersion_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 + { + 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, getLecturesByImageVersion_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.getLecturesByImageVersion(args.userToken, args.imageVersionId,resultHandler); + } + } + + public static class deleteLecture extends org.apache.thrift.AsyncProcessFunction { + public deleteLecture() { + super("deleteLecture"); + } + + public deleteLecture_args getEmptyArgsInstance() { + return new deleteLecture_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + deleteLecture_result result = new deleteLecture_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; + deleteLecture_result result = new deleteLecture_result(); + if (e instanceof TAuthorizationException) { + result.authError = (TAuthorizationException) e; + result.setAuthErrorIsSet(true); + msg = result; + } + else if (e instanceof TNotFoundException) { + result.notFound = (TNotFoundException) e; + result.setNotFoundIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, deleteLecture_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.deleteLecture(args.userToken, args.lectureId,resultHandler); + } + } + + public static class writeLecturePermissions extends org.apache.thrift.AsyncProcessFunction { + public writeLecturePermissions() { + super("writeLecturePermissions"); + } + + public writeLecturePermissions_args getEmptyArgsInstance() { + return new writeLecturePermissions_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(Boolean o) { + writeLecturePermissions_result result = new writeLecturePermissions_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; + writeLecturePermissions_result result = new writeLecturePermissions_result(); + if (e instanceof TAuthorizationException) { + result.authError = (TAuthorizationException) e; + result.setAuthErrorIsSet(true); + msg = result; + } + else if (e instanceof TNotFoundException) { + result.notFound = (TNotFoundException) e; + result.setNotFoundIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, writeLecturePermissions_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.writeLecturePermissions(args.userToken, args.lectureId, args.permissions,resultHandler); + } + } + + public static class getLecturePermissions extends org.apache.thrift.AsyncProcessFunction> { + public getLecturePermissions() { + super("getLecturePermissions"); + } + + public getLecturePermissions_args getEmptyArgsInstance() { + return new getLecturePermissions_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(Map o) { + getLecturePermissions_result result = new getLecturePermissions_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + getLecturePermissions_result result = new getLecturePermissions_result(); + if (e instanceof TAuthorizationException) { + result.authError = (TAuthorizationException) e; + result.setAuthErrorIsSet(true); + msg = result; + } + else if (e instanceof TNotFoundException) { + result.notFound = (TNotFoundException) e; + result.setNotFoundIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, getLecturePermissions_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.getLecturePermissions(args.userToken, args.lectureId,resultHandler); + } + } + + } + + public static class getVersion_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getVersion_args"); + + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getVersion_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getVersion_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 byName = new HashMap(); + + 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(getVersion_args.class, metaDataMap); + } + + public getVersion_args() { + } + + /** + * Performs a deep copy on other. + */ + public getVersion_args(getVersion_args other) { + } + + public getVersion_args deepCopy() { + return new getVersion_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 getVersion_args) + return this.equals((getVersion_args)that); + return false; + } + + public boolean equals(getVersion_args that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getVersion_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("getVersion_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 getVersion_argsStandardSchemeFactory implements SchemeFactory { + public getVersion_argsStandardScheme getScheme() { + return new getVersion_argsStandardScheme(); + } + } + + private static class getVersion_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getVersion_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getVersion_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getVersion_argsTupleSchemeFactory implements SchemeFactory { + public getVersion_argsTupleScheme getScheme() { + return new getVersion_argsTupleScheme(); + } + } + + private static class getVersion_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getVersion_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getVersion_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + + } + + public static class getVersion_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getVersion_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getVersion_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getVersion_resultTupleSchemeFactory()); + } + + public long success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "int"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getVersion_result.class, metaDataMap); + } + + public getVersion_result() { + } + + public getVersion_result( + long success) + { + this(); + this.success = success; + setSuccessIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public getVersion_result(getVersion_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + } + + public getVersion_result deepCopy() { + return new getVersion_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = 0; + } + + public long getSuccess() { + return this.success; + } + + public getVersion_result setSuccess(long success) { + this.success = success; + setSuccessIsSet(true); + return this; + } + + public void unsetSuccess() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Long)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return Long.valueOf(getSuccess()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getVersion_result) + return this.equals((getVersion_result)that); + return false; + } + + public boolean equals(getVersion_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getVersion_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getVersion_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getVersion_resultStandardSchemeFactory implements SchemeFactory { + public getVersion_resultStandardScheme getScheme() { + return new getVersion_resultStandardScheme(); + } + } + + private static class getVersion_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getVersion_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.success = iprot.readI64(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getVersion_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeI64(struct.success); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getVersion_resultTupleSchemeFactory implements SchemeFactory { + public getVersion_resultTupleScheme getScheme() { + return new getVersion_resultTupleScheme(); + } + } + + private static class getVersion_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getVersion_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + oprot.writeI64(struct.success); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getVersion_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = iprot.readI64(); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class requestImageVersionUpload_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("requestImageVersionUpload_args"); + + private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField IMAGE_BASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageBaseId", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField FILE_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("fileSize", org.apache.thrift.protocol.TType.I64, (short)3); + private static final org.apache.thrift.protocol.TField BLOCK_HASHES_FIELD_DESC = new org.apache.thrift.protocol.TField("blockHashes", org.apache.thrift.protocol.TType.LIST, (short)4); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new requestImageVersionUpload_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new requestImageVersionUpload_argsTupleSchemeFactory()); + } + + public String userToken; // required + public String imageBaseId; // required + public long fileSize; // required + public List 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_BASE_ID((short)2, "imageBaseId"), + FILE_SIZE((short)3, "fileSize"), + BLOCK_HASHES((short)4, "blockHashes"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // USER_TOKEN + return USER_TOKEN; + case 2: // IMAGE_BASE_ID + return IMAGE_BASE_ID; + case 3: // FILE_SIZE + return FILE_SIZE; + case 4: // BLOCK_HASHES + return BLOCK_HASHES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __FILESIZE_ISSET_ID = 0; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); + tmpMap.put(_Fields.IMAGE_BASE_ID, new org.apache.thrift.meta_data.FieldMetaData("imageBaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); + tmpMap.put(_Fields.FILE_SIZE, new org.apache.thrift.meta_data.FieldMetaData("fileSize", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.BLOCK_HASHES, new org.apache.thrift.meta_data.FieldMetaData("blockHashes", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestImageVersionUpload_args.class, metaDataMap); + } + + public requestImageVersionUpload_args() { + } + + public requestImageVersionUpload_args( + String userToken, + String imageBaseId, + long fileSize, + List blockHashes) + { + this(); + this.userToken = userToken; + this.imageBaseId = imageBaseId; + this.fileSize = fileSize; + setFileSizeIsSet(true); + this.blockHashes = blockHashes; + } + + /** + * Performs a deep copy on other. + */ + public requestImageVersionUpload_args(requestImageVersionUpload_args other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetUserToken()) { + this.userToken = other.userToken; + } + if (other.isSetImageBaseId()) { + this.imageBaseId = other.imageBaseId; + } + this.fileSize = other.fileSize; + if (other.isSetBlockHashes()) { + List __this__blockHashes = new ArrayList(other.blockHashes); + this.blockHashes = __this__blockHashes; + } + } + + public requestImageVersionUpload_args deepCopy() { + return new requestImageVersionUpload_args(this); + } + + @Override + public void clear() { + this.userToken = null; + this.imageBaseId = null; + setFileSizeIsSet(false); + this.fileSize = 0; + this.blockHashes = null; + } + + public String getUserToken() { + return this.userToken; + } + + public requestImageVersionUpload_args setUserToken(String userToken) { + this.userToken = userToken; + return this; + } + + public void unsetUserToken() { + this.userToken = null; + } + + /** Returns true if field userToken is set (has been assigned a value) and false otherwise */ + public boolean isSetUserToken() { + return this.userToken != null; + } + + public void setUserTokenIsSet(boolean value) { + if (!value) { + this.userToken = null; + } + } + + public String getImageBaseId() { + return this.imageBaseId; + } + + public requestImageVersionUpload_args setImageBaseId(String imageBaseId) { + this.imageBaseId = imageBaseId; + return this; + } + + public void unsetImageBaseId() { + this.imageBaseId = null; + } + + /** Returns true if field imageBaseId is set (has been assigned a value) and false otherwise */ + public boolean isSetImageBaseId() { + return this.imageBaseId != null; + } + + public void setImageBaseIdIsSet(boolean value) { + if (!value) { + this.imageBaseId = null; + } + } + + public long getFileSize() { + return this.fileSize; + } + + public requestImageVersionUpload_args setFileSize(long fileSize) { + this.fileSize = fileSize; + setFileSizeIsSet(true); + return this; + } + + public void unsetFileSize() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILESIZE_ISSET_ID); + } + + /** Returns true if field fileSize is set (has been assigned a value) and false otherwise */ + public boolean isSetFileSize() { + return EncodingUtils.testBit(__isset_bitfield, __FILESIZE_ISSET_ID); + } + + public void setFileSizeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILESIZE_ISSET_ID, value); + } + + public int getBlockHashesSize() { + return (this.blockHashes == null) ? 0 : this.blockHashes.size(); + } + + public java.util.Iterator getBlockHashesIterator() { + return (this.blockHashes == null) ? null : this.blockHashes.iterator(); + } + + public void addToBlockHashes(ByteBuffer elem) { + if (this.blockHashes == null) { + this.blockHashes = new ArrayList(); + } + this.blockHashes.add(elem); + } + + public List getBlockHashes() { + return this.blockHashes; + } + + public requestImageVersionUpload_args setBlockHashes(List 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_BASE_ID: + if (value == null) { + unsetImageBaseId(); + } else { + setImageBaseId((String)value); + } + break; + + case FILE_SIZE: + if (value == null) { + unsetFileSize(); + } else { + setFileSize((Long)value); + } + break; + + case BLOCK_HASHES: + if (value == null) { + unsetBlockHashes(); + } else { + setBlockHashes((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case USER_TOKEN: + return getUserToken(); + + case IMAGE_BASE_ID: + return getImageBaseId(); + + case FILE_SIZE: + return Long.valueOf(getFileSize()); + + 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_BASE_ID: + return isSetImageBaseId(); + case FILE_SIZE: + return isSetFileSize(); + case BLOCK_HASHES: + return isSetBlockHashes(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof requestImageVersionUpload_args) + return this.equals((requestImageVersionUpload_args)that); + return false; + } + + public boolean equals(requestImageVersionUpload_args that) { + if (that == null) + return false; + + boolean this_present_userToken = true && this.isSetUserToken(); + boolean that_present_userToken = true && that.isSetUserToken(); + if (this_present_userToken || that_present_userToken) { + if (!(this_present_userToken && that_present_userToken)) + return false; + if (!this.userToken.equals(that.userToken)) + return false; + } + + boolean this_present_imageBaseId = true && this.isSetImageBaseId(); + boolean that_present_imageBaseId = true && that.isSetImageBaseId(); + if (this_present_imageBaseId || that_present_imageBaseId) { + if (!(this_present_imageBaseId && that_present_imageBaseId)) + return false; + if (!this.imageBaseId.equals(that.imageBaseId)) + return false; + } + + boolean this_present_fileSize = true; + boolean that_present_fileSize = true; + if (this_present_fileSize || that_present_fileSize) { + if (!(this_present_fileSize && that_present_fileSize)) + return false; + if (this.fileSize != that.fileSize) + return false; + } + + boolean this_present_blockHashes = true && this.isSetBlockHashes(); + boolean that_present_blockHashes = true && that.isSetBlockHashes(); + if (this_present_blockHashes || that_present_blockHashes) { + if (!(this_present_blockHashes && that_present_blockHashes)) + return false; + if (!this.blockHashes.equals(that.blockHashes)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(requestImageVersionUpload_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUserToken()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetImageBaseId()).compareTo(other.isSetImageBaseId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetImageBaseId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageBaseId, other.imageBaseId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFileSize()).compareTo(other.isSetFileSize()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFileSize()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileSize, other.fileSize); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetBlockHashes()).compareTo(other.isSetBlockHashes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetBlockHashes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockHashes, other.blockHashes); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("requestImageVersionUpload_args("); + boolean first = true; + + sb.append("userToken:"); + if (this.userToken == null) { + sb.append("null"); + } else { + sb.append(this.userToken); + } + first = false; + if (!first) sb.append(", "); + sb.append("imageBaseId:"); + if (this.imageBaseId == null) { + sb.append("null"); + } else { + sb.append(this.imageBaseId); + } + first = false; + if (!first) sb.append(", "); + sb.append("fileSize:"); + sb.append(this.fileSize); + first = false; + if (!first) sb.append(", "); + sb.append("blockHashes:"); + if (this.blockHashes == null) { + sb.append("null"); + } else { + sb.append(this.blockHashes); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class requestImageVersionUpload_argsStandardSchemeFactory implements SchemeFactory { + public requestImageVersionUpload_argsStandardScheme getScheme() { + return new requestImageVersionUpload_argsStandardScheme(); + } + } + + private static class requestImageVersionUpload_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, requestImageVersionUpload_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // USER_TOKEN + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.userToken = iprot.readString(); + struct.setUserTokenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // IMAGE_BASE_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.imageBaseId = iprot.readString(); + struct.setImageBaseIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // FILE_SIZE + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.fileSize = iprot.readI64(); + struct.setFileSizeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // BLOCK_HASHES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list58 = iprot.readListBegin(); + struct.blockHashes = new ArrayList(_list58.size); + for (int _i59 = 0; _i59 < _list58.size; ++_i59) + { + ByteBuffer _elem60; + _elem60 = iprot.readBinary(); + struct.blockHashes.add(_elem60); + } + 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, requestImageVersionUpload_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.userToken != null) { + oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC); + oprot.writeString(struct.userToken); + oprot.writeFieldEnd(); + } + if (struct.imageBaseId != null) { + oprot.writeFieldBegin(IMAGE_BASE_ID_FIELD_DESC); + oprot.writeString(struct.imageBaseId); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(FILE_SIZE_FIELD_DESC); + oprot.writeI64(struct.fileSize); + oprot.writeFieldEnd(); + if (struct.blockHashes != null) { + oprot.writeFieldBegin(BLOCK_HASHES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.blockHashes.size())); + for (ByteBuffer _iter61 : struct.blockHashes) + { + oprot.writeBinary(_iter61); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class requestImageVersionUpload_argsTupleSchemeFactory implements SchemeFactory { + public requestImageVersionUpload_argsTupleScheme getScheme() { + return new requestImageVersionUpload_argsTupleScheme(); + } + } + + private static class requestImageVersionUpload_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, requestImageVersionUpload_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUserToken()) { + optionals.set(0); + } + if (struct.isSetImageBaseId()) { + optionals.set(1); + } + if (struct.isSetFileSize()) { + optionals.set(2); + } + if (struct.isSetBlockHashes()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetUserToken()) { + oprot.writeString(struct.userToken); + } + if (struct.isSetImageBaseId()) { + oprot.writeString(struct.imageBaseId); + } + if (struct.isSetFileSize()) { + oprot.writeI64(struct.fileSize); + } + if (struct.isSetBlockHashes()) { + { + oprot.writeI32(struct.blockHashes.size()); + for (ByteBuffer _iter62 : struct.blockHashes) + { + oprot.writeBinary(_iter62); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, requestImageVersionUpload_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.userToken = iprot.readString(); + struct.setUserTokenIsSet(true); + } + if (incoming.get(1)) { + struct.imageBaseId = iprot.readString(); + struct.setImageBaseIdIsSet(true); + } + if (incoming.get(2)) { + struct.fileSize = iprot.readI64(); + struct.setFileSizeIsSet(true); + } + if (incoming.get(3)) { + { + org.apache.thrift.protocol.TList _list63 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.blockHashes = new ArrayList(_list63.size); + for (int _i64 = 0; _i64 < _list63.size; ++_i64) + { + ByteBuffer _elem65; + _elem65 = iprot.readBinary(); + struct.blockHashes.add(_elem65); + } + } + struct.setBlockHashesIsSet(true); + } + } + } + + } + + public static class requestImageVersionUpload_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("requestImageVersionUpload_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + private static final org.apache.thrift.protocol.TField REJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("rejection", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new requestImageVersionUpload_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new requestImageVersionUpload_resultTupleSchemeFactory()); + } + + public TransferInformation success; // required + public TTransferRejectedException rejection; // required + public TAuthorizationException authError; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + REJECTION((short)1, "rejection"), + AUTH_ERROR((short)2, "authError"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // REJECTION + return REJECTION; + case 2: // AUTH_ERROR + return AUTH_ERROR; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TransferInformation.class))); + tmpMap.put(_Fields.REJECTION, new org.apache.thrift.meta_data.FieldMetaData("rejection", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestImageVersionUpload_result.class, metaDataMap); + } + + public requestImageVersionUpload_result() { + } + + public requestImageVersionUpload_result( + TransferInformation success, + TTransferRejectedException rejection, + TAuthorizationException authError) + { + this(); + this.success = success; + this.rejection = rejection; + this.authError = authError; + } + + /** + * Performs a deep copy on other. + */ + public requestImageVersionUpload_result(requestImageVersionUpload_result other) { + if (other.isSetSuccess()) { + this.success = new TransferInformation(other.success); + } + if (other.isSetRejection()) { + this.rejection = new TTransferRejectedException(other.rejection); + } + if (other.isSetAuthError()) { + this.authError = new TAuthorizationException(other.authError); + } + } + + public requestImageVersionUpload_result deepCopy() { + return new requestImageVersionUpload_result(this); + } + + @Override + public void clear() { + this.success = null; + this.rejection = null; + this.authError = null; + } + + public TransferInformation getSuccess() { + return this.success; + } + + public requestImageVersionUpload_result setSuccess(TransferInformation success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public TTransferRejectedException getRejection() { + return this.rejection; + } + + public requestImageVersionUpload_result setRejection(TTransferRejectedException rejection) { + this.rejection = rejection; + return this; + } + + public void unsetRejection() { + this.rejection = null; + } + + /** Returns true if field rejection is set (has been assigned a value) and false otherwise */ + public boolean isSetRejection() { + return this.rejection != null; + } + + public void setRejectionIsSet(boolean value) { + if (!value) { + this.rejection = null; + } + } + + public TAuthorizationException getAuthError() { + return this.authError; + } + + public requestImageVersionUpload_result setAuthError(TAuthorizationException authError) { + this.authError = authError; + return this; + } + + public void unsetAuthError() { + this.authError = null; + } + + /** Returns true if field authError is set (has been assigned a value) and false otherwise */ + public boolean isSetAuthError() { + return this.authError != null; + } + + public void setAuthErrorIsSet(boolean value) { + if (!value) { + this.authError = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((TransferInformation)value); + } + break; + + case REJECTION: + if (value == null) { + unsetRejection(); + } else { + setRejection((TTransferRejectedException)value); + } + break; + + case AUTH_ERROR: + if (value == null) { + unsetAuthError(); + } else { + setAuthError((TAuthorizationException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case REJECTION: + return getRejection(); + + case AUTH_ERROR: + return getAuthError(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case REJECTION: + return isSetRejection(); + case AUTH_ERROR: + return isSetAuthError(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof requestImageVersionUpload_result) + return this.equals((requestImageVersionUpload_result)that); + return false; + } + + public boolean equals(requestImageVersionUpload_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_rejection = true && this.isSetRejection(); + boolean that_present_rejection = true && that.isSetRejection(); + if (this_present_rejection || that_present_rejection) { + if (!(this_present_rejection && that_present_rejection)) + return false; + if (!this.rejection.equals(that.rejection)) + return false; + } + + boolean this_present_authError = true && this.isSetAuthError(); + boolean that_present_authError = true && that.isSetAuthError(); + if (this_present_authError || that_present_authError) { + if (!(this_present_authError && that_present_authError)) + return false; + if (!this.authError.equals(that.authError)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(requestImageVersionUpload_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRejection()).compareTo(other.isSetRejection()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRejection()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rejection, other.rejection); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAuthError()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("requestImageVersionUpload_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("rejection:"); + if (this.rejection == null) { + sb.append("null"); + } else { + sb.append(this.rejection); + } + first = false; + if (!first) sb.append(", "); + sb.append("authError:"); + if (this.authError == null) { + sb.append("null"); + } else { + sb.append(this.authError); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class requestImageVersionUpload_resultStandardSchemeFactory implements SchemeFactory { + public requestImageVersionUpload_resultStandardScheme getScheme() { + return new requestImageVersionUpload_resultStandardScheme(); + } + } + + private static class requestImageVersionUpload_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, requestImageVersionUpload_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new TransferInformation(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // REJECTION + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.rejection = new TTransferRejectedException(); + struct.rejection.read(iprot); + struct.setRejectionIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // AUTH_ERROR + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.authError = new TAuthorizationException(); + struct.authError.read(iprot); + struct.setAuthErrorIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, requestImageVersionUpload_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.rejection != null) { + oprot.writeFieldBegin(REJECTION_FIELD_DESC); + struct.rejection.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.authError != null) { + oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); + struct.authError.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class requestImageVersionUpload_resultTupleSchemeFactory implements SchemeFactory { + public requestImageVersionUpload_resultTupleScheme getScheme() { + return new requestImageVersionUpload_resultTupleScheme(); + } + } + + private static class requestImageVersionUpload_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, requestImageVersionUpload_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetRejection()) { + optionals.set(1); + } + if (struct.isSetAuthError()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetRejection()) { + struct.rejection.write(oprot); + } + if (struct.isSetAuthError()) { + struct.authError.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, requestImageVersionUpload_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = new TransferInformation(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.rejection = new TTransferRejectedException(); + struct.rejection.read(iprot); + struct.setRejectionIsSet(true); + } + if (incoming.get(2)) { + struct.authError = new TAuthorizationException(); + struct.authError.read(iprot); + struct.setAuthErrorIsSet(true); + } + } + } + + } + + public static class cancelUpload_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cancelUpload_args"); + + private static final org.apache.thrift.protocol.TField UPLOAD_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("uploadToken", org.apache.thrift.protocol.TType.STRING, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new cancelUpload_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new cancelUpload_argsTupleSchemeFactory()); + } + + public String uploadToken; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + UPLOAD_TOKEN((short)1, "uploadToken"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // UPLOAD_TOKEN + return UPLOAD_TOKEN; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.UPLOAD_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("uploadToken", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelUpload_args.class, metaDataMap); + } + + public cancelUpload_args() { + } + + public cancelUpload_args( + String uploadToken) + { + this(); + this.uploadToken = uploadToken; + } + + /** + * Performs a deep copy on other. + */ + public cancelUpload_args(cancelUpload_args other) { + if (other.isSetUploadToken()) { + this.uploadToken = other.uploadToken; + } + } + + public cancelUpload_args deepCopy() { + return new cancelUpload_args(this); + } + + @Override + public void clear() { + this.uploadToken = null; + } + + public String getUploadToken() { + return this.uploadToken; + } + + public cancelUpload_args setUploadToken(String uploadToken) { + this.uploadToken = uploadToken; + return this; + } + + public void unsetUploadToken() { + this.uploadToken = null; + } + + /** Returns true if field uploadToken is set (has been assigned a value) and false otherwise */ + public boolean isSetUploadToken() { + return this.uploadToken != null; + } + + public void setUploadTokenIsSet(boolean value) { + if (!value) { + this.uploadToken = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case UPLOAD_TOKEN: + if (value == null) { + unsetUploadToken(); + } else { + setUploadToken((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case UPLOAD_TOKEN: + return getUploadToken(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case UPLOAD_TOKEN: + return isSetUploadToken(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof cancelUpload_args) + return this.equals((cancelUpload_args)that); + return false; + } + + public boolean equals(cancelUpload_args that) { + if (that == null) + return false; + + boolean this_present_uploadToken = true && this.isSetUploadToken(); + boolean that_present_uploadToken = true && that.isSetUploadToken(); + if (this_present_uploadToken || that_present_uploadToken) { + if (!(this_present_uploadToken && that_present_uploadToken)) + return false; + if (!this.uploadToken.equals(that.uploadToken)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(cancelUpload_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUploadToken()).compareTo(other.isSetUploadToken()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUploadToken()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uploadToken, other.uploadToken); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("cancelUpload_args("); + boolean first = true; + + sb.append("uploadToken:"); + if (this.uploadToken == null) { + sb.append("null"); + } else { + sb.append(this.uploadToken); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class cancelUpload_argsStandardSchemeFactory implements SchemeFactory { + public cancelUpload_argsStandardScheme getScheme() { + return new cancelUpload_argsStandardScheme(); + } + } + + private static class cancelUpload_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, cancelUpload_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // UPLOAD_TOKEN + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.uploadToken = iprot.readString(); + struct.setUploadTokenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, cancelUpload_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.uploadToken != null) { + oprot.writeFieldBegin(UPLOAD_TOKEN_FIELD_DESC); + oprot.writeString(struct.uploadToken); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class cancelUpload_argsTupleSchemeFactory implements SchemeFactory { + public cancelUpload_argsTupleScheme getScheme() { + return new cancelUpload_argsTupleScheme(); + } + } + + private static class cancelUpload_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, cancelUpload_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUploadToken()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetUploadToken()) { + oprot.writeString(struct.uploadToken); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, cancelUpload_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.uploadToken = iprot.readString(); + struct.setUploadTokenIsSet(true); + } + } + } + + } + + public static class cancelUpload_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cancelUpload_result"); + + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new cancelUpload_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new cancelUpload_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 byName = new HashMap(); + + 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(cancelUpload_result.class, metaDataMap); + } + + public cancelUpload_result() { + } + + /** + * Performs a deep copy on other. + */ + public cancelUpload_result(cancelUpload_result other) { + } + + public cancelUpload_result deepCopy() { + return new cancelUpload_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 cancelUpload_result) + return this.equals((cancelUpload_result)that); + return false; + } + + public boolean equals(cancelUpload_result that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(cancelUpload_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("cancelUpload_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 cancelUpload_resultStandardSchemeFactory implements SchemeFactory { + public cancelUpload_resultStandardScheme getScheme() { + return new cancelUpload_resultStandardScheme(); + } + } + + private static class cancelUpload_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, cancelUpload_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, cancelUpload_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class cancelUpload_resultTupleSchemeFactory implements SchemeFactory { + public cancelUpload_resultTupleScheme getScheme() { + return new cancelUpload_resultTupleScheme(); + } + } + + private static class cancelUpload_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, cancelUpload_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, cancelUpload_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + + } + + public static class queryUploadStatus_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + 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, SchemeFactory> schemes = new HashMap, 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 byName = new HashMap(); + + 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 other. + */ + 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() { + return 0; + } + + @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 { + + 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 { + + @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, java.io.Serializable, Cloneable, Comparable { + 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, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new queryUploadStatus_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new queryUploadStatus_resultTupleSchemeFactory()); + } + + public UploadStatus 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 byName = new HashMap(); + + 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, UploadStatus.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( + UploadStatus success, + TInvalidTokenException ex1) + { + this(); + this.success = success; + this.ex1 = ex1; + } + + /** + * Performs a deep copy on other. + */ + public queryUploadStatus_result(queryUploadStatus_result other) { + if (other.isSetSuccess()) { + this.success = new UploadStatus(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 UploadStatus getSuccess() { + return this.success; + } + + public queryUploadStatus_result setSuccess(UploadStatus 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((UploadStatus)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() { + return 0; + } + + @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 { + + 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 UploadStatus(); + 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 { + + @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 UploadStatus(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.ex1 = new TInvalidTokenException(); + struct.ex1.read(iprot); + struct.setEx1IsSet(true); + } + } + } + + } + + public static class requestDownload_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("requestDownload_args"); + + private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField IMAGE_VERSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageVersionId", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new requestDownload_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new requestDownload_argsTupleSchemeFactory()); + } + + public String userToken; // required + public String imageVersionId; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + USER_TOKEN((short)1, "userToken"), + IMAGE_VERSION_ID((short)2, "imageVersionId"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // USER_TOKEN + return USER_TOKEN; + case 2: // IMAGE_VERSION_ID + return IMAGE_VERSION_ID; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); + tmpMap.put(_Fields.IMAGE_VERSION_ID, new org.apache.thrift.meta_data.FieldMetaData("imageVersionId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestDownload_args.class, metaDataMap); + } + + public requestDownload_args() { + } + + public requestDownload_args( + String userToken, + String imageVersionId) + { + this(); + this.userToken = userToken; + this.imageVersionId = imageVersionId; + } + + /** + * Performs a deep copy on other. + */ + public requestDownload_args(requestDownload_args other) { + if (other.isSetUserToken()) { + this.userToken = other.userToken; + } + if (other.isSetImageVersionId()) { + this.imageVersionId = other.imageVersionId; + } + } + + public requestDownload_args deepCopy() { + return new requestDownload_args(this); + } + + @Override + public void clear() { + this.userToken = null; + this.imageVersionId = null; + } + + public String getUserToken() { + return this.userToken; + } + + public requestDownload_args setUserToken(String userToken) { + this.userToken = userToken; + return this; + } + + public void unsetUserToken() { + this.userToken = null; + } + + /** Returns true if field userToken is set (has been assigned a value) and false otherwise */ + public boolean isSetUserToken() { + return this.userToken != null; + } + + public void setUserTokenIsSet(boolean value) { + if (!value) { + this.userToken = null; + } + } + + public String getImageVersionId() { + return this.imageVersionId; + } + + public requestDownload_args setImageVersionId(String imageVersionId) { + this.imageVersionId = imageVersionId; + return this; + } + + public void unsetImageVersionId() { + this.imageVersionId = null; + } + + /** Returns true if field imageVersionId is set (has been assigned a value) and false otherwise */ + public boolean isSetImageVersionId() { + return this.imageVersionId != null; + } + + public void setImageVersionIdIsSet(boolean value) { + if (!value) { + this.imageVersionId = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case USER_TOKEN: + if (value == null) { + unsetUserToken(); + } else { + setUserToken((String)value); + } + break; + + case IMAGE_VERSION_ID: + if (value == null) { + unsetImageVersionId(); + } else { + setImageVersionId((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case USER_TOKEN: + return getUserToken(); + + case IMAGE_VERSION_ID: + return getImageVersionId(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case USER_TOKEN: + return isSetUserToken(); + case IMAGE_VERSION_ID: + return isSetImageVersionId(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof requestDownload_args) + return this.equals((requestDownload_args)that); + return false; + } + + public boolean equals(requestDownload_args that) { + if (that == null) + return false; + + boolean this_present_userToken = true && this.isSetUserToken(); + boolean that_present_userToken = true && that.isSetUserToken(); + if (this_present_userToken || that_present_userToken) { + if (!(this_present_userToken && that_present_userToken)) + return false; + if (!this.userToken.equals(that.userToken)) + return false; + } + + boolean this_present_imageVersionId = true && this.isSetImageVersionId(); + boolean that_present_imageVersionId = true && that.isSetImageVersionId(); + if (this_present_imageVersionId || that_present_imageVersionId) { + if (!(this_present_imageVersionId && that_present_imageVersionId)) + return false; + if (!this.imageVersionId.equals(that.imageVersionId)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(requestDownload_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUserToken()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetImageVersionId()).compareTo(other.isSetImageVersionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetImageVersionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageVersionId, other.imageVersionId); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("requestDownload_args("); + boolean first = true; + + sb.append("userToken:"); + if (this.userToken == null) { + sb.append("null"); + } else { + sb.append(this.userToken); + } + first = false; + if (!first) sb.append(", "); + sb.append("imageVersionId:"); + if (this.imageVersionId == null) { + sb.append("null"); + } else { + sb.append(this.imageVersionId); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class requestDownload_argsStandardSchemeFactory implements SchemeFactory { + public requestDownload_argsStandardScheme getScheme() { + return new requestDownload_argsStandardScheme(); + } + } + + private static class requestDownload_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, requestDownload_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // USER_TOKEN + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.userToken = iprot.readString(); + struct.setUserTokenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // IMAGE_VERSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.imageVersionId = iprot.readString(); + struct.setImageVersionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, requestDownload_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.userToken != null) { + oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC); + oprot.writeString(struct.userToken); + oprot.writeFieldEnd(); + } + if (struct.imageVersionId != null) { + oprot.writeFieldBegin(IMAGE_VERSION_ID_FIELD_DESC); + oprot.writeString(struct.imageVersionId); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class requestDownload_argsTupleSchemeFactory implements SchemeFactory { + public requestDownload_argsTupleScheme getScheme() { + return new requestDownload_argsTupleScheme(); + } + } + + private static class requestDownload_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, requestDownload_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUserToken()) { + optionals.set(0); + } + if (struct.isSetImageVersionId()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetUserToken()) { + oprot.writeString(struct.userToken); + } + if (struct.isSetImageVersionId()) { + oprot.writeString(struct.imageVersionId); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, requestDownload_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.userToken = iprot.readString(); + struct.setUserTokenIsSet(true); + } + if (incoming.get(1)) { + struct.imageVersionId = iprot.readString(); + struct.setImageVersionIdIsSet(true); + } + } + } + + } + + public static class requestDownload_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("requestDownload_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new requestDownload_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new requestDownload_resultTupleSchemeFactory()); + } + + public TransferInformation success; // required + public TAuthorizationException authError; // 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"); + + private static final Map byName = new HashMap(); + + 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; + 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.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))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestDownload_result.class, metaDataMap); + } + + public requestDownload_result() { + } + + public requestDownload_result( + TransferInformation success, + TAuthorizationException authError) + { + this(); + this.success = success; + this.authError = authError; + } + + /** + * Performs a deep copy on other. + */ + public requestDownload_result(requestDownload_result other) { + if (other.isSetSuccess()) { + this.success = new TransferInformation(other.success); + } + if (other.isSetAuthError()) { + this.authError = new TAuthorizationException(other.authError); + } + } + + public requestDownload_result deepCopy() { + return new requestDownload_result(this); + } + + @Override + public void clear() { + this.success = null; + this.authError = null; + } + + public TransferInformation getSuccess() { + return this.success; + } + + public requestDownload_result setSuccess(TransferInformation success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public TAuthorizationException getAuthError() { + return this.authError; + } + + public requestDownload_result setAuthError(TAuthorizationException authError) { + this.authError = authError; + return this; + } + + public void unsetAuthError() { + this.authError = null; + } + + /** Returns true if field authError is set (has been assigned a value) and false otherwise */ + public boolean isSetAuthError() { + return this.authError != null; + } + + public void setAuthErrorIsSet(boolean value) { + if (!value) { + this.authError = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((TransferInformation)value); + } + break; + + case AUTH_ERROR: + if (value == null) { + unsetAuthError(); + } else { + setAuthError((TAuthorizationException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case AUTH_ERROR: + return getAuthError(); + + } + 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(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof requestDownload_result) + return this.equals((requestDownload_result)that); + return false; + } + + public boolean equals(requestDownload_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_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; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(requestDownload_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(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; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("requestDownload_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("authError:"); + if (this.authError == null) { + sb.append("null"); + } else { + sb.append(this.authError); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class requestDownload_resultStandardSchemeFactory implements SchemeFactory { + public requestDownload_resultStandardScheme getScheme() { + return new requestDownload_resultStandardScheme(); + } + } + + private static class requestDownload_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, requestDownload_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new TransferInformation(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // 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; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, requestDownload_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.authError != null) { + oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); + struct.authError.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class requestDownload_resultTupleSchemeFactory implements SchemeFactory { + public requestDownload_resultTupleScheme getScheme() { + return new requestDownload_resultTupleScheme(); + } + } + + private static class requestDownload_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, requestDownload_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetAuthError()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetAuthError()) { + struct.authError.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, requestDownload_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = new TransferInformation(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.authError = new TAuthorizationException(); + struct.authError.read(iprot); + struct.setAuthErrorIsSet(true); + } + } + } + + } + + public static class cancelDownload_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cancelDownload_args"); + + private static final org.apache.thrift.protocol.TField DOWNLOAD_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("downloadToken", org.apache.thrift.protocol.TType.STRING, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new cancelDownload_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new cancelDownload_argsTupleSchemeFactory()); + } + + public String downloadToken; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DOWNLOAD_TOKEN((short)1, "downloadToken"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DOWNLOAD_TOKEN + return DOWNLOAD_TOKEN; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DOWNLOAD_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("downloadToken", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelDownload_args.class, metaDataMap); + } + + public cancelDownload_args() { + } + + public cancelDownload_args( + String downloadToken) + { + this(); + this.downloadToken = downloadToken; + } + + /** + * Performs a deep copy on other. + */ + public cancelDownload_args(cancelDownload_args other) { + if (other.isSetDownloadToken()) { + this.downloadToken = other.downloadToken; + } + } + + public cancelDownload_args deepCopy() { + return new cancelDownload_args(this); + } + + @Override + public void clear() { + this.downloadToken = null; + } + + public String getDownloadToken() { + return this.downloadToken; + } + + public cancelDownload_args setDownloadToken(String downloadToken) { + this.downloadToken = downloadToken; + return this; + } + + public void unsetDownloadToken() { + this.downloadToken = null; + } + + /** Returns true if field downloadToken is set (has been assigned a value) and false otherwise */ + public boolean isSetDownloadToken() { + return this.downloadToken != null; + } + + public void setDownloadTokenIsSet(boolean value) { + if (!value) { + this.downloadToken = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DOWNLOAD_TOKEN: + if (value == null) { + unsetDownloadToken(); + } else { + setDownloadToken((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DOWNLOAD_TOKEN: + return getDownloadToken(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DOWNLOAD_TOKEN: + return isSetDownloadToken(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof cancelDownload_args) + return this.equals((cancelDownload_args)that); + return false; + } + + public boolean equals(cancelDownload_args that) { + if (that == null) + return false; + + boolean this_present_downloadToken = true && this.isSetDownloadToken(); + boolean that_present_downloadToken = true && that.isSetDownloadToken(); + if (this_present_downloadToken || that_present_downloadToken) { + if (!(this_present_downloadToken && that_present_downloadToken)) + return false; + if (!this.downloadToken.equals(that.downloadToken)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(cancelDownload_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDownloadToken()).compareTo(other.isSetDownloadToken()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDownloadToken()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.downloadToken, other.downloadToken); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("cancelDownload_args("); + boolean first = true; + + sb.append("downloadToken:"); + if (this.downloadToken == null) { + sb.append("null"); + } else { + sb.append(this.downloadToken); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class cancelDownload_argsStandardSchemeFactory implements SchemeFactory { + public cancelDownload_argsStandardScheme getScheme() { + return new cancelDownload_argsStandardScheme(); + } + } + + private static class cancelDownload_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, cancelDownload_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // DOWNLOAD_TOKEN + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.downloadToken = iprot.readString(); + struct.setDownloadTokenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, cancelDownload_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.downloadToken != null) { + oprot.writeFieldBegin(DOWNLOAD_TOKEN_FIELD_DESC); + oprot.writeString(struct.downloadToken); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class cancelDownload_argsTupleSchemeFactory implements SchemeFactory { + public cancelDownload_argsTupleScheme getScheme() { + return new cancelDownload_argsTupleScheme(); + } + } + + private static class cancelDownload_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, cancelDownload_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetDownloadToken()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetDownloadToken()) { + oprot.writeString(struct.downloadToken); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, cancelDownload_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.downloadToken = iprot.readString(); + struct.setDownloadTokenIsSet(true); + } + } + } + + } + + public static class cancelDownload_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cancelDownload_result"); + + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new cancelDownload_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new cancelDownload_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 byName = new HashMap(); + + 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(cancelDownload_result.class, metaDataMap); + } + + public cancelDownload_result() { + } + + /** + * Performs a deep copy on other. + */ + public cancelDownload_result(cancelDownload_result other) { + } + + public cancelDownload_result deepCopy() { + return new cancelDownload_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 cancelDownload_result) + return this.equals((cancelDownload_result)that); + return false; + } + + public boolean equals(cancelDownload_result that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(cancelDownload_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("cancelDownload_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 cancelDownload_resultStandardSchemeFactory implements SchemeFactory { + public cancelDownload_resultStandardScheme getScheme() { + return new cancelDownload_resultStandardScheme(); + } + } + + private static class cancelDownload_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, cancelDownload_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, cancelDownload_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class cancelDownload_resultTupleSchemeFactory implements SchemeFactory { + public cancelDownload_resultTupleScheme getScheme() { + return new cancelDownload_resultTupleScheme(); + } + } + + private static class cancelDownload_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, cancelDownload_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, cancelDownload_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + + } + + public static class isAuthenticated_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isAuthenticated_args"); + + private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new isAuthenticated_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new isAuthenticated_argsTupleSchemeFactory()); + } + + public String userToken; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + USER_TOKEN((short)1, "userToken"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // USER_TOKEN + return USER_TOKEN; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isAuthenticated_args.class, metaDataMap); + } + + public isAuthenticated_args() { + } + + public isAuthenticated_args( + String userToken) + { + this(); + this.userToken = userToken; + } + + /** + * Performs a deep copy on other. + */ + public isAuthenticated_args(isAuthenticated_args other) { + if (other.isSetUserToken()) { + this.userToken = other.userToken; + } + } + + public isAuthenticated_args deepCopy() { + return new isAuthenticated_args(this); + } + + @Override + public void clear() { + this.userToken = null; + } + + public String getUserToken() { + return this.userToken; + } + + public isAuthenticated_args setUserToken(String userToken) { + this.userToken = userToken; + return this; + } + + public void unsetUserToken() { + this.userToken = null; + } + + /** Returns true if field userToken is set (has been assigned a value) and false otherwise */ + public boolean isSetUserToken() { + return this.userToken != null; + } + + public void setUserTokenIsSet(boolean value) { + if (!value) { + this.userToken = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case USER_TOKEN: + if (value == null) { + unsetUserToken(); + } else { + setUserToken((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case USER_TOKEN: + return getUserToken(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case USER_TOKEN: + return isSetUserToken(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof isAuthenticated_args) + return this.equals((isAuthenticated_args)that); + return false; + } + + public boolean equals(isAuthenticated_args that) { + if (that == null) + return false; + + boolean this_present_userToken = true && this.isSetUserToken(); + boolean that_present_userToken = true && that.isSetUserToken(); + if (this_present_userToken || that_present_userToken) { + if (!(this_present_userToken && that_present_userToken)) + return false; + if (!this.userToken.equals(that.userToken)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(isAuthenticated_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUserToken()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("isAuthenticated_args("); + boolean first = true; + + sb.append("userToken:"); + if (this.userToken == null) { + sb.append("null"); + } else { + sb.append(this.userToken); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class isAuthenticated_argsStandardSchemeFactory implements SchemeFactory { + public isAuthenticated_argsStandardScheme getScheme() { + return new isAuthenticated_argsStandardScheme(); + } + } + + private static class isAuthenticated_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, isAuthenticated_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // USER_TOKEN + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.userToken = iprot.readString(); + struct.setUserTokenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, isAuthenticated_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.userToken != null) { + oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC); + oprot.writeString(struct.userToken); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class isAuthenticated_argsTupleSchemeFactory implements SchemeFactory { + public isAuthenticated_argsTupleScheme getScheme() { + return new isAuthenticated_argsTupleScheme(); + } + } + + private static class isAuthenticated_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, isAuthenticated_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUserToken()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetUserToken()) { + oprot.writeString(struct.userToken); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, isAuthenticated_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.userToken = iprot.readString(); + struct.setUserTokenIsSet(true); + } + } + } + + } + + public static class isAuthenticated_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isAuthenticated_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new isAuthenticated_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new isAuthenticated_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 byName = new HashMap(); + + 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(isAuthenticated_result.class, metaDataMap); + } + + public isAuthenticated_result() { + } + + public isAuthenticated_result( + boolean success) + { + this(); + this.success = success; + setSuccessIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public isAuthenticated_result(isAuthenticated_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + } + + public isAuthenticated_result deepCopy() { + return new isAuthenticated_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + } + + public boolean isSuccess() { + return this.success; + } + + public isAuthenticated_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 Boolean.valueOf(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 isAuthenticated_result) + return this.equals((isAuthenticated_result)that); + return false; + } + + public boolean equals(isAuthenticated_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() { + return 0; + } + + @Override + public int compareTo(isAuthenticated_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(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("isAuthenticated_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 isAuthenticated_resultStandardSchemeFactory implements SchemeFactory { + public isAuthenticated_resultStandardScheme getScheme() { + return new isAuthenticated_resultStandardScheme(); + } + } + + private static class isAuthenticated_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, isAuthenticated_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 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, isAuthenticated_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 isAuthenticated_resultTupleSchemeFactory implements SchemeFactory { + public isAuthenticated_resultTupleScheme getScheme() { + return new isAuthenticated_resultTupleScheme(); + } + } + + private static class isAuthenticated_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, isAuthenticated_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.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, isAuthenticated_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 invalidateSession_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("invalidateSession_args"); + + private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new invalidateSession_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new invalidateSession_argsTupleSchemeFactory()); + } + + public String userToken; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + USER_TOKEN((short)1, "userToken"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // USER_TOKEN + return USER_TOKEN; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(invalidateSession_args.class, metaDataMap); + } + + public invalidateSession_args() { + } + + public invalidateSession_args( + String userToken) + { + this(); + this.userToken = userToken; + } + + /** + * Performs a deep copy on other. + */ + public invalidateSession_args(invalidateSession_args other) { + if (other.isSetUserToken()) { + this.userToken = other.userToken; + } + } + + public invalidateSession_args deepCopy() { + return new invalidateSession_args(this); + } + + @Override + public void clear() { + this.userToken = null; + } + + public String getUserToken() { + return this.userToken; + } + + public invalidateSession_args setUserToken(String userToken) { + this.userToken = userToken; + return this; + } + + public void unsetUserToken() { + this.userToken = null; + } + + /** Returns true if field userToken is set (has been assigned a value) and false otherwise */ + public boolean isSetUserToken() { + return this.userToken != null; + } + + public void setUserTokenIsSet(boolean value) { + if (!value) { + this.userToken = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case USER_TOKEN: + if (value == null) { + unsetUserToken(); + } else { + setUserToken((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case USER_TOKEN: + return getUserToken(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case USER_TOKEN: + return isSetUserToken(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof invalidateSession_args) + return this.equals((invalidateSession_args)that); + return false; + } + + public boolean equals(invalidateSession_args that) { + if (that == null) + return false; + + boolean this_present_userToken = true && this.isSetUserToken(); + boolean that_present_userToken = true && that.isSetUserToken(); + if (this_present_userToken || that_present_userToken) { + if (!(this_present_userToken && that_present_userToken)) + return false; + if (!this.userToken.equals(that.userToken)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(invalidateSession_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUserToken()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("invalidateSession_args("); + boolean first = true; + + sb.append("userToken:"); + if (this.userToken == null) { + sb.append("null"); + } else { + sb.append(this.userToken); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class invalidateSession_argsStandardSchemeFactory implements SchemeFactory { + public invalidateSession_argsStandardScheme getScheme() { + return new invalidateSession_argsStandardScheme(); + } + } + + private static class invalidateSession_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, invalidateSession_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // USER_TOKEN + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.userToken = iprot.readString(); + struct.setUserTokenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, invalidateSession_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.userToken != null) { + oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC); + oprot.writeString(struct.userToken); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class invalidateSession_argsTupleSchemeFactory implements SchemeFactory { + public invalidateSession_argsTupleScheme getScheme() { + return new invalidateSession_argsTupleScheme(); + } + } + + private static class invalidateSession_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, invalidateSession_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUserToken()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetUserToken()) { + oprot.writeString(struct.userToken); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, invalidateSession_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.userToken = iprot.readString(); + struct.setUserTokenIsSet(true); + } + } + } + + } + + public static class invalidateSession_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("invalidateSession_result"); + + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new invalidateSession_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new invalidateSession_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 byName = new HashMap(); + + 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(invalidateSession_result.class, metaDataMap); + } + + public invalidateSession_result() { + } + + /** + * Performs a deep copy on other. + */ + public invalidateSession_result(invalidateSession_result other) { + } + + public invalidateSession_result deepCopy() { + return new invalidateSession_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 invalidateSession_result) + return this.equals((invalidateSession_result)that); + return false; + } + + public boolean equals(invalidateSession_result that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(invalidateSession_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("invalidateSession_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 invalidateSession_resultStandardSchemeFactory implements SchemeFactory { + public invalidateSession_resultStandardScheme getScheme() { + return new invalidateSession_resultStandardScheme(); + } + } + + private static class invalidateSession_resultStandardScheme extends StandardScheme { + + 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) { + 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); + 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 { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, invalidateSession_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, invalidateSession_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + + } + + public static class getOperatingSystems_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getOperatingSystems_args"); + + + private static final Map, SchemeFactory> schemes = new HashMap, 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 byName = new HashMap(); + + 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 other. + */ + 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() { + return 0; + } + + @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 { + + 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 { + + @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, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getOperatingSystems_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getOperatingSystems_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getOperatingSystems_resultTupleSchemeFactory()); + } + + public List 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 byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, OperatingSystem.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getOperatingSystems_result.class, metaDataMap); + } + + public getOperatingSystems_result() { + } + + public getOperatingSystems_result( + List success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public getOperatingSystems_result(getOperatingSystems_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (OperatingSystem other_element : other.success) { + __this__success.add(new OperatingSystem(other_element)); + } + this.success = __this__success; + } + } + + public getOperatingSystems_result deepCopy() { + return new getOperatingSystems_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(OperatingSystem elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public getOperatingSystems_result setSuccess(List success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getOperatingSystems_result) + return this.equals((getOperatingSystems_result)that); + return false; + } + + public boolean equals(getOperatingSystems_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getOperatingSystems_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getOperatingSystems_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getOperatingSystems_resultStandardSchemeFactory implements SchemeFactory { + public getOperatingSystems_resultStandardScheme getScheme() { + return new getOperatingSystems_resultStandardScheme(); + } + } + + private static class getOperatingSystems_resultStandardScheme extends StandardScheme { + + 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 _list66 = iprot.readListBegin(); + struct.success = new ArrayList(_list66.size); + for (int _i67 = 0; _i67 < _list66.size; ++_i67) + { + OperatingSystem _elem68; + _elem68 = new OperatingSystem(); + _elem68.read(iprot); + struct.success.add(_elem68); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getOperatingSystems_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (OperatingSystem _iter69 : struct.success) + { + _iter69.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getOperatingSystems_resultTupleSchemeFactory implements SchemeFactory { + public getOperatingSystems_resultTupleScheme getScheme() { + return new getOperatingSystems_resultTupleScheme(); + } + } + + private static class getOperatingSystems_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getOperatingSystems_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (OperatingSystem _iter70 : struct.success) + { + _iter70.write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getOperatingSystems_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list71 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list71.size); + for (int _i72 = 0; _i72 < _list71.size; ++_i72) + { + OperatingSystem _elem73; + _elem73 = new OperatingSystem(); + _elem73.read(iprot); + struct.success.add(_elem73); + } + } + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class getVirtualizers_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getVirtualizers_args"); + + + private static final Map, SchemeFactory> schemes = new HashMap, 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 byName = new HashMap(); + + 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 other. + */ + 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() { + return 0; + } + + @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 { + + 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 { + + @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, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getVirtualizers_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getVirtualizers_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getVirtualizers_resultTupleSchemeFactory()); + } + + public List 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 byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Virtualizer.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getVirtualizers_result.class, metaDataMap); + } + + public getVirtualizers_result() { + } + + public getVirtualizers_result( + List success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public getVirtualizers_result(getVirtualizers_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (Virtualizer other_element : other.success) { + __this__success.add(new Virtualizer(other_element)); + } + this.success = __this__success; + } + } + + public getVirtualizers_result deepCopy() { + return new getVirtualizers_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(Virtualizer elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public getVirtualizers_result setSuccess(List success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getVirtualizers_result) + return this.equals((getVirtualizers_result)that); + return false; + } + + public boolean equals(getVirtualizers_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getVirtualizers_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getVirtualizers_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getVirtualizers_resultStandardSchemeFactory implements SchemeFactory { + public getVirtualizers_resultStandardScheme getScheme() { + return new getVirtualizers_resultStandardScheme(); + } + } + + private static class getVirtualizers_resultStandardScheme extends StandardScheme { + + 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 _list74 = iprot.readListBegin(); + struct.success = new ArrayList(_list74.size); + for (int _i75 = 0; _i75 < _list74.size; ++_i75) + { + Virtualizer _elem76; + _elem76 = new Virtualizer(); + _elem76.read(iprot); + struct.success.add(_elem76); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getVirtualizers_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (Virtualizer _iter77 : struct.success) + { + _iter77.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getVirtualizers_resultTupleSchemeFactory implements SchemeFactory { + public getVirtualizers_resultTupleScheme getScheme() { + return new getVirtualizers_resultTupleScheme(); + } + } + + private static class getVirtualizers_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getVirtualizers_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (Virtualizer _iter78 : struct.success) + { + _iter78.write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getVirtualizers_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list79 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list79.size); + for (int _i80 = 0; _i80 < _list79.size; ++_i80) + { + Virtualizer _elem81; + _elem81 = new Virtualizer(); + _elem81.read(iprot); + struct.success.add(_elem81); + } + } + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class getAllOrganizations_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllOrganizations_args"); + + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getAllOrganizations_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getAllOrganizations_argsTupleSchemeFactory()); + } + + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { +; + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllOrganizations_args.class, metaDataMap); + } + + public getAllOrganizations_args() { + } + + /** + * Performs a deep copy on other. + */ + public getAllOrganizations_args(getAllOrganizations_args other) { + } + + public getAllOrganizations_args deepCopy() { + return new getAllOrganizations_args(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getAllOrganizations_args) + return this.equals((getAllOrganizations_args)that); + return false; + } + + public boolean equals(getAllOrganizations_args that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getAllOrganizations_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getAllOrganizations_args("); + boolean first = true; + + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getAllOrganizations_argsStandardSchemeFactory implements SchemeFactory { + public getAllOrganizations_argsStandardScheme getScheme() { + return new getAllOrganizations_argsStandardScheme(); + } + } + + private static class getAllOrganizations_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getAllOrganizations_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getAllOrganizations_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getAllOrganizations_argsTupleSchemeFactory implements SchemeFactory { + public getAllOrganizations_argsTupleScheme getScheme() { + return new getAllOrganizations_argsTupleScheme(); + } + } + + private static class getAllOrganizations_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getAllOrganizations_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getAllOrganizations_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + + } + + public static class getAllOrganizations_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllOrganizations_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getAllOrganizations_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getAllOrganizations_resultTupleSchemeFactory()); + } + + public List 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 byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Organization.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllOrganizations_result.class, metaDataMap); + } + + public getAllOrganizations_result() { + } + + public getAllOrganizations_result( + List success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public getAllOrganizations_result(getAllOrganizations_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (Organization other_element : other.success) { + __this__success.add(new Organization(other_element)); + } + this.success = __this__success; + } + } + + public getAllOrganizations_result deepCopy() { + return new getAllOrganizations_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(Organization elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public getAllOrganizations_result setSuccess(List success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getAllOrganizations_result) + return this.equals((getAllOrganizations_result)that); + return false; + } + + public boolean equals(getAllOrganizations_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getAllOrganizations_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getAllOrganizations_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getAllOrganizations_resultStandardSchemeFactory implements SchemeFactory { + public getAllOrganizations_resultStandardScheme getScheme() { + return new getAllOrganizations_resultStandardScheme(); + } + } + + private static class getAllOrganizations_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getAllOrganizations_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list82 = iprot.readListBegin(); + struct.success = new ArrayList(_list82.size); + for (int _i83 = 0; _i83 < _list82.size; ++_i83) + { + Organization _elem84; + _elem84 = new Organization(); + _elem84.read(iprot); + struct.success.add(_elem84); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getAllOrganizations_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (Organization _iter85 : struct.success) + { + _iter85.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getAllOrganizations_resultTupleSchemeFactory implements SchemeFactory { + public getAllOrganizations_resultTupleScheme getScheme() { + return new getAllOrganizations_resultTupleScheme(); + } + } + + private static class getAllOrganizations_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getAllOrganizations_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (Organization _iter86 : struct.success) + { + _iter86.write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getAllOrganizations_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list87 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list87.size); + for (int _i88 = 0; _i88 < _list87.size; ++_i88) + { + Organization _elem89; + _elem89 = new Organization(); + _elem89.read(iprot); + struct.success.add(_elem89); + } + } + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class getImageList_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImageList_args"); + + private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField TAG_SEARCH_FIELD_DESC = new org.apache.thrift.protocol.TField("tagSearch", org.apache.thrift.protocol.TType.LIST, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getImageList_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getImageList_argsTupleSchemeFactory()); + } + + public String userToken; // required + public List tagSearch; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + USER_TOKEN((short)1, "userToken"), + TAG_SEARCH((short)2, "tagSearch"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // USER_TOKEN + return USER_TOKEN; + case 2: // TAG_SEARCH + return TAG_SEARCH; + 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.TAG_SEARCH, new org.apache.thrift.meta_data.FieldMetaData("tagSearch", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageList_args.class, metaDataMap); + } + + public getImageList_args() { + } + + public getImageList_args( + String userToken, + List tagSearch) + { + this(); + this.userToken = userToken; + this.tagSearch = tagSearch; + } + + /** + * Performs a deep copy on other. + */ + public getImageList_args(getImageList_args other) { + if (other.isSetUserToken()) { + this.userToken = other.userToken; + } + if (other.isSetTagSearch()) { + List __this__tagSearch = new ArrayList(other.tagSearch); + this.tagSearch = __this__tagSearch; + } + } + + public getImageList_args deepCopy() { + return new getImageList_args(this); + } + + @Override + public void clear() { + this.userToken = null; + this.tagSearch = null; + } + + public String getUserToken() { + return this.userToken; + } + + public getImageList_args setUserToken(String userToken) { + this.userToken = userToken; + return this; + } + + public void unsetUserToken() { + this.userToken = null; + } + + /** Returns true if field userToken is set (has been assigned a value) and false otherwise */ + public boolean isSetUserToken() { + return this.userToken != null; + } + + public void setUserTokenIsSet(boolean value) { + if (!value) { + this.userToken = null; + } + } + + public int getTagSearchSize() { + return (this.tagSearch == null) ? 0 : this.tagSearch.size(); + } + + public java.util.Iterator getTagSearchIterator() { + return (this.tagSearch == null) ? null : this.tagSearch.iterator(); + } + + public void addToTagSearch(String elem) { + if (this.tagSearch == null) { + this.tagSearch = new ArrayList(); + } + this.tagSearch.add(elem); + } + + public List getTagSearch() { + return this.tagSearch; + } + + public getImageList_args setTagSearch(List tagSearch) { + this.tagSearch = tagSearch; + return this; + } + + public void unsetTagSearch() { + this.tagSearch = null; + } + + /** Returns true if field tagSearch is set (has been assigned a value) and false otherwise */ + public boolean isSetTagSearch() { + return this.tagSearch != null; + } + + public void setTagSearchIsSet(boolean value) { + if (!value) { + this.tagSearch = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case USER_TOKEN: + if (value == null) { + unsetUserToken(); + } else { + setUserToken((String)value); + } + break; + + case TAG_SEARCH: + if (value == null) { + unsetTagSearch(); + } else { + setTagSearch((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case USER_TOKEN: + return getUserToken(); + + case TAG_SEARCH: + return getTagSearch(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case USER_TOKEN: + return isSetUserToken(); + case TAG_SEARCH: + return isSetTagSearch(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getImageList_args) + return this.equals((getImageList_args)that); + return false; + } + + public boolean equals(getImageList_args that) { + if (that == null) + return false; + + boolean this_present_userToken = true && this.isSetUserToken(); + boolean that_present_userToken = true && that.isSetUserToken(); + if (this_present_userToken || that_present_userToken) { + if (!(this_present_userToken && that_present_userToken)) + return false; + if (!this.userToken.equals(that.userToken)) + return false; + } + + boolean this_present_tagSearch = true && this.isSetTagSearch(); + boolean that_present_tagSearch = true && that.isSetTagSearch(); + if (this_present_tagSearch || that_present_tagSearch) { + if (!(this_present_tagSearch && that_present_tagSearch)) + return false; + if (!this.tagSearch.equals(that.tagSearch)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getImageList_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUserToken()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTagSearch()).compareTo(other.isSetTagSearch()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTagSearch()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tagSearch, other.tagSearch); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getImageList_args("); + boolean first = true; + + sb.append("userToken:"); + if (this.userToken == null) { + sb.append("null"); + } else { + sb.append(this.userToken); + } + first = false; + if (!first) sb.append(", "); + sb.append("tagSearch:"); + if (this.tagSearch == null) { + sb.append("null"); + } else { + sb.append(this.tagSearch); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getImageList_argsStandardSchemeFactory implements SchemeFactory { + public getImageList_argsStandardScheme getScheme() { + return new getImageList_argsStandardScheme(); + } + } + + private static class getImageList_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getImageList_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // USER_TOKEN + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.userToken = iprot.readString(); + struct.setUserTokenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TAG_SEARCH + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list90 = iprot.readListBegin(); + struct.tagSearch = new ArrayList(_list90.size); + for (int _i91 = 0; _i91 < _list90.size; ++_i91) + { + String _elem92; + _elem92 = iprot.readString(); + struct.tagSearch.add(_elem92); + } + iprot.readListEnd(); + } + struct.setTagSearchIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getImageList_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.userToken != null) { + oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC); + oprot.writeString(struct.userToken); + oprot.writeFieldEnd(); + } + if (struct.tagSearch != null) { + oprot.writeFieldBegin(TAG_SEARCH_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.tagSearch.size())); + for (String _iter93 : struct.tagSearch) + { + oprot.writeString(_iter93); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getImageList_argsTupleSchemeFactory implements SchemeFactory { + public getImageList_argsTupleScheme getScheme() { + return new getImageList_argsTupleScheme(); + } + } + + private static class getImageList_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getImageList_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUserToken()) { + optionals.set(0); + } + if (struct.isSetTagSearch()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetUserToken()) { + oprot.writeString(struct.userToken); + } + if (struct.isSetTagSearch()) { + { + oprot.writeI32(struct.tagSearch.size()); + for (String _iter94 : struct.tagSearch) + { + oprot.writeString(_iter94); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getImageList_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.userToken = iprot.readString(); + struct.setUserTokenIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TList _list95 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.tagSearch = new ArrayList(_list95.size); + for (int _i96 = 0; _i96 < _list95.size; ++_i96) + { + String _elem97; + _elem97 = iprot.readString(); + struct.tagSearch.add(_elem97); + } + } + struct.setTagSearchIsSet(true); + } + } + } + + } + + public static class getImageList_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImageList_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getImageList_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getImageList_resultTupleSchemeFactory()); + } + + public List success; // required + public TAuthorizationException authError; // 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"); + + private static final Map byName = new HashMap(); + + 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; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ImageSummaryRead.class)))); + tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageList_result.class, metaDataMap); + } + + public getImageList_result() { + } + + public getImageList_result( + List success, + TAuthorizationException authError) + { + this(); + this.success = success; + this.authError = authError; + } + + /** + * Performs a deep copy on other. + */ + public getImageList_result(getImageList_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (ImageSummaryRead other_element : other.success) { + __this__success.add(new ImageSummaryRead(other_element)); + } + this.success = __this__success; + } + if (other.isSetAuthError()) { + this.authError = new TAuthorizationException(other.authError); + } + } + + public getImageList_result deepCopy() { + return new getImageList_result(this); + } + + @Override + public void clear() { + this.success = null; + this.authError = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(ImageSummaryRead elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public getImageList_result setSuccess(List success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public TAuthorizationException getAuthError() { + return this.authError; + } + + public getImageList_result setAuthError(TAuthorizationException authError) { + this.authError = authError; + return this; + } + + public void unsetAuthError() { + this.authError = null; + } + + /** Returns true if field authError is set (has been assigned a value) and false otherwise */ + public boolean isSetAuthError() { + return this.authError != null; + } + + public void setAuthErrorIsSet(boolean value) { + if (!value) { + this.authError = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case AUTH_ERROR: + if (value == null) { + unsetAuthError(); + } else { + setAuthError((TAuthorizationException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case AUTH_ERROR: + return getAuthError(); + + } + 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(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getImageList_result) + return this.equals((getImageList_result)that); + return false; + } + + public boolean equals(getImageList_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_authError = true && this.isSetAuthError(); + boolean that_present_authError = true && that.isSetAuthError(); + if (this_present_authError || that_present_authError) { + if (!(this_present_authError && that_present_authError)) + return false; + if (!this.authError.equals(that.authError)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getImageList_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAuthError()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getImageList_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("authError:"); + if (this.authError == null) { + sb.append("null"); + } else { + sb.append(this.authError); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getImageList_resultStandardSchemeFactory implements SchemeFactory { + public getImageList_resultStandardScheme getScheme() { + return new getImageList_resultStandardScheme(); + } + } + + private static class getImageList_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getImageList_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list98 = iprot.readListBegin(); + struct.success = new ArrayList(_list98.size); + for (int _i99 = 0; _i99 < _list98.size; ++_i99) + { + ImageSummaryRead _elem100; + _elem100 = new ImageSummaryRead(); + _elem100.read(iprot); + struct.success.add(_elem100); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // AUTH_ERROR + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.authError = new TAuthorizationException(); + struct.authError.read(iprot); + struct.setAuthErrorIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getImageList_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (ImageSummaryRead _iter101 : struct.success) + { + _iter101.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.authError != null) { + oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); + struct.authError.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getImageList_resultTupleSchemeFactory implements SchemeFactory { + public getImageList_resultTupleScheme getScheme() { + return new getImageList_resultTupleScheme(); + } + } + + private static class getImageList_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getImageList_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetAuthError()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (ImageSummaryRead _iter102 : struct.success) + { + _iter102.write(oprot); + } + } + } + if (struct.isSetAuthError()) { + struct.authError.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getImageList_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list103 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list103.size); + for (int _i104 = 0; _i104 < _list103.size; ++_i104) + { + ImageSummaryRead _elem105; + _elem105 = new ImageSummaryRead(); + _elem105.read(iprot); + struct.success.add(_elem105); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.authError = new TAuthorizationException(); + struct.authError.read(iprot); + struct.setAuthErrorIsSet(true); + } + } + } + + } + + public static class getImageDetails_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImageDetails_args"); + + private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField IMAGE_BASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageBaseId", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getImageDetails_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getImageDetails_argsTupleSchemeFactory()); + } + + public String userToken; // required + public String imageBaseId; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + USER_TOKEN((short)1, "userToken"), + IMAGE_BASE_ID((short)2, "imageBaseId"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // USER_TOKEN + return USER_TOKEN; + case 2: // IMAGE_BASE_ID + return IMAGE_BASE_ID; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); + tmpMap.put(_Fields.IMAGE_BASE_ID, new org.apache.thrift.meta_data.FieldMetaData("imageBaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageDetails_args.class, metaDataMap); + } + + public getImageDetails_args() { + } + + public getImageDetails_args( + String userToken, + String imageBaseId) + { + this(); + this.userToken = userToken; + this.imageBaseId = imageBaseId; + } + + /** + * Performs a deep copy on other. + */ + public getImageDetails_args(getImageDetails_args other) { + if (other.isSetUserToken()) { + this.userToken = other.userToken; + } + if (other.isSetImageBaseId()) { + this.imageBaseId = other.imageBaseId; + } + } + + public getImageDetails_args deepCopy() { + return new getImageDetails_args(this); + } + + @Override + public void clear() { + this.userToken = null; + this.imageBaseId = null; + } + + public String getUserToken() { + return this.userToken; + } + + public getImageDetails_args setUserToken(String userToken) { + this.userToken = userToken; + return this; + } + + public void unsetUserToken() { + this.userToken = null; + } + + /** Returns true if field userToken is set (has been assigned a value) and false otherwise */ + public boolean isSetUserToken() { + return this.userToken != null; + } + + public void setUserTokenIsSet(boolean value) { + if (!value) { + this.userToken = null; + } + } + + public String getImageBaseId() { + return this.imageBaseId; + } + + public getImageDetails_args setImageBaseId(String imageBaseId) { + this.imageBaseId = imageBaseId; + return this; + } + + public void unsetImageBaseId() { + this.imageBaseId = null; + } + + /** Returns true if field imageBaseId is set (has been assigned a value) and false otherwise */ + public boolean isSetImageBaseId() { + return this.imageBaseId != null; + } + + public void setImageBaseIdIsSet(boolean value) { + if (!value) { + this.imageBaseId = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case USER_TOKEN: + if (value == null) { + unsetUserToken(); + } else { + setUserToken((String)value); + } + break; + + case IMAGE_BASE_ID: + if (value == null) { + unsetImageBaseId(); + } else { + setImageBaseId((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case USER_TOKEN: + return getUserToken(); + + case IMAGE_BASE_ID: + return getImageBaseId(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case USER_TOKEN: + return isSetUserToken(); + case IMAGE_BASE_ID: + return isSetImageBaseId(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getImageDetails_args) + return this.equals((getImageDetails_args)that); + return false; + } + + public boolean equals(getImageDetails_args that) { + if (that == null) + return false; + + boolean this_present_userToken = true && this.isSetUserToken(); + boolean that_present_userToken = true && that.isSetUserToken(); + if (this_present_userToken || that_present_userToken) { + if (!(this_present_userToken && that_present_userToken)) + return false; + if (!this.userToken.equals(that.userToken)) + return false; + } + + boolean this_present_imageBaseId = true && this.isSetImageBaseId(); + boolean that_present_imageBaseId = true && that.isSetImageBaseId(); + if (this_present_imageBaseId || that_present_imageBaseId) { + if (!(this_present_imageBaseId && that_present_imageBaseId)) + return false; + if (!this.imageBaseId.equals(that.imageBaseId)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getImageDetails_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUserToken()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetImageBaseId()).compareTo(other.isSetImageBaseId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetImageBaseId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageBaseId, other.imageBaseId); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getImageDetails_args("); + boolean first = true; + + sb.append("userToken:"); + if (this.userToken == null) { + sb.append("null"); + } else { + sb.append(this.userToken); + } + first = false; + if (!first) sb.append(", "); + sb.append("imageBaseId:"); + if (this.imageBaseId == null) { + sb.append("null"); + } else { + sb.append(this.imageBaseId); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getImageDetails_argsStandardSchemeFactory implements SchemeFactory { + public getImageDetails_argsStandardScheme getScheme() { + return new getImageDetails_argsStandardScheme(); + } + } + + private static class getImageDetails_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getImageDetails_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // USER_TOKEN + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.userToken = iprot.readString(); + struct.setUserTokenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // IMAGE_BASE_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.imageBaseId = iprot.readString(); + struct.setImageBaseIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getImageDetails_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.userToken != null) { + oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC); + oprot.writeString(struct.userToken); + oprot.writeFieldEnd(); + } + if (struct.imageBaseId != null) { + oprot.writeFieldBegin(IMAGE_BASE_ID_FIELD_DESC); + oprot.writeString(struct.imageBaseId); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getImageDetails_argsTupleSchemeFactory implements SchemeFactory { + public getImageDetails_argsTupleScheme getScheme() { + return new getImageDetails_argsTupleScheme(); + } + } + + private static class getImageDetails_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getImageDetails_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUserToken()) { + optionals.set(0); + } + if (struct.isSetImageBaseId()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetUserToken()) { + oprot.writeString(struct.userToken); + } + if (struct.isSetImageBaseId()) { + oprot.writeString(struct.imageBaseId); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getImageDetails_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.userToken = iprot.readString(); + struct.setUserTokenIsSet(true); + } + if (incoming.get(1)) { + struct.imageBaseId = iprot.readString(); + struct.setImageBaseIdIsSet(true); + } + } + } + + } + + public static class getImageDetails_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + 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 Map, SchemeFactory> schemes = new HashMap, 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 + + /** 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"); + + private static final Map byName = new HashMap(); + + 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; + 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))); + 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) + { + this(); + this.success = success; + this.authError = authError; + this.notFound = notFound; + } + + /** + * Performs a deep copy on other. + */ + 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); + } + } + + public getImageDetails_result deepCopy() { + return new getImageDetails_result(this); + } + + @Override + public void clear() { + this.success = null; + this.authError = null; + this.notFound = 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 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; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case AUTH_ERROR: + return getAuthError(); + + case NOT_FOUND: + return getNotFound(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case AUTH_ERROR: + return isSetAuthError(); + case NOT_FOUND: + return isSetNotFound(); + } + 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; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @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; + } + } + 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; + 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 { + + 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; + 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(); + } + 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 { + + @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); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetAuthError()) { + struct.authError.write(oprot); + } + if (struct.isSetNotFound()) { + struct.notFound.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(3); + 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); + } + } + } + + } + + public static class updateImageBase_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateImageBase_args"); + + private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField IMAGE_BASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageBaseId", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField IMAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("image", org.apache.thrift.protocol.TType.STRUCT, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new updateImageBase_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new updateImageBase_argsTupleSchemeFactory()); + } + + public String userToken; // required + public String imageBaseId; // required + public ImageBaseWrite image; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + USER_TOKEN((short)1, "userToken"), + IMAGE_BASE_ID((short)2, "imageBaseId"), + IMAGE((short)3, "image"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // USER_TOKEN + return USER_TOKEN; + case 2: // IMAGE_BASE_ID + return IMAGE_BASE_ID; + case 3: // IMAGE + return IMAGE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); + tmpMap.put(_Fields.IMAGE_BASE_ID, new org.apache.thrift.meta_data.FieldMetaData("imageBaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); + tmpMap.put(_Fields.IMAGE, new org.apache.thrift.meta_data.FieldMetaData("image", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ImageBaseWrite.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateImageBase_args.class, metaDataMap); + } + + public updateImageBase_args() { + } + + public updateImageBase_args( + String userToken, + String imageBaseId, + ImageBaseWrite image) + { + this(); + this.userToken = userToken; + this.imageBaseId = imageBaseId; + this.image = image; + } + + /** + * Performs a deep copy on other. + */ + public updateImageBase_args(updateImageBase_args other) { + if (other.isSetUserToken()) { + this.userToken = other.userToken; + } + if (other.isSetImageBaseId()) { + this.imageBaseId = other.imageBaseId; + } + if (other.isSetImage()) { + this.image = new ImageBaseWrite(other.image); + } + } + + public updateImageBase_args deepCopy() { + return new updateImageBase_args(this); + } + + @Override + public void clear() { + this.userToken = null; + this.imageBaseId = null; + this.image = null; + } + + public String getUserToken() { + return this.userToken; + } + + public updateImageBase_args setUserToken(String userToken) { + this.userToken = userToken; + return this; + } + + public void unsetUserToken() { + this.userToken = null; + } + + /** Returns true if field userToken is set (has been assigned a value) and false otherwise */ + public boolean isSetUserToken() { + return this.userToken != null; + } + + public void setUserTokenIsSet(boolean value) { + if (!value) { + this.userToken = null; + } + } + + public String getImageBaseId() { + return this.imageBaseId; + } + + public updateImageBase_args setImageBaseId(String imageBaseId) { + this.imageBaseId = imageBaseId; + return this; + } + + public void unsetImageBaseId() { + this.imageBaseId = null; + } + + /** Returns true if field imageBaseId is set (has been assigned a value) and false otherwise */ + public boolean isSetImageBaseId() { + return this.imageBaseId != null; + } + + public void setImageBaseIdIsSet(boolean value) { + if (!value) { + this.imageBaseId = null; + } + } + + public ImageBaseWrite getImage() { + return this.image; + } + + public updateImageBase_args setImage(ImageBaseWrite image) { + this.image = image; + return this; + } + + public void unsetImage() { + this.image = null; + } + + /** Returns true if field image is set (has been assigned a value) and false otherwise */ + public boolean isSetImage() { + return this.image != null; + } + + public void setImageIsSet(boolean value) { + if (!value) { + this.image = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case USER_TOKEN: + if (value == null) { + unsetUserToken(); + } else { + setUserToken((String)value); + } + break; + + case IMAGE_BASE_ID: + if (value == null) { + unsetImageBaseId(); + } else { + setImageBaseId((String)value); + } + break; + + case IMAGE: + if (value == null) { + unsetImage(); + } else { + setImage((ImageBaseWrite)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case USER_TOKEN: + return getUserToken(); + + case IMAGE_BASE_ID: + return getImageBaseId(); + + case IMAGE: + return getImage(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case USER_TOKEN: + return isSetUserToken(); + case IMAGE_BASE_ID: + return isSetImageBaseId(); + case IMAGE: + return isSetImage(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof updateImageBase_args) + return this.equals((updateImageBase_args)that); + return false; + } + + public boolean equals(updateImageBase_args that) { + if (that == null) + return false; + + boolean this_present_userToken = true && this.isSetUserToken(); + boolean that_present_userToken = true && that.isSetUserToken(); + if (this_present_userToken || that_present_userToken) { + if (!(this_present_userToken && that_present_userToken)) + return false; + if (!this.userToken.equals(that.userToken)) + return false; + } + + boolean this_present_imageBaseId = true && this.isSetImageBaseId(); + boolean that_present_imageBaseId = true && that.isSetImageBaseId(); + if (this_present_imageBaseId || that_present_imageBaseId) { + if (!(this_present_imageBaseId && that_present_imageBaseId)) + return false; + if (!this.imageBaseId.equals(that.imageBaseId)) + return false; + } + + boolean this_present_image = true && this.isSetImage(); + boolean that_present_image = true && that.isSetImage(); + if (this_present_image || that_present_image) { + if (!(this_present_image && that_present_image)) + return false; + if (!this.image.equals(that.image)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(updateImageBase_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUserToken()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetImageBaseId()).compareTo(other.isSetImageBaseId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetImageBaseId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageBaseId, other.imageBaseId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetImage()).compareTo(other.isSetImage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetImage()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.image, other.image); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("updateImageBase_args("); + boolean first = true; + + sb.append("userToken:"); + if (this.userToken == null) { + sb.append("null"); + } else { + sb.append(this.userToken); + } + first = false; + if (!first) sb.append(", "); + sb.append("imageBaseId:"); + if (this.imageBaseId == null) { + sb.append("null"); + } else { + sb.append(this.imageBaseId); + } + first = false; + if (!first) sb.append(", "); + sb.append("image:"); + if (this.image == null) { + sb.append("null"); + } else { + sb.append(this.image); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (image != null) { + image.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class updateImageBase_argsStandardSchemeFactory implements SchemeFactory { + public updateImageBase_argsStandardScheme getScheme() { + return new updateImageBase_argsStandardScheme(); + } + } + + private static class updateImageBase_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, updateImageBase_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // USER_TOKEN + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.userToken = iprot.readString(); + struct.setUserTokenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // IMAGE_BASE_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.imageBaseId = iprot.readString(); + struct.setImageBaseIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // IMAGE + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.image = new ImageBaseWrite(); + struct.image.read(iprot); + struct.setImageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, updateImageBase_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.userToken != null) { + oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC); + oprot.writeString(struct.userToken); + oprot.writeFieldEnd(); + } + if (struct.imageBaseId != null) { + oprot.writeFieldBegin(IMAGE_BASE_ID_FIELD_DESC); + oprot.writeString(struct.imageBaseId); + oprot.writeFieldEnd(); + } + if (struct.image != null) { + oprot.writeFieldBegin(IMAGE_FIELD_DESC); + struct.image.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class updateImageBase_argsTupleSchemeFactory implements SchemeFactory { + public updateImageBase_argsTupleScheme getScheme() { + return new updateImageBase_argsTupleScheme(); + } + } + + private static class updateImageBase_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, updateImageBase_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUserToken()) { + optionals.set(0); + } + if (struct.isSetImageBaseId()) { + optionals.set(1); + } + if (struct.isSetImage()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetUserToken()) { + oprot.writeString(struct.userToken); + } + if (struct.isSetImageBaseId()) { + oprot.writeString(struct.imageBaseId); + } + if (struct.isSetImage()) { + struct.image.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, updateImageBase_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.userToken = iprot.readString(); + struct.setUserTokenIsSet(true); + } + if (incoming.get(1)) { + struct.imageBaseId = iprot.readString(); + struct.setImageBaseIdIsSet(true); + } + if (incoming.get(2)) { + struct.image = new ImageBaseWrite(); + struct.image.read(iprot); + struct.setImageIsSet(true); + } + } + } + + } + + public static class updateImageBase_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateImageBase_result"); + + private static final org.apache.thrift.protocol.TField 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 AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new updateImageBase_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new updateImageBase_resultTupleSchemeFactory()); + } + + public boolean success; // required + public TAuthorizationException authError; // 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"); + + private static final Map byName = new HashMap(); + + 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; + 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.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))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateImageBase_result.class, metaDataMap); + } + + public updateImageBase_result() { + } + + public updateImageBase_result( + boolean success, + TAuthorizationException authError) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.authError = authError; + } + + /** + * Performs a deep copy on other. + */ + public updateImageBase_result(updateImageBase_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetAuthError()) { + this.authError = new TAuthorizationException(other.authError); + } + } + + public updateImageBase_result deepCopy() { + return new updateImageBase_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.authError = null; + } + + public boolean isSuccess() { + return this.success; + } + + public updateImageBase_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 getAuthError() { + return this.authError; + } + + public updateImageBase_result setAuthError(TAuthorizationException authError) { + this.authError = authError; + return this; + } + + public void unsetAuthError() { + this.authError = null; + } + + /** Returns true if field authError is set (has been assigned a value) and false otherwise */ + public boolean isSetAuthError() { + return this.authError != null; + } + + public void setAuthErrorIsSet(boolean value) { + if (!value) { + this.authError = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case AUTH_ERROR: + if (value == null) { + unsetAuthError(); + } else { + setAuthError((TAuthorizationException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return Boolean.valueOf(isSuccess()); + + case AUTH_ERROR: + return getAuthError(); + + } + 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(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof updateImageBase_result) + return this.equals((updateImageBase_result)that); + return false; + } + + public boolean equals(updateImageBase_result that) { + if (that == null) + return false; + + boolean this_present_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_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; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(updateImageBase_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(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; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("updateImageBase_result("); + boolean first = true; + + sb.append("success:"); + 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; + 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 updateImageBase_resultStandardSchemeFactory implements SchemeFactory { + public updateImageBase_resultStandardScheme getScheme() { + return new updateImageBase_resultStandardScheme(); + } + } + + private static class updateImageBase_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, updateImageBase_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 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: // 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; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, updateImageBase_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.authError != null) { + oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); + struct.authError.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class updateImageBase_resultTupleSchemeFactory implements SchemeFactory { + public updateImageBase_resultTupleScheme getScheme() { + return new updateImageBase_resultTupleScheme(); + } + } + + private static class updateImageBase_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, updateImageBase_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetAuthError()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetAuthError()) { + struct.authError.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, updateImageBase_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.authError = new TAuthorizationException(); + struct.authError.read(iprot); + struct.setAuthErrorIsSet(true); + } + } + } + + } + + public static class updateImageVersion_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateImageVersion_args"); + + private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField IMAGE_VERSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageVersionId", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField IMAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("image", org.apache.thrift.protocol.TType.STRUCT, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new updateImageVersion_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new updateImageVersion_argsTupleSchemeFactory()); + } + + public String userToken; // required + public String imageVersionId; // required + public ImageVersionWrite image; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + USER_TOKEN((short)1, "userToken"), + IMAGE_VERSION_ID((short)2, "imageVersionId"), + IMAGE((short)3, "image"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // USER_TOKEN + return USER_TOKEN; + case 2: // IMAGE_VERSION_ID + return IMAGE_VERSION_ID; + case 3: // IMAGE + return IMAGE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); + tmpMap.put(_Fields.IMAGE_VERSION_ID, new org.apache.thrift.meta_data.FieldMetaData("imageVersionId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); + tmpMap.put(_Fields.IMAGE, new org.apache.thrift.meta_data.FieldMetaData("image", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ImageVersionWrite.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateImageVersion_args.class, metaDataMap); + } + + public updateImageVersion_args() { + } + + public updateImageVersion_args( + String userToken, + String imageVersionId, + ImageVersionWrite image) + { + this(); + this.userToken = userToken; + this.imageVersionId = imageVersionId; + this.image = image; + } + + /** + * Performs a deep copy on other. + */ + public updateImageVersion_args(updateImageVersion_args other) { + if (other.isSetUserToken()) { + this.userToken = other.userToken; + } + if (other.isSetImageVersionId()) { + this.imageVersionId = other.imageVersionId; + } + if (other.isSetImage()) { + this.image = new ImageVersionWrite(other.image); + } + } + + public updateImageVersion_args deepCopy() { + return new updateImageVersion_args(this); + } + + @Override + public void clear() { + this.userToken = null; + this.imageVersionId = null; + this.image = null; + } + + public String getUserToken() { + return this.userToken; + } + + public updateImageVersion_args setUserToken(String userToken) { + this.userToken = userToken; + return this; + } + + public void unsetUserToken() { + this.userToken = null; + } + + /** Returns true if field userToken is set (has been assigned a value) and false otherwise */ + public boolean isSetUserToken() { + return this.userToken != null; + } + + public void setUserTokenIsSet(boolean value) { + if (!value) { + this.userToken = null; + } + } + + public String getImageVersionId() { + return this.imageVersionId; + } + + public updateImageVersion_args setImageVersionId(String imageVersionId) { + this.imageVersionId = imageVersionId; + return this; + } + + public void unsetImageVersionId() { + this.imageVersionId = null; + } + + /** Returns true if field imageVersionId is set (has been assigned a value) and false otherwise */ + public boolean isSetImageVersionId() { + return this.imageVersionId != null; + } + + public void setImageVersionIdIsSet(boolean value) { + if (!value) { + this.imageVersionId = null; + } + } + + public ImageVersionWrite getImage() { + return this.image; + } + + public updateImageVersion_args setImage(ImageVersionWrite image) { + this.image = image; + return this; + } + + public void unsetImage() { + this.image = null; + } + + /** Returns true if field image is set (has been assigned a value) and false otherwise */ + public boolean isSetImage() { + return this.image != null; + } + + public void setImageIsSet(boolean value) { + if (!value) { + this.image = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case USER_TOKEN: + if (value == null) { + unsetUserToken(); + } else { + setUserToken((String)value); + } + break; + + case IMAGE_VERSION_ID: + if (value == null) { + unsetImageVersionId(); + } else { + setImageVersionId((String)value); + } + break; + + case IMAGE: + if (value == null) { + unsetImage(); + } else { + setImage((ImageVersionWrite)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case USER_TOKEN: + return getUserToken(); + + case IMAGE_VERSION_ID: + return getImageVersionId(); + + case IMAGE: + return getImage(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case USER_TOKEN: + return isSetUserToken(); + case IMAGE_VERSION_ID: + return isSetImageVersionId(); + case IMAGE: + return isSetImage(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof updateImageVersion_args) + return this.equals((updateImageVersion_args)that); + return false; + } + + public boolean equals(updateImageVersion_args that) { + if (that == null) + return false; + + boolean this_present_userToken = true && this.isSetUserToken(); + boolean that_present_userToken = true && that.isSetUserToken(); + if (this_present_userToken || that_present_userToken) { + if (!(this_present_userToken && that_present_userToken)) + return false; + if (!this.userToken.equals(that.userToken)) + return false; + } + + boolean this_present_imageVersionId = true && this.isSetImageVersionId(); + boolean that_present_imageVersionId = true && that.isSetImageVersionId(); + if (this_present_imageVersionId || that_present_imageVersionId) { + if (!(this_present_imageVersionId && that_present_imageVersionId)) + return false; + if (!this.imageVersionId.equals(that.imageVersionId)) + return false; + } + + boolean this_present_image = true && this.isSetImage(); + boolean that_present_image = true && that.isSetImage(); + if (this_present_image || that_present_image) { + if (!(this_present_image && that_present_image)) + return false; + if (!this.image.equals(that.image)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(updateImageVersion_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUserToken()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetImageVersionId()).compareTo(other.isSetImageVersionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetImageVersionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageVersionId, other.imageVersionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetImage()).compareTo(other.isSetImage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetImage()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.image, other.image); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("updateImageVersion_args("); + boolean first = true; + + sb.append("userToken:"); + if (this.userToken == null) { + sb.append("null"); + } else { + sb.append(this.userToken); + } + first = false; + if (!first) sb.append(", "); + sb.append("imageVersionId:"); + if (this.imageVersionId == null) { + sb.append("null"); + } else { + sb.append(this.imageVersionId); + } + first = false; + if (!first) sb.append(", "); + sb.append("image:"); + if (this.image == null) { + sb.append("null"); + } else { + sb.append(this.image); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (image != null) { + image.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class updateImageVersion_argsStandardSchemeFactory implements SchemeFactory { + public updateImageVersion_argsStandardScheme getScheme() { + return new updateImageVersion_argsStandardScheme(); + } + } + + private static class updateImageVersion_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, updateImageVersion_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // USER_TOKEN + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.userToken = iprot.readString(); + struct.setUserTokenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // IMAGE_VERSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.imageVersionId = iprot.readString(); + struct.setImageVersionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // IMAGE + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.image = new ImageVersionWrite(); + struct.image.read(iprot); + struct.setImageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, updateImageVersion_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.userToken != null) { + oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC); + oprot.writeString(struct.userToken); + oprot.writeFieldEnd(); + } + if (struct.imageVersionId != null) { + oprot.writeFieldBegin(IMAGE_VERSION_ID_FIELD_DESC); + oprot.writeString(struct.imageVersionId); + oprot.writeFieldEnd(); + } + if (struct.image != null) { + oprot.writeFieldBegin(IMAGE_FIELD_DESC); + struct.image.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class updateImageVersion_argsTupleSchemeFactory implements SchemeFactory { + public updateImageVersion_argsTupleScheme getScheme() { + return new updateImageVersion_argsTupleScheme(); + } + } + + private static class updateImageVersion_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, updateImageVersion_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUserToken()) { + optionals.set(0); + } + if (struct.isSetImageVersionId()) { + optionals.set(1); + } + if (struct.isSetImage()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetUserToken()) { + oprot.writeString(struct.userToken); + } + if (struct.isSetImageVersionId()) { + oprot.writeString(struct.imageVersionId); + } + if (struct.isSetImage()) { + struct.image.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, updateImageVersion_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.userToken = iprot.readString(); + struct.setUserTokenIsSet(true); + } + if (incoming.get(1)) { + struct.imageVersionId = iprot.readString(); + struct.setImageVersionIdIsSet(true); + } + if (incoming.get(2)) { + struct.image = new ImageVersionWrite(); + struct.image.read(iprot); + struct.setImageIsSet(true); + } + } + } + + } + + public static class updateImageVersion_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateImageVersion_result"); + + private static final org.apache.thrift.protocol.TField 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 AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new updateImageVersion_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new updateImageVersion_resultTupleSchemeFactory()); + } + + public boolean success; // required + public TAuthorizationException authError; // 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"); + + private static final Map byName = new HashMap(); + + 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; + 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.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))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateImageVersion_result.class, metaDataMap); + } + + public updateImageVersion_result() { + } + + public updateImageVersion_result( + boolean success, + TAuthorizationException authError) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.authError = authError; + } + + /** + * Performs a deep copy on other. + */ + public updateImageVersion_result(updateImageVersion_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetAuthError()) { + this.authError = new TAuthorizationException(other.authError); + } + } + + public updateImageVersion_result deepCopy() { + return new updateImageVersion_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.authError = null; + } + + public boolean isSuccess() { + return this.success; + } + + public updateImageVersion_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 getAuthError() { + return this.authError; + } + + public updateImageVersion_result setAuthError(TAuthorizationException authError) { + this.authError = authError; + return this; + } + + public void unsetAuthError() { + this.authError = null; + } + + /** Returns true if field authError is set (has been assigned a value) and false otherwise */ + public boolean isSetAuthError() { + return this.authError != null; + } + + public void setAuthErrorIsSet(boolean value) { + if (!value) { + this.authError = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case AUTH_ERROR: + if (value == null) { + unsetAuthError(); + } else { + setAuthError((TAuthorizationException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return Boolean.valueOf(isSuccess()); + + case AUTH_ERROR: + return getAuthError(); + + } + 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(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof updateImageVersion_result) + return this.equals((updateImageVersion_result)that); + return false; + } + + public boolean equals(updateImageVersion_result that) { + if (that == null) + return false; + + boolean this_present_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_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; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(updateImageVersion_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(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; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("updateImageVersion_result("); + boolean first = true; + + sb.append("success:"); + 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; + 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 updateImageVersion_resultStandardSchemeFactory implements SchemeFactory { + public updateImageVersion_resultStandardScheme getScheme() { + return new updateImageVersion_resultStandardScheme(); + } + } + + private static class updateImageVersion_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, updateImageVersion_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 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: // 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; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, updateImageVersion_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.authError != null) { + oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); + struct.authError.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class updateImageVersion_resultTupleSchemeFactory implements SchemeFactory { + public updateImageVersion_resultTupleScheme getScheme() { + return new updateImageVersion_resultTupleScheme(); + } + } + + private static class updateImageVersion_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, updateImageVersion_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetAuthError()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetAuthError()) { + struct.authError.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, updateImageVersion_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.authError = new TAuthorizationException(); + struct.authError.read(iprot); + struct.setAuthErrorIsSet(true); + } + } + } + + } + + public static class deleteImageVersion_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteImageVersion_args"); + + private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField IMAGE_VERSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageVersionId", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new deleteImageVersion_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deleteImageVersion_argsTupleSchemeFactory()); + } + + public String userToken; // required + public String imageVersionId; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + USER_TOKEN((short)1, "userToken"), + IMAGE_VERSION_ID((short)2, "imageVersionId"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // USER_TOKEN + return USER_TOKEN; + case 2: // IMAGE_VERSION_ID + return IMAGE_VERSION_ID; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); + tmpMap.put(_Fields.IMAGE_VERSION_ID, new org.apache.thrift.meta_data.FieldMetaData("imageVersionId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteImageVersion_args.class, metaDataMap); + } + + public deleteImageVersion_args() { + } + + public deleteImageVersion_args( + String userToken, + String imageVersionId) + { + this(); + this.userToken = userToken; + this.imageVersionId = imageVersionId; + } + + /** + * Performs a deep copy on other. + */ + public deleteImageVersion_args(deleteImageVersion_args other) { + if (other.isSetUserToken()) { + this.userToken = other.userToken; + } + if (other.isSetImageVersionId()) { + this.imageVersionId = other.imageVersionId; + } + } + + public deleteImageVersion_args deepCopy() { + return new deleteImageVersion_args(this); + } + + @Override + public void clear() { + this.userToken = null; + this.imageVersionId = null; + } + + public String getUserToken() { + return this.userToken; + } + + public deleteImageVersion_args setUserToken(String userToken) { + this.userToken = userToken; + return this; + } + + public void unsetUserToken() { + this.userToken = null; + } + + /** Returns true if field userToken is set (has been assigned a value) and false otherwise */ + public boolean isSetUserToken() { + return this.userToken != null; + } + + public void setUserTokenIsSet(boolean value) { + if (!value) { + this.userToken = null; + } + } + + public String getImageVersionId() { + return this.imageVersionId; + } + + public deleteImageVersion_args setImageVersionId(String imageVersionId) { + this.imageVersionId = imageVersionId; + return this; + } + + public void unsetImageVersionId() { + this.imageVersionId = null; + } + + /** Returns true if field imageVersionId is set (has been assigned a value) and false otherwise */ + public boolean isSetImageVersionId() { + return this.imageVersionId != null; + } + + public void setImageVersionIdIsSet(boolean value) { + if (!value) { + this.imageVersionId = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case USER_TOKEN: + if (value == null) { + unsetUserToken(); + } else { + setUserToken((String)value); + } + break; + + case IMAGE_VERSION_ID: + if (value == null) { + unsetImageVersionId(); + } else { + setImageVersionId((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case USER_TOKEN: + return getUserToken(); + + case IMAGE_VERSION_ID: + return getImageVersionId(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case USER_TOKEN: + return isSetUserToken(); + case IMAGE_VERSION_ID: + return isSetImageVersionId(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof deleteImageVersion_args) + return this.equals((deleteImageVersion_args)that); + return false; + } + + public boolean equals(deleteImageVersion_args that) { + if (that == null) + return false; + + boolean this_present_userToken = true && this.isSetUserToken(); + boolean that_present_userToken = true && that.isSetUserToken(); + if (this_present_userToken || that_present_userToken) { + if (!(this_present_userToken && that_present_userToken)) + return false; + if (!this.userToken.equals(that.userToken)) + return false; + } + + boolean this_present_imageVersionId = true && this.isSetImageVersionId(); + boolean that_present_imageVersionId = true && that.isSetImageVersionId(); + if (this_present_imageVersionId || that_present_imageVersionId) { + if (!(this_present_imageVersionId && that_present_imageVersionId)) + return false; + if (!this.imageVersionId.equals(that.imageVersionId)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(deleteImageVersion_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUserToken()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetImageVersionId()).compareTo(other.isSetImageVersionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetImageVersionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageVersionId, other.imageVersionId); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("deleteImageVersion_args("); + boolean first = true; + + sb.append("userToken:"); + if (this.userToken == null) { + sb.append("null"); + } else { + sb.append(this.userToken); + } + first = false; + if (!first) sb.append(", "); + sb.append("imageVersionId:"); + if (this.imageVersionId == null) { + sb.append("null"); + } else { + sb.append(this.imageVersionId); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class deleteImageVersion_argsStandardSchemeFactory implements SchemeFactory { + public deleteImageVersion_argsStandardScheme getScheme() { + return new deleteImageVersion_argsStandardScheme(); + } + } + + private static class deleteImageVersion_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, deleteImageVersion_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // USER_TOKEN + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.userToken = iprot.readString(); + struct.setUserTokenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // IMAGE_VERSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.imageVersionId = iprot.readString(); + struct.setImageVersionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, deleteImageVersion_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.userToken != null) { + oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC); + oprot.writeString(struct.userToken); + oprot.writeFieldEnd(); + } + if (struct.imageVersionId != null) { + oprot.writeFieldBegin(IMAGE_VERSION_ID_FIELD_DESC); + oprot.writeString(struct.imageVersionId); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deleteImageVersion_argsTupleSchemeFactory implements SchemeFactory { + public deleteImageVersion_argsTupleScheme getScheme() { + return new deleteImageVersion_argsTupleScheme(); + } + } + + private static class deleteImageVersion_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deleteImageVersion_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUserToken()) { + optionals.set(0); + } + if (struct.isSetImageVersionId()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetUserToken()) { + oprot.writeString(struct.userToken); + } + if (struct.isSetImageVersionId()) { + oprot.writeString(struct.imageVersionId); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deleteImageVersion_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.userToken = iprot.readString(); + struct.setUserTokenIsSet(true); + } + if (incoming.get(1)) { + struct.imageVersionId = iprot.readString(); + struct.setImageVersionIdIsSet(true); + } + } + } + + } + + public static class deleteImageVersion_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteImageVersion_result"); + + private static final org.apache.thrift.protocol.TField 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 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new deleteImageVersion_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deleteImageVersion_resultTupleSchemeFactory()); + } + + public boolean success; // required + public TAuthorizationException authError; // required + public TNotFoundException notFound; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + AUTH_ERROR((short)1, "authError"), + NOT_FOUND((short)2, "notFound"); + + private static final Map byName = new HashMap(); + + 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; + 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.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))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteImageVersion_result.class, metaDataMap); + } + + public deleteImageVersion_result() { + } + + public deleteImageVersion_result( + boolean success, + TAuthorizationException authError, + TNotFoundException notFound) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.authError = authError; + this.notFound = notFound; + } + + /** + * Performs a deep copy on other. + */ + public deleteImageVersion_result(deleteImageVersion_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetAuthError()) { + this.authError = new TAuthorizationException(other.authError); + } + if (other.isSetNotFound()) { + this.notFound = new TNotFoundException(other.notFound); + } + } + + public deleteImageVersion_result deepCopy() { + return new deleteImageVersion_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.authError = null; + this.notFound = null; + } + + public boolean isSuccess() { + return this.success; + } + + public deleteImageVersion_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 getAuthError() { + return this.authError; + } + + public deleteImageVersion_result setAuthError(TAuthorizationException authError) { + this.authError = authError; + return this; + } + + public void unsetAuthError() { + this.authError = null; + } + + /** Returns true if field authError is set (has been assigned a value) and false otherwise */ + public boolean isSetAuthError() { + return this.authError != null; + } + + public void setAuthErrorIsSet(boolean value) { + if (!value) { + this.authError = null; + } + } + + public TNotFoundException getNotFound() { + return this.notFound; + } + + public deleteImageVersion_result setNotFound(TNotFoundException notFound) { + this.notFound = notFound; + return this; + } + + public void unsetNotFound() { + this.notFound = null; + } + + /** Returns true if field notFound is set (has been assigned a value) and false otherwise */ + public boolean isSetNotFound() { + return this.notFound != null; + } + + public void setNotFoundIsSet(boolean value) { + if (!value) { + this.notFound = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)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; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return Boolean.valueOf(isSuccess()); + + case AUTH_ERROR: + return getAuthError(); + + case NOT_FOUND: + return getNotFound(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case AUTH_ERROR: + return isSetAuthError(); + case NOT_FOUND: + return isSetNotFound(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof deleteImageVersion_result) + return this.equals((deleteImageVersion_result)that); + return false; + } + + public boolean equals(deleteImageVersion_result that) { + if (that == null) + return false; + + boolean this_present_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_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; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(deleteImageVersion_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(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; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("deleteImageVersion_result("); + boolean first = true; + + sb.append("success:"); + 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; + 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 deleteImageVersion_resultStandardSchemeFactory implements SchemeFactory { + public deleteImageVersion_resultStandardScheme getScheme() { + return new deleteImageVersion_resultStandardScheme(); + } + } + + private static class deleteImageVersion_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, deleteImageVersion_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 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: // 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; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, deleteImageVersion_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.authError != null) { + oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); + struct.authError.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.notFound != null) { + oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC); + struct.notFound.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deleteImageVersion_resultTupleSchemeFactory implements SchemeFactory { + public deleteImageVersion_resultTupleScheme getScheme() { + return new deleteImageVersion_resultTupleScheme(); + } + } + + private static class deleteImageVersion_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deleteImageVersion_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetAuthError()) { + optionals.set(1); + } + if (struct.isSetNotFound()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetAuthError()) { + struct.authError.write(oprot); + } + if (struct.isSetNotFound()) { + struct.notFound.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deleteImageVersion_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + 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); + } + } + } + + } + + public static class writeImagePermissions_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("writeImagePermissions_args"); + + private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField IMAGE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageId", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField PERMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("permissions", org.apache.thrift.protocol.TType.MAP, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new writeImagePermissions_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new writeImagePermissions_argsTupleSchemeFactory()); + } + + public String userToken; // required + public String imageId; // required + public Map permissions; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + USER_TOKEN((short)1, "userToken"), + IMAGE_ID((short)2, "imageId"), + PERMISSIONS((short)3, "permissions"); + + private static final Map byName = new HashMap(); + + 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_ID + return IMAGE_ID; + case 3: // PERMISSIONS + return PERMISSIONS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); + tmpMap.put(_Fields.IMAGE_ID, new org.apache.thrift.meta_data.FieldMetaData("imageId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); + tmpMap.put(_Fields.PERMISSIONS, new org.apache.thrift.meta_data.FieldMetaData("permissions", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"), + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ImagePermissions.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(writeImagePermissions_args.class, metaDataMap); + } + + public writeImagePermissions_args() { + } + + public writeImagePermissions_args( + String userToken, + String imageId, + Map permissions) + { + this(); + this.userToken = userToken; + this.imageId = imageId; + this.permissions = permissions; + } + + /** + * Performs a deep copy on other. + */ + public writeImagePermissions_args(writeImagePermissions_args other) { + if (other.isSetUserToken()) { + this.userToken = other.userToken; + } + if (other.isSetImageId()) { + this.imageId = other.imageId; + } + if (other.isSetPermissions()) { + Map __this__permissions = new HashMap(other.permissions.size()); + for (Map.Entry other_element : other.permissions.entrySet()) { + + String other_element_key = other_element.getKey(); + ImagePermissions other_element_value = other_element.getValue(); + + String __this__permissions_copy_key = other_element_key; + + ImagePermissions __this__permissions_copy_value = new ImagePermissions(other_element_value); + + __this__permissions.put(__this__permissions_copy_key, __this__permissions_copy_value); + } + this.permissions = __this__permissions; + } + } + + public writeImagePermissions_args deepCopy() { + return new writeImagePermissions_args(this); + } + + @Override + public void clear() { + this.userToken = null; + this.imageId = null; + this.permissions = null; + } + + public String getUserToken() { + return this.userToken; + } + + public writeImagePermissions_args setUserToken(String userToken) { + this.userToken = userToken; + return this; + } + + public void unsetUserToken() { + this.userToken = null; + } + + /** Returns true if field userToken is set (has been assigned a value) and false otherwise */ + public boolean isSetUserToken() { + return this.userToken != null; + } + + public void setUserTokenIsSet(boolean value) { + if (!value) { + this.userToken = null; + } + } + + public String getImageId() { + return this.imageId; + } + + public writeImagePermissions_args setImageId(String imageId) { + this.imageId = imageId; + return this; + } + + public void unsetImageId() { + this.imageId = null; + } + + /** Returns true if field imageId is set (has been assigned a value) and false otherwise */ + public boolean isSetImageId() { + return this.imageId != null; + } + + public void setImageIdIsSet(boolean value) { + if (!value) { + this.imageId = null; + } + } + + public int getPermissionsSize() { + return (this.permissions == null) ? 0 : this.permissions.size(); + } + + public void putToPermissions(String key, ImagePermissions val) { + if (this.permissions == null) { + this.permissions = new HashMap(); + } + this.permissions.put(key, val); + } + + public Map getPermissions() { + return this.permissions; + } + + public writeImagePermissions_args setPermissions(Map permissions) { + this.permissions = permissions; + return this; + } + + public void unsetPermissions() { + this.permissions = null; + } + + /** Returns true if field permissions is set (has been assigned a value) and false otherwise */ + public boolean isSetPermissions() { + return this.permissions != null; + } + + public void setPermissionsIsSet(boolean value) { + if (!value) { + this.permissions = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case USER_TOKEN: + if (value == null) { + unsetUserToken(); + } else { + setUserToken((String)value); + } + break; + + case IMAGE_ID: + if (value == null) { + unsetImageId(); + } else { + setImageId((String)value); + } + break; + + case PERMISSIONS: + if (value == null) { + unsetPermissions(); + } else { + setPermissions((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case USER_TOKEN: + return getUserToken(); + + case IMAGE_ID: + return getImageId(); + + case PERMISSIONS: + return getPermissions(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case USER_TOKEN: + return isSetUserToken(); + case IMAGE_ID: + return isSetImageId(); + case PERMISSIONS: + return isSetPermissions(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof writeImagePermissions_args) + return this.equals((writeImagePermissions_args)that); + return false; + } + + public boolean equals(writeImagePermissions_args that) { + if (that == null) + return false; + + boolean this_present_userToken = true && this.isSetUserToken(); + boolean that_present_userToken = true && that.isSetUserToken(); + if (this_present_userToken || that_present_userToken) { + if (!(this_present_userToken && that_present_userToken)) + return false; + if (!this.userToken.equals(that.userToken)) + return false; + } + + boolean this_present_imageId = true && this.isSetImageId(); + boolean that_present_imageId = true && that.isSetImageId(); + if (this_present_imageId || that_present_imageId) { + if (!(this_present_imageId && that_present_imageId)) + return false; + if (!this.imageId.equals(that.imageId)) + return false; + } + + boolean this_present_permissions = true && this.isSetPermissions(); + boolean that_present_permissions = true && that.isSetPermissions(); + if (this_present_permissions || that_present_permissions) { + if (!(this_present_permissions && that_present_permissions)) + return false; + if (!this.permissions.equals(that.permissions)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(writeImagePermissions_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUserToken()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetImageId()).compareTo(other.isSetImageId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetImageId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageId, other.imageId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPermissions()).compareTo(other.isSetPermissions()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPermissions()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.permissions, other.permissions); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("writeImagePermissions_args("); + boolean first = true; + + sb.append("userToken:"); + if (this.userToken == null) { + sb.append("null"); + } else { + sb.append(this.userToken); + } + first = false; + if (!first) sb.append(", "); + sb.append("imageId:"); + if (this.imageId == null) { + sb.append("null"); + } else { + sb.append(this.imageId); + } + first = false; + if (!first) sb.append(", "); + sb.append("permissions:"); + if (this.permissions == null) { + sb.append("null"); + } else { + sb.append(this.permissions); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class writeImagePermissions_argsStandardSchemeFactory implements SchemeFactory { + public writeImagePermissions_argsStandardScheme getScheme() { + return new writeImagePermissions_argsStandardScheme(); + } + } + + private static class writeImagePermissions_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, writeImagePermissions_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // USER_TOKEN + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.userToken = iprot.readString(); + struct.setUserTokenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // IMAGE_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.imageId = iprot.readString(); + struct.setImageIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PERMISSIONS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map106 = iprot.readMapBegin(); + struct.permissions = new HashMap(2*_map106.size); + for (int _i107 = 0; _i107 < _map106.size; ++_i107) + { + String _key108; + ImagePermissions _val109; + _key108 = iprot.readString(); + _val109 = new ImagePermissions(); + _val109.read(iprot); + struct.permissions.put(_key108, _val109); + } + iprot.readMapEnd(); + } + struct.setPermissionsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, writeImagePermissions_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.userToken != null) { + oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC); + oprot.writeString(struct.userToken); + oprot.writeFieldEnd(); + } + if (struct.imageId != null) { + oprot.writeFieldBegin(IMAGE_ID_FIELD_DESC); + oprot.writeString(struct.imageId); + oprot.writeFieldEnd(); + } + if (struct.permissions != null) { + oprot.writeFieldBegin(PERMISSIONS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.permissions.size())); + for (Map.Entry _iter110 : struct.permissions.entrySet()) + { + oprot.writeString(_iter110.getKey()); + _iter110.getValue().write(oprot); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class writeImagePermissions_argsTupleSchemeFactory implements SchemeFactory { + public writeImagePermissions_argsTupleScheme getScheme() { + return new writeImagePermissions_argsTupleScheme(); + } + } + + private static class writeImagePermissions_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, writeImagePermissions_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUserToken()) { + optionals.set(0); + } + if (struct.isSetImageId()) { + optionals.set(1); + } + if (struct.isSetPermissions()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetUserToken()) { + oprot.writeString(struct.userToken); + } + if (struct.isSetImageId()) { + oprot.writeString(struct.imageId); + } + if (struct.isSetPermissions()) { + { + oprot.writeI32(struct.permissions.size()); + for (Map.Entry _iter111 : struct.permissions.entrySet()) + { + oprot.writeString(_iter111.getKey()); + _iter111.getValue().write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, writeImagePermissions_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.userToken = iprot.readString(); + struct.setUserTokenIsSet(true); + } + if (incoming.get(1)) { + struct.imageId = iprot.readString(); + struct.setImageIdIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TMap _map112 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.permissions = new HashMap(2*_map112.size); + for (int _i113 = 0; _i113 < _map112.size; ++_i113) + { + String _key114; + ImagePermissions _val115; + _key114 = iprot.readString(); + _val115 = new ImagePermissions(); + _val115.read(iprot); + struct.permissions.put(_key114, _val115); + } + } + struct.setPermissionsIsSet(true); + } + } + } + + } + + public static class writeImagePermissions_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("writeImagePermissions_result"); + + private static final org.apache.thrift.protocol.TField 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 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new writeImagePermissions_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new writeImagePermissions_resultTupleSchemeFactory()); + } + + public boolean success; // required + public TAuthorizationException authError; // required + public TNotFoundException notFound; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + AUTH_ERROR((short)1, "authError"), + NOT_FOUND((short)2, "notFound"); + + private static final Map byName = new HashMap(); + + 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; + 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.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))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(writeImagePermissions_result.class, metaDataMap); + } + + public writeImagePermissions_result() { + } + + public writeImagePermissions_result( + boolean success, + TAuthorizationException authError, + TNotFoundException notFound) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.authError = authError; + this.notFound = notFound; + } + + /** + * Performs a deep copy on other. + */ + public writeImagePermissions_result(writeImagePermissions_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetAuthError()) { + this.authError = new TAuthorizationException(other.authError); + } + if (other.isSetNotFound()) { + this.notFound = new TNotFoundException(other.notFound); + } + } + + public writeImagePermissions_result deepCopy() { + return new writeImagePermissions_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.authError = null; + this.notFound = null; + } + + public boolean isSuccess() { + return this.success; + } + + public writeImagePermissions_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 getAuthError() { + return this.authError; + } + + public writeImagePermissions_result setAuthError(TAuthorizationException authError) { + this.authError = authError; + return this; + } + + public void unsetAuthError() { + this.authError = null; + } + + /** Returns true if field authError is set (has been assigned a value) and false otherwise */ + public boolean isSetAuthError() { + return this.authError != null; + } + + public void setAuthErrorIsSet(boolean value) { + if (!value) { + this.authError = null; + } + } + + public TNotFoundException getNotFound() { + return this.notFound; + } + + public writeImagePermissions_result setNotFound(TNotFoundException notFound) { + this.notFound = notFound; + return this; + } + + public void unsetNotFound() { + this.notFound = null; + } + + /** Returns true if field notFound is set (has been assigned a value) and false otherwise */ + public boolean isSetNotFound() { + return this.notFound != null; + } + + public void setNotFoundIsSet(boolean value) { + if (!value) { + this.notFound = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)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; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return Boolean.valueOf(isSuccess()); + + case AUTH_ERROR: + return getAuthError(); + + case NOT_FOUND: + return getNotFound(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case AUTH_ERROR: + return isSetAuthError(); + case NOT_FOUND: + return isSetNotFound(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof writeImagePermissions_result) + return this.equals((writeImagePermissions_result)that); + return false; + } + + public boolean equals(writeImagePermissions_result that) { + if (that == null) + return false; + + boolean this_present_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_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; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(writeImagePermissions_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(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; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("writeImagePermissions_result("); + boolean first = true; + + sb.append("success:"); + 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; + 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 writeImagePermissions_resultStandardSchemeFactory implements SchemeFactory { + public writeImagePermissions_resultStandardScheme getScheme() { + return new writeImagePermissions_resultStandardScheme(); + } + } + + private static class writeImagePermissions_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, writeImagePermissions_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 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: // 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; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, writeImagePermissions_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.authError != null) { + oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); + struct.authError.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.notFound != null) { + oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC); + struct.notFound.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class writeImagePermissions_resultTupleSchemeFactory implements SchemeFactory { + public writeImagePermissions_resultTupleScheme getScheme() { + return new writeImagePermissions_resultTupleScheme(); + } + } + + private static class writeImagePermissions_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, writeImagePermissions_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetAuthError()) { + optionals.set(1); + } + if (struct.isSetNotFound()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetAuthError()) { + struct.authError.write(oprot); + } + if (struct.isSetNotFound()) { + struct.notFound.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, writeImagePermissions_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + 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); + } + } + } + + } + + public static class getImagePermissions_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImagePermissions_args"); + + private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField IMAGE_BASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageBaseId", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getImagePermissions_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getImagePermissions_argsTupleSchemeFactory()); + } + + public String userToken; // required + public String imageBaseId; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + USER_TOKEN((short)1, "userToken"), + IMAGE_BASE_ID((short)2, "imageBaseId"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // USER_TOKEN + return USER_TOKEN; + case 2: // IMAGE_BASE_ID + return IMAGE_BASE_ID; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); + tmpMap.put(_Fields.IMAGE_BASE_ID, new org.apache.thrift.meta_data.FieldMetaData("imageBaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImagePermissions_args.class, metaDataMap); + } + + public getImagePermissions_args() { + } + + public getImagePermissions_args( + String userToken, + String imageBaseId) + { + this(); + this.userToken = userToken; + this.imageBaseId = imageBaseId; + } + + /** + * Performs a deep copy on other. + */ + public getImagePermissions_args(getImagePermissions_args other) { + if (other.isSetUserToken()) { + this.userToken = other.userToken; + } + if (other.isSetImageBaseId()) { + this.imageBaseId = other.imageBaseId; + } + } + + public getImagePermissions_args deepCopy() { + return new getImagePermissions_args(this); + } + + @Override + public void clear() { + this.userToken = null; + this.imageBaseId = null; + } + + public String getUserToken() { + return this.userToken; + } + + public getImagePermissions_args setUserToken(String userToken) { + this.userToken = userToken; + return this; + } + + public void unsetUserToken() { + this.userToken = null; + } + + /** Returns true if field userToken is set (has been assigned a value) and false otherwise */ + public boolean isSetUserToken() { + return this.userToken != null; + } + + public void setUserTokenIsSet(boolean value) { + if (!value) { + this.userToken = null; + } + } + + public String getImageBaseId() { + return this.imageBaseId; + } + + public getImagePermissions_args setImageBaseId(String imageBaseId) { + this.imageBaseId = imageBaseId; + return this; + } + + public void unsetImageBaseId() { + this.imageBaseId = null; + } + + /** Returns true if field imageBaseId is set (has been assigned a value) and false otherwise */ + public boolean isSetImageBaseId() { + return this.imageBaseId != null; + } + + public void setImageBaseIdIsSet(boolean value) { + if (!value) { + this.imageBaseId = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case USER_TOKEN: + if (value == null) { + unsetUserToken(); + } else { + setUserToken((String)value); + } + break; + + case IMAGE_BASE_ID: + if (value == null) { + unsetImageBaseId(); + } else { + setImageBaseId((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case USER_TOKEN: + return getUserToken(); + + case IMAGE_BASE_ID: + return getImageBaseId(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case USER_TOKEN: + return isSetUserToken(); + case IMAGE_BASE_ID: + return isSetImageBaseId(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getImagePermissions_args) + return this.equals((getImagePermissions_args)that); + return false; + } + + public boolean equals(getImagePermissions_args that) { + if (that == null) + return false; + + boolean this_present_userToken = true && this.isSetUserToken(); + boolean that_present_userToken = true && that.isSetUserToken(); + if (this_present_userToken || that_present_userToken) { + if (!(this_present_userToken && that_present_userToken)) + return false; + if (!this.userToken.equals(that.userToken)) + return false; + } + + boolean this_present_imageBaseId = true && this.isSetImageBaseId(); + boolean that_present_imageBaseId = true && that.isSetImageBaseId(); + if (this_present_imageBaseId || that_present_imageBaseId) { + if (!(this_present_imageBaseId && that_present_imageBaseId)) + return false; + if (!this.imageBaseId.equals(that.imageBaseId)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getImagePermissions_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUserToken()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetImageBaseId()).compareTo(other.isSetImageBaseId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetImageBaseId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageBaseId, other.imageBaseId); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getImagePermissions_args("); + boolean first = true; + + sb.append("userToken:"); + if (this.userToken == null) { + sb.append("null"); + } else { + sb.append(this.userToken); + } + first = false; + if (!first) sb.append(", "); + sb.append("imageBaseId:"); + if (this.imageBaseId == null) { + sb.append("null"); + } else { + sb.append(this.imageBaseId); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getImagePermissions_argsStandardSchemeFactory implements SchemeFactory { + public getImagePermissions_argsStandardScheme getScheme() { + return new getImagePermissions_argsStandardScheme(); + } + } + + private static class getImagePermissions_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getImagePermissions_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // USER_TOKEN + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.userToken = iprot.readString(); + struct.setUserTokenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // IMAGE_BASE_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.imageBaseId = iprot.readString(); + struct.setImageBaseIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getImagePermissions_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.userToken != null) { + oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC); + oprot.writeString(struct.userToken); + oprot.writeFieldEnd(); + } + if (struct.imageBaseId != null) { + oprot.writeFieldBegin(IMAGE_BASE_ID_FIELD_DESC); + oprot.writeString(struct.imageBaseId); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getImagePermissions_argsTupleSchemeFactory implements SchemeFactory { + public getImagePermissions_argsTupleScheme getScheme() { + return new getImagePermissions_argsTupleScheme(); + } + } + + private static class getImagePermissions_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getImagePermissions_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUserToken()) { + optionals.set(0); + } + if (struct.isSetImageBaseId()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetUserToken()) { + oprot.writeString(struct.userToken); + } + if (struct.isSetImageBaseId()) { + oprot.writeString(struct.imageBaseId); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getImagePermissions_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.userToken = iprot.readString(); + struct.setUserTokenIsSet(true); + } + if (incoming.get(1)) { + struct.imageBaseId = iprot.readString(); + struct.setImageBaseIdIsSet(true); + } + } + } + + } + + public static class getImagePermissions_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImagePermissions_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0); + private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getImagePermissions_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getImagePermissions_resultTupleSchemeFactory()); + } + + public Map success; // required + public TAuthorizationException authError; // required + public TNotFoundException notFound; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + AUTH_ERROR((short)1, "authError"), + NOT_FOUND((short)2, "notFound"); + + private static final Map byName = new HashMap(); + + 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; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"), + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ImagePermissions.class)))); + tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImagePermissions_result.class, metaDataMap); + } + + public getImagePermissions_result() { + } + + public getImagePermissions_result( + Map success, + TAuthorizationException authError, + TNotFoundException notFound) + { + this(); + this.success = success; + this.authError = authError; + this.notFound = notFound; + } + + /** + * Performs a deep copy on other. + */ + public getImagePermissions_result(getImagePermissions_result other) { + if (other.isSetSuccess()) { + Map __this__success = new HashMap(other.success.size()); + for (Map.Entry other_element : other.success.entrySet()) { + + String other_element_key = other_element.getKey(); + ImagePermissions other_element_value = other_element.getValue(); + + String __this__success_copy_key = other_element_key; + + ImagePermissions __this__success_copy_value = new ImagePermissions(other_element_value); + + __this__success.put(__this__success_copy_key, __this__success_copy_value); + } + this.success = __this__success; + } + if (other.isSetAuthError()) { + this.authError = new TAuthorizationException(other.authError); + } + if (other.isSetNotFound()) { + this.notFound = new TNotFoundException(other.notFound); + } + } + + public getImagePermissions_result deepCopy() { + return new getImagePermissions_result(this); + } + + @Override + public void clear() { + this.success = null; + this.authError = null; + this.notFound = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public void putToSuccess(String key, ImagePermissions val) { + if (this.success == null) { + this.success = new HashMap(); + } + this.success.put(key, val); + } + + public Map getSuccess() { + return this.success; + } + + public getImagePermissions_result setSuccess(Map success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public TAuthorizationException getAuthError() { + return this.authError; + } + + public getImagePermissions_result setAuthError(TAuthorizationException authError) { + this.authError = authError; + return this; + } + + public void unsetAuthError() { + this.authError = null; + } + + /** Returns true if field authError is set (has been assigned a value) and false otherwise */ + public boolean isSetAuthError() { + return this.authError != null; + } + + public void setAuthErrorIsSet(boolean value) { + if (!value) { + this.authError = null; + } + } + + public TNotFoundException getNotFound() { + return this.notFound; + } + + public getImagePermissions_result setNotFound(TNotFoundException notFound) { + this.notFound = notFound; + return this; + } + + public void unsetNotFound() { + this.notFound = null; + } + + /** Returns true if field notFound is set (has been assigned a value) and false otherwise */ + public boolean isSetNotFound() { + return this.notFound != null; + } + + public void setNotFoundIsSet(boolean value) { + if (!value) { + this.notFound = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Map)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; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case AUTH_ERROR: + return getAuthError(); + + case NOT_FOUND: + return getNotFound(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case AUTH_ERROR: + return isSetAuthError(); + case NOT_FOUND: + return isSetNotFound(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getImagePermissions_result) + return this.equals((getImagePermissions_result)that); + return false; + } + + public boolean equals(getImagePermissions_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_authError = true && this.isSetAuthError(); + boolean that_present_authError = true && that.isSetAuthError(); + if (this_present_authError || that_present_authError) { + if (!(this_present_authError && that_present_authError)) + return false; + if (!this.authError.equals(that.authError)) + return false; + } + + boolean this_present_notFound = true && this.isSetNotFound(); + boolean that_present_notFound = true && that.isSetNotFound(); + if (this_present_notFound || that_present_notFound) { + if (!(this_present_notFound && that_present_notFound)) + return false; + if (!this.notFound.equals(that.notFound)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getImagePermissions_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAuthError()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNotFound()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getImagePermissions_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("authError:"); + if (this.authError == null) { + sb.append("null"); + } else { + sb.append(this.authError); + } + first = false; + if (!first) sb.append(", "); + sb.append("notFound:"); + if (this.notFound == null) { + sb.append("null"); + } else { + sb.append(this.notFound); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getImagePermissions_resultStandardSchemeFactory implements SchemeFactory { + public getImagePermissions_resultStandardScheme getScheme() { + return new getImagePermissions_resultStandardScheme(); + } + } + + private static class getImagePermissions_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getImagePermissions_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map116 = iprot.readMapBegin(); + struct.success = new HashMap(2*_map116.size); + for (int _i117 = 0; _i117 < _map116.size; ++_i117) + { + String _key118; + ImagePermissions _val119; + _key118 = iprot.readString(); + _val119 = new ImagePermissions(); + _val119.read(iprot); + struct.success.put(_key118, _val119); + } + iprot.readMapEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // AUTH_ERROR + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.authError = new TAuthorizationException(); + struct.authError.read(iprot); + struct.setAuthErrorIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // NOT_FOUND + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.notFound = new TNotFoundException(); + struct.notFound.read(iprot); + struct.setNotFoundIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getImagePermissions_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (Map.Entry _iter120 : struct.success.entrySet()) + { + oprot.writeString(_iter120.getKey()); + _iter120.getValue().write(oprot); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.authError != null) { + oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); + struct.authError.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.notFound != null) { + oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC); + struct.notFound.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getImagePermissions_resultTupleSchemeFactory implements SchemeFactory { + public getImagePermissions_resultTupleScheme getScheme() { + return new getImagePermissions_resultTupleScheme(); + } + } + + private static class getImagePermissions_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getImagePermissions_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetAuthError()) { + optionals.set(1); + } + if (struct.isSetNotFound()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (Map.Entry _iter121 : struct.success.entrySet()) + { + oprot.writeString(_iter121.getKey()); + _iter121.getValue().write(oprot); + } + } + } + if (struct.isSetAuthError()) { + struct.authError.write(oprot); + } + if (struct.isSetNotFound()) { + struct.notFound.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getImagePermissions_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TMap _map122 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new HashMap(2*_map122.size); + for (int _i123 = 0; _i123 < _map122.size; ++_i123) + { + String _key124; + ImagePermissions _val125; + _key124 = iprot.readString(); + _val125 = new ImagePermissions(); + _val125.read(iprot); + struct.success.put(_key124, _val125); + } + } + 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); + } + } + } + + } + + public static class createLecture_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createLecture_args"); + + private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField LECTURE_FIELD_DESC = new org.apache.thrift.protocol.TField("lecture", org.apache.thrift.protocol.TType.STRUCT, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new createLecture_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new createLecture_argsTupleSchemeFactory()); + } + + public String userToken; // required + public LectureWrite lecture; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + USER_TOKEN((short)1, "userToken"), + LECTURE((short)2, "lecture"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // USER_TOKEN + return USER_TOKEN; + case 2: // LECTURE + return LECTURE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); + tmpMap.put(_Fields.LECTURE, new org.apache.thrift.meta_data.FieldMetaData("lecture", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LectureWrite.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createLecture_args.class, metaDataMap); + } + + public createLecture_args() { + } + + public createLecture_args( + String userToken, + LectureWrite lecture) + { + this(); + this.userToken = userToken; + this.lecture = lecture; + } + + /** + * Performs a deep copy on other. + */ + public createLecture_args(createLecture_args other) { + if (other.isSetUserToken()) { + this.userToken = other.userToken; + } + if (other.isSetLecture()) { + this.lecture = new LectureWrite(other.lecture); + } + } + + public createLecture_args deepCopy() { + return new createLecture_args(this); + } + + @Override + public void clear() { + this.userToken = null; + this.lecture = null; + } + + public String getUserToken() { + return this.userToken; + } + + public createLecture_args setUserToken(String userToken) { + this.userToken = userToken; + return this; + } + + public void unsetUserToken() { + this.userToken = null; + } + + /** Returns true if field userToken is set (has been assigned a value) and false otherwise */ + public boolean isSetUserToken() { + return this.userToken != null; + } + + public void setUserTokenIsSet(boolean value) { + if (!value) { + this.userToken = null; + } + } + + public LectureWrite getLecture() { + return this.lecture; + } + + public createLecture_args setLecture(LectureWrite lecture) { + this.lecture = lecture; + return this; + } + + public void unsetLecture() { + this.lecture = null; + } + + /** Returns true if field lecture is set (has been assigned a value) and false otherwise */ + public boolean isSetLecture() { + return this.lecture != null; + } + + public void setLectureIsSet(boolean value) { + if (!value) { + this.lecture = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case USER_TOKEN: + if (value == null) { + unsetUserToken(); + } else { + setUserToken((String)value); + } + break; + + case LECTURE: + if (value == null) { + unsetLecture(); + } else { + setLecture((LectureWrite)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case USER_TOKEN: + return getUserToken(); + + case LECTURE: + return getLecture(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case USER_TOKEN: + return isSetUserToken(); + case LECTURE: + return isSetLecture(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof createLecture_args) + return this.equals((createLecture_args)that); + return false; + } + + public boolean equals(createLecture_args that) { + if (that == null) + return false; + + boolean this_present_userToken = true && this.isSetUserToken(); + boolean that_present_userToken = true && that.isSetUserToken(); + if (this_present_userToken || that_present_userToken) { + if (!(this_present_userToken && that_present_userToken)) + return false; + if (!this.userToken.equals(that.userToken)) + return false; + } + + boolean this_present_lecture = true && this.isSetLecture(); + boolean that_present_lecture = true && that.isSetLecture(); + if (this_present_lecture || that_present_lecture) { + if (!(this_present_lecture && that_present_lecture)) + return false; + if (!this.lecture.equals(that.lecture)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(createLecture_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUserToken()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLecture()).compareTo(other.isSetLecture()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLecture()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lecture, other.lecture); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("createLecture_args("); + boolean first = true; + + sb.append("userToken:"); + if (this.userToken == null) { + sb.append("null"); + } else { + sb.append(this.userToken); + } + first = false; + if (!first) sb.append(", "); + sb.append("lecture:"); + if (this.lecture == null) { + sb.append("null"); + } else { + sb.append(this.lecture); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (lecture != null) { + lecture.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class createLecture_argsStandardSchemeFactory implements SchemeFactory { + public createLecture_argsStandardScheme getScheme() { + return new createLecture_argsStandardScheme(); + } + } + + private static class createLecture_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, createLecture_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // USER_TOKEN + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.userToken = iprot.readString(); + struct.setUserTokenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // LECTURE + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.lecture = new LectureWrite(); + struct.lecture.read(iprot); + struct.setLectureIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, createLecture_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.userToken != null) { + oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC); + oprot.writeString(struct.userToken); + oprot.writeFieldEnd(); + } + if (struct.lecture != null) { + oprot.writeFieldBegin(LECTURE_FIELD_DESC); + struct.lecture.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class createLecture_argsTupleSchemeFactory implements SchemeFactory { + public createLecture_argsTupleScheme getScheme() { + return new createLecture_argsTupleScheme(); + } + } + + private static class createLecture_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, createLecture_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUserToken()) { + optionals.set(0); + } + if (struct.isSetLecture()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetUserToken()) { + oprot.writeString(struct.userToken); + } + if (struct.isSetLecture()) { + struct.lecture.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, createLecture_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.userToken = iprot.readString(); + struct.setUserTokenIsSet(true); + } + if (incoming.get(1)) { + struct.lecture = new LectureWrite(); + struct.lecture.read(iprot); + struct.setLectureIsSet(true); + } + } + } + + } + + public static class createLecture_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createLecture_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); + private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new createLecture_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new createLecture_resultTupleSchemeFactory()); + } + + public String success; // required + public TAuthorizationException authError; // 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"); + + private static final Map byName = new HashMap(); + + 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; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); + tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createLecture_result.class, metaDataMap); + } + + public createLecture_result() { + } + + public createLecture_result( + String success, + TAuthorizationException authError) + { + this(); + this.success = success; + this.authError = authError; + } + + /** + * Performs a deep copy on other. + */ + public createLecture_result(createLecture_result other) { + if (other.isSetSuccess()) { + this.success = other.success; + } + if (other.isSetAuthError()) { + this.authError = new TAuthorizationException(other.authError); + } + } + + public createLecture_result deepCopy() { + return new createLecture_result(this); + } + + @Override + public void clear() { + this.success = null; + this.authError = null; + } + + public String getSuccess() { + return this.success; + } + + public createLecture_result setSuccess(String success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public TAuthorizationException getAuthError() { + return this.authError; + } + + public createLecture_result setAuthError(TAuthorizationException authError) { + this.authError = authError; + return this; + } + + public void unsetAuthError() { + this.authError = null; + } + + /** Returns true if field authError is set (has been assigned a value) and false otherwise */ + public boolean isSetAuthError() { + return this.authError != null; + } + + public void setAuthErrorIsSet(boolean value) { + if (!value) { + this.authError = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((String)value); + } + break; + + case AUTH_ERROR: + if (value == null) { + unsetAuthError(); + } else { + setAuthError((TAuthorizationException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case AUTH_ERROR: + return getAuthError(); + + } + 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(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof createLecture_result) + return this.equals((createLecture_result)that); + return false; + } + + public boolean equals(createLecture_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_authError = true && this.isSetAuthError(); + boolean that_present_authError = true && that.isSetAuthError(); + if (this_present_authError || that_present_authError) { + if (!(this_present_authError && that_present_authError)) + return false; + if (!this.authError.equals(that.authError)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(createLecture_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAuthError()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("createLecture_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("authError:"); + if (this.authError == null) { + sb.append("null"); + } else { + sb.append(this.authError); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class createLecture_resultStandardSchemeFactory implements SchemeFactory { + public createLecture_resultStandardScheme getScheme() { + return new createLecture_resultStandardScheme(); + } + } + + private static class createLecture_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, createLecture_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.success = iprot.readString(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // AUTH_ERROR + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.authError = new TAuthorizationException(); + struct.authError.read(iprot); + struct.setAuthErrorIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, createLecture_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeString(struct.success); + oprot.writeFieldEnd(); + } + if (struct.authError != null) { + oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); + struct.authError.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class createLecture_resultTupleSchemeFactory implements SchemeFactory { + public createLecture_resultTupleScheme getScheme() { + return new createLecture_resultTupleScheme(); + } + } + + private static class createLecture_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, createLecture_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetAuthError()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeString(struct.success); + } + if (struct.isSetAuthError()) { + struct.authError.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, createLecture_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = iprot.readString(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.authError = new TAuthorizationException(); + struct.authError.read(iprot); + struct.setAuthErrorIsSet(true); + } + } + } + + } + + public static class updateLecture_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateLecture_args"); + + private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField LECTURE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureId", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField LECTURE_FIELD_DESC = new org.apache.thrift.protocol.TField("lecture", org.apache.thrift.protocol.TType.STRUCT, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new updateLecture_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new updateLecture_argsTupleSchemeFactory()); + } + + public String userToken; // required + public String lectureId; // required + public LectureWrite lecture; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + USER_TOKEN((short)1, "userToken"), + LECTURE_ID((short)2, "lectureId"), + LECTURE((short)3, "lecture"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // USER_TOKEN + return USER_TOKEN; + case 2: // LECTURE_ID + return LECTURE_ID; + case 3: // LECTURE + return LECTURE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); + tmpMap.put(_Fields.LECTURE_ID, new org.apache.thrift.meta_data.FieldMetaData("lectureId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); + tmpMap.put(_Fields.LECTURE, new org.apache.thrift.meta_data.FieldMetaData("lecture", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LectureWrite.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateLecture_args.class, metaDataMap); + } + + public updateLecture_args() { + } + + public updateLecture_args( + String userToken, + String lectureId, + LectureWrite lecture) + { + this(); + this.userToken = userToken; + this.lectureId = lectureId; + this.lecture = lecture; + } + + /** + * Performs a deep copy on other. + */ + public updateLecture_args(updateLecture_args other) { + if (other.isSetUserToken()) { + this.userToken = other.userToken; + } + if (other.isSetLectureId()) { + this.lectureId = other.lectureId; + } + if (other.isSetLecture()) { + this.lecture = new LectureWrite(other.lecture); + } + } + + public updateLecture_args deepCopy() { + return new updateLecture_args(this); + } + + @Override + public void clear() { + this.userToken = null; + this.lectureId = null; + this.lecture = null; + } + + public String getUserToken() { + return this.userToken; + } + + public updateLecture_args setUserToken(String userToken) { + this.userToken = userToken; + return this; + } + + public void unsetUserToken() { + this.userToken = null; + } + + /** Returns true if field userToken is set (has been assigned a value) and false otherwise */ + public boolean isSetUserToken() { + return this.userToken != null; + } + + public void setUserTokenIsSet(boolean value) { + if (!value) { + this.userToken = null; + } + } + + public String getLectureId() { + return this.lectureId; + } + + public updateLecture_args setLectureId(String lectureId) { + this.lectureId = lectureId; + return this; + } + + public void unsetLectureId() { + this.lectureId = null; + } + + /** Returns true if field lectureId is set (has been assigned a value) and false otherwise */ + public boolean isSetLectureId() { + return this.lectureId != null; + } + + public void setLectureIdIsSet(boolean value) { + if (!value) { + this.lectureId = null; + } + } + + public LectureWrite getLecture() { + return this.lecture; + } + + public updateLecture_args setLecture(LectureWrite lecture) { + this.lecture = lecture; + return this; + } + + public void unsetLecture() { + this.lecture = null; + } + + /** Returns true if field lecture is set (has been assigned a value) and false otherwise */ + public boolean isSetLecture() { + return this.lecture != null; + } + + public void setLectureIsSet(boolean value) { + if (!value) { + this.lecture = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case USER_TOKEN: + if (value == null) { + unsetUserToken(); + } else { + setUserToken((String)value); + } + break; + + case LECTURE_ID: + if (value == null) { + unsetLectureId(); + } else { + setLectureId((String)value); + } + break; + + case LECTURE: + if (value == null) { + unsetLecture(); + } else { + setLecture((LectureWrite)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case USER_TOKEN: + return getUserToken(); + + case LECTURE_ID: + return getLectureId(); + + case LECTURE: + return getLecture(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case USER_TOKEN: + return isSetUserToken(); + case LECTURE_ID: + return isSetLectureId(); + case LECTURE: + return isSetLecture(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof updateLecture_args) + return this.equals((updateLecture_args)that); + return false; + } + + public boolean equals(updateLecture_args that) { + if (that == null) + return false; + + boolean this_present_userToken = true && this.isSetUserToken(); + boolean that_present_userToken = true && that.isSetUserToken(); + if (this_present_userToken || that_present_userToken) { + if (!(this_present_userToken && that_present_userToken)) + return false; + if (!this.userToken.equals(that.userToken)) + return false; + } + + boolean this_present_lectureId = true && this.isSetLectureId(); + boolean that_present_lectureId = true && that.isSetLectureId(); + if (this_present_lectureId || that_present_lectureId) { + if (!(this_present_lectureId && that_present_lectureId)) + return false; + if (!this.lectureId.equals(that.lectureId)) + return false; + } + + boolean this_present_lecture = true && this.isSetLecture(); + boolean that_present_lecture = true && that.isSetLecture(); + if (this_present_lecture || that_present_lecture) { + if (!(this_present_lecture && that_present_lecture)) + return false; + if (!this.lecture.equals(that.lecture)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(updateLecture_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUserToken()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLectureId()).compareTo(other.isSetLectureId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLectureId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lectureId, other.lectureId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLecture()).compareTo(other.isSetLecture()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLecture()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lecture, other.lecture); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("updateLecture_args("); + boolean first = true; + + sb.append("userToken:"); + if (this.userToken == null) { + sb.append("null"); + } else { + sb.append(this.userToken); + } + first = false; + if (!first) sb.append(", "); + sb.append("lectureId:"); + if (this.lectureId == null) { + sb.append("null"); + } else { + sb.append(this.lectureId); + } + first = false; + if (!first) sb.append(", "); + sb.append("lecture:"); + if (this.lecture == null) { + sb.append("null"); + } else { + sb.append(this.lecture); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (lecture != null) { + lecture.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class updateLecture_argsStandardSchemeFactory implements SchemeFactory { + public updateLecture_argsStandardScheme getScheme() { + return new updateLecture_argsStandardScheme(); + } + } + + private static class updateLecture_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, updateLecture_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // USER_TOKEN + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.userToken = iprot.readString(); + struct.setUserTokenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // LECTURE_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.lectureId = iprot.readString(); + struct.setLectureIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // LECTURE + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.lecture = new LectureWrite(); + struct.lecture.read(iprot); + struct.setLectureIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, updateLecture_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.userToken != null) { + oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC); + oprot.writeString(struct.userToken); + oprot.writeFieldEnd(); + } + if (struct.lectureId != null) { + oprot.writeFieldBegin(LECTURE_ID_FIELD_DESC); + oprot.writeString(struct.lectureId); + oprot.writeFieldEnd(); + } + if (struct.lecture != null) { + oprot.writeFieldBegin(LECTURE_FIELD_DESC); + struct.lecture.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class updateLecture_argsTupleSchemeFactory implements SchemeFactory { + public updateLecture_argsTupleScheme getScheme() { + return new updateLecture_argsTupleScheme(); + } + } + + private static class updateLecture_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, updateLecture_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUserToken()) { + optionals.set(0); + } + if (struct.isSetLectureId()) { + optionals.set(1); + } + if (struct.isSetLecture()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetUserToken()) { + oprot.writeString(struct.userToken); + } + if (struct.isSetLectureId()) { + oprot.writeString(struct.lectureId); + } + if (struct.isSetLecture()) { + struct.lecture.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, updateLecture_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.userToken = iprot.readString(); + struct.setUserTokenIsSet(true); + } + if (incoming.get(1)) { + struct.lectureId = iprot.readString(); + struct.setLectureIdIsSet(true); + } + if (incoming.get(2)) { + struct.lecture = new LectureWrite(); + struct.lecture.read(iprot); + struct.setLectureIsSet(true); + } + } + } + + } + + public static class updateLecture_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateLecture_result"); + + private static final org.apache.thrift.protocol.TField 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 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new updateLecture_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new updateLecture_resultTupleSchemeFactory()); + } + + public boolean success; // required + public TAuthorizationException authError; // required + public TNotFoundException notFound; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + AUTH_ERROR((short)1, "authError"), + NOT_FOUND((short)2, "notFound"); + + private static final Map byName = new HashMap(); + + 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; + 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.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))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateLecture_result.class, metaDataMap); + } + + public updateLecture_result() { + } + + public updateLecture_result( + boolean success, + TAuthorizationException authError, + TNotFoundException notFound) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.authError = authError; + this.notFound = notFound; + } + + /** + * Performs a deep copy on other. + */ + public updateLecture_result(updateLecture_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetAuthError()) { + this.authError = new TAuthorizationException(other.authError); + } + if (other.isSetNotFound()) { + this.notFound = new TNotFoundException(other.notFound); + } + } + + public updateLecture_result deepCopy() { + return new updateLecture_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.authError = null; + this.notFound = null; + } + + public boolean isSuccess() { + return this.success; + } + + public updateLecture_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 getAuthError() { + return this.authError; + } + + public updateLecture_result setAuthError(TAuthorizationException authError) { + this.authError = authError; + return this; + } + + public void unsetAuthError() { + this.authError = null; + } + + /** Returns true if field authError is set (has been assigned a value) and false otherwise */ + public boolean isSetAuthError() { + return this.authError != null; + } + + public void setAuthErrorIsSet(boolean value) { + if (!value) { + this.authError = null; + } + } + + public TNotFoundException getNotFound() { + return this.notFound; + } + + public updateLecture_result setNotFound(TNotFoundException notFound) { + this.notFound = notFound; + return this; + } + + public void unsetNotFound() { + this.notFound = null; + } + + /** Returns true if field notFound is set (has been assigned a value) and false otherwise */ + public boolean isSetNotFound() { + return this.notFound != null; + } + + public void setNotFoundIsSet(boolean value) { + if (!value) { + this.notFound = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)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; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return Boolean.valueOf(isSuccess()); + + case AUTH_ERROR: + return getAuthError(); + + case NOT_FOUND: + return getNotFound(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case AUTH_ERROR: + return isSetAuthError(); + case NOT_FOUND: + return isSetNotFound(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof updateLecture_result) + return this.equals((updateLecture_result)that); + return false; + } + + public boolean equals(updateLecture_result that) { + if (that == null) + return false; + + boolean this_present_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_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; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(updateLecture_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(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; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("updateLecture_result("); + boolean first = true; + + sb.append("success:"); + 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; + 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 updateLecture_resultStandardSchemeFactory implements SchemeFactory { + public updateLecture_resultStandardScheme getScheme() { + return new updateLecture_resultStandardScheme(); + } + } + + private static class updateLecture_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, updateLecture_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 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: // 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; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, updateLecture_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.authError != null) { + oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); + struct.authError.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.notFound != null) { + oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC); + struct.notFound.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class updateLecture_resultTupleSchemeFactory implements SchemeFactory { + public updateLecture_resultTupleScheme getScheme() { + return new updateLecture_resultTupleScheme(); + } + } + + private static class updateLecture_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, updateLecture_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetAuthError()) { + optionals.set(1); + } + if (struct.isSetNotFound()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetAuthError()) { + struct.authError.write(oprot); + } + if (struct.isSetNotFound()) { + struct.notFound.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, updateLecture_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + 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); + } + } + } + + } + + public static class getLectureList_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLectureList_args"); + + private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getLectureList_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getLectureList_argsTupleSchemeFactory()); + } + + public String userToken; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + USER_TOKEN((short)1, "userToken"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // USER_TOKEN + return USER_TOKEN; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureList_args.class, metaDataMap); + } + + public getLectureList_args() { + } + + public getLectureList_args( + String userToken) + { + this(); + this.userToken = userToken; + } + + /** + * Performs a deep copy on other. + */ + public getLectureList_args(getLectureList_args other) { + if (other.isSetUserToken()) { + this.userToken = other.userToken; + } + } + + public getLectureList_args deepCopy() { + return new getLectureList_args(this); + } + + @Override + public void clear() { + this.userToken = null; + } + + public String getUserToken() { + return this.userToken; + } + + public getLectureList_args setUserToken(String userToken) { + this.userToken = userToken; + return this; + } + + public void unsetUserToken() { + this.userToken = null; + } + + /** Returns true if field userToken is set (has been assigned a value) and false otherwise */ + public boolean isSetUserToken() { + return this.userToken != null; + } + + public void setUserTokenIsSet(boolean value) { + if (!value) { + this.userToken = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case USER_TOKEN: + if (value == null) { + unsetUserToken(); + } else { + setUserToken((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case USER_TOKEN: + return getUserToken(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case USER_TOKEN: + return isSetUserToken(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getLectureList_args) + return this.equals((getLectureList_args)that); + return false; + } + + public boolean equals(getLectureList_args that) { + if (that == null) + return false; + + boolean this_present_userToken = true && this.isSetUserToken(); + boolean that_present_userToken = true && that.isSetUserToken(); + if (this_present_userToken || that_present_userToken) { + if (!(this_present_userToken && that_present_userToken)) + return false; + if (!this.userToken.equals(that.userToken)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getLectureList_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUserToken()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getLectureList_args("); + boolean first = true; + + sb.append("userToken:"); + if (this.userToken == null) { + sb.append("null"); + } else { + sb.append(this.userToken); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getLectureList_argsStandardSchemeFactory implements SchemeFactory { + public getLectureList_argsStandardScheme getScheme() { + return new getLectureList_argsStandardScheme(); + } + } + + private static class getLectureList_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureList_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // USER_TOKEN + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.userToken = iprot.readString(); + struct.setUserTokenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureList_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.userToken != null) { + oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC); + oprot.writeString(struct.userToken); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getLectureList_argsTupleSchemeFactory implements SchemeFactory { + public getLectureList_argsTupleScheme getScheme() { + return new getLectureList_argsTupleScheme(); + } + } + + private static class getLectureList_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getLectureList_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUserToken()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetUserToken()) { + oprot.writeString(struct.userToken); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getLectureList_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.userToken = iprot.readString(); + struct.setUserTokenIsSet(true); + } + } + } + + } + + public static class getLectureList_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLectureList_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getLectureList_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getLectureList_resultTupleSchemeFactory()); + } + + public List success; // required + public TAuthorizationException authError; // 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"); + + private static final Map byName = new HashMap(); + + 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; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LectureSummary.class)))); + tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureList_result.class, metaDataMap); + } + + public getLectureList_result() { + } + + public getLectureList_result( + List success, + TAuthorizationException authError) + { + this(); + this.success = success; + this.authError = authError; + } + + /** + * Performs a deep copy on other. + */ + public getLectureList_result(getLectureList_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (LectureSummary other_element : other.success) { + __this__success.add(new LectureSummary(other_element)); + } + this.success = __this__success; + } + if (other.isSetAuthError()) { + this.authError = new TAuthorizationException(other.authError); + } + } + + public getLectureList_result deepCopy() { + return new getLectureList_result(this); + } + + @Override + public void clear() { + this.success = null; + this.authError = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(LectureSummary elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public getLectureList_result setSuccess(List success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public TAuthorizationException getAuthError() { + return this.authError; + } + + public getLectureList_result setAuthError(TAuthorizationException authError) { + this.authError = authError; + return this; + } + + public void unsetAuthError() { + this.authError = null; + } + + /** Returns true if field authError is set (has been assigned a value) and false otherwise */ + public boolean isSetAuthError() { + return this.authError != null; + } + + public void setAuthErrorIsSet(boolean value) { + if (!value) { + this.authError = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case AUTH_ERROR: + if (value == null) { + unsetAuthError(); + } else { + setAuthError((TAuthorizationException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case AUTH_ERROR: + return getAuthError(); + + } + 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(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getLectureList_result) + return this.equals((getLectureList_result)that); + return false; + } + + public boolean equals(getLectureList_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_authError = true && this.isSetAuthError(); + boolean that_present_authError = true && that.isSetAuthError(); + if (this_present_authError || that_present_authError) { + if (!(this_present_authError && that_present_authError)) + return false; + if (!this.authError.equals(that.authError)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getLectureList_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAuthError()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getLectureList_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("authError:"); + if (this.authError == null) { + sb.append("null"); + } else { + sb.append(this.authError); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getLectureList_resultStandardSchemeFactory implements SchemeFactory { + public getLectureList_resultStandardScheme getScheme() { + return new getLectureList_resultStandardScheme(); + } + } + + private static class getLectureList_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureList_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list126 = iprot.readListBegin(); + struct.success = new ArrayList(_list126.size); + for (int _i127 = 0; _i127 < _list126.size; ++_i127) + { + LectureSummary _elem128; + _elem128 = new LectureSummary(); + _elem128.read(iprot); + struct.success.add(_elem128); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // AUTH_ERROR + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.authError = new TAuthorizationException(); + struct.authError.read(iprot); + struct.setAuthErrorIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureList_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (LectureSummary _iter129 : struct.success) + { + _iter129.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.authError != null) { + oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); + struct.authError.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getLectureList_resultTupleSchemeFactory implements SchemeFactory { + public getLectureList_resultTupleScheme getScheme() { + return new getLectureList_resultTupleScheme(); + } + } + + private static class getLectureList_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getLectureList_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetAuthError()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (LectureSummary _iter130 : struct.success) + { + _iter130.write(oprot); + } + } + } + if (struct.isSetAuthError()) { + struct.authError.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getLectureList_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list131 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list131.size); + for (int _i132 = 0; _i132 < _list131.size; ++_i132) + { + LectureSummary _elem133; + _elem133 = new LectureSummary(); + _elem133.read(iprot); + struct.success.add(_elem133); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.authError = new TAuthorizationException(); + struct.authError.read(iprot); + struct.setAuthErrorIsSet(true); + } + } + } + + } + + public static class getLectureDetails_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLectureDetails_args"); + + private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField LECTURE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureId", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getLectureDetails_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getLectureDetails_argsTupleSchemeFactory()); + } + + public String userToken; // required + public String lectureId; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + USER_TOKEN((short)1, "userToken"), + LECTURE_ID((short)2, "lectureId"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // USER_TOKEN + return USER_TOKEN; + case 2: // LECTURE_ID + return LECTURE_ID; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); + tmpMap.put(_Fields.LECTURE_ID, new org.apache.thrift.meta_data.FieldMetaData("lectureId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureDetails_args.class, metaDataMap); + } + + public getLectureDetails_args() { + } + + public getLectureDetails_args( + String userToken, + String lectureId) + { + this(); + this.userToken = userToken; + this.lectureId = lectureId; + } + + /** + * Performs a deep copy on other. + */ + public getLectureDetails_args(getLectureDetails_args other) { + if (other.isSetUserToken()) { + this.userToken = other.userToken; + } + if (other.isSetLectureId()) { + this.lectureId = other.lectureId; + } + } + + public getLectureDetails_args deepCopy() { + return new getLectureDetails_args(this); + } + + @Override + public void clear() { + this.userToken = null; + this.lectureId = null; + } + + public String getUserToken() { + return this.userToken; + } + + public getLectureDetails_args setUserToken(String userToken) { + this.userToken = userToken; + return this; + } + + public void unsetUserToken() { + this.userToken = null; + } + + /** Returns true if field userToken is set (has been assigned a value) and false otherwise */ + public boolean isSetUserToken() { + return this.userToken != null; + } + + public void setUserTokenIsSet(boolean value) { + if (!value) { + this.userToken = null; + } + } + + public String getLectureId() { + return this.lectureId; + } + + public getLectureDetails_args setLectureId(String lectureId) { + this.lectureId = lectureId; + return this; + } + + public void unsetLectureId() { + this.lectureId = null; + } + + /** Returns true if field lectureId is set (has been assigned a value) and false otherwise */ + public boolean isSetLectureId() { + return this.lectureId != null; + } + + public void setLectureIdIsSet(boolean value) { + if (!value) { + this.lectureId = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case USER_TOKEN: + if (value == null) { + unsetUserToken(); + } else { + setUserToken((String)value); + } + break; + + case LECTURE_ID: + if (value == null) { + unsetLectureId(); + } else { + setLectureId((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case USER_TOKEN: + return getUserToken(); + + case LECTURE_ID: + return getLectureId(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case USER_TOKEN: + return isSetUserToken(); + case LECTURE_ID: + return isSetLectureId(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getLectureDetails_args) + return this.equals((getLectureDetails_args)that); + return false; + } + + public boolean equals(getLectureDetails_args that) { + if (that == null) + return false; + + boolean this_present_userToken = true && this.isSetUserToken(); + boolean that_present_userToken = true && that.isSetUserToken(); + if (this_present_userToken || that_present_userToken) { + if (!(this_present_userToken && that_present_userToken)) + return false; + if (!this.userToken.equals(that.userToken)) + return false; + } + + boolean this_present_lectureId = true && this.isSetLectureId(); + boolean that_present_lectureId = true && that.isSetLectureId(); + if (this_present_lectureId || that_present_lectureId) { + if (!(this_present_lectureId && that_present_lectureId)) + return false; + if (!this.lectureId.equals(that.lectureId)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getLectureDetails_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUserToken()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLectureId()).compareTo(other.isSetLectureId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLectureId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lectureId, other.lectureId); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getLectureDetails_args("); + boolean first = true; + + sb.append("userToken:"); + if (this.userToken == null) { + sb.append("null"); + } else { + sb.append(this.userToken); + } + first = false; + if (!first) sb.append(", "); + sb.append("lectureId:"); + if (this.lectureId == null) { + sb.append("null"); + } else { + sb.append(this.lectureId); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getLectureDetails_argsStandardSchemeFactory implements SchemeFactory { + public getLectureDetails_argsStandardScheme getScheme() { + return new getLectureDetails_argsStandardScheme(); + } + } + + private static class getLectureDetails_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureDetails_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // USER_TOKEN + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.userToken = iprot.readString(); + struct.setUserTokenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // LECTURE_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.lectureId = iprot.readString(); + struct.setLectureIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureDetails_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.userToken != null) { + oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC); + oprot.writeString(struct.userToken); + oprot.writeFieldEnd(); + } + if (struct.lectureId != null) { + oprot.writeFieldBegin(LECTURE_ID_FIELD_DESC); + oprot.writeString(struct.lectureId); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getLectureDetails_argsTupleSchemeFactory implements SchemeFactory { + public getLectureDetails_argsTupleScheme getScheme() { + return new getLectureDetails_argsTupleScheme(); + } + } + + private static class getLectureDetails_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getLectureDetails_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUserToken()) { + optionals.set(0); + } + if (struct.isSetLectureId()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetUserToken()) { + oprot.writeString(struct.userToken); + } + if (struct.isSetLectureId()) { + oprot.writeString(struct.lectureId); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getLectureDetails_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.userToken = iprot.readString(); + struct.setUserTokenIsSet(true); + } + if (incoming.get(1)) { + struct.lectureId = iprot.readString(); + struct.setLectureIdIsSet(true); + } + } + } + + } + + public static class getLectureDetails_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLectureDetails_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getLectureDetails_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getLectureDetails_resultTupleSchemeFactory()); + } + + public LectureRead success; // required + public TAuthorizationException authError; // required + public TNotFoundException notFound; // required + + /** 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"); + + private static final Map byName = new HashMap(); + + 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; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LectureRead.class))); + tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureDetails_result.class, metaDataMap); + } + + public getLectureDetails_result() { + } + + public getLectureDetails_result( + LectureRead success, + TAuthorizationException authError, + TNotFoundException notFound) + { + this(); + this.success = success; + this.authError = authError; + this.notFound = notFound; + } + + /** + * Performs a deep copy on other. + */ + public getLectureDetails_result(getLectureDetails_result other) { + if (other.isSetSuccess()) { + this.success = new LectureRead(other.success); + } + if (other.isSetAuthError()) { + this.authError = new TAuthorizationException(other.authError); + } + if (other.isSetNotFound()) { + this.notFound = new TNotFoundException(other.notFound); + } + } + + public getLectureDetails_result deepCopy() { + return new getLectureDetails_result(this); + } + + @Override + public void clear() { + this.success = null; + this.authError = null; + this.notFound = null; + } + + public LectureRead getSuccess() { + return this.success; + } + + public getLectureDetails_result setSuccess(LectureRead success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public TAuthorizationException getAuthError() { + return this.authError; + } + + public getLectureDetails_result setAuthError(TAuthorizationException authError) { + this.authError = authError; + return this; + } + + public void unsetAuthError() { + this.authError = null; + } + + /** Returns true if field authError is set (has been assigned a value) and false otherwise */ + public boolean isSetAuthError() { + return this.authError != null; + } + + public void setAuthErrorIsSet(boolean value) { + if (!value) { + this.authError = null; + } + } + + public TNotFoundException getNotFound() { + return this.notFound; + } + + public getLectureDetails_result setNotFound(TNotFoundException notFound) { + this.notFound = notFound; + return this; + } + + public void unsetNotFound() { + this.notFound = null; + } + + /** Returns true if field notFound is set (has been assigned a value) and false otherwise */ + public boolean isSetNotFound() { + return this.notFound != null; + } + + public void setNotFoundIsSet(boolean value) { + if (!value) { + this.notFound = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((LectureRead)value); + } + break; + + case AUTH_ERROR: + if (value == null) { + unsetAuthError(); + } else { + setAuthError((TAuthorizationException)value); + } + break; + + case NOT_FOUND: + if (value == null) { + unsetNotFound(); + } else { + setNotFound((TNotFoundException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case AUTH_ERROR: + return getAuthError(); + + case NOT_FOUND: + return getNotFound(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case AUTH_ERROR: + return isSetAuthError(); + case NOT_FOUND: + return isSetNotFound(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getLectureDetails_result) + return this.equals((getLectureDetails_result)that); + return false; + } + + public boolean equals(getLectureDetails_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_authError = true && this.isSetAuthError(); + boolean that_present_authError = true && that.isSetAuthError(); + if (this_present_authError || that_present_authError) { + if (!(this_present_authError && that_present_authError)) + return false; + if (!this.authError.equals(that.authError)) + return false; + } + + boolean this_present_notFound = true && this.isSetNotFound(); + boolean that_present_notFound = true && that.isSetNotFound(); + if (this_present_notFound || that_present_notFound) { + if (!(this_present_notFound && that_present_notFound)) + return false; + if (!this.notFound.equals(that.notFound)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getLectureDetails_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAuthError()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNotFound()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getLectureDetails_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("authError:"); + if (this.authError == null) { + sb.append("null"); + } else { + sb.append(this.authError); + } + first = false; + if (!first) sb.append(", "); + sb.append("notFound:"); + if (this.notFound == null) { + sb.append("null"); + } else { + sb.append(this.notFound); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (success != null) { + success.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getLectureDetails_resultStandardSchemeFactory implements SchemeFactory { + public getLectureDetails_resultStandardScheme getScheme() { + return new getLectureDetails_resultStandardScheme(); + } + } + + private static class getLectureDetails_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureDetails_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new LectureRead(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // AUTH_ERROR + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.authError = new TAuthorizationException(); + struct.authError.read(iprot); + struct.setAuthErrorIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // NOT_FOUND + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.notFound = new TNotFoundException(); + struct.notFound.read(iprot); + struct.setNotFoundIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureDetails_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.authError != null) { + oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); + struct.authError.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.notFound != null) { + oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC); + struct.notFound.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getLectureDetails_resultTupleSchemeFactory implements SchemeFactory { + public getLectureDetails_resultTupleScheme getScheme() { + return new getLectureDetails_resultTupleScheme(); + } + } + + private static class getLectureDetails_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getLectureDetails_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetAuthError()) { + optionals.set(1); + } + if (struct.isSetNotFound()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetAuthError()) { + struct.authError.write(oprot); + } + if (struct.isSetNotFound()) { + struct.notFound.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getLectureDetails_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = new LectureRead(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.authError = new TAuthorizationException(); + struct.authError.read(iprot); + struct.setAuthErrorIsSet(true); + } + if (incoming.get(2)) { + struct.notFound = new TNotFoundException(); + struct.notFound.read(iprot); + struct.setNotFoundIsSet(true); + } + } + } + + } + + public static class getLecturesByImageVersion_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLecturesByImageVersion_args"); + + private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField IMAGE_VERSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageVersionId", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getLecturesByImageVersion_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getLecturesByImageVersion_argsTupleSchemeFactory()); + } + + public String userToken; // required + public String imageVersionId; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + USER_TOKEN((short)1, "userToken"), + IMAGE_VERSION_ID((short)2, "imageVersionId"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // USER_TOKEN + return USER_TOKEN; + case 2: // IMAGE_VERSION_ID + return IMAGE_VERSION_ID; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); + tmpMap.put(_Fields.IMAGE_VERSION_ID, new org.apache.thrift.meta_data.FieldMetaData("imageVersionId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLecturesByImageVersion_args.class, metaDataMap); + } + + public getLecturesByImageVersion_args() { + } + + public getLecturesByImageVersion_args( + String userToken, + String imageVersionId) + { + this(); + this.userToken = userToken; + this.imageVersionId = imageVersionId; + } + + /** + * Performs a deep copy on other. + */ + public getLecturesByImageVersion_args(getLecturesByImageVersion_args other) { + if (other.isSetUserToken()) { + this.userToken = other.userToken; + } + if (other.isSetImageVersionId()) { + this.imageVersionId = other.imageVersionId; + } + } + + public getLecturesByImageVersion_args deepCopy() { + return new getLecturesByImageVersion_args(this); + } + + @Override + public void clear() { + this.userToken = null; + this.imageVersionId = null; + } + + public String getUserToken() { + return this.userToken; + } + + public getLecturesByImageVersion_args setUserToken(String userToken) { + this.userToken = userToken; + return this; + } + + public void unsetUserToken() { + this.userToken = null; + } + + /** Returns true if field userToken is set (has been assigned a value) and false otherwise */ + public boolean isSetUserToken() { + return this.userToken != null; + } + + public void setUserTokenIsSet(boolean value) { + if (!value) { + this.userToken = null; + } + } + + public String getImageVersionId() { + return this.imageVersionId; + } + + public getLecturesByImageVersion_args setImageVersionId(String imageVersionId) { + this.imageVersionId = imageVersionId; + return this; + } + + public void unsetImageVersionId() { + this.imageVersionId = null; + } + + /** Returns true if field imageVersionId is set (has been assigned a value) and false otherwise */ + public boolean isSetImageVersionId() { + return this.imageVersionId != null; + } + + public void setImageVersionIdIsSet(boolean value) { + if (!value) { + this.imageVersionId = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case USER_TOKEN: + if (value == null) { + unsetUserToken(); + } else { + setUserToken((String)value); + } + break; + + case IMAGE_VERSION_ID: + if (value == null) { + unsetImageVersionId(); + } else { + setImageVersionId((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case USER_TOKEN: + return getUserToken(); + + case IMAGE_VERSION_ID: + return getImageVersionId(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case USER_TOKEN: + return isSetUserToken(); + case IMAGE_VERSION_ID: + return isSetImageVersionId(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getLecturesByImageVersion_args) + return this.equals((getLecturesByImageVersion_args)that); + return false; + } + + public boolean equals(getLecturesByImageVersion_args that) { + if (that == null) + return false; + + boolean this_present_userToken = true && this.isSetUserToken(); + boolean that_present_userToken = true && that.isSetUserToken(); + if (this_present_userToken || that_present_userToken) { + if (!(this_present_userToken && that_present_userToken)) + return false; + if (!this.userToken.equals(that.userToken)) + return false; + } + + boolean this_present_imageVersionId = true && this.isSetImageVersionId(); + boolean that_present_imageVersionId = true && that.isSetImageVersionId(); + if (this_present_imageVersionId || that_present_imageVersionId) { + if (!(this_present_imageVersionId && that_present_imageVersionId)) + return false; + if (!this.imageVersionId.equals(that.imageVersionId)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getLecturesByImageVersion_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUserToken()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetImageVersionId()).compareTo(other.isSetImageVersionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetImageVersionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageVersionId, other.imageVersionId); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getLecturesByImageVersion_args("); + boolean first = true; + + sb.append("userToken:"); + if (this.userToken == null) { + sb.append("null"); + } else { + sb.append(this.userToken); + } + first = false; + if (!first) sb.append(", "); + sb.append("imageVersionId:"); + if (this.imageVersionId == null) { + sb.append("null"); + } else { + sb.append(this.imageVersionId); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getLecturesByImageVersion_argsStandardSchemeFactory implements SchemeFactory { + public getLecturesByImageVersion_argsStandardScheme getScheme() { + return new getLecturesByImageVersion_argsStandardScheme(); + } + } + + private static class getLecturesByImageVersion_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getLecturesByImageVersion_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // USER_TOKEN + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.userToken = iprot.readString(); + struct.setUserTokenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // IMAGE_VERSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.imageVersionId = iprot.readString(); + struct.setImageVersionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getLecturesByImageVersion_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.userToken != null) { + oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC); + oprot.writeString(struct.userToken); + oprot.writeFieldEnd(); + } + if (struct.imageVersionId != null) { + oprot.writeFieldBegin(IMAGE_VERSION_ID_FIELD_DESC); + oprot.writeString(struct.imageVersionId); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getLecturesByImageVersion_argsTupleSchemeFactory implements SchemeFactory { + public getLecturesByImageVersion_argsTupleScheme getScheme() { + return new getLecturesByImageVersion_argsTupleScheme(); + } + } + + private static class getLecturesByImageVersion_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getLecturesByImageVersion_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUserToken()) { + optionals.set(0); + } + if (struct.isSetImageVersionId()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetUserToken()) { + oprot.writeString(struct.userToken); + } + if (struct.isSetImageVersionId()) { + oprot.writeString(struct.imageVersionId); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getLecturesByImageVersion_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.userToken = iprot.readString(); + struct.setUserTokenIsSet(true); + } + if (incoming.get(1)) { + struct.imageVersionId = iprot.readString(); + struct.setImageVersionIdIsSet(true); + } + } + } + + } + + public static class getLecturesByImageVersion_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLecturesByImageVersion_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getLecturesByImageVersion_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getLecturesByImageVersion_resultTupleSchemeFactory()); + } + + public List success; // required + public TAuthorizationException authError; // required + public TNotFoundException notFound; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + AUTH_ERROR((short)1, "authError"), + NOT_FOUND((short)2, "notFound"); + + private static final Map byName = new HashMap(); + + 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; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LectureSummary.class)))); + tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLecturesByImageVersion_result.class, metaDataMap); + } + + public getLecturesByImageVersion_result() { + } + + public getLecturesByImageVersion_result( + List success, + TAuthorizationException authError, + TNotFoundException notFound) + { + this(); + this.success = success; + this.authError = authError; + this.notFound = notFound; + } + + /** + * Performs a deep copy on other. + */ + public getLecturesByImageVersion_result(getLecturesByImageVersion_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (LectureSummary other_element : other.success) { + __this__success.add(new LectureSummary(other_element)); + } + this.success = __this__success; + } + if (other.isSetAuthError()) { + this.authError = new TAuthorizationException(other.authError); + } + if (other.isSetNotFound()) { + this.notFound = new TNotFoundException(other.notFound); + } + } + + public getLecturesByImageVersion_result deepCopy() { + return new getLecturesByImageVersion_result(this); + } + + @Override + public void clear() { + this.success = null; + this.authError = null; + this.notFound = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(LectureSummary elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public getLecturesByImageVersion_result setSuccess(List 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 getLecturesByImageVersion_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 getLecturesByImageVersion_result setNotFound(TNotFoundException notFound) { + this.notFound = notFound; + return this; + } + + public void unsetNotFound() { + this.notFound = null; + } + + /** Returns true if field notFound is set (has been assigned a value) and false otherwise */ + public boolean isSetNotFound() { + return this.notFound != null; + } + + public void setNotFoundIsSet(boolean value) { + if (!value) { + this.notFound = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)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; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case AUTH_ERROR: + return getAuthError(); + + case NOT_FOUND: + return getNotFound(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case AUTH_ERROR: + return isSetAuthError(); + case NOT_FOUND: + return isSetNotFound(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getLecturesByImageVersion_result) + return this.equals((getLecturesByImageVersion_result)that); + return false; + } + + public boolean equals(getLecturesByImageVersion_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; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getLecturesByImageVersion_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; + } + } + 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("getLecturesByImageVersion_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; + 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 getLecturesByImageVersion_resultStandardSchemeFactory implements SchemeFactory { + public getLecturesByImageVersion_resultStandardScheme getScheme() { + return new getLecturesByImageVersion_resultStandardScheme(); + } + } + + private static class getLecturesByImageVersion_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getLecturesByImageVersion_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 _list134 = iprot.readListBegin(); + struct.success = new ArrayList(_list134.size); + for (int _i135 = 0; _i135 < _list134.size; ++_i135) + { + LectureSummary _elem136; + _elem136 = new LectureSummary(); + _elem136.read(iprot); + struct.success.add(_elem136); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // AUTH_ERROR + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.authError = new TAuthorizationException(); + struct.authError.read(iprot); + struct.setAuthErrorIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // NOT_FOUND + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.notFound = new TNotFoundException(); + struct.notFound.read(iprot); + struct.setNotFoundIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getLecturesByImageVersion_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (LectureSummary _iter137 : struct.success) + { + _iter137.write(oprot); + } + oprot.writeListEnd(); + } + 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(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getLecturesByImageVersion_resultTupleSchemeFactory implements SchemeFactory { + public getLecturesByImageVersion_resultTupleScheme getScheme() { + return new getLecturesByImageVersion_resultTupleScheme(); + } + } + + private static class getLecturesByImageVersion_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getLecturesByImageVersion_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); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (LectureSummary _iter138 : struct.success) + { + _iter138.write(oprot); + } + } + } + if (struct.isSetAuthError()) { + struct.authError.write(oprot); + } + if (struct.isSetNotFound()) { + struct.notFound.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getLecturesByImageVersion_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 _list139 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list139.size); + for (int _i140 = 0; _i140 < _list139.size; ++_i140) + { + LectureSummary _elem141; + _elem141 = new LectureSummary(); + _elem141.read(iprot); + struct.success.add(_elem141); + } + } + 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); + } + } + } + + } + + public static class deleteLecture_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteLecture_args"); + + private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField LECTURE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureId", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new deleteLecture_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deleteLecture_argsTupleSchemeFactory()); + } + + public String userToken; // required + public String lectureId; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + USER_TOKEN((short)1, "userToken"), + LECTURE_ID((short)2, "lectureId"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // USER_TOKEN + return USER_TOKEN; + case 2: // LECTURE_ID + return LECTURE_ID; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); + tmpMap.put(_Fields.LECTURE_ID, new org.apache.thrift.meta_data.FieldMetaData("lectureId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteLecture_args.class, metaDataMap); + } + + public deleteLecture_args() { + } + + public deleteLecture_args( + String userToken, + String lectureId) + { + this(); + this.userToken = userToken; + this.lectureId = lectureId; + } + + /** + * Performs a deep copy on other. + */ + public deleteLecture_args(deleteLecture_args other) { + if (other.isSetUserToken()) { + this.userToken = other.userToken; + } + if (other.isSetLectureId()) { + this.lectureId = other.lectureId; + } + } + + public deleteLecture_args deepCopy() { + return new deleteLecture_args(this); + } + + @Override + public void clear() { + this.userToken = null; + this.lectureId = null; + } + + public String getUserToken() { + return this.userToken; + } + + public deleteLecture_args setUserToken(String userToken) { + this.userToken = userToken; + return this; + } + + public void unsetUserToken() { + this.userToken = null; + } + + /** Returns true if field userToken is set (has been assigned a value) and false otherwise */ + public boolean isSetUserToken() { + return this.userToken != null; + } + + public void setUserTokenIsSet(boolean value) { + if (!value) { + this.userToken = null; + } + } + + public String getLectureId() { + return this.lectureId; + } + + public deleteLecture_args setLectureId(String lectureId) { + this.lectureId = lectureId; + return this; + } + + public void unsetLectureId() { + this.lectureId = null; + } + + /** Returns true if field lectureId is set (has been assigned a value) and false otherwise */ + public boolean isSetLectureId() { + return this.lectureId != null; + } + + public void setLectureIdIsSet(boolean value) { + if (!value) { + this.lectureId = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case USER_TOKEN: + if (value == null) { + unsetUserToken(); + } else { + setUserToken((String)value); + } + break; + + case LECTURE_ID: + if (value == null) { + unsetLectureId(); + } else { + setLectureId((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case USER_TOKEN: + return getUserToken(); + + case LECTURE_ID: + return getLectureId(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case USER_TOKEN: + return isSetUserToken(); + case LECTURE_ID: + return isSetLectureId(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof deleteLecture_args) + return this.equals((deleteLecture_args)that); + return false; + } + + public boolean equals(deleteLecture_args that) { + if (that == null) + return false; + + boolean this_present_userToken = true && this.isSetUserToken(); + boolean that_present_userToken = true && that.isSetUserToken(); + if (this_present_userToken || that_present_userToken) { + if (!(this_present_userToken && that_present_userToken)) + return false; + if (!this.userToken.equals(that.userToken)) + return false; + } + + boolean this_present_lectureId = true && this.isSetLectureId(); + boolean that_present_lectureId = true && that.isSetLectureId(); + if (this_present_lectureId || that_present_lectureId) { + if (!(this_present_lectureId && that_present_lectureId)) + return false; + if (!this.lectureId.equals(that.lectureId)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(deleteLecture_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUserToken()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLectureId()).compareTo(other.isSetLectureId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLectureId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lectureId, other.lectureId); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("deleteLecture_args("); + boolean first = true; + + sb.append("userToken:"); + if (this.userToken == null) { + sb.append("null"); + } else { + sb.append(this.userToken); + } + first = false; + if (!first) sb.append(", "); + sb.append("lectureId:"); + if (this.lectureId == null) { + sb.append("null"); + } else { + sb.append(this.lectureId); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class deleteLecture_argsStandardSchemeFactory implements SchemeFactory { + public deleteLecture_argsStandardScheme getScheme() { + return new deleteLecture_argsStandardScheme(); + } + } + + private static class deleteLecture_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, deleteLecture_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // USER_TOKEN + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.userToken = iprot.readString(); + struct.setUserTokenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // LECTURE_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.lectureId = iprot.readString(); + struct.setLectureIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, deleteLecture_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.userToken != null) { + oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC); + oprot.writeString(struct.userToken); + oprot.writeFieldEnd(); + } + if (struct.lectureId != null) { + oprot.writeFieldBegin(LECTURE_ID_FIELD_DESC); + oprot.writeString(struct.lectureId); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deleteLecture_argsTupleSchemeFactory implements SchemeFactory { + public deleteLecture_argsTupleScheme getScheme() { + return new deleteLecture_argsTupleScheme(); + } + } + + private static class deleteLecture_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deleteLecture_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUserToken()) { + optionals.set(0); + } + if (struct.isSetLectureId()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetUserToken()) { + oprot.writeString(struct.userToken); + } + if (struct.isSetLectureId()) { + oprot.writeString(struct.lectureId); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deleteLecture_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.userToken = iprot.readString(); + struct.setUserTokenIsSet(true); + } + if (incoming.get(1)) { + struct.lectureId = iprot.readString(); + struct.setLectureIdIsSet(true); + } + } + } + + } + + public static class deleteLecture_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteLecture_result"); + + private static final org.apache.thrift.protocol.TField 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 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new deleteLecture_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deleteLecture_resultTupleSchemeFactory()); + } + + public boolean success; // required + public TAuthorizationException authError; // required + public TNotFoundException notFound; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + AUTH_ERROR((short)1, "authError"), + NOT_FOUND((short)2, "notFound"); + + private static final Map byName = new HashMap(); + + 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; + 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.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))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteLecture_result.class, metaDataMap); + } + + public deleteLecture_result() { + } + + public deleteLecture_result( + boolean success, + TAuthorizationException authError, + TNotFoundException notFound) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.authError = authError; + this.notFound = notFound; + } + + /** + * Performs a deep copy on other. + */ + public deleteLecture_result(deleteLecture_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetAuthError()) { + this.authError = new TAuthorizationException(other.authError); + } + if (other.isSetNotFound()) { + this.notFound = new TNotFoundException(other.notFound); + } + } + + public deleteLecture_result deepCopy() { + return new deleteLecture_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.authError = null; + this.notFound = null; + } + + public boolean isSuccess() { + return this.success; + } + + public deleteLecture_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 getAuthError() { + return this.authError; + } + + public deleteLecture_result setAuthError(TAuthorizationException authError) { + this.authError = authError; + return this; + } + + public void unsetAuthError() { + this.authError = null; + } + + /** Returns true if field authError is set (has been assigned a value) and false otherwise */ + public boolean isSetAuthError() { + return this.authError != null; + } + + public void setAuthErrorIsSet(boolean value) { + if (!value) { + this.authError = null; + } + } + + public TNotFoundException getNotFound() { + return this.notFound; + } + + public deleteLecture_result setNotFound(TNotFoundException notFound) { + this.notFound = notFound; + return this; + } + + public void unsetNotFound() { + this.notFound = null; + } + + /** Returns true if field notFound is set (has been assigned a value) and false otherwise */ + public boolean isSetNotFound() { + return this.notFound != null; + } + + public void setNotFoundIsSet(boolean value) { + if (!value) { + this.notFound = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)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; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return Boolean.valueOf(isSuccess()); + + case AUTH_ERROR: + return getAuthError(); + + case NOT_FOUND: + return getNotFound(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case AUTH_ERROR: + return isSetAuthError(); + case NOT_FOUND: + return isSetNotFound(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof deleteLecture_result) + return this.equals((deleteLecture_result)that); + return false; + } + + public boolean equals(deleteLecture_result that) { + if (that == null) + return false; + + boolean this_present_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_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; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(deleteLecture_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(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; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("deleteLecture_result("); + boolean first = true; + + sb.append("success:"); + 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; + 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 deleteLecture_resultStandardSchemeFactory implements SchemeFactory { + public deleteLecture_resultStandardScheme getScheme() { + return new deleteLecture_resultStandardScheme(); + } + } + + private static class deleteLecture_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, deleteLecture_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 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: // 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; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, deleteLecture_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.authError != null) { + oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); + struct.authError.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.notFound != null) { + oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC); + struct.notFound.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deleteLecture_resultTupleSchemeFactory implements SchemeFactory { + public deleteLecture_resultTupleScheme getScheme() { + return new deleteLecture_resultTupleScheme(); + } + } + + private static class deleteLecture_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deleteLecture_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetAuthError()) { + optionals.set(1); + } + if (struct.isSetNotFound()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetAuthError()) { + struct.authError.write(oprot); + } + if (struct.isSetNotFound()) { + struct.notFound.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deleteLecture_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + 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); + } + } + } + + } + + public static class writeLecturePermissions_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("writeLecturePermissions_args"); + + private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField LECTURE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureId", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField PERMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("permissions", org.apache.thrift.protocol.TType.MAP, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new writeLecturePermissions_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new writeLecturePermissions_argsTupleSchemeFactory()); + } + + public String userToken; // required + public String lectureId; // required + public Map permissions; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + USER_TOKEN((short)1, "userToken"), + LECTURE_ID((short)2, "lectureId"), + PERMISSIONS((short)3, "permissions"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // USER_TOKEN + return USER_TOKEN; + case 2: // LECTURE_ID + return LECTURE_ID; + case 3: // PERMISSIONS + return PERMISSIONS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); + tmpMap.put(_Fields.LECTURE_ID, new org.apache.thrift.meta_data.FieldMetaData("lectureId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); + tmpMap.put(_Fields.PERMISSIONS, new org.apache.thrift.meta_data.FieldMetaData("permissions", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"), + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LecturePermissions.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(writeLecturePermissions_args.class, metaDataMap); + } + + public writeLecturePermissions_args() { + } + + public writeLecturePermissions_args( + String userToken, + String lectureId, + Map permissions) + { + this(); + this.userToken = userToken; + this.lectureId = lectureId; + this.permissions = permissions; + } + + /** + * Performs a deep copy on other. + */ + public writeLecturePermissions_args(writeLecturePermissions_args other) { + if (other.isSetUserToken()) { + this.userToken = other.userToken; + } + if (other.isSetLectureId()) { + this.lectureId = other.lectureId; + } + if (other.isSetPermissions()) { + Map __this__permissions = new HashMap(other.permissions.size()); + for (Map.Entry other_element : other.permissions.entrySet()) { + + String other_element_key = other_element.getKey(); + LecturePermissions other_element_value = other_element.getValue(); + + String __this__permissions_copy_key = other_element_key; + + LecturePermissions __this__permissions_copy_value = new LecturePermissions(other_element_value); + + __this__permissions.put(__this__permissions_copy_key, __this__permissions_copy_value); + } + this.permissions = __this__permissions; + } + } + + public writeLecturePermissions_args deepCopy() { + return new writeLecturePermissions_args(this); + } + + @Override + public void clear() { + this.userToken = null; + this.lectureId = null; + this.permissions = null; + } + + public String getUserToken() { + return this.userToken; + } + + public writeLecturePermissions_args setUserToken(String userToken) { + this.userToken = userToken; + return this; + } + + public void unsetUserToken() { + this.userToken = null; + } + + /** Returns true if field userToken is set (has been assigned a value) and false otherwise */ + public boolean isSetUserToken() { + return this.userToken != null; + } + + public void setUserTokenIsSet(boolean value) { + if (!value) { + this.userToken = null; + } + } + + public String getLectureId() { + return this.lectureId; + } + + public writeLecturePermissions_args setLectureId(String lectureId) { + this.lectureId = lectureId; + return this; + } + + public void unsetLectureId() { + this.lectureId = null; + } + + /** Returns true if field lectureId is set (has been assigned a value) and false otherwise */ + public boolean isSetLectureId() { + return this.lectureId != null; + } + + public void setLectureIdIsSet(boolean value) { + if (!value) { + this.lectureId = null; + } + } + + public int getPermissionsSize() { + return (this.permissions == null) ? 0 : this.permissions.size(); + } + + public void putToPermissions(String key, LecturePermissions val) { + if (this.permissions == null) { + this.permissions = new HashMap(); + } + this.permissions.put(key, val); + } + + public Map getPermissions() { + return this.permissions; + } + + public writeLecturePermissions_args setPermissions(Map permissions) { + this.permissions = permissions; + return this; + } + + public void unsetPermissions() { + this.permissions = null; + } + + /** Returns true if field permissions is set (has been assigned a value) and false otherwise */ + public boolean isSetPermissions() { + return this.permissions != null; + } + + public void setPermissionsIsSet(boolean value) { + if (!value) { + this.permissions = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case USER_TOKEN: + if (value == null) { + unsetUserToken(); + } else { + setUserToken((String)value); + } + break; + + case LECTURE_ID: + if (value == null) { + unsetLectureId(); + } else { + setLectureId((String)value); + } + break; + + case PERMISSIONS: + if (value == null) { + unsetPermissions(); + } else { + setPermissions((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case USER_TOKEN: + return getUserToken(); + + case LECTURE_ID: + return getLectureId(); + + case PERMISSIONS: + return getPermissions(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case USER_TOKEN: + return isSetUserToken(); + case LECTURE_ID: + return isSetLectureId(); + case PERMISSIONS: + return isSetPermissions(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof writeLecturePermissions_args) + return this.equals((writeLecturePermissions_args)that); + return false; + } + + public boolean equals(writeLecturePermissions_args that) { + if (that == null) + return false; + + boolean this_present_userToken = true && this.isSetUserToken(); + boolean that_present_userToken = true && that.isSetUserToken(); + if (this_present_userToken || that_present_userToken) { + if (!(this_present_userToken && that_present_userToken)) + return false; + if (!this.userToken.equals(that.userToken)) + return false; + } + + boolean this_present_lectureId = true && this.isSetLectureId(); + boolean that_present_lectureId = true && that.isSetLectureId(); + if (this_present_lectureId || that_present_lectureId) { + if (!(this_present_lectureId && that_present_lectureId)) + return false; + if (!this.lectureId.equals(that.lectureId)) + return false; + } + + boolean this_present_permissions = true && this.isSetPermissions(); + boolean that_present_permissions = true && that.isSetPermissions(); + if (this_present_permissions || that_present_permissions) { + if (!(this_present_permissions && that_present_permissions)) + return false; + if (!this.permissions.equals(that.permissions)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(writeLecturePermissions_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUserToken()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLectureId()).compareTo(other.isSetLectureId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLectureId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lectureId, other.lectureId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPermissions()).compareTo(other.isSetPermissions()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPermissions()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.permissions, other.permissions); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("writeLecturePermissions_args("); + boolean first = true; + + sb.append("userToken:"); + if (this.userToken == null) { + sb.append("null"); + } else { + sb.append(this.userToken); + } + first = false; + if (!first) sb.append(", "); + sb.append("lectureId:"); + if (this.lectureId == null) { + sb.append("null"); + } else { + sb.append(this.lectureId); + } + first = false; + if (!first) sb.append(", "); + sb.append("permissions:"); + if (this.permissions == null) { + sb.append("null"); + } else { + sb.append(this.permissions); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class writeLecturePermissions_argsStandardSchemeFactory implements SchemeFactory { + public writeLecturePermissions_argsStandardScheme getScheme() { + return new writeLecturePermissions_argsStandardScheme(); + } + } + + private static class writeLecturePermissions_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, writeLecturePermissions_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // USER_TOKEN + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.userToken = iprot.readString(); + struct.setUserTokenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // LECTURE_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.lectureId = iprot.readString(); + struct.setLectureIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PERMISSIONS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map142 = iprot.readMapBegin(); + struct.permissions = new HashMap(2*_map142.size); + for (int _i143 = 0; _i143 < _map142.size; ++_i143) + { + String _key144; + LecturePermissions _val145; + _key144 = iprot.readString(); + _val145 = new LecturePermissions(); + _val145.read(iprot); + struct.permissions.put(_key144, _val145); + } + iprot.readMapEnd(); + } + struct.setPermissionsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, writeLecturePermissions_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.userToken != null) { + oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC); + oprot.writeString(struct.userToken); + oprot.writeFieldEnd(); + } + if (struct.lectureId != null) { + oprot.writeFieldBegin(LECTURE_ID_FIELD_DESC); + oprot.writeString(struct.lectureId); + oprot.writeFieldEnd(); + } + if (struct.permissions != null) { + oprot.writeFieldBegin(PERMISSIONS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.permissions.size())); + for (Map.Entry _iter146 : struct.permissions.entrySet()) + { + oprot.writeString(_iter146.getKey()); + _iter146.getValue().write(oprot); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class writeLecturePermissions_argsTupleSchemeFactory implements SchemeFactory { + public writeLecturePermissions_argsTupleScheme getScheme() { + return new writeLecturePermissions_argsTupleScheme(); + } + } + + private static class writeLecturePermissions_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, writeLecturePermissions_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUserToken()) { + optionals.set(0); + } + if (struct.isSetLectureId()) { + optionals.set(1); + } + if (struct.isSetPermissions()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetUserToken()) { + oprot.writeString(struct.userToken); + } + if (struct.isSetLectureId()) { + oprot.writeString(struct.lectureId); + } + if (struct.isSetPermissions()) { + { + oprot.writeI32(struct.permissions.size()); + for (Map.Entry _iter147 : struct.permissions.entrySet()) + { + oprot.writeString(_iter147.getKey()); + _iter147.getValue().write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, writeLecturePermissions_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.userToken = iprot.readString(); + struct.setUserTokenIsSet(true); + } + if (incoming.get(1)) { + struct.lectureId = iprot.readString(); + struct.setLectureIdIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TMap _map148 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.permissions = new HashMap(2*_map148.size); + for (int _i149 = 0; _i149 < _map148.size; ++_i149) + { + String _key150; + LecturePermissions _val151; + _key150 = iprot.readString(); + _val151 = new LecturePermissions(); + _val151.read(iprot); + struct.permissions.put(_key150, _val151); + } + } + struct.setPermissionsIsSet(true); + } + } + } + + } + + public static class writeLecturePermissions_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("writeLecturePermissions_result"); + + private static final org.apache.thrift.protocol.TField 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 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new writeLecturePermissions_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new writeLecturePermissions_resultTupleSchemeFactory()); + } + + public boolean success; // required + public TAuthorizationException authError; // required + public TNotFoundException notFound; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + AUTH_ERROR((short)1, "authError"), + NOT_FOUND((short)2, "notFound"); + + private static final Map byName = new HashMap(); + + 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; + 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.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))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(writeLecturePermissions_result.class, metaDataMap); + } + + public writeLecturePermissions_result() { + } + + public writeLecturePermissions_result( + boolean success, + TAuthorizationException authError, + TNotFoundException notFound) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.authError = authError; + this.notFound = notFound; + } + + /** + * Performs a deep copy on other. + */ + public writeLecturePermissions_result(writeLecturePermissions_result other) { + __isset_bitfield = other.__isset_bitfield; + this.success = other.success; + if (other.isSetAuthError()) { + this.authError = new TAuthorizationException(other.authError); + } + if (other.isSetNotFound()) { + this.notFound = new TNotFoundException(other.notFound); + } + } + + public writeLecturePermissions_result deepCopy() { + return new writeLecturePermissions_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.authError = null; + this.notFound = null; + } + + public boolean isSuccess() { + return this.success; + } + + public writeLecturePermissions_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 getAuthError() { + return this.authError; + } + + public writeLecturePermissions_result setAuthError(TAuthorizationException authError) { + this.authError = authError; + return this; + } + + public void unsetAuthError() { + this.authError = null; + } + + /** Returns true if field authError is set (has been assigned a value) and false otherwise */ + public boolean isSetAuthError() { + return this.authError != null; + } + + public void setAuthErrorIsSet(boolean value) { + if (!value) { + this.authError = null; + } + } + + public TNotFoundException getNotFound() { + return this.notFound; + } + + public writeLecturePermissions_result setNotFound(TNotFoundException notFound) { + this.notFound = notFound; + return this; + } + + public void unsetNotFound() { + this.notFound = null; + } + + /** Returns true if field notFound is set (has been assigned a value) and false otherwise */ + public boolean isSetNotFound() { + return this.notFound != null; + } + + public void setNotFoundIsSet(boolean value) { + if (!value) { + this.notFound = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)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; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return Boolean.valueOf(isSuccess()); + + case AUTH_ERROR: + return getAuthError(); + + case NOT_FOUND: + return getNotFound(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case AUTH_ERROR: + return isSetAuthError(); + case NOT_FOUND: + return isSetNotFound(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof writeLecturePermissions_result) + return this.equals((writeLecturePermissions_result)that); + return false; + } + + public boolean equals(writeLecturePermissions_result that) { + if (that == null) + return false; + + boolean this_present_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_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; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(writeLecturePermissions_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(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; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("writeLecturePermissions_result("); + boolean first = true; + + sb.append("success:"); + 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; + 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 writeLecturePermissions_resultStandardSchemeFactory implements SchemeFactory { + public writeLecturePermissions_resultStandardScheme getScheme() { + return new writeLecturePermissions_resultStandardScheme(); + } + } + + private static class writeLecturePermissions_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, writeLecturePermissions_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 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: // 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; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, writeLecturePermissions_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + } + if (struct.authError != null) { + oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); + struct.authError.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.notFound != null) { + oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC); + struct.notFound.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class writeLecturePermissions_resultTupleSchemeFactory implements SchemeFactory { + public writeLecturePermissions_resultTupleScheme getScheme() { + return new writeLecturePermissions_resultTupleScheme(); + } + } + + private static class writeLecturePermissions_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, writeLecturePermissions_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetAuthError()) { + optionals.set(1); + } + if (struct.isSetNotFound()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetAuthError()) { + struct.authError.write(oprot); + } + if (struct.isSetNotFound()) { + struct.notFound.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, writeLecturePermissions_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + 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); + } + } + } + + } + + public static class getLecturePermissions_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLecturePermissions_args"); + + private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField LECTURE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureId", org.apache.thrift.protocol.TType.STRING, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getLecturePermissions_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getLecturePermissions_argsTupleSchemeFactory()); + } + + public String userToken; // required + public String lectureId; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + USER_TOKEN((short)1, "userToken"), + LECTURE_ID((short)2, "lectureId"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // USER_TOKEN + return USER_TOKEN; + case 2: // LECTURE_ID + return LECTURE_ID; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); + tmpMap.put(_Fields.LECTURE_ID, new org.apache.thrift.meta_data.FieldMetaData("lectureId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLecturePermissions_args.class, metaDataMap); + } + + public getLecturePermissions_args() { + } + + public getLecturePermissions_args( + String userToken, + String lectureId) + { + this(); + this.userToken = userToken; + this.lectureId = lectureId; + } + + /** + * Performs a deep copy on other. + */ + public getLecturePermissions_args(getLecturePermissions_args other) { + if (other.isSetUserToken()) { + this.userToken = other.userToken; + } + if (other.isSetLectureId()) { + this.lectureId = other.lectureId; + } + } + + public getLecturePermissions_args deepCopy() { + return new getLecturePermissions_args(this); + } + + @Override + public void clear() { + this.userToken = null; + this.lectureId = null; + } + + public String getUserToken() { + return this.userToken; + } + + public getLecturePermissions_args setUserToken(String userToken) { + this.userToken = userToken; + return this; + } + + public void unsetUserToken() { + this.userToken = null; + } + + /** Returns true if field userToken is set (has been assigned a value) and false otherwise */ + public boolean isSetUserToken() { + return this.userToken != null; + } + + public void setUserTokenIsSet(boolean value) { + if (!value) { + this.userToken = null; + } + } + + public String getLectureId() { + return this.lectureId; + } + + public getLecturePermissions_args setLectureId(String lectureId) { + this.lectureId = lectureId; + return this; + } + + public void unsetLectureId() { + this.lectureId = null; + } + + /** Returns true if field lectureId is set (has been assigned a value) and false otherwise */ + public boolean isSetLectureId() { + return this.lectureId != null; + } + + public void setLectureIdIsSet(boolean value) { + if (!value) { + this.lectureId = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case USER_TOKEN: + if (value == null) { + unsetUserToken(); + } else { + setUserToken((String)value); + } + break; + + case LECTURE_ID: + if (value == null) { + unsetLectureId(); + } else { + setLectureId((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case USER_TOKEN: + return getUserToken(); + + case LECTURE_ID: + return getLectureId(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case USER_TOKEN: + return isSetUserToken(); + case LECTURE_ID: + return isSetLectureId(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getLecturePermissions_args) + return this.equals((getLecturePermissions_args)that); + return false; + } + + public boolean equals(getLecturePermissions_args that) { + if (that == null) + return false; + + boolean this_present_userToken = true && this.isSetUserToken(); + boolean that_present_userToken = true && that.isSetUserToken(); + if (this_present_userToken || that_present_userToken) { + if (!(this_present_userToken && that_present_userToken)) + return false; + if (!this.userToken.equals(that.userToken)) + return false; + } + + boolean this_present_lectureId = true && this.isSetLectureId(); + boolean that_present_lectureId = true && that.isSetLectureId(); + if (this_present_lectureId || that_present_lectureId) { + if (!(this_present_lectureId && that_present_lectureId)) + return false; + if (!this.lectureId.equals(that.lectureId)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getLecturePermissions_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUserToken()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLectureId()).compareTo(other.isSetLectureId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLectureId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lectureId, other.lectureId); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getLecturePermissions_args("); + boolean first = true; + + sb.append("userToken:"); + if (this.userToken == null) { + sb.append("null"); + } else { + sb.append(this.userToken); + } + first = false; + if (!first) sb.append(", "); + sb.append("lectureId:"); + if (this.lectureId == null) { + sb.append("null"); + } else { + sb.append(this.lectureId); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getLecturePermissions_argsStandardSchemeFactory implements SchemeFactory { + public getLecturePermissions_argsStandardScheme getScheme() { + return new getLecturePermissions_argsStandardScheme(); + } + } + + private static class getLecturePermissions_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getLecturePermissions_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // USER_TOKEN + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.userToken = iprot.readString(); + struct.setUserTokenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // LECTURE_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.lectureId = iprot.readString(); + struct.setLectureIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getLecturePermissions_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.userToken != null) { + oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC); + oprot.writeString(struct.userToken); + oprot.writeFieldEnd(); + } + if (struct.lectureId != null) { + oprot.writeFieldBegin(LECTURE_ID_FIELD_DESC); + oprot.writeString(struct.lectureId); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getLecturePermissions_argsTupleSchemeFactory implements SchemeFactory { + public getLecturePermissions_argsTupleScheme getScheme() { + return new getLecturePermissions_argsTupleScheme(); + } + } + + private static class getLecturePermissions_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getLecturePermissions_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUserToken()) { + optionals.set(0); + } + if (struct.isSetLectureId()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetUserToken()) { + oprot.writeString(struct.userToken); + } + if (struct.isSetLectureId()) { + oprot.writeString(struct.lectureId); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getLecturePermissions_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.userToken = iprot.readString(); + struct.setUserTokenIsSet(true); + } + if (incoming.get(1)) { + struct.lectureId = iprot.readString(); + struct.setLectureIdIsSet(true); + } + } + } + + } + + public static class getLecturePermissions_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLecturePermissions_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0); + private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getLecturePermissions_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getLecturePermissions_resultTupleSchemeFactory()); + } + + public Map success; // required + public TAuthorizationException authError; // required + public TNotFoundException notFound; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + AUTH_ERROR((short)1, "authError"), + NOT_FOUND((short)2, "notFound"); + + private static final Map byName = new HashMap(); + + 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; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"), + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LecturePermissions.class)))); + tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLecturePermissions_result.class, metaDataMap); + } + + public getLecturePermissions_result() { + } + + public getLecturePermissions_result( + Map success, + TAuthorizationException authError, + TNotFoundException notFound) + { + this(); + this.success = success; + this.authError = authError; + this.notFound = notFound; + } + + /** + * Performs a deep copy on other. + */ + public getLecturePermissions_result(getLecturePermissions_result other) { + if (other.isSetSuccess()) { + Map __this__success = new HashMap(other.success.size()); + for (Map.Entry other_element : other.success.entrySet()) { + + String other_element_key = other_element.getKey(); + LecturePermissions other_element_value = other_element.getValue(); + + String __this__success_copy_key = other_element_key; + + LecturePermissions __this__success_copy_value = new LecturePermissions(other_element_value); + + __this__success.put(__this__success_copy_key, __this__success_copy_value); + } + this.success = __this__success; + } + if (other.isSetAuthError()) { + this.authError = new TAuthorizationException(other.authError); + } + if (other.isSetNotFound()) { + this.notFound = new TNotFoundException(other.notFound); + } + } + + public getLecturePermissions_result deepCopy() { + return new getLecturePermissions_result(this); + } + + @Override + public void clear() { + this.success = null; + this.authError = null; + this.notFound = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public void putToSuccess(String key, LecturePermissions val) { + if (this.success == null) { + this.success = new HashMap(); + } + this.success.put(key, val); + } + + public Map getSuccess() { + return this.success; + } + + public getLecturePermissions_result setSuccess(Map success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public TAuthorizationException getAuthError() { + return this.authError; + } + + public getLecturePermissions_result setAuthError(TAuthorizationException authError) { + this.authError = authError; + return this; + } + + public void unsetAuthError() { + this.authError = null; + } + + /** Returns true if field authError is set (has been assigned a value) and false otherwise */ + public boolean isSetAuthError() { + return this.authError != null; + } + + public void setAuthErrorIsSet(boolean value) { + if (!value) { + this.authError = null; + } + } + + public TNotFoundException getNotFound() { + return this.notFound; + } + + public getLecturePermissions_result setNotFound(TNotFoundException notFound) { + this.notFound = notFound; + return this; + } + + public void unsetNotFound() { + this.notFound = null; + } + + /** Returns true if field notFound is set (has been assigned a value) and false otherwise */ + public boolean isSetNotFound() { + return this.notFound != null; + } + + public void setNotFoundIsSet(boolean value) { + if (!value) { + this.notFound = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Map)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; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case AUTH_ERROR: + return getAuthError(); + + case NOT_FOUND: + return getNotFound(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case AUTH_ERROR: + return isSetAuthError(); + case NOT_FOUND: + return isSetNotFound(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getLecturePermissions_result) + return this.equals((getLecturePermissions_result)that); + return false; + } + + public boolean equals(getLecturePermissions_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_authError = true && this.isSetAuthError(); + boolean that_present_authError = true && that.isSetAuthError(); + if (this_present_authError || that_present_authError) { + if (!(this_present_authError && that_present_authError)) + return false; + if (!this.authError.equals(that.authError)) + return false; + } + + boolean this_present_notFound = true && this.isSetNotFound(); + boolean that_present_notFound = true && that.isSetNotFound(); + if (this_present_notFound || that_present_notFound) { + if (!(this_present_notFound && that_present_notFound)) + return false; + if (!this.notFound.equals(that.notFound)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getLecturePermissions_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAuthError()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authError, other.authError); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNotFound()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getLecturePermissions_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("authError:"); + if (this.authError == null) { + sb.append("null"); + } else { + sb.append(this.authError); + } + first = false; + if (!first) sb.append(", "); + sb.append("notFound:"); + if (this.notFound == null) { + sb.append("null"); + } else { + sb.append(this.notFound); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getLecturePermissions_resultStandardSchemeFactory implements SchemeFactory { + public getLecturePermissions_resultStandardScheme getScheme() { + return new getLecturePermissions_resultStandardScheme(); + } + } + + private static class getLecturePermissions_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getLecturePermissions_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map152 = iprot.readMapBegin(); + struct.success = new HashMap(2*_map152.size); + for (int _i153 = 0; _i153 < _map152.size; ++_i153) + { + String _key154; + LecturePermissions _val155; + _key154 = iprot.readString(); + _val155 = new LecturePermissions(); + _val155.read(iprot); + struct.success.put(_key154, _val155); + } + iprot.readMapEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // AUTH_ERROR + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.authError = new TAuthorizationException(); + struct.authError.read(iprot); + struct.setAuthErrorIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // NOT_FOUND + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.notFound = new TNotFoundException(); + struct.notFound.read(iprot); + struct.setNotFoundIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getLecturePermissions_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (Map.Entry _iter156 : struct.success.entrySet()) + { + oprot.writeString(_iter156.getKey()); + _iter156.getValue().write(oprot); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.authError != null) { + oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); + struct.authError.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.notFound != null) { + oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC); + struct.notFound.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getLecturePermissions_resultTupleSchemeFactory implements SchemeFactory { + public getLecturePermissions_resultTupleScheme getScheme() { + return new getLecturePermissions_resultTupleScheme(); + } + } + + private static class getLecturePermissions_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getLecturePermissions_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetAuthError()) { + optionals.set(1); + } + if (struct.isSetNotFound()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (Map.Entry _iter157 : struct.success.entrySet()) + { + oprot.writeString(_iter157.getKey()); + _iter157.getValue().write(oprot); + } + } + } + if (struct.isSetAuthError()) { + struct.authError.write(oprot); + } + if (struct.isSetNotFound()) { + struct.notFound.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getLecturePermissions_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TMap _map158 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new HashMap(2*_map158.size); + for (int _i159 = 0; _i159 < _map158.size; ++_i159) + { + String _key160; + LecturePermissions _val161; + _key160 = iprot.readString(); + _val161 = new LecturePermissions(); + _val161.read(iprot); + struct.success.put(_key160, _val161); + } + } + 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); + } + } + } + + } + +} -- cgit v1.2.3-55-g7522