/** * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package org.openslx.bwlp.thrift.iface; @javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.17.0)", date = "2022-11-03") @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public class SatelliteServer { public interface Iface { public long getVersion(long clientVersion) throws org.apache.thrift.TException; public java.lang.String getSupportedFeatures() throws org.apache.thrift.TException; public SatelliteConfig getConfiguration() throws org.apache.thrift.TException; public TransferInformation requestImageVersionUpload(java.lang.String userToken, java.lang.String imageBaseId, long fileSize, java.util.List blockHashes, java.nio.ByteBuffer machineDescription) throws TTransferRejectedException, TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException; public void updateBlockHashes(java.lang.String uploadToken, java.util.List blockHashes, java.lang.String userToken) throws TInvalidTokenException, org.apache.thrift.TException; public UploadOptions setUploadOptions(java.lang.String userToken, java.lang.String uploadToken, UploadOptions options) throws TAuthorizationException, TInvalidTokenException, org.apache.thrift.TException; public void cancelUpload(java.lang.String uploadToken) throws TInvalidTokenException, org.apache.thrift.TException; public TransferStatus queryUploadStatus(java.lang.String uploadToken) throws TInvalidTokenException, org.apache.thrift.TException; public TransferInformation requestDownload(java.lang.String userToken, java.lang.String imageVersionId) throws TTransferRejectedException, TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException; public void cancelDownload(java.lang.String downloadToken) throws TInvalidTokenException, org.apache.thrift.TException; public void isAuthenticated(java.lang.String userToken) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException; public WhoamiInfo whoami(java.lang.String userToken) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException; public void invalidateSession(java.lang.String userToken) throws TInvalidTokenException, org.apache.thrift.TException; public java.util.List getUserList(java.lang.String userToken, int page) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException; public SatelliteUserConfig getUserConfig(java.lang.String userToken) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException; public void setUserConfig(java.lang.String userToken, SatelliteUserConfig config) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException; public java.util.List getOperatingSystems() throws org.apache.thrift.TException; public java.util.List getVirtualizers() throws org.apache.thrift.TException; public java.util.List getAllOrganizations() throws org.apache.thrift.TException; public java.util.List getLocations() throws org.apache.thrift.TException; public SatelliteStatus getStatus() throws org.apache.thrift.TException; public java.util.List getImageList(java.lang.String userToken, java.util.List tagSearch, int page) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException; public ImageDetailsRead getImageDetails(java.lang.String userToken, java.lang.String imageBaseId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException; public java.lang.String createImage(java.lang.String userToken, java.lang.String imageName) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException; public void updateImageBase(java.lang.String userToken, java.lang.String imageBaseId, ImageBaseWrite image) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException; public void updateImageVersion(java.lang.String userToken, java.lang.String imageVersionId, ImageVersionWrite image) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException; public void deleteImageVersion(java.lang.String userToken, java.lang.String imageVersionId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException; public void deleteImageBase(java.lang.String userToken, java.lang.String imageBaseId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException; public void writeImagePermissions(java.lang.String userToken, java.lang.String imageBaseId, java.util.Map permissions) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException; public java.util.Map getImagePermissions(java.lang.String userToken, java.lang.String imageBaseId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException; public void setImageOwner(java.lang.String userToken, java.lang.String imageBaseId, java.lang.String newOwnerId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException; public void setImageVersionExpiry(java.lang.String userToken, java.lang.String imageBaseId, long expireTime) throws TAuthorizationException, TNotFoundException, TInvocationException, TInvalidDateParam, org.apache.thrift.TException; public java.nio.ByteBuffer getImageVersionVirtConfig(java.lang.String userToken, java.lang.String imageVersionId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException; public void setImageVersionVirtConfig(java.lang.String userToken, java.lang.String imageVersionId, java.nio.ByteBuffer meta) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException; public java.lang.String requestImageReplication(java.lang.String userToken, java.lang.String imageVersionId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException; public java.lang.String publishImageVersion(java.lang.String userToken, java.lang.String imageVersionId) throws TAuthorizationException, TNotFoundException, TInvocationException, TTransferRejectedException, org.apache.thrift.TException; public java.lang.String createLecture(java.lang.String userToken, LectureWrite lecture) throws TAuthorizationException, TInvocationException, TInvalidDateParam, TNotFoundException, org.apache.thrift.TException; public void updateLecture(java.lang.String userToken, java.lang.String lectureId, LectureWrite lecture) throws TAuthorizationException, TNotFoundException, TInvocationException, TInvalidDateParam, org.apache.thrift.TException; public java.util.List getLectureList(java.lang.String userToken, int page) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException; public LectureRead getLectureDetails(java.lang.String userToken, java.lang.String lectureId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException; public void deleteLecture(java.lang.String userToken, java.lang.String lectureId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException; public void writeLecturePermissions(java.lang.String userToken, java.lang.String lectureId, java.util.Map permissions) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException; public java.util.Map getLecturePermissions(java.lang.String userToken, java.lang.String lectureId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException; public void setLectureOwner(java.lang.String userToken, java.lang.String lectureId, java.lang.String newOwnerId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException; public PredefinedData getPredefinedData(java.lang.String userToken) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException; } public interface AsyncIface { public void getVersion(long clientVersion, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getSupportedFeatures(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getConfiguration(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void requestImageVersionUpload(java.lang.String userToken, java.lang.String imageBaseId, long fileSize, java.util.List blockHashes, java.nio.ByteBuffer machineDescription, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void updateBlockHashes(java.lang.String uploadToken, java.util.List blockHashes, java.lang.String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void setUploadOptions(java.lang.String userToken, java.lang.String uploadToken, UploadOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void cancelUpload(java.lang.String uploadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void queryUploadStatus(java.lang.String uploadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void requestDownload(java.lang.String userToken, java.lang.String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void cancelDownload(java.lang.String downloadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void isAuthenticated(java.lang.String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void whoami(java.lang.String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void invalidateSession(java.lang.String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getUserList(java.lang.String userToken, int page, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException; public void getUserConfig(java.lang.String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void setUserConfig(java.lang.String userToken, SatelliteUserConfig config, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getOperatingSystems(org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException; public void getVirtualizers(org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException; public void getAllOrganizations(org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException; public void getLocations(org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException; public void getStatus(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getImageList(java.lang.String userToken, java.util.List tagSearch, int page, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException; public void getImageDetails(java.lang.String userToken, java.lang.String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void createImage(java.lang.String userToken, java.lang.String imageName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void updateImageBase(java.lang.String userToken, java.lang.String imageBaseId, ImageBaseWrite image, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void updateImageVersion(java.lang.String userToken, java.lang.String imageVersionId, ImageVersionWrite image, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void deleteImageVersion(java.lang.String userToken, java.lang.String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void deleteImageBase(java.lang.String userToken, java.lang.String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void writeImagePermissions(java.lang.String userToken, java.lang.String imageBaseId, java.util.Map permissions, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getImagePermissions(java.lang.String userToken, java.lang.String imageBaseId, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException; public void setImageOwner(java.lang.String userToken, java.lang.String imageBaseId, java.lang.String newOwnerId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void setImageVersionExpiry(java.lang.String userToken, java.lang.String imageBaseId, long expireTime, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getImageVersionVirtConfig(java.lang.String userToken, java.lang.String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void setImageVersionVirtConfig(java.lang.String userToken, java.lang.String imageVersionId, java.nio.ByteBuffer meta, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void requestImageReplication(java.lang.String userToken, java.lang.String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void publishImageVersion(java.lang.String userToken, java.lang.String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void createLecture(java.lang.String userToken, LectureWrite lecture, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void updateLecture(java.lang.String userToken, java.lang.String lectureId, LectureWrite lecture, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getLectureList(java.lang.String userToken, int page, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException; public void getLectureDetails(java.lang.String userToken, java.lang.String lectureId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void deleteLecture(java.lang.String userToken, java.lang.String lectureId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void writeLecturePermissions(java.lang.String userToken, java.lang.String lectureId, java.util.Map permissions, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getLecturePermissions(java.lang.String userToken, java.lang.String lectureId, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException; public void setLectureOwner(java.lang.String userToken, java.lang.String lectureId, java.lang.String newOwnerId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getPredefinedData(java.lang.String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; } public static class Client extends org.apache.thrift.TServiceClient implements Iface { public static class Factory implements org.apache.thrift.TServiceClientFactory { public Factory() {} @Override public Client getClient(org.apache.thrift.protocol.TProtocol prot) { return new Client(prot); } @Override 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); } @Override public long getVersion(long clientVersion) throws org.apache.thrift.TException { send_getVersion(clientVersion); return recv_getVersion(); } public void send_getVersion(long clientVersion) throws org.apache.thrift.TException { getVersion_args args = new getVersion_args(); args.setClientVersion(clientVersion); sendBase("getVersion", args); } public long recv_getVersion() throws org.apache.thrift.TException { getVersion_result result = new getVersion_result(); receiveBase(result, "getVersion"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getVersion failed: unknown result"); } @Override public java.lang.String getSupportedFeatures() throws org.apache.thrift.TException { send_getSupportedFeatures(); return recv_getSupportedFeatures(); } public void send_getSupportedFeatures() throws org.apache.thrift.TException { getSupportedFeatures_args args = new getSupportedFeatures_args(); sendBase("getSupportedFeatures", args); } public java.lang.String recv_getSupportedFeatures() throws org.apache.thrift.TException { getSupportedFeatures_result result = new getSupportedFeatures_result(); receiveBase(result, "getSupportedFeatures"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSupportedFeatures failed: unknown result"); } @Override public SatelliteConfig getConfiguration() throws org.apache.thrift.TException { send_getConfiguration(); return recv_getConfiguration(); } public void send_getConfiguration() throws org.apache.thrift.TException { getConfiguration_args args = new getConfiguration_args(); sendBase("getConfiguration", args); } public SatelliteConfig recv_getConfiguration() throws org.apache.thrift.TException { getConfiguration_result result = new getConfiguration_result(); receiveBase(result, "getConfiguration"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getConfiguration failed: unknown result"); } @Override public TransferInformation requestImageVersionUpload(java.lang.String userToken, java.lang.String imageBaseId, long fileSize, java.util.List blockHashes, java.nio.ByteBuffer machineDescription) throws TTransferRejectedException, TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException { send_requestImageVersionUpload(userToken, imageBaseId, fileSize, blockHashes, machineDescription); return recv_requestImageVersionUpload(); } public void send_requestImageVersionUpload(java.lang.String userToken, java.lang.String imageBaseId, long fileSize, java.util.List blockHashes, java.nio.ByteBuffer machineDescription) throws org.apache.thrift.TException { requestImageVersionUpload_args args = new requestImageVersionUpload_args(); args.setUserToken(userToken); args.setImageBaseId(imageBaseId); args.setFileSize(fileSize); args.setBlockHashes(blockHashes); args.setMachineDescription(machineDescription); sendBase("requestImageVersionUpload", args); } public TransferInformation recv_requestImageVersionUpload() throws TTransferRejectedException, TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException { requestImageVersionUpload_result result = new requestImageVersionUpload_result(); receiveBase(result, "requestImageVersionUpload"); if (result.isSetSuccess()) { return result.success; } if (result.rejection != null) { throw result.rejection; } if (result.authError != null) { throw result.authError; } if (result.ffff != null) { throw result.ffff; } if (result.sdf != null) { throw result.sdf; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "requestImageVersionUpload failed: unknown result"); } @Override public void updateBlockHashes(java.lang.String uploadToken, java.util.List blockHashes, java.lang.String userToken) throws TInvalidTokenException, org.apache.thrift.TException { send_updateBlockHashes(uploadToken, blockHashes, userToken); recv_updateBlockHashes(); } public void send_updateBlockHashes(java.lang.String uploadToken, java.util.List blockHashes, java.lang.String userToken) throws org.apache.thrift.TException { updateBlockHashes_args args = new updateBlockHashes_args(); args.setUploadToken(uploadToken); args.setBlockHashes(blockHashes); args.setUserToken(userToken); sendBase("updateBlockHashes", args); } public void recv_updateBlockHashes() throws TInvalidTokenException, org.apache.thrift.TException { updateBlockHashes_result result = new updateBlockHashes_result(); receiveBase(result, "updateBlockHashes"); if (result.ex1 != null) { throw result.ex1; } return; } @Override public UploadOptions setUploadOptions(java.lang.String userToken, java.lang.String uploadToken, UploadOptions options) throws TAuthorizationException, TInvalidTokenException, org.apache.thrift.TException { send_setUploadOptions(userToken, uploadToken, options); return recv_setUploadOptions(); } public void send_setUploadOptions(java.lang.String userToken, java.lang.String uploadToken, UploadOptions options) throws org.apache.thrift.TException { setUploadOptions_args args = new setUploadOptions_args(); args.setUserToken(userToken); args.setUploadToken(uploadToken); args.setOptions(options); sendBase("setUploadOptions", args); } public UploadOptions recv_setUploadOptions() throws TAuthorizationException, TInvalidTokenException, org.apache.thrift.TException { setUploadOptions_result result = new setUploadOptions_result(); receiveBase(result, "setUploadOptions"); if (result.isSetSuccess()) { return result.success; } if (result.frootloops != null) { throw result.frootloops; } if (result.imcyborgbutthatsok != null) { throw result.imcyborgbutthatsok; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "setUploadOptions failed: unknown result"); } @Override public void cancelUpload(java.lang.String uploadToken) throws TInvalidTokenException, org.apache.thrift.TException { send_cancelUpload(uploadToken); recv_cancelUpload(); } public void send_cancelUpload(java.lang.String uploadToken) throws org.apache.thrift.TException { cancelUpload_args args = new cancelUpload_args(); args.setUploadToken(uploadToken); sendBase("cancelUpload", args); } public void recv_cancelUpload() throws TInvalidTokenException, org.apache.thrift.TException { cancelUpload_result result = new cancelUpload_result(); receiveBase(result, "cancelUpload"); if (result.ex1 != null) { throw result.ex1; } return; } @Override public TransferStatus queryUploadStatus(java.lang.String uploadToken) throws TInvalidTokenException, org.apache.thrift.TException { send_queryUploadStatus(uploadToken); return recv_queryUploadStatus(); } public void send_queryUploadStatus(java.lang.String uploadToken) throws org.apache.thrift.TException { queryUploadStatus_args args = new queryUploadStatus_args(); args.setUploadToken(uploadToken); sendBase("queryUploadStatus", args); } public TransferStatus recv_queryUploadStatus() throws TInvalidTokenException, org.apache.thrift.TException { queryUploadStatus_result result = new queryUploadStatus_result(); receiveBase(result, "queryUploadStatus"); if (result.isSetSuccess()) { return result.success; } if (result.ex1 != null) { throw result.ex1; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "queryUploadStatus failed: unknown result"); } @Override public TransferInformation requestDownload(java.lang.String userToken, java.lang.String imageVersionId) throws TTransferRejectedException, TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException { send_requestDownload(userToken, imageVersionId); return recv_requestDownload(); } public void send_requestDownload(java.lang.String userToken, java.lang.String imageVersionId) throws org.apache.thrift.TException { requestDownload_args args = new requestDownload_args(); args.setUserToken(userToken); args.setImageVersionId(imageVersionId); sendBase("requestDownload", args); } public TransferInformation recv_requestDownload() throws TTransferRejectedException, TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException { requestDownload_result result = new requestDownload_result(); receiveBase(result, "requestDownload"); if (result.isSetSuccess()) { return result.success; } if (result.rejection != null) { throw result.rejection; } if (result.authError != null) { throw result.authError; } if (result.ffff != null) { throw result.ffff; } if (result.sdf != null) { throw result.sdf; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "requestDownload failed: unknown result"); } @Override public void cancelDownload(java.lang.String downloadToken) throws TInvalidTokenException, org.apache.thrift.TException { send_cancelDownload(downloadToken); recv_cancelDownload(); } public void send_cancelDownload(java.lang.String downloadToken) throws org.apache.thrift.TException { cancelDownload_args args = new cancelDownload_args(); args.setDownloadToken(downloadToken); sendBase("cancelDownload", args); } public void recv_cancelDownload() throws TInvalidTokenException, org.apache.thrift.TException { cancelDownload_result result = new cancelDownload_result(); receiveBase(result, "cancelDownload"); if (result.ex1 != null) { throw result.ex1; } return; } @Override public void isAuthenticated(java.lang.String userToken) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException { send_isAuthenticated(userToken); recv_isAuthenticated(); } public void send_isAuthenticated(java.lang.String userToken) throws org.apache.thrift.TException { isAuthenticated_args args = new isAuthenticated_args(); args.setUserToken(userToken); sendBase("isAuthenticated", args); } public void recv_isAuthenticated() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException { isAuthenticated_result result = new isAuthenticated_result(); receiveBase(result, "isAuthenticated"); if (result.authError != null) { throw result.authError; } if (result.serverError != null) { throw result.serverError; } return; } @Override public WhoamiInfo whoami(java.lang.String userToken) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException { send_whoami(userToken); return recv_whoami(); } public void send_whoami(java.lang.String userToken) throws org.apache.thrift.TException { whoami_args args = new whoami_args(); args.setUserToken(userToken); sendBase("whoami", args); } public WhoamiInfo recv_whoami() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException { whoami_result result = new whoami_result(); receiveBase(result, "whoami"); if (result.isSetSuccess()) { return result.success; } if (result.authError != null) { throw result.authError; } if (result.serverError != null) { throw result.serverError; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "whoami failed: unknown result"); } @Override public void invalidateSession(java.lang.String userToken) throws TInvalidTokenException, org.apache.thrift.TException { send_invalidateSession(userToken); recv_invalidateSession(); } public void send_invalidateSession(java.lang.String userToken) throws org.apache.thrift.TException { invalidateSession_args args = new invalidateSession_args(); args.setUserToken(userToken); sendBase("invalidateSession", args); } public void recv_invalidateSession() throws TInvalidTokenException, org.apache.thrift.TException { invalidateSession_result result = new invalidateSession_result(); receiveBase(result, "invalidateSession"); if (result.ex != null) { throw result.ex; } return; } @Override public java.util.List getUserList(java.lang.String userToken, int page) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException { send_getUserList(userToken, page); return recv_getUserList(); } public void send_getUserList(java.lang.String userToken, int page) throws org.apache.thrift.TException { getUserList_args args = new getUserList_args(); args.setUserToken(userToken); args.setPage(page); sendBase("getUserList", args); } public java.util.List recv_getUserList() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException { getUserList_result result = new getUserList_result(); receiveBase(result, "getUserList"); if (result.isSetSuccess()) { return result.success; } if (result.failure != null) { throw result.failure; } if (result.serverError != null) { throw result.serverError; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUserList failed: unknown result"); } @Override public SatelliteUserConfig getUserConfig(java.lang.String userToken) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException { send_getUserConfig(userToken); return recv_getUserConfig(); } public void send_getUserConfig(java.lang.String userToken) throws org.apache.thrift.TException { getUserConfig_args args = new getUserConfig_args(); args.setUserToken(userToken); sendBase("getUserConfig", args); } public SatelliteUserConfig recv_getUserConfig() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException { getUserConfig_result result = new getUserConfig_result(); receiveBase(result, "getUserConfig"); if (result.isSetSuccess()) { return result.success; } if (result.failure != null) { throw result.failure; } if (result.serverError != null) { throw result.serverError; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUserConfig failed: unknown result"); } @Override public void setUserConfig(java.lang.String userToken, SatelliteUserConfig config) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException { send_setUserConfig(userToken, config); recv_setUserConfig(); } public void send_setUserConfig(java.lang.String userToken, SatelliteUserConfig config) throws org.apache.thrift.TException { setUserConfig_args args = new setUserConfig_args(); args.setUserToken(userToken); args.setConfig(config); sendBase("setUserConfig", args); } public void recv_setUserConfig() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException { setUserConfig_result result = new setUserConfig_result(); receiveBase(result, "setUserConfig"); if (result.failure != null) { throw result.failure; } if (result.serverError != null) { throw result.serverError; } return; } @Override public java.util.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 java.util.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"); } @Override public java.util.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 java.util.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"); } @Override public java.util.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 java.util.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"); } @Override public java.util.List getLocations() throws org.apache.thrift.TException { send_getLocations(); return recv_getLocations(); } public void send_getLocations() throws org.apache.thrift.TException { getLocations_args args = new getLocations_args(); sendBase("getLocations", args); } public java.util.List recv_getLocations() throws org.apache.thrift.TException { getLocations_result result = new getLocations_result(); receiveBase(result, "getLocations"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLocations failed: unknown result"); } @Override public SatelliteStatus getStatus() throws org.apache.thrift.TException { send_getStatus(); return recv_getStatus(); } public void send_getStatus() throws org.apache.thrift.TException { getStatus_args args = new getStatus_args(); sendBase("getStatus", args); } public SatelliteStatus recv_getStatus() throws org.apache.thrift.TException { getStatus_result result = new getStatus_result(); receiveBase(result, "getStatus"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getStatus failed: unknown result"); } @Override public java.util.List getImageList(java.lang.String userToken, java.util.List tagSearch, int page) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException { send_getImageList(userToken, tagSearch, page); return recv_getImageList(); } public void send_getImageList(java.lang.String userToken, java.util.List tagSearch, int page) throws org.apache.thrift.TException { getImageList_args args = new getImageList_args(); args.setUserToken(userToken); args.setTagSearch(tagSearch); args.setPage(page); sendBase("getImageList", args); } public java.util.List recv_getImageList() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException { getImageList_result result = new getImageList_result(); receiveBase(result, "getImageList"); if (result.isSetSuccess()) { return result.success; } if (result.authError != null) { throw result.authError; } if (result.serverError != null) { throw result.serverError; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getImageList failed: unknown result"); } @Override public ImageDetailsRead getImageDetails(java.lang.String userToken, java.lang.String imageBaseId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { send_getImageDetails(userToken, imageBaseId); return recv_getImageDetails(); } public void send_getImageDetails(java.lang.String userToken, java.lang.String imageBaseId) throws org.apache.thrift.TException { getImageDetails_args args = new getImageDetails_args(); args.setUserToken(userToken); args.setImageBaseId(imageBaseId); sendBase("getImageDetails", args); } public ImageDetailsRead recv_getImageDetails() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { getImageDetails_result result = new getImageDetails_result(); receiveBase(result, "getImageDetails"); if (result.isSetSuccess()) { return result.success; } if (result.authError != null) { throw result.authError; } if (result.notFound != null) { throw result.notFound; } if (result.serverError != null) { throw result.serverError; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getImageDetails failed: unknown result"); } @Override public java.lang.String createImage(java.lang.String userToken, java.lang.String imageName) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException { send_createImage(userToken, imageName); return recv_createImage(); } public void send_createImage(java.lang.String userToken, java.lang.String imageName) throws org.apache.thrift.TException { createImage_args args = new createImage_args(); args.setUserToken(userToken); args.setImageName(imageName); sendBase("createImage", args); } public java.lang.String recv_createImage() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException { createImage_result result = new createImage_result(); receiveBase(result, "createImage"); if (result.isSetSuccess()) { return result.success; } if (result.authError != null) { throw result.authError; } if (result.error != null) { throw result.error; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createImage failed: unknown result"); } @Override public void updateImageBase(java.lang.String userToken, java.lang.String imageBaseId, ImageBaseWrite image) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { send_updateImageBase(userToken, imageBaseId, image); recv_updateImageBase(); } public void send_updateImageBase(java.lang.String userToken, java.lang.String imageBaseId, ImageBaseWrite image) throws org.apache.thrift.TException { updateImageBase_args args = new updateImageBase_args(); args.setUserToken(userToken); args.setImageBaseId(imageBaseId); args.setImage(image); sendBase("updateImageBase", args); } public void recv_updateImageBase() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { updateImageBase_result result = new updateImageBase_result(); receiveBase(result, "updateImageBase"); if (result.authError != null) { throw result.authError; } if (result.notFound != null) { throw result.notFound; } if (result.imgError != null) { throw result.imgError; } return; } @Override public void updateImageVersion(java.lang.String userToken, java.lang.String imageVersionId, ImageVersionWrite image) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { send_updateImageVersion(userToken, imageVersionId, image); recv_updateImageVersion(); } public void send_updateImageVersion(java.lang.String userToken, java.lang.String imageVersionId, ImageVersionWrite image) throws org.apache.thrift.TException { updateImageVersion_args args = new updateImageVersion_args(); args.setUserToken(userToken); args.setImageVersionId(imageVersionId); args.setImage(image); sendBase("updateImageVersion", args); } public void recv_updateImageVersion() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { updateImageVersion_result result = new updateImageVersion_result(); receiveBase(result, "updateImageVersion"); if (result.authError != null) { throw result.authError; } if (result.notFound != null) { throw result.notFound; } if (result.imgError != null) { throw result.imgError; } return; } @Override public void deleteImageVersion(java.lang.String userToken, java.lang.String imageVersionId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { send_deleteImageVersion(userToken, imageVersionId); recv_deleteImageVersion(); } public void send_deleteImageVersion(java.lang.String userToken, java.lang.String imageVersionId) throws org.apache.thrift.TException { deleteImageVersion_args args = new deleteImageVersion_args(); args.setUserToken(userToken); args.setImageVersionId(imageVersionId); sendBase("deleteImageVersion", args); } public void recv_deleteImageVersion() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { deleteImageVersion_result result = new deleteImageVersion_result(); receiveBase(result, "deleteImageVersion"); if (result.authError != null) { throw result.authError; } if (result.notFound != null) { throw result.notFound; } if (result.serverError != null) { throw result.serverError; } return; } @Override public void deleteImageBase(java.lang.String userToken, java.lang.String imageBaseId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { send_deleteImageBase(userToken, imageBaseId); recv_deleteImageBase(); } public void send_deleteImageBase(java.lang.String userToken, java.lang.String imageBaseId) throws org.apache.thrift.TException { deleteImageBase_args args = new deleteImageBase_args(); args.setUserToken(userToken); args.setImageBaseId(imageBaseId); sendBase("deleteImageBase", args); } public void recv_deleteImageBase() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { deleteImageBase_result result = new deleteImageBase_result(); receiveBase(result, "deleteImageBase"); if (result.authError != null) { throw result.authError; } if (result.notFound != null) { throw result.notFound; } if (result.serverError != null) { throw result.serverError; } return; } @Override public void writeImagePermissions(java.lang.String userToken, java.lang.String imageBaseId, java.util.Map permissions) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { send_writeImagePermissions(userToken, imageBaseId, permissions); recv_writeImagePermissions(); } public void send_writeImagePermissions(java.lang.String userToken, java.lang.String imageBaseId, java.util.Map permissions) throws org.apache.thrift.TException { writeImagePermissions_args args = new writeImagePermissions_args(); args.setUserToken(userToken); args.setImageBaseId(imageBaseId); args.setPermissions(permissions); sendBase("writeImagePermissions", args); } public void recv_writeImagePermissions() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { writeImagePermissions_result result = new writeImagePermissions_result(); receiveBase(result, "writeImagePermissions"); if (result.authError != null) { throw result.authError; } if (result.notFound != null) { throw result.notFound; } if (result.serverError != null) { throw result.serverError; } return; } @Override public java.util.Map getImagePermissions(java.lang.String userToken, java.lang.String imageBaseId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { send_getImagePermissions(userToken, imageBaseId); return recv_getImagePermissions(); } public void send_getImagePermissions(java.lang.String userToken, java.lang.String imageBaseId) throws org.apache.thrift.TException { getImagePermissions_args args = new getImagePermissions_args(); args.setUserToken(userToken); args.setImageBaseId(imageBaseId); sendBase("getImagePermissions", args); } public java.util.Map recv_getImagePermissions() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { getImagePermissions_result result = new getImagePermissions_result(); receiveBase(result, "getImagePermissions"); if (result.isSetSuccess()) { return result.success; } if (result.authError != null) { throw result.authError; } if (result.notFound != null) { throw result.notFound; } if (result.serverError != null) { throw result.serverError; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getImagePermissions failed: unknown result"); } @Override public void setImageOwner(java.lang.String userToken, java.lang.String imageBaseId, java.lang.String newOwnerId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { send_setImageOwner(userToken, imageBaseId, newOwnerId); recv_setImageOwner(); } public void send_setImageOwner(java.lang.String userToken, java.lang.String imageBaseId, java.lang.String newOwnerId) throws org.apache.thrift.TException { setImageOwner_args args = new setImageOwner_args(); args.setUserToken(userToken); args.setImageBaseId(imageBaseId); args.setNewOwnerId(newOwnerId); sendBase("setImageOwner", args); } public void recv_setImageOwner() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { setImageOwner_result result = new setImageOwner_result(); receiveBase(result, "setImageOwner"); if (result.authError != null) { throw result.authError; } if (result.notFound != null) { throw result.notFound; } if (result.serverError != null) { throw result.serverError; } return; } @Override public void setImageVersionExpiry(java.lang.String userToken, java.lang.String imageBaseId, long expireTime) throws TAuthorizationException, TNotFoundException, TInvocationException, TInvalidDateParam, org.apache.thrift.TException { send_setImageVersionExpiry(userToken, imageBaseId, expireTime); recv_setImageVersionExpiry(); } public void send_setImageVersionExpiry(java.lang.String userToken, java.lang.String imageBaseId, long expireTime) throws org.apache.thrift.TException { setImageVersionExpiry_args args = new setImageVersionExpiry_args(); args.setUserToken(userToken); args.setImageBaseId(imageBaseId); args.setExpireTime(expireTime); sendBase("setImageVersionExpiry", args); } public void recv_setImageVersionExpiry() throws TAuthorizationException, TNotFoundException, TInvocationException, TInvalidDateParam, org.apache.thrift.TException { setImageVersionExpiry_result result = new setImageVersionExpiry_result(); receiveBase(result, "setImageVersionExpiry"); if (result.authError != null) { throw result.authError; } if (result.notFound != null) { throw result.notFound; } if (result.serverError != null) { throw result.serverError; } if (result.dateError != null) { throw result.dateError; } return; } @Override public java.nio.ByteBuffer getImageVersionVirtConfig(java.lang.String userToken, java.lang.String imageVersionId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { send_getImageVersionVirtConfig(userToken, imageVersionId); return recv_getImageVersionVirtConfig(); } public void send_getImageVersionVirtConfig(java.lang.String userToken, java.lang.String imageVersionId) throws org.apache.thrift.TException { getImageVersionVirtConfig_args args = new getImageVersionVirtConfig_args(); args.setUserToken(userToken); args.setImageVersionId(imageVersionId); sendBase("getImageVersionVirtConfig", args); } public java.nio.ByteBuffer recv_getImageVersionVirtConfig() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { getImageVersionVirtConfig_result result = new getImageVersionVirtConfig_result(); receiveBase(result, "getImageVersionVirtConfig"); if (result.isSetSuccess()) { return result.success; } if (result.authError != null) { throw result.authError; } if (result.notFound != null) { throw result.notFound; } if (result.serverError != null) { throw result.serverError; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getImageVersionVirtConfig failed: unknown result"); } @Override public void setImageVersionVirtConfig(java.lang.String userToken, java.lang.String imageVersionId, java.nio.ByteBuffer meta) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { send_setImageVersionVirtConfig(userToken, imageVersionId, meta); recv_setImageVersionVirtConfig(); } public void send_setImageVersionVirtConfig(java.lang.String userToken, java.lang.String imageVersionId, java.nio.ByteBuffer meta) throws org.apache.thrift.TException { setImageVersionVirtConfig_args args = new setImageVersionVirtConfig_args(); args.setUserToken(userToken); args.setImageVersionId(imageVersionId); args.setMeta(meta); sendBase("setImageVersionVirtConfig", args); } public void recv_setImageVersionVirtConfig() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { setImageVersionVirtConfig_result result = new setImageVersionVirtConfig_result(); receiveBase(result, "setImageVersionVirtConfig"); if (result.authError != null) { throw result.authError; } if (result.notFound != null) { throw result.notFound; } if (result.serverError != null) { throw result.serverError; } return; } @Override public java.lang.String requestImageReplication(java.lang.String userToken, java.lang.String imageVersionId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { send_requestImageReplication(userToken, imageVersionId); return recv_requestImageReplication(); } public void send_requestImageReplication(java.lang.String userToken, java.lang.String imageVersionId) throws org.apache.thrift.TException { requestImageReplication_args args = new requestImageReplication_args(); args.setUserToken(userToken); args.setImageVersionId(imageVersionId); sendBase("requestImageReplication", args); } public java.lang.String recv_requestImageReplication() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { requestImageReplication_result result = new requestImageReplication_result(); receiveBase(result, "requestImageReplication"); if (result.isSetSuccess()) { return result.success; } if (result.authError != null) { throw result.authError; } if (result.notFound != null) { throw result.notFound; } if (result.serverError != null) { throw result.serverError; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "requestImageReplication failed: unknown result"); } @Override public java.lang.String publishImageVersion(java.lang.String userToken, java.lang.String imageVersionId) throws TAuthorizationException, TNotFoundException, TInvocationException, TTransferRejectedException, org.apache.thrift.TException { send_publishImageVersion(userToken, imageVersionId); return recv_publishImageVersion(); } public void send_publishImageVersion(java.lang.String userToken, java.lang.String imageVersionId) throws org.apache.thrift.TException { publishImageVersion_args args = new publishImageVersion_args(); args.setUserToken(userToken); args.setImageVersionId(imageVersionId); sendBase("publishImageVersion", args); } public java.lang.String recv_publishImageVersion() throws TAuthorizationException, TNotFoundException, TInvocationException, TTransferRejectedException, org.apache.thrift.TException { publishImageVersion_result result = new publishImageVersion_result(); receiveBase(result, "publishImageVersion"); if (result.isSetSuccess()) { return result.success; } if (result.authError != null) { throw result.authError; } if (result.notFound != null) { throw result.notFound; } if (result.serverError != null) { throw result.serverError; } if (result.tre != null) { throw result.tre; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "publishImageVersion failed: unknown result"); } @Override public java.lang.String createLecture(java.lang.String userToken, LectureWrite lecture) throws TAuthorizationException, TInvocationException, TInvalidDateParam, TNotFoundException, org.apache.thrift.TException { send_createLecture(userToken, lecture); return recv_createLecture(); } public void send_createLecture(java.lang.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 java.lang.String recv_createLecture() throws TAuthorizationException, TInvocationException, TInvalidDateParam, TNotFoundException, org.apache.thrift.TException { createLecture_result result = new createLecture_result(); receiveBase(result, "createLecture"); if (result.isSetSuccess()) { return result.success; } if (result.authError != null) { throw result.authError; } if (result.serverError != null) { throw result.serverError; } if (result.dateError != null) { throw result.dateError; } if (result.notFound != null) { throw result.notFound; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createLecture failed: unknown result"); } @Override public void updateLecture(java.lang.String userToken, java.lang.String lectureId, LectureWrite lecture) throws TAuthorizationException, TNotFoundException, TInvocationException, TInvalidDateParam, org.apache.thrift.TException { send_updateLecture(userToken, lectureId, lecture); recv_updateLecture(); } public void send_updateLecture(java.lang.String userToken, java.lang.String lectureId, LectureWrite lecture) throws org.apache.thrift.TException { updateLecture_args args = new updateLecture_args(); args.setUserToken(userToken); args.setLectureId(lectureId); args.setLecture(lecture); sendBase("updateLecture", args); } public void recv_updateLecture() throws TAuthorizationException, TNotFoundException, TInvocationException, TInvalidDateParam, org.apache.thrift.TException { updateLecture_result result = new updateLecture_result(); receiveBase(result, "updateLecture"); if (result.authError != null) { throw result.authError; } if (result.notFound != null) { throw result.notFound; } if (result.serverError != null) { throw result.serverError; } if (result.dateError != null) { throw result.dateError; } return; } @Override public java.util.List getLectureList(java.lang.String userToken, int page) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException { send_getLectureList(userToken, page); return recv_getLectureList(); } public void send_getLectureList(java.lang.String userToken, int page) throws org.apache.thrift.TException { getLectureList_args args = new getLectureList_args(); args.setUserToken(userToken); args.setPage(page); sendBase("getLectureList", args); } public java.util.List recv_getLectureList() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException { getLectureList_result result = new getLectureList_result(); receiveBase(result, "getLectureList"); if (result.isSetSuccess()) { return result.success; } if (result.authError != null) { throw result.authError; } if (result.serverError != null) { throw result.serverError; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLectureList failed: unknown result"); } @Override public LectureRead getLectureDetails(java.lang.String userToken, java.lang.String lectureId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { send_getLectureDetails(userToken, lectureId); return recv_getLectureDetails(); } public void send_getLectureDetails(java.lang.String userToken, java.lang.String lectureId) throws org.apache.thrift.TException { getLectureDetails_args args = new getLectureDetails_args(); args.setUserToken(userToken); args.setLectureId(lectureId); sendBase("getLectureDetails", args); } public LectureRead recv_getLectureDetails() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { getLectureDetails_result result = new getLectureDetails_result(); receiveBase(result, "getLectureDetails"); if (result.isSetSuccess()) { return result.success; } if (result.authError != null) { throw result.authError; } if (result.notFound != null) { throw result.notFound; } if (result.serverError != null) { throw result.serverError; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLectureDetails failed: unknown result"); } @Override public void deleteLecture(java.lang.String userToken, java.lang.String lectureId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { send_deleteLecture(userToken, lectureId); recv_deleteLecture(); } public void send_deleteLecture(java.lang.String userToken, java.lang.String lectureId) throws org.apache.thrift.TException { deleteLecture_args args = new deleteLecture_args(); args.setUserToken(userToken); args.setLectureId(lectureId); sendBase("deleteLecture", args); } public void recv_deleteLecture() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { deleteLecture_result result = new deleteLecture_result(); receiveBase(result, "deleteLecture"); if (result.authError != null) { throw result.authError; } if (result.notFound != null) { throw result.notFound; } if (result.serverError != null) { throw result.serverError; } return; } @Override public void writeLecturePermissions(java.lang.String userToken, java.lang.String lectureId, java.util.Map permissions) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { send_writeLecturePermissions(userToken, lectureId, permissions); recv_writeLecturePermissions(); } public void send_writeLecturePermissions(java.lang.String userToken, java.lang.String lectureId, java.util.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 void recv_writeLecturePermissions() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { writeLecturePermissions_result result = new writeLecturePermissions_result(); receiveBase(result, "writeLecturePermissions"); if (result.authError != null) { throw result.authError; } if (result.notFound != null) { throw result.notFound; } if (result.serverError != null) { throw result.serverError; } return; } @Override public java.util.Map getLecturePermissions(java.lang.String userToken, java.lang.String lectureId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { send_getLecturePermissions(userToken, lectureId); return recv_getLecturePermissions(); } public void send_getLecturePermissions(java.lang.String userToken, java.lang.String lectureId) throws org.apache.thrift.TException { getLecturePermissions_args args = new getLecturePermissions_args(); args.setUserToken(userToken); args.setLectureId(lectureId); sendBase("getLecturePermissions", args); } public java.util.Map recv_getLecturePermissions() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { getLecturePermissions_result result = new getLecturePermissions_result(); receiveBase(result, "getLecturePermissions"); if (result.isSetSuccess()) { return result.success; } if (result.authError != null) { throw result.authError; } if (result.notFound != null) { throw result.notFound; } if (result.serverError != null) { throw result.serverError; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLecturePermissions failed: unknown result"); } @Override public void setLectureOwner(java.lang.String userToken, java.lang.String lectureId, java.lang.String newOwnerId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { send_setLectureOwner(userToken, lectureId, newOwnerId); recv_setLectureOwner(); } public void send_setLectureOwner(java.lang.String userToken, java.lang.String lectureId, java.lang.String newOwnerId) throws org.apache.thrift.TException { setLectureOwner_args args = new setLectureOwner_args(); args.setUserToken(userToken); args.setLectureId(lectureId); args.setNewOwnerId(newOwnerId); sendBase("setLectureOwner", args); } public void recv_setLectureOwner() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { setLectureOwner_result result = new setLectureOwner_result(); receiveBase(result, "setLectureOwner"); if (result.authError != null) { throw result.authError; } if (result.notFound != null) { throw result.notFound; } if (result.serverError != null) { throw result.serverError; } return; } @Override public PredefinedData getPredefinedData(java.lang.String userToken) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException { send_getPredefinedData(userToken); return recv_getPredefinedData(); } public void send_getPredefinedData(java.lang.String userToken) throws org.apache.thrift.TException { getPredefinedData_args args = new getPredefinedData_args(); args.setUserToken(userToken); sendBase("getPredefinedData", args); } public PredefinedData recv_getPredefinedData() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException { getPredefinedData_result result = new getPredefinedData_result(); receiveBase(result, "getPredefinedData"); if (result.isSetSuccess()) { return result.success; } if (result.authError != null) { throw result.authError; } if (result.serverError != null) { throw result.serverError; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPredefinedData failed: unknown result"); } } public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { public static class Factory implements org.apache.thrift.async.TAsyncClientFactory { 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; } @Override 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); } @Override public void getVersion(long clientVersion, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getVersion_call method_call = new getVersion_call(clientVersion, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getVersion_call extends org.apache.thrift.async.TAsyncMethodCall { private long clientVersion; public getVersion_call(long clientVersion, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.clientVersion = clientVersion; } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getVersion", org.apache.thrift.protocol.TMessageType.CALL, 0)); getVersion_args args = new getVersion_args(); args.setClientVersion(clientVersion); args.write(prot); prot.writeMessageEnd(); } @Override public java.lang.Long getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.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(); } } @Override public void getSupportedFeatures(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getSupportedFeatures_call method_call = new getSupportedFeatures_call(resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getSupportedFeatures_call extends org.apache.thrift.async.TAsyncMethodCall { public getSupportedFeatures_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSupportedFeatures", org.apache.thrift.protocol.TMessageType.CALL, 0)); getSupportedFeatures_args args = new getSupportedFeatures_args(); args.write(prot); prot.writeMessageEnd(); } @Override public java.lang.String getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_getSupportedFeatures(); } } @Override public void getConfiguration(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getConfiguration_call method_call = new getConfiguration_call(resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getConfiguration_call extends org.apache.thrift.async.TAsyncMethodCall { public getConfiguration_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getConfiguration", org.apache.thrift.protocol.TMessageType.CALL, 0)); getConfiguration_args args = new getConfiguration_args(); args.write(prot); prot.writeMessageEnd(); } @Override public SatelliteConfig getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_getConfiguration(); } } @Override public void requestImageVersionUpload(java.lang.String userToken, java.lang.String imageBaseId, long fileSize, java.util.List blockHashes, java.nio.ByteBuffer machineDescription, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); requestImageVersionUpload_call method_call = new requestImageVersionUpload_call(userToken, imageBaseId, fileSize, blockHashes, machineDescription, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class requestImageVersionUpload_call extends org.apache.thrift.async.TAsyncMethodCall { private java.lang.String userToken; private java.lang.String imageBaseId; private long fileSize; private java.util.List blockHashes; private java.nio.ByteBuffer machineDescription; public requestImageVersionUpload_call(java.lang.String userToken, java.lang.String imageBaseId, long fileSize, java.util.List blockHashes, java.nio.ByteBuffer machineDescription, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.userToken = userToken; this.imageBaseId = imageBaseId; this.fileSize = fileSize; this.blockHashes = blockHashes; this.machineDescription = machineDescription; } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("requestImageVersionUpload", org.apache.thrift.protocol.TMessageType.CALL, 0)); requestImageVersionUpload_args args = new requestImageVersionUpload_args(); args.setUserToken(userToken); args.setImageBaseId(imageBaseId); args.setFileSize(fileSize); args.setBlockHashes(blockHashes); args.setMachineDescription(machineDescription); args.write(prot); prot.writeMessageEnd(); } @Override public TransferInformation getResult() throws TTransferRejectedException, TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.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(); } } @Override public void updateBlockHashes(java.lang.String uploadToken, java.util.List blockHashes, java.lang.String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); updateBlockHashes_call method_call = new updateBlockHashes_call(uploadToken, blockHashes, userToken, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class updateBlockHashes_call extends org.apache.thrift.async.TAsyncMethodCall { private java.lang.String uploadToken; private java.util.List blockHashes; private java.lang.String userToken; public updateBlockHashes_call(java.lang.String uploadToken, java.util.List blockHashes, java.lang.String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.uploadToken = uploadToken; this.blockHashes = blockHashes; this.userToken = userToken; } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateBlockHashes", org.apache.thrift.protocol.TMessageType.CALL, 0)); updateBlockHashes_args args = new updateBlockHashes_args(); args.setUploadToken(uploadToken); args.setBlockHashes(blockHashes); args.setUserToken(userToken); args.write(prot); prot.writeMessageEnd(); } @Override public Void getResult() throws TInvalidTokenException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_updateBlockHashes(); return null; } } @Override public void setUploadOptions(java.lang.String userToken, java.lang.String uploadToken, UploadOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); setUploadOptions_call method_call = new setUploadOptions_call(userToken, uploadToken, options, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class setUploadOptions_call extends org.apache.thrift.async.TAsyncMethodCall { private java.lang.String userToken; private java.lang.String uploadToken; private UploadOptions options; public setUploadOptions_call(java.lang.String userToken, java.lang.String uploadToken, UploadOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.userToken = userToken; this.uploadToken = uploadToken; this.options = options; } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setUploadOptions", org.apache.thrift.protocol.TMessageType.CALL, 0)); setUploadOptions_args args = new setUploadOptions_args(); args.setUserToken(userToken); args.setUploadToken(uploadToken); args.setOptions(options); args.write(prot); prot.writeMessageEnd(); } @Override public UploadOptions getResult() throws TAuthorizationException, TInvalidTokenException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_setUploadOptions(); } } @Override public void cancelUpload(java.lang.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 java.lang.String uploadToken; public cancelUpload_call(java.lang.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; } @Override 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(); } @Override public Void getResult() throws TInvalidTokenException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.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(); return null; } } @Override public void queryUploadStatus(java.lang.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 java.lang.String uploadToken; public queryUploadStatus_call(java.lang.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; } @Override 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(); } @Override public TransferStatus getResult() throws TInvalidTokenException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.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(); } } @Override public void requestDownload(java.lang.String userToken, java.lang.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 java.lang.String userToken; private java.lang.String imageVersionId; public requestDownload_call(java.lang.String userToken, java.lang.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; } @Override 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(); } @Override public TransferInformation getResult() throws TTransferRejectedException, TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.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(); } } @Override public void cancelDownload(java.lang.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 java.lang.String downloadToken; public cancelDownload_call(java.lang.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; } @Override 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(); } @Override public Void getResult() throws TInvalidTokenException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.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(); return null; } } @Override public void isAuthenticated(java.lang.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 java.lang.String userToken; public isAuthenticated_call(java.lang.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; } @Override 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(); } @Override public Void getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_isAuthenticated(); return null; } } @Override public void whoami(java.lang.String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); whoami_call method_call = new whoami_call(userToken, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class whoami_call extends org.apache.thrift.async.TAsyncMethodCall { private java.lang.String userToken; public whoami_call(java.lang.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; } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("whoami", org.apache.thrift.protocol.TMessageType.CALL, 0)); whoami_args args = new whoami_args(); args.setUserToken(userToken); args.write(prot); prot.writeMessageEnd(); } @Override public WhoamiInfo getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_whoami(); } } @Override public void invalidateSession(java.lang.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 java.lang.String userToken; public invalidateSession_call(java.lang.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; } @Override 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(); } @Override public Void getResult() throws TInvalidTokenException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.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(); return null; } } @Override public void getUserList(java.lang.String userToken, int page, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException { checkReady(); getUserList_call method_call = new getUserList_call(userToken, page, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getUserList_call extends org.apache.thrift.async.TAsyncMethodCall> { private java.lang.String userToken; private int page; public getUserList_call(java.lang.String userToken, int page, org.apache.thrift.async.AsyncMethodCallback> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.userToken = userToken; this.page = page; } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUserList", org.apache.thrift.protocol.TMessageType.CALL, 0)); getUserList_args args = new getUserList_args(); args.setUserToken(userToken); args.setPage(page); args.write(prot); prot.writeMessageEnd(); } @Override public java.util.List getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_getUserList(); } } @Override public void getUserConfig(java.lang.String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getUserConfig_call method_call = new getUserConfig_call(userToken, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getUserConfig_call extends org.apache.thrift.async.TAsyncMethodCall { private java.lang.String userToken; public getUserConfig_call(java.lang.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; } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUserConfig", org.apache.thrift.protocol.TMessageType.CALL, 0)); getUserConfig_args args = new getUserConfig_args(); args.setUserToken(userToken); args.write(prot); prot.writeMessageEnd(); } @Override public SatelliteUserConfig getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_getUserConfig(); } } @Override public void setUserConfig(java.lang.String userToken, SatelliteUserConfig config, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); setUserConfig_call method_call = new setUserConfig_call(userToken, config, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class setUserConfig_call extends org.apache.thrift.async.TAsyncMethodCall { private java.lang.String userToken; private SatelliteUserConfig config; public setUserConfig_call(java.lang.String userToken, SatelliteUserConfig config, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.userToken = userToken; this.config = config; } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setUserConfig", org.apache.thrift.protocol.TMessageType.CALL, 0)); setUserConfig_args args = new setUserConfig_args(); args.setUserToken(userToken); args.setConfig(config); args.write(prot); prot.writeMessageEnd(); } @Override public Void getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_setUserConfig(); return null; } } @Override 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); } @Override 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(); } @Override public java.util.List getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.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(); } } @Override 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); } @Override 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(); } @Override public java.util.List getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.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(); } } @Override 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); } @Override 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(); } @Override public java.util.List getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.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(); } } @Override public void getLocations(org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException { checkReady(); getLocations_call method_call = new getLocations_call(resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getLocations_call extends org.apache.thrift.async.TAsyncMethodCall> { public getLocations_call(org.apache.thrift.async.AsyncMethodCallback> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getLocations", org.apache.thrift.protocol.TMessageType.CALL, 0)); getLocations_args args = new getLocations_args(); args.write(prot); prot.writeMessageEnd(); } @Override public java.util.List getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_getLocations(); } } @Override public void getStatus(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getStatus_call method_call = new getStatus_call(resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getStatus_call extends org.apache.thrift.async.TAsyncMethodCall { public getStatus_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getStatus", org.apache.thrift.protocol.TMessageType.CALL, 0)); getStatus_args args = new getStatus_args(); args.write(prot); prot.writeMessageEnd(); } @Override public SatelliteStatus getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_getStatus(); } } @Override public void getImageList(java.lang.String userToken, java.util.List tagSearch, int page, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException { checkReady(); getImageList_call method_call = new getImageList_call(userToken, tagSearch, page, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getImageList_call extends org.apache.thrift.async.TAsyncMethodCall> { private java.lang.String userToken; private java.util.List tagSearch; private int page; public getImageList_call(java.lang.String userToken, java.util.List tagSearch, int page, org.apache.thrift.async.AsyncMethodCallback> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.userToken = userToken; this.tagSearch = tagSearch; this.page = page; } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getImageList", org.apache.thrift.protocol.TMessageType.CALL, 0)); getImageList_args args = new getImageList_args(); args.setUserToken(userToken); args.setTagSearch(tagSearch); args.setPage(page); args.write(prot); prot.writeMessageEnd(); } @Override public java.util.List getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.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(); } } @Override public void getImageDetails(java.lang.String userToken, java.lang.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 java.lang.String userToken; private java.lang.String imageBaseId; public getImageDetails_call(java.lang.String userToken, java.lang.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; } @Override 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(); } @Override public ImageDetailsRead getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.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(); } } @Override public void createImage(java.lang.String userToken, java.lang.String imageName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); createImage_call method_call = new createImage_call(userToken, imageName, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class createImage_call extends org.apache.thrift.async.TAsyncMethodCall { private java.lang.String userToken; private java.lang.String imageName; public createImage_call(java.lang.String userToken, java.lang.String imageName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.userToken = userToken; this.imageName = imageName; } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createImage", org.apache.thrift.protocol.TMessageType.CALL, 0)); createImage_args args = new createImage_args(); args.setUserToken(userToken); args.setImageName(imageName); args.write(prot); prot.writeMessageEnd(); } @Override public java.lang.String getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_createImage(); } } @Override public void updateImageBase(java.lang.String userToken, java.lang.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 java.lang.String userToken; private java.lang.String imageBaseId; private ImageBaseWrite image; public updateImageBase_call(java.lang.String userToken, java.lang.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; } @Override 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(); } @Override public Void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_updateImageBase(); return null; } } @Override public void updateImageVersion(java.lang.String userToken, java.lang.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 java.lang.String userToken; private java.lang.String imageVersionId; private ImageVersionWrite image; public updateImageVersion_call(java.lang.String userToken, java.lang.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; } @Override 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(); } @Override public Void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_updateImageVersion(); return null; } } @Override public void deleteImageVersion(java.lang.String userToken, java.lang.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 java.lang.String userToken; private java.lang.String imageVersionId; public deleteImageVersion_call(java.lang.String userToken, java.lang.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; } @Override 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(); } @Override public Void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_deleteImageVersion(); return null; } } @Override public void deleteImageBase(java.lang.String userToken, java.lang.String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); deleteImageBase_call method_call = new deleteImageBase_call(userToken, imageBaseId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class deleteImageBase_call extends org.apache.thrift.async.TAsyncMethodCall { private java.lang.String userToken; private java.lang.String imageBaseId; public deleteImageBase_call(java.lang.String userToken, java.lang.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; } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteImageBase", org.apache.thrift.protocol.TMessageType.CALL, 0)); deleteImageBase_args args = new deleteImageBase_args(); args.setUserToken(userToken); args.setImageBaseId(imageBaseId); args.write(prot); prot.writeMessageEnd(); } @Override public Void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_deleteImageBase(); return null; } } @Override public void writeImagePermissions(java.lang.String userToken, java.lang.String imageBaseId, java.util.Map permissions, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); writeImagePermissions_call method_call = new writeImagePermissions_call(userToken, imageBaseId, permissions, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class writeImagePermissions_call extends org.apache.thrift.async.TAsyncMethodCall { private java.lang.String userToken; private java.lang.String imageBaseId; private java.util.Map permissions; public writeImagePermissions_call(java.lang.String userToken, java.lang.String imageBaseId, java.util.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.imageBaseId = imageBaseId; this.permissions = permissions; } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("writeImagePermissions", org.apache.thrift.protocol.TMessageType.CALL, 0)); writeImagePermissions_args args = new writeImagePermissions_args(); args.setUserToken(userToken); args.setImageBaseId(imageBaseId); args.setPermissions(permissions); args.write(prot); prot.writeMessageEnd(); } @Override public Void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_writeImagePermissions(); return null; } } @Override public void getImagePermissions(java.lang.String userToken, java.lang.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 java.lang.String userToken; private java.lang.String imageBaseId; public getImagePermissions_call(java.lang.String userToken, java.lang.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; } @Override 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(); } @Override public java.util.Map getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.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(); } } @Override public void setImageOwner(java.lang.String userToken, java.lang.String imageBaseId, java.lang.String newOwnerId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); setImageOwner_call method_call = new setImageOwner_call(userToken, imageBaseId, newOwnerId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class setImageOwner_call extends org.apache.thrift.async.TAsyncMethodCall { private java.lang.String userToken; private java.lang.String imageBaseId; private java.lang.String newOwnerId; public setImageOwner_call(java.lang.String userToken, java.lang.String imageBaseId, java.lang.String newOwnerId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.userToken = userToken; this.imageBaseId = imageBaseId; this.newOwnerId = newOwnerId; } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setImageOwner", org.apache.thrift.protocol.TMessageType.CALL, 0)); setImageOwner_args args = new setImageOwner_args(); args.setUserToken(userToken); args.setImageBaseId(imageBaseId); args.setNewOwnerId(newOwnerId); args.write(prot); prot.writeMessageEnd(); } @Override public Void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_setImageOwner(); return null; } } @Override public void setImageVersionExpiry(java.lang.String userToken, java.lang.String imageBaseId, long expireTime, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); setImageVersionExpiry_call method_call = new setImageVersionExpiry_call(userToken, imageBaseId, expireTime, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class setImageVersionExpiry_call extends org.apache.thrift.async.TAsyncMethodCall { private java.lang.String userToken; private java.lang.String imageBaseId; private long expireTime; public setImageVersionExpiry_call(java.lang.String userToken, java.lang.String imageBaseId, long expireTime, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.userToken = userToken; this.imageBaseId = imageBaseId; this.expireTime = expireTime; } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setImageVersionExpiry", org.apache.thrift.protocol.TMessageType.CALL, 0)); setImageVersionExpiry_args args = new setImageVersionExpiry_args(); args.setUserToken(userToken); args.setImageBaseId(imageBaseId); args.setExpireTime(expireTime); args.write(prot); prot.writeMessageEnd(); } @Override public Void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, TInvalidDateParam, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_setImageVersionExpiry(); return null; } } @Override public void getImageVersionVirtConfig(java.lang.String userToken, java.lang.String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getImageVersionVirtConfig_call method_call = new getImageVersionVirtConfig_call(userToken, imageVersionId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getImageVersionVirtConfig_call extends org.apache.thrift.async.TAsyncMethodCall { private java.lang.String userToken; private java.lang.String imageVersionId; public getImageVersionVirtConfig_call(java.lang.String userToken, java.lang.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; } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getImageVersionVirtConfig", org.apache.thrift.protocol.TMessageType.CALL, 0)); getImageVersionVirtConfig_args args = new getImageVersionVirtConfig_args(); args.setUserToken(userToken); args.setImageVersionId(imageVersionId); args.write(prot); prot.writeMessageEnd(); } @Override public java.nio.ByteBuffer getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_getImageVersionVirtConfig(); } } @Override public void setImageVersionVirtConfig(java.lang.String userToken, java.lang.String imageVersionId, java.nio.ByteBuffer meta, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); setImageVersionVirtConfig_call method_call = new setImageVersionVirtConfig_call(userToken, imageVersionId, meta, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class setImageVersionVirtConfig_call extends org.apache.thrift.async.TAsyncMethodCall { private java.lang.String userToken; private java.lang.String imageVersionId; private java.nio.ByteBuffer meta; public setImageVersionVirtConfig_call(java.lang.String userToken, java.lang.String imageVersionId, java.nio.ByteBuffer meta, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.userToken = userToken; this.imageVersionId = imageVersionId; this.meta = meta; } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setImageVersionVirtConfig", org.apache.thrift.protocol.TMessageType.CALL, 0)); setImageVersionVirtConfig_args args = new setImageVersionVirtConfig_args(); args.setUserToken(userToken); args.setImageVersionId(imageVersionId); args.setMeta(meta); args.write(prot); prot.writeMessageEnd(); } @Override public Void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_setImageVersionVirtConfig(); return null; } } @Override public void requestImageReplication(java.lang.String userToken, java.lang.String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); requestImageReplication_call method_call = new requestImageReplication_call(userToken, imageVersionId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class requestImageReplication_call extends org.apache.thrift.async.TAsyncMethodCall { private java.lang.String userToken; private java.lang.String imageVersionId; public requestImageReplication_call(java.lang.String userToken, java.lang.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; } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("requestImageReplication", org.apache.thrift.protocol.TMessageType.CALL, 0)); requestImageReplication_args args = new requestImageReplication_args(); args.setUserToken(userToken); args.setImageVersionId(imageVersionId); args.write(prot); prot.writeMessageEnd(); } @Override public java.lang.String getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_requestImageReplication(); } } @Override public void publishImageVersion(java.lang.String userToken, java.lang.String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); publishImageVersion_call method_call = new publishImageVersion_call(userToken, imageVersionId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class publishImageVersion_call extends org.apache.thrift.async.TAsyncMethodCall { private java.lang.String userToken; private java.lang.String imageVersionId; public publishImageVersion_call(java.lang.String userToken, java.lang.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; } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("publishImageVersion", org.apache.thrift.protocol.TMessageType.CALL, 0)); publishImageVersion_args args = new publishImageVersion_args(); args.setUserToken(userToken); args.setImageVersionId(imageVersionId); args.write(prot); prot.writeMessageEnd(); } @Override public java.lang.String getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, TTransferRejectedException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_publishImageVersion(); } } @Override public void createLecture(java.lang.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 java.lang.String userToken; private LectureWrite lecture; public createLecture_call(java.lang.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; } @Override 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(); } @Override public java.lang.String getResult() throws TAuthorizationException, TInvocationException, TInvalidDateParam, TNotFoundException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.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(); } } @Override public void updateLecture(java.lang.String userToken, java.lang.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 java.lang.String userToken; private java.lang.String lectureId; private LectureWrite lecture; public updateLecture_call(java.lang.String userToken, java.lang.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; } @Override 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(); } @Override public Void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, TInvalidDateParam, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_updateLecture(); return null; } } @Override public void getLectureList(java.lang.String userToken, int page, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException { checkReady(); getLectureList_call method_call = new getLectureList_call(userToken, page, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getLectureList_call extends org.apache.thrift.async.TAsyncMethodCall> { private java.lang.String userToken; private int page; public getLectureList_call(java.lang.String userToken, int page, org.apache.thrift.async.AsyncMethodCallback> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.userToken = userToken; this.page = page; } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getLectureList", org.apache.thrift.protocol.TMessageType.CALL, 0)); getLectureList_args args = new getLectureList_args(); args.setUserToken(userToken); args.setPage(page); args.write(prot); prot.writeMessageEnd(); } @Override public java.util.List getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.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(); } } @Override public void getLectureDetails(java.lang.String userToken, java.lang.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 java.lang.String userToken; private java.lang.String lectureId; public getLectureDetails_call(java.lang.String userToken, java.lang.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; } @Override 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(); } @Override public LectureRead getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.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(); } } @Override public void deleteLecture(java.lang.String userToken, java.lang.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 java.lang.String userToken; private java.lang.String lectureId; public deleteLecture_call(java.lang.String userToken, java.lang.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; } @Override 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(); } @Override public Void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_deleteLecture(); return null; } } @Override public void writeLecturePermissions(java.lang.String userToken, java.lang.String lectureId, java.util.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 java.lang.String userToken; private java.lang.String lectureId; private java.util.Map permissions; public writeLecturePermissions_call(java.lang.String userToken, java.lang.String lectureId, java.util.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; } @Override 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(); } @Override public Void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_writeLecturePermissions(); return null; } } @Override public void getLecturePermissions(java.lang.String userToken, java.lang.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 java.lang.String userToken; private java.lang.String lectureId; public getLecturePermissions_call(java.lang.String userToken, java.lang.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; } @Override 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(); } @Override public java.util.Map getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.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(); } } @Override public void setLectureOwner(java.lang.String userToken, java.lang.String lectureId, java.lang.String newOwnerId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); setLectureOwner_call method_call = new setLectureOwner_call(userToken, lectureId, newOwnerId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class setLectureOwner_call extends org.apache.thrift.async.TAsyncMethodCall { private java.lang.String userToken; private java.lang.String lectureId; private java.lang.String newOwnerId; public setLectureOwner_call(java.lang.String userToken, java.lang.String lectureId, java.lang.String newOwnerId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.userToken = userToken; this.lectureId = lectureId; this.newOwnerId = newOwnerId; } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setLectureOwner", org.apache.thrift.protocol.TMessageType.CALL, 0)); setLectureOwner_args args = new setLectureOwner_args(); args.setUserToken(userToken); args.setLectureId(lectureId); args.setNewOwnerId(newOwnerId); args.write(prot); prot.writeMessageEnd(); } @Override public Void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_setLectureOwner(); return null; } } @Override public void getPredefinedData(java.lang.String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getPredefinedData_call method_call = new getPredefinedData_call(userToken, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getPredefinedData_call extends org.apache.thrift.async.TAsyncMethodCall { private java.lang.String userToken; public getPredefinedData_call(java.lang.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; } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPredefinedData", org.apache.thrift.protocol.TMessageType.CALL, 0)); getPredefinedData_args args = new getPredefinedData_args(); args.setUserToken(userToken); args.write(prot); prot.writeMessageEnd(); } @Override public PredefinedData getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_getPredefinedData(); } } } public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor { private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(Processor.class.getName()); public Processor(I iface) { super(iface, getProcessMap(new java.util.HashMap>())); } protected Processor(I iface, java.util.Map> processMap) { super(iface, getProcessMap(processMap)); } private static java.util.Map> getProcessMap(java.util.Map> processMap) { processMap.put("getVersion", new getVersion()); processMap.put("getSupportedFeatures", new getSupportedFeatures()); processMap.put("getConfiguration", new getConfiguration()); processMap.put("requestImageVersionUpload", new requestImageVersionUpload()); processMap.put("updateBlockHashes", new updateBlockHashes()); processMap.put("setUploadOptions", new setUploadOptions()); processMap.put("cancelUpload", new cancelUpload()); processMap.put("queryUploadStatus", new queryUploadStatus()); processMap.put("requestDownload", new requestDownload()); processMap.put("cancelDownload", new cancelDownload()); processMap.put("isAuthenticated", new isAuthenticated()); processMap.put("whoami", new whoami()); processMap.put("invalidateSession", new invalidateSession()); processMap.put("getUserList", new getUserList()); processMap.put("getUserConfig", new getUserConfig()); processMap.put("setUserConfig", new setUserConfig()); processMap.put("getOperatingSystems", new getOperatingSystems()); processMap.put("getVirtualizers", new getVirtualizers()); processMap.put("getAllOrganizations", new getAllOrganizations()); processMap.put("getLocations", new getLocations()); processMap.put("getStatus", new getStatus()); processMap.put("getImageList", new getImageList()); processMap.put("getImageDetails", new getImageDetails()); processMap.put("createImage", new createImage()); processMap.put("updateImageBase", new updateImageBase()); processMap.put("updateImageVersion", new updateImageVersion()); processMap.put("deleteImageVersion", new deleteImageVersion()); processMap.put("deleteImageBase", new deleteImageBase()); processMap.put("writeImagePermissions", new writeImagePermissions()); processMap.put("getImagePermissions", new getImagePermissions()); processMap.put("setImageOwner", new setImageOwner()); processMap.put("setImageVersionExpiry", new setImageVersionExpiry()); processMap.put("getImageVersionVirtConfig", new getImageVersionVirtConfig()); processMap.put("setImageVersionVirtConfig", new setImageVersionVirtConfig()); processMap.put("requestImageReplication", new requestImageReplication()); processMap.put("publishImageVersion", new publishImageVersion()); processMap.put("createLecture", new createLecture()); processMap.put("updateLecture", new updateLecture()); processMap.put("getLectureList", new getLectureList()); processMap.put("getLectureDetails", new getLectureDetails()); processMap.put("deleteLecture", new deleteLecture()); processMap.put("writeLecturePermissions", new writeLecturePermissions()); processMap.put("getLecturePermissions", new getLecturePermissions()); processMap.put("setLectureOwner", new setLectureOwner()); processMap.put("getPredefinedData", new getPredefinedData()); return processMap; } public static class getVersion extends org.apache.thrift.ProcessFunction { public getVersion() { super("getVersion"); } @Override public getVersion_args getEmptyArgsInstance() { return new getVersion_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public getVersion_result getResult(I iface, getVersion_args args) throws org.apache.thrift.TException { getVersion_result result = new getVersion_result(); result.success = iface.getVersion(args.clientVersion); result.setSuccessIsSet(true); return result; } } public static class getSupportedFeatures extends org.apache.thrift.ProcessFunction { public getSupportedFeatures() { super("getSupportedFeatures"); } @Override public getSupportedFeatures_args getEmptyArgsInstance() { return new getSupportedFeatures_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public getSupportedFeatures_result getResult(I iface, getSupportedFeatures_args args) throws org.apache.thrift.TException { getSupportedFeatures_result result = new getSupportedFeatures_result(); result.success = iface.getSupportedFeatures(); return result; } } public static class getConfiguration extends org.apache.thrift.ProcessFunction { public getConfiguration() { super("getConfiguration"); } @Override public getConfiguration_args getEmptyArgsInstance() { return new getConfiguration_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public getConfiguration_result getResult(I iface, getConfiguration_args args) throws org.apache.thrift.TException { getConfiguration_result result = new getConfiguration_result(); result.success = iface.getConfiguration(); return result; } } public static class requestImageVersionUpload extends org.apache.thrift.ProcessFunction { public requestImageVersionUpload() { super("requestImageVersionUpload"); } @Override public requestImageVersionUpload_args getEmptyArgsInstance() { return new requestImageVersionUpload_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public requestImageVersionUpload_result getResult(I iface, requestImageVersionUpload_args args) throws org.apache.thrift.TException { requestImageVersionUpload_result result = new requestImageVersionUpload_result(); try { result.success = iface.requestImageVersionUpload(args.userToken, args.imageBaseId, args.fileSize, args.blockHashes, args.machineDescription); } catch (TTransferRejectedException rejection) { result.rejection = rejection; } catch (TAuthorizationException authError) { result.authError = authError; } catch (TInvocationException ffff) { result.ffff = ffff; } catch (TNotFoundException sdf) { result.sdf = sdf; } return result; } } public static class updateBlockHashes extends org.apache.thrift.ProcessFunction { public updateBlockHashes() { super("updateBlockHashes"); } @Override public updateBlockHashes_args getEmptyArgsInstance() { return new updateBlockHashes_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public updateBlockHashes_result getResult(I iface, updateBlockHashes_args args) throws org.apache.thrift.TException { updateBlockHashes_result result = new updateBlockHashes_result(); try { iface.updateBlockHashes(args.uploadToken, args.blockHashes, args.userToken); } catch (TInvalidTokenException ex1) { result.ex1 = ex1; } return result; } } public static class setUploadOptions extends org.apache.thrift.ProcessFunction { public setUploadOptions() { super("setUploadOptions"); } @Override public setUploadOptions_args getEmptyArgsInstance() { return new setUploadOptions_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public setUploadOptions_result getResult(I iface, setUploadOptions_args args) throws org.apache.thrift.TException { setUploadOptions_result result = new setUploadOptions_result(); try { result.success = iface.setUploadOptions(args.userToken, args.uploadToken, args.options); } catch (TAuthorizationException frootloops) { result.frootloops = frootloops; } catch (TInvalidTokenException imcyborgbutthatsok) { result.imcyborgbutthatsok = imcyborgbutthatsok; } return result; } } public static class cancelUpload extends org.apache.thrift.ProcessFunction { public cancelUpload() { super("cancelUpload"); } @Override public cancelUpload_args getEmptyArgsInstance() { return new cancelUpload_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public cancelUpload_result getResult(I iface, cancelUpload_args args) throws org.apache.thrift.TException { cancelUpload_result result = new cancelUpload_result(); try { iface.cancelUpload(args.uploadToken); } catch (TInvalidTokenException ex1) { result.ex1 = ex1; } return result; } } public static class queryUploadStatus extends org.apache.thrift.ProcessFunction { public queryUploadStatus() { super("queryUploadStatus"); } @Override public queryUploadStatus_args getEmptyArgsInstance() { return new queryUploadStatus_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override 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"); } @Override public requestDownload_args getEmptyArgsInstance() { return new requestDownload_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public requestDownload_result getResult(I iface, requestDownload_args args) throws org.apache.thrift.TException { requestDownload_result result = new requestDownload_result(); try { result.success = iface.requestDownload(args.userToken, args.imageVersionId); } catch (TTransferRejectedException rejection) { result.rejection = rejection; } catch (TAuthorizationException authError) { result.authError = authError; } catch (TInvocationException ffff) { result.ffff = ffff; } catch (TNotFoundException sdf) { result.sdf = sdf; } return result; } } public static class cancelDownload extends org.apache.thrift.ProcessFunction { public cancelDownload() { super("cancelDownload"); } @Override public cancelDownload_args getEmptyArgsInstance() { return new cancelDownload_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public cancelDownload_result getResult(I iface, cancelDownload_args args) throws org.apache.thrift.TException { cancelDownload_result result = new cancelDownload_result(); try { iface.cancelDownload(args.downloadToken); } catch (TInvalidTokenException ex1) { result.ex1 = ex1; } return result; } } public static class isAuthenticated extends org.apache.thrift.ProcessFunction { public isAuthenticated() { super("isAuthenticated"); } @Override public isAuthenticated_args getEmptyArgsInstance() { return new isAuthenticated_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public isAuthenticated_result getResult(I iface, isAuthenticated_args args) throws org.apache.thrift.TException { isAuthenticated_result result = new isAuthenticated_result(); try { iface.isAuthenticated(args.userToken); } catch (TAuthorizationException authError) { result.authError = authError; } catch (TInvocationException serverError) { result.serverError = serverError; } return result; } } public static class whoami extends org.apache.thrift.ProcessFunction { public whoami() { super("whoami"); } @Override public whoami_args getEmptyArgsInstance() { return new whoami_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public whoami_result getResult(I iface, whoami_args args) throws org.apache.thrift.TException { whoami_result result = new whoami_result(); try { result.success = iface.whoami(args.userToken); } catch (TAuthorizationException authError) { result.authError = authError; } catch (TInvocationException serverError) { result.serverError = serverError; } return result; } } public static class invalidateSession extends org.apache.thrift.ProcessFunction { public invalidateSession() { super("invalidateSession"); } @Override public invalidateSession_args getEmptyArgsInstance() { return new invalidateSession_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public invalidateSession_result getResult(I iface, invalidateSession_args args) throws org.apache.thrift.TException { invalidateSession_result result = new invalidateSession_result(); try { iface.invalidateSession(args.userToken); } catch (TInvalidTokenException ex) { result.ex = ex; } return result; } } public static class getUserList extends org.apache.thrift.ProcessFunction { public getUserList() { super("getUserList"); } @Override public getUserList_args getEmptyArgsInstance() { return new getUserList_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public getUserList_result getResult(I iface, getUserList_args args) throws org.apache.thrift.TException { getUserList_result result = new getUserList_result(); try { result.success = iface.getUserList(args.userToken, args.page); } catch (TAuthorizationException failure) { result.failure = failure; } catch (TInvocationException serverError) { result.serverError = serverError; } return result; } } public static class getUserConfig extends org.apache.thrift.ProcessFunction { public getUserConfig() { super("getUserConfig"); } @Override public getUserConfig_args getEmptyArgsInstance() { return new getUserConfig_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public getUserConfig_result getResult(I iface, getUserConfig_args args) throws org.apache.thrift.TException { getUserConfig_result result = new getUserConfig_result(); try { result.success = iface.getUserConfig(args.userToken); } catch (TAuthorizationException failure) { result.failure = failure; } catch (TInvocationException serverError) { result.serverError = serverError; } return result; } } public static class setUserConfig extends org.apache.thrift.ProcessFunction { public setUserConfig() { super("setUserConfig"); } @Override public setUserConfig_args getEmptyArgsInstance() { return new setUserConfig_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public setUserConfig_result getResult(I iface, setUserConfig_args args) throws org.apache.thrift.TException { setUserConfig_result result = new setUserConfig_result(); try { iface.setUserConfig(args.userToken, args.config); } catch (TAuthorizationException failure) { result.failure = failure; } catch (TInvocationException serverError) { result.serverError = serverError; } return result; } } public static class getOperatingSystems extends org.apache.thrift.ProcessFunction { public getOperatingSystems() { super("getOperatingSystems"); } @Override public getOperatingSystems_args getEmptyArgsInstance() { return new getOperatingSystems_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override 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"); } @Override public getVirtualizers_args getEmptyArgsInstance() { return new getVirtualizers_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override 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"); } @Override public getAllOrganizations_args getEmptyArgsInstance() { return new getAllOrganizations_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public getAllOrganizations_result getResult(I iface, getAllOrganizations_args args) throws org.apache.thrift.TException { getAllOrganizations_result result = new getAllOrganizations_result(); result.success = iface.getAllOrganizations(); return result; } } public static class getLocations extends org.apache.thrift.ProcessFunction { public getLocations() { super("getLocations"); } @Override public getLocations_args getEmptyArgsInstance() { return new getLocations_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public getLocations_result getResult(I iface, getLocations_args args) throws org.apache.thrift.TException { getLocations_result result = new getLocations_result(); result.success = iface.getLocations(); return result; } } public static class getStatus extends org.apache.thrift.ProcessFunction { public getStatus() { super("getStatus"); } @Override public getStatus_args getEmptyArgsInstance() { return new getStatus_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public getStatus_result getResult(I iface, getStatus_args args) throws org.apache.thrift.TException { getStatus_result result = new getStatus_result(); result.success = iface.getStatus(); return result; } } public static class getImageList extends org.apache.thrift.ProcessFunction { public getImageList() { super("getImageList"); } @Override public getImageList_args getEmptyArgsInstance() { return new getImageList_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public getImageList_result getResult(I iface, getImageList_args args) throws org.apache.thrift.TException { getImageList_result result = new getImageList_result(); try { result.success = iface.getImageList(args.userToken, args.tagSearch, args.page); } catch (TAuthorizationException authError) { result.authError = authError; } catch (TInvocationException serverError) { result.serverError = serverError; } return result; } } public static class getImageDetails extends org.apache.thrift.ProcessFunction { public getImageDetails() { super("getImageDetails"); } @Override public getImageDetails_args getEmptyArgsInstance() { return new getImageDetails_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public getImageDetails_result getResult(I iface, getImageDetails_args args) throws org.apache.thrift.TException { getImageDetails_result result = new getImageDetails_result(); try { result.success = iface.getImageDetails(args.userToken, args.imageBaseId); } catch (TAuthorizationException authError) { result.authError = authError; } catch (TNotFoundException notFound) { result.notFound = notFound; } catch (TInvocationException serverError) { result.serverError = serverError; } return result; } } public static class createImage extends org.apache.thrift.ProcessFunction { public createImage() { super("createImage"); } @Override public createImage_args getEmptyArgsInstance() { return new createImage_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public createImage_result getResult(I iface, createImage_args args) throws org.apache.thrift.TException { createImage_result result = new createImage_result(); try { result.success = iface.createImage(args.userToken, args.imageName); } catch (TAuthorizationException authError) { result.authError = authError; } catch (TInvocationException error) { result.error = error; } return result; } } public static class updateImageBase extends org.apache.thrift.ProcessFunction { public updateImageBase() { super("updateImageBase"); } @Override public updateImageBase_args getEmptyArgsInstance() { return new updateImageBase_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public updateImageBase_result getResult(I iface, updateImageBase_args args) throws org.apache.thrift.TException { updateImageBase_result result = new updateImageBase_result(); try { iface.updateImageBase(args.userToken, args.imageBaseId, args.image); } catch (TAuthorizationException authError) { result.authError = authError; } catch (TNotFoundException notFound) { result.notFound = notFound; } catch (TInvocationException imgError) { result.imgError = imgError; } return result; } } public static class updateImageVersion extends org.apache.thrift.ProcessFunction { public updateImageVersion() { super("updateImageVersion"); } @Override public updateImageVersion_args getEmptyArgsInstance() { return new updateImageVersion_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public updateImageVersion_result getResult(I iface, updateImageVersion_args args) throws org.apache.thrift.TException { updateImageVersion_result result = new updateImageVersion_result(); try { iface.updateImageVersion(args.userToken, args.imageVersionId, args.image); } catch (TAuthorizationException authError) { result.authError = authError; } catch (TNotFoundException notFound) { result.notFound = notFound; } catch (TInvocationException imgError) { result.imgError = imgError; } return result; } } public static class deleteImageVersion extends org.apache.thrift.ProcessFunction { public deleteImageVersion() { super("deleteImageVersion"); } @Override public deleteImageVersion_args getEmptyArgsInstance() { return new deleteImageVersion_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public deleteImageVersion_result getResult(I iface, deleteImageVersion_args args) throws org.apache.thrift.TException { deleteImageVersion_result result = new deleteImageVersion_result(); try { iface.deleteImageVersion(args.userToken, args.imageVersionId); } catch (TAuthorizationException authError) { result.authError = authError; } catch (TNotFoundException notFound) { result.notFound = notFound; } catch (TInvocationException serverError) { result.serverError = serverError; } return result; } } public static class deleteImageBase extends org.apache.thrift.ProcessFunction { public deleteImageBase() { super("deleteImageBase"); } @Override public deleteImageBase_args getEmptyArgsInstance() { return new deleteImageBase_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public deleteImageBase_result getResult(I iface, deleteImageBase_args args) throws org.apache.thrift.TException { deleteImageBase_result result = new deleteImageBase_result(); try { iface.deleteImageBase(args.userToken, args.imageBaseId); } catch (TAuthorizationException authError) { result.authError = authError; } catch (TNotFoundException notFound) { result.notFound = notFound; } catch (TInvocationException serverError) { result.serverError = serverError; } return result; } } public static class writeImagePermissions extends org.apache.thrift.ProcessFunction { public writeImagePermissions() { super("writeImagePermissions"); } @Override public writeImagePermissions_args getEmptyArgsInstance() { return new writeImagePermissions_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public writeImagePermissions_result getResult(I iface, writeImagePermissions_args args) throws org.apache.thrift.TException { writeImagePermissions_result result = new writeImagePermissions_result(); try { iface.writeImagePermissions(args.userToken, args.imageBaseId, args.permissions); } catch (TAuthorizationException authError) { result.authError = authError; } catch (TNotFoundException notFound) { result.notFound = notFound; } catch (TInvocationException serverError) { result.serverError = serverError; } return result; } } public static class getImagePermissions extends org.apache.thrift.ProcessFunction { public getImagePermissions() { super("getImagePermissions"); } @Override public getImagePermissions_args getEmptyArgsInstance() { return new getImagePermissions_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public getImagePermissions_result getResult(I iface, getImagePermissions_args args) throws org.apache.thrift.TException { getImagePermissions_result result = new getImagePermissions_result(); try { result.success = iface.getImagePermissions(args.userToken, args.imageBaseId); } catch (TAuthorizationException authError) { result.authError = authError; } catch (TNotFoundException notFound) { result.notFound = notFound; } catch (TInvocationException serverError) { result.serverError = serverError; } return result; } } public static class setImageOwner extends org.apache.thrift.ProcessFunction { public setImageOwner() { super("setImageOwner"); } @Override public setImageOwner_args getEmptyArgsInstance() { return new setImageOwner_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public setImageOwner_result getResult(I iface, setImageOwner_args args) throws org.apache.thrift.TException { setImageOwner_result result = new setImageOwner_result(); try { iface.setImageOwner(args.userToken, args.imageBaseId, args.newOwnerId); } catch (TAuthorizationException authError) { result.authError = authError; } catch (TNotFoundException notFound) { result.notFound = notFound; } catch (TInvocationException serverError) { result.serverError = serverError; } return result; } } public static class setImageVersionExpiry extends org.apache.thrift.ProcessFunction { public setImageVersionExpiry() { super("setImageVersionExpiry"); } @Override public setImageVersionExpiry_args getEmptyArgsInstance() { return new setImageVersionExpiry_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public setImageVersionExpiry_result getResult(I iface, setImageVersionExpiry_args args) throws org.apache.thrift.TException { setImageVersionExpiry_result result = new setImageVersionExpiry_result(); try { iface.setImageVersionExpiry(args.userToken, args.imageBaseId, args.expireTime); } catch (TAuthorizationException authError) { result.authError = authError; } catch (TNotFoundException notFound) { result.notFound = notFound; } catch (TInvocationException serverError) { result.serverError = serverError; } catch (TInvalidDateParam dateError) { result.dateError = dateError; } return result; } } public static class getImageVersionVirtConfig extends org.apache.thrift.ProcessFunction { public getImageVersionVirtConfig() { super("getImageVersionVirtConfig"); } @Override public getImageVersionVirtConfig_args getEmptyArgsInstance() { return new getImageVersionVirtConfig_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public getImageVersionVirtConfig_result getResult(I iface, getImageVersionVirtConfig_args args) throws org.apache.thrift.TException { getImageVersionVirtConfig_result result = new getImageVersionVirtConfig_result(); try { result.success = iface.getImageVersionVirtConfig(args.userToken, args.imageVersionId); } catch (TAuthorizationException authError) { result.authError = authError; } catch (TNotFoundException notFound) { result.notFound = notFound; } catch (TInvocationException serverError) { result.serverError = serverError; } return result; } } public static class setImageVersionVirtConfig extends org.apache.thrift.ProcessFunction { public setImageVersionVirtConfig() { super("setImageVersionVirtConfig"); } @Override public setImageVersionVirtConfig_args getEmptyArgsInstance() { return new setImageVersionVirtConfig_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public setImageVersionVirtConfig_result getResult(I iface, setImageVersionVirtConfig_args args) throws org.apache.thrift.TException { setImageVersionVirtConfig_result result = new setImageVersionVirtConfig_result(); try { iface.setImageVersionVirtConfig(args.userToken, args.imageVersionId, args.meta); } catch (TAuthorizationException authError) { result.authError = authError; } catch (TNotFoundException notFound) { result.notFound = notFound; } catch (TInvocationException serverError) { result.serverError = serverError; } return result; } } public static class requestImageReplication extends org.apache.thrift.ProcessFunction { public requestImageReplication() { super("requestImageReplication"); } @Override public requestImageReplication_args getEmptyArgsInstance() { return new requestImageReplication_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public requestImageReplication_result getResult(I iface, requestImageReplication_args args) throws org.apache.thrift.TException { requestImageReplication_result result = new requestImageReplication_result(); try { result.success = iface.requestImageReplication(args.userToken, args.imageVersionId); } catch (TAuthorizationException authError) { result.authError = authError; } catch (TNotFoundException notFound) { result.notFound = notFound; } catch (TInvocationException serverError) { result.serverError = serverError; } return result; } } public static class publishImageVersion extends org.apache.thrift.ProcessFunction { public publishImageVersion() { super("publishImageVersion"); } @Override public publishImageVersion_args getEmptyArgsInstance() { return new publishImageVersion_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public publishImageVersion_result getResult(I iface, publishImageVersion_args args) throws org.apache.thrift.TException { publishImageVersion_result result = new publishImageVersion_result(); try { result.success = iface.publishImageVersion(args.userToken, args.imageVersionId); } catch (TAuthorizationException authError) { result.authError = authError; } catch (TNotFoundException notFound) { result.notFound = notFound; } catch (TInvocationException serverError) { result.serverError = serverError; } catch (TTransferRejectedException tre) { result.tre = tre; } return result; } } public static class createLecture extends org.apache.thrift.ProcessFunction { public createLecture() { super("createLecture"); } @Override public createLecture_args getEmptyArgsInstance() { return new createLecture_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public createLecture_result getResult(I iface, createLecture_args args) throws org.apache.thrift.TException { createLecture_result result = new createLecture_result(); try { result.success = iface.createLecture(args.userToken, args.lecture); } catch (TAuthorizationException authError) { result.authError = authError; } catch (TInvocationException serverError) { result.serverError = serverError; } catch (TInvalidDateParam dateError) { result.dateError = dateError; } catch (TNotFoundException notFound) { result.notFound = notFound; } return result; } } public static class updateLecture extends org.apache.thrift.ProcessFunction { public updateLecture() { super("updateLecture"); } @Override public updateLecture_args getEmptyArgsInstance() { return new updateLecture_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public updateLecture_result getResult(I iface, updateLecture_args args) throws org.apache.thrift.TException { updateLecture_result result = new updateLecture_result(); try { iface.updateLecture(args.userToken, args.lectureId, args.lecture); } catch (TAuthorizationException authError) { result.authError = authError; } catch (TNotFoundException notFound) { result.notFound = notFound; } catch (TInvocationException serverError) { result.serverError = serverError; } catch (TInvalidDateParam dateError) { result.dateError = dateError; } return result; } } public static class getLectureList extends org.apache.thrift.ProcessFunction { public getLectureList() { super("getLectureList"); } @Override public getLectureList_args getEmptyArgsInstance() { return new getLectureList_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public getLectureList_result getResult(I iface, getLectureList_args args) throws org.apache.thrift.TException { getLectureList_result result = new getLectureList_result(); try { result.success = iface.getLectureList(args.userToken, args.page); } catch (TAuthorizationException authError) { result.authError = authError; } catch (TInvocationException serverError) { result.serverError = serverError; } return result; } } public static class getLectureDetails extends org.apache.thrift.ProcessFunction { public getLectureDetails() { super("getLectureDetails"); } @Override public getLectureDetails_args getEmptyArgsInstance() { return new getLectureDetails_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public getLectureDetails_result getResult(I iface, getLectureDetails_args args) throws org.apache.thrift.TException { getLectureDetails_result result = new getLectureDetails_result(); try { result.success = iface.getLectureDetails(args.userToken, args.lectureId); } catch (TAuthorizationException authError) { result.authError = authError; } catch (TNotFoundException notFound) { result.notFound = notFound; } catch (TInvocationException serverError) { result.serverError = serverError; } return result; } } public static class deleteLecture extends org.apache.thrift.ProcessFunction { public deleteLecture() { super("deleteLecture"); } @Override public deleteLecture_args getEmptyArgsInstance() { return new deleteLecture_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public deleteLecture_result getResult(I iface, deleteLecture_args args) throws org.apache.thrift.TException { deleteLecture_result result = new deleteLecture_result(); try { iface.deleteLecture(args.userToken, args.lectureId); } catch (TAuthorizationException authError) { result.authError = authError; } catch (TNotFoundException notFound) { result.notFound = notFound; } catch (TInvocationException serverError) { result.serverError = serverError; } return result; } } public static class writeLecturePermissions extends org.apache.thrift.ProcessFunction { public writeLecturePermissions() { super("writeLecturePermissions"); } @Override public writeLecturePermissions_args getEmptyArgsInstance() { return new writeLecturePermissions_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public writeLecturePermissions_result getResult(I iface, writeLecturePermissions_args args) throws org.apache.thrift.TException { writeLecturePermissions_result result = new writeLecturePermissions_result(); try { iface.writeLecturePermissions(args.userToken, args.lectureId, args.permissions); } catch (TAuthorizationException authError) { result.authError = authError; } catch (TNotFoundException notFound) { result.notFound = notFound; } catch (TInvocationException serverError) { result.serverError = serverError; } return result; } } public static class getLecturePermissions extends org.apache.thrift.ProcessFunction { public getLecturePermissions() { super("getLecturePermissions"); } @Override public getLecturePermissions_args getEmptyArgsInstance() { return new getLecturePermissions_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public getLecturePermissions_result getResult(I iface, getLecturePermissions_args args) throws org.apache.thrift.TException { getLecturePermissions_result result = new getLecturePermissions_result(); try { result.success = iface.getLecturePermissions(args.userToken, args.lectureId); } catch (TAuthorizationException authError) { result.authError = authError; } catch (TNotFoundException notFound) { result.notFound = notFound; } catch (TInvocationException serverError) { result.serverError = serverError; } return result; } } public static class setLectureOwner extends org.apache.thrift.ProcessFunction { public setLectureOwner() { super("setLectureOwner"); } @Override public setLectureOwner_args getEmptyArgsInstance() { return new setLectureOwner_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public setLectureOwner_result getResult(I iface, setLectureOwner_args args) throws org.apache.thrift.TException { setLectureOwner_result result = new setLectureOwner_result(); try { iface.setLectureOwner(args.userToken, args.lectureId, args.newOwnerId); } catch (TAuthorizationException authError) { result.authError = authError; } catch (TNotFoundException notFound) { result.notFound = notFound; } catch (TInvocationException serverError) { result.serverError = serverError; } return result; } } public static class getPredefinedData extends org.apache.thrift.ProcessFunction { public getPredefinedData() { super("getPredefinedData"); } @Override public getPredefinedData_args getEmptyArgsInstance() { return new getPredefinedData_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public getPredefinedData_result getResult(I iface, getPredefinedData_args args) throws org.apache.thrift.TException { getPredefinedData_result result = new getPredefinedData_result(); try { result.success = iface.getPredefinedData(args.userToken); } catch (TAuthorizationException authError) { result.authError = authError; } catch (TInvocationException serverError) { result.serverError = serverError; } return result; } } } public static class AsyncProcessor extends org.apache.thrift.TBaseAsyncProcessor { private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(AsyncProcessor.class.getName()); public AsyncProcessor(I iface) { super(iface, getProcessMap(new java.util.HashMap>())); } protected AsyncProcessor(I iface, java.util.Map> processMap) { super(iface, getProcessMap(processMap)); } private static java.util.Map> getProcessMap(java.util.Map> processMap) { processMap.put("getVersion", new getVersion()); processMap.put("getSupportedFeatures", new getSupportedFeatures()); processMap.put("getConfiguration", new getConfiguration()); processMap.put("requestImageVersionUpload", new requestImageVersionUpload()); processMap.put("updateBlockHashes", new updateBlockHashes()); processMap.put("setUploadOptions", new setUploadOptions()); processMap.put("cancelUpload", new cancelUpload()); processMap.put("queryUploadStatus", new queryUploadStatus()); processMap.put("requestDownload", new requestDownload()); processMap.put("cancelDownload", new cancelDownload()); processMap.put("isAuthenticated", new isAuthenticated()); processMap.put("whoami", new whoami()); processMap.put("invalidateSession", new invalidateSession()); processMap.put("getUserList", new getUserList()); processMap.put("getUserConfig", new getUserConfig()); processMap.put("setUserConfig", new setUserConfig()); processMap.put("getOperatingSystems", new getOperatingSystems()); processMap.put("getVirtualizers", new getVirtualizers()); processMap.put("getAllOrganizations", new getAllOrganizations()); processMap.put("getLocations", new getLocations()); processMap.put("getStatus", new getStatus()); processMap.put("getImageList", new getImageList()); processMap.put("getImageDetails", new getImageDetails()); processMap.put("createImage", new createImage()); processMap.put("updateImageBase", new updateImageBase()); processMap.put("updateImageVersion", new updateImageVersion()); processMap.put("deleteImageVersion", new deleteImageVersion()); processMap.put("deleteImageBase", new deleteImageBase()); processMap.put("writeImagePermissions", new writeImagePermissions()); processMap.put("getImagePermissions", new getImagePermissions()); processMap.put("setImageOwner", new setImageOwner()); processMap.put("setImageVersionExpiry", new setImageVersionExpiry()); processMap.put("getImageVersionVirtConfig", new getImageVersionVirtConfig()); processMap.put("setImageVersionVirtConfig", new setImageVersionVirtConfig()); processMap.put("requestImageReplication", new requestImageReplication()); processMap.put("publishImageVersion", new publishImageVersion()); processMap.put("createLecture", new createLecture()); processMap.put("updateLecture", new updateLecture()); processMap.put("getLectureList", new getLectureList()); processMap.put("getLectureDetails", new getLectureDetails()); processMap.put("deleteLecture", new deleteLecture()); processMap.put("writeLecturePermissions", new writeLecturePermissions()); processMap.put("getLecturePermissions", new getLecturePermissions()); processMap.put("setLectureOwner", new setLectureOwner()); processMap.put("getPredefinedData", new getPredefinedData()); return processMap; } public static class getVersion extends org.apache.thrift.AsyncProcessFunction { public getVersion() { super("getVersion"); } @Override public getVersion_args getEmptyArgsInstance() { return new getVersion_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback() { @Override public void onComplete(java.lang.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); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; getVersion_result result = new getVersion_result(); if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, getVersion_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.getVersion(args.clientVersion,resultHandler); } } public static class getSupportedFeatures extends org.apache.thrift.AsyncProcessFunction { public getSupportedFeatures() { super("getSupportedFeatures"); } @Override public getSupportedFeatures_args getEmptyArgsInstance() { return new getSupportedFeatures_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback() { @Override public void onComplete(java.lang.String o) { getSupportedFeatures_result result = new getSupportedFeatures_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; getSupportedFeatures_result result = new getSupportedFeatures_result(); if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, getSupportedFeatures_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.getSupportedFeatures(resultHandler); } } public static class getConfiguration extends org.apache.thrift.AsyncProcessFunction { public getConfiguration() { super("getConfiguration"); } @Override public getConfiguration_args getEmptyArgsInstance() { return new getConfiguration_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback() { @Override public void onComplete(SatelliteConfig o) { getConfiguration_result result = new getConfiguration_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; getConfiguration_result result = new getConfiguration_result(); if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, getConfiguration_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.getConfiguration(resultHandler); } } public static class requestImageVersionUpload extends org.apache.thrift.AsyncProcessFunction { public requestImageVersionUpload() { super("requestImageVersionUpload"); } @Override public requestImageVersionUpload_args getEmptyArgsInstance() { return new requestImageVersionUpload_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback() { @Override 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); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; requestImageVersionUpload_result result = new requestImageVersionUpload_result(); if (e instanceof TTransferRejectedException) { result.rejection = (TTransferRejectedException) e; result.setRejectionIsSet(true); msg = result; } else if (e instanceof TAuthorizationException) { result.authError = (TAuthorizationException) e; result.setAuthErrorIsSet(true); msg = result; } else if (e instanceof TInvocationException) { result.ffff = (TInvocationException) e; result.setFfffIsSet(true); msg = result; } else if (e instanceof TNotFoundException) { result.sdf = (TNotFoundException) e; result.setSdfIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, requestImageVersionUpload_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.requestImageVersionUpload(args.userToken, args.imageBaseId, args.fileSize, args.blockHashes, args.machineDescription,resultHandler); } } public static class updateBlockHashes extends org.apache.thrift.AsyncProcessFunction { public updateBlockHashes() { super("updateBlockHashes"); } @Override public updateBlockHashes_args getEmptyArgsInstance() { return new updateBlockHashes_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback() { @Override public void onComplete(Void o) { updateBlockHashes_result result = new updateBlockHashes_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; updateBlockHashes_result result = new updateBlockHashes_result(); if (e instanceof TInvalidTokenException) { result.ex1 = (TInvalidTokenException) e; result.setEx1IsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, updateBlockHashes_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.updateBlockHashes(args.uploadToken, args.blockHashes, args.userToken,resultHandler); } } public static class setUploadOptions extends org.apache.thrift.AsyncProcessFunction { public setUploadOptions() { super("setUploadOptions"); } @Override public setUploadOptions_args getEmptyArgsInstance() { return new setUploadOptions_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback() { @Override public void onComplete(UploadOptions o) { setUploadOptions_result result = new setUploadOptions_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; setUploadOptions_result result = new setUploadOptions_result(); if (e instanceof TAuthorizationException) { result.frootloops = (TAuthorizationException) e; result.setFrootloopsIsSet(true); msg = result; } else if (e instanceof TInvalidTokenException) { result.imcyborgbutthatsok = (TInvalidTokenException) e; result.setImcyborgbutthatsokIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, setUploadOptions_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.setUploadOptions(args.userToken, args.uploadToken, args.options,resultHandler); } } public static class cancelUpload extends org.apache.thrift.AsyncProcessFunction { public cancelUpload() { super("cancelUpload"); } @Override public cancelUpload_args getEmptyArgsInstance() { return new cancelUpload_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback() { @Override public void onComplete(Void o) { cancelUpload_result result = new cancelUpload_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; cancelUpload_result result = new cancelUpload_result(); if (e instanceof TInvalidTokenException) { result.ex1 = (TInvalidTokenException) e; result.setEx1IsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, cancelUpload_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.cancelUpload(args.uploadToken,resultHandler); } } public static class queryUploadStatus extends org.apache.thrift.AsyncProcessFunction { public queryUploadStatus() { super("queryUploadStatus"); } @Override public queryUploadStatus_args getEmptyArgsInstance() { return new queryUploadStatus_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback() { @Override public void onComplete(TransferStatus o) { queryUploadStatus_result result = new queryUploadStatus_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; queryUploadStatus_result result = new queryUploadStatus_result(); if (e instanceof TInvalidTokenException) { result.ex1 = (TInvalidTokenException) e; result.setEx1IsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, queryUploadStatus_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.queryUploadStatus(args.uploadToken,resultHandler); } } public static class requestDownload extends org.apache.thrift.AsyncProcessFunction { public requestDownload() { super("requestDownload"); } @Override public requestDownload_args getEmptyArgsInstance() { return new requestDownload_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback() { @Override 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); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; requestDownload_result result = new requestDownload_result(); if (e instanceof TTransferRejectedException) { result.rejection = (TTransferRejectedException) e; result.setRejectionIsSet(true); msg = result; } else if (e instanceof TAuthorizationException) { result.authError = (TAuthorizationException) e; result.setAuthErrorIsSet(true); msg = result; } else if (e instanceof TInvocationException) { result.ffff = (TInvocationException) e; result.setFfffIsSet(true); msg = result; } else if (e instanceof TNotFoundException) { result.sdf = (TNotFoundException) e; result.setSdfIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, requestDownload_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.requestDownload(args.userToken, args.imageVersionId,resultHandler); } } public static class cancelDownload extends org.apache.thrift.AsyncProcessFunction { public cancelDownload() { super("cancelDownload"); } @Override public cancelDownload_args getEmptyArgsInstance() { return new cancelDownload_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback() { @Override public void onComplete(Void o) { cancelDownload_result result = new cancelDownload_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; cancelDownload_result result = new cancelDownload_result(); if (e instanceof TInvalidTokenException) { result.ex1 = (TInvalidTokenException) e; result.setEx1IsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, cancelDownload_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.cancelDownload(args.downloadToken,resultHandler); } } public static class isAuthenticated extends org.apache.thrift.AsyncProcessFunction { public isAuthenticated() { super("isAuthenticated"); } @Override public isAuthenticated_args getEmptyArgsInstance() { return new isAuthenticated_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback() { @Override public void onComplete(Void o) { isAuthenticated_result result = new isAuthenticated_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; isAuthenticated_result result = new isAuthenticated_result(); if (e instanceof TAuthorizationException) { result.authError = (TAuthorizationException) e; result.setAuthErrorIsSet(true); msg = result; } else if (e instanceof TInvocationException) { result.serverError = (TInvocationException) e; result.setServerErrorIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, isAuthenticated_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.isAuthenticated(args.userToken,resultHandler); } } public static class whoami extends org.apache.thrift.AsyncProcessFunction { public whoami() { super("whoami"); } @Override public whoami_args getEmptyArgsInstance() { return new whoami_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback() { @Override public void onComplete(WhoamiInfo o) { whoami_result result = new whoami_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; whoami_result result = new whoami_result(); if (e instanceof TAuthorizationException) { result.authError = (TAuthorizationException) e; result.setAuthErrorIsSet(true); msg = result; } else if (e instanceof TInvocationException) { result.serverError = (TInvocationException) e; result.setServerErrorIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, whoami_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.whoami(args.userToken,resultHandler); } } public static class invalidateSession extends org.apache.thrift.AsyncProcessFunction { public invalidateSession() { super("invalidateSession"); } @Override public invalidateSession_args getEmptyArgsInstance() { return new invalidateSession_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback() { @Override public void onComplete(Void o) { invalidateSession_result result = new invalidateSession_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; invalidateSession_result result = new invalidateSession_result(); if (e instanceof TInvalidTokenException) { result.ex = (TInvalidTokenException) e; result.setExIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, invalidateSession_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.invalidateSession(args.userToken,resultHandler); } } public static class getUserList extends org.apache.thrift.AsyncProcessFunction> { public getUserList() { super("getUserList"); } @Override public getUserList_args getEmptyArgsInstance() { return new getUserList_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback>() { @Override public void onComplete(java.util.List o) { getUserList_result result = new getUserList_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; getUserList_result result = new getUserList_result(); if (e instanceof TAuthorizationException) { result.failure = (TAuthorizationException) e; result.setFailureIsSet(true); msg = result; } else if (e instanceof TInvocationException) { result.serverError = (TInvocationException) e; result.setServerErrorIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, getUserList_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException { iface.getUserList(args.userToken, args.page,resultHandler); } } public static class getUserConfig extends org.apache.thrift.AsyncProcessFunction { public getUserConfig() { super("getUserConfig"); } @Override public getUserConfig_args getEmptyArgsInstance() { return new getUserConfig_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback() { @Override public void onComplete(SatelliteUserConfig o) { getUserConfig_result result = new getUserConfig_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; getUserConfig_result result = new getUserConfig_result(); if (e instanceof TAuthorizationException) { result.failure = (TAuthorizationException) e; result.setFailureIsSet(true); msg = result; } else if (e instanceof TInvocationException) { result.serverError = (TInvocationException) e; result.setServerErrorIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, getUserConfig_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.getUserConfig(args.userToken,resultHandler); } } public static class setUserConfig extends org.apache.thrift.AsyncProcessFunction { public setUserConfig() { super("setUserConfig"); } @Override public setUserConfig_args getEmptyArgsInstance() { return new setUserConfig_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback() { @Override public void onComplete(Void o) { setUserConfig_result result = new setUserConfig_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; setUserConfig_result result = new setUserConfig_result(); if (e instanceof TAuthorizationException) { result.failure = (TAuthorizationException) e; result.setFailureIsSet(true); msg = result; } else if (e instanceof TInvocationException) { result.serverError = (TInvocationException) e; result.setServerErrorIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, setUserConfig_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.setUserConfig(args.userToken, args.config,resultHandler); } } public static class getOperatingSystems extends org.apache.thrift.AsyncProcessFunction> { public getOperatingSystems() { super("getOperatingSystems"); } @Override public getOperatingSystems_args getEmptyArgsInstance() { return new getOperatingSystems_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback>() { @Override public void onComplete(java.util.List o) { getOperatingSystems_result result = new getOperatingSystems_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; getOperatingSystems_result result = new getOperatingSystems_result(); if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, getOperatingSystems_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException { iface.getOperatingSystems(resultHandler); } } public static class getVirtualizers extends org.apache.thrift.AsyncProcessFunction> { public getVirtualizers() { super("getVirtualizers"); } @Override public getVirtualizers_args getEmptyArgsInstance() { return new getVirtualizers_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback>() { @Override public void onComplete(java.util.List o) { getVirtualizers_result result = new getVirtualizers_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; getVirtualizers_result result = new getVirtualizers_result(); if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, getVirtualizers_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException { iface.getVirtualizers(resultHandler); } } public static class getAllOrganizations extends org.apache.thrift.AsyncProcessFunction> { public getAllOrganizations() { super("getAllOrganizations"); } @Override public getAllOrganizations_args getEmptyArgsInstance() { return new getAllOrganizations_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback>() { @Override public void onComplete(java.util.List o) { getAllOrganizations_result result = new getAllOrganizations_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; getAllOrganizations_result result = new getAllOrganizations_result(); if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, getAllOrganizations_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException { iface.getAllOrganizations(resultHandler); } } public static class getLocations extends org.apache.thrift.AsyncProcessFunction> { public getLocations() { super("getLocations"); } @Override public getLocations_args getEmptyArgsInstance() { return new getLocations_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback>() { @Override public void onComplete(java.util.List o) { getLocations_result result = new getLocations_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; getLocations_result result = new getLocations_result(); if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, getLocations_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException { iface.getLocations(resultHandler); } } public static class getStatus extends org.apache.thrift.AsyncProcessFunction { public getStatus() { super("getStatus"); } @Override public getStatus_args getEmptyArgsInstance() { return new getStatus_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback() { @Override public void onComplete(SatelliteStatus o) { getStatus_result result = new getStatus_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; getStatus_result result = new getStatus_result(); if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, getStatus_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.getStatus(resultHandler); } } public static class getImageList extends org.apache.thrift.AsyncProcessFunction> { public getImageList() { super("getImageList"); } @Override public getImageList_args getEmptyArgsInstance() { return new getImageList_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback>() { @Override public void onComplete(java.util.List o) { getImageList_result result = new getImageList_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; getImageList_result result = new getImageList_result(); if (e instanceof TAuthorizationException) { result.authError = (TAuthorizationException) e; result.setAuthErrorIsSet(true); msg = result; } else if (e instanceof TInvocationException) { result.serverError = (TInvocationException) e; result.setServerErrorIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, getImageList_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException { iface.getImageList(args.userToken, args.tagSearch, args.page,resultHandler); } } public static class getImageDetails extends org.apache.thrift.AsyncProcessFunction { public getImageDetails() { super("getImageDetails"); } @Override public getImageDetails_args getEmptyArgsInstance() { return new getImageDetails_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback() { @Override 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); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; getImageDetails_result result = new getImageDetails_result(); if (e instanceof TAuthorizationException) { result.authError = (TAuthorizationException) e; result.setAuthErrorIsSet(true); msg = result; } else if (e instanceof TNotFoundException) { result.notFound = (TNotFoundException) e; result.setNotFoundIsSet(true); msg = result; } else if (e instanceof TInvocationException) { result.serverError = (TInvocationException) e; result.setServerErrorIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, getImageDetails_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.getImageDetails(args.userToken, args.imageBaseId,resultHandler); } } public static class createImage extends org.apache.thrift.AsyncProcessFunction { public createImage() { super("createImage"); } @Override public createImage_args getEmptyArgsInstance() { return new createImage_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback() { @Override public void onComplete(java.lang.String o) { createImage_result result = new createImage_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; createImage_result result = new createImage_result(); if (e instanceof TAuthorizationException) { result.authError = (TAuthorizationException) e; result.setAuthErrorIsSet(true); msg = result; } else if (e instanceof TInvocationException) { result.error = (TInvocationException) e; result.setErrorIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, createImage_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.createImage(args.userToken, args.imageName,resultHandler); } } public static class updateImageBase extends org.apache.thrift.AsyncProcessFunction { public updateImageBase() { super("updateImageBase"); } @Override public updateImageBase_args getEmptyArgsInstance() { return new updateImageBase_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback() { @Override public void onComplete(Void o) { updateImageBase_result result = new updateImageBase_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; updateImageBase_result result = new updateImageBase_result(); if (e instanceof TAuthorizationException) { result.authError = (TAuthorizationException) e; result.setAuthErrorIsSet(true); msg = result; } else if (e instanceof TNotFoundException) { result.notFound = (TNotFoundException) e; result.setNotFoundIsSet(true); msg = result; } else if (e instanceof TInvocationException) { result.imgError = (TInvocationException) e; result.setImgErrorIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, updateImageBase_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.updateImageBase(args.userToken, args.imageBaseId, args.image,resultHandler); } } public static class updateImageVersion extends org.apache.thrift.AsyncProcessFunction { public updateImageVersion() { super("updateImageVersion"); } @Override public updateImageVersion_args getEmptyArgsInstance() { return new updateImageVersion_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback() { @Override public void onComplete(Void o) { updateImageVersion_result result = new updateImageVersion_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; updateImageVersion_result result = new updateImageVersion_result(); if (e instanceof TAuthorizationException) { result.authError = (TAuthorizationException) e; result.setAuthErrorIsSet(true); msg = result; } else if (e instanceof TNotFoundException) { result.notFound = (TNotFoundException) e; result.setNotFoundIsSet(true); msg = result; } else if (e instanceof TInvocationException) { result.imgError = (TInvocationException) e; result.setImgErrorIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, updateImageVersion_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.updateImageVersion(args.userToken, args.imageVersionId, args.image,resultHandler); } } public static class deleteImageVersion extends org.apache.thrift.AsyncProcessFunction { public deleteImageVersion() { super("deleteImageVersion"); } @Override public deleteImageVersion_args getEmptyArgsInstance() { return new deleteImageVersion_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback() { @Override public void onComplete(Void o) { deleteImageVersion_result result = new deleteImageVersion_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; deleteImageVersion_result result = new deleteImageVersion_result(); if (e instanceof TAuthorizationException) { result.authError = (TAuthorizationException) e; result.setAuthErrorIsSet(true); msg = result; } else if (e instanceof TNotFoundException) { result.notFound = (TNotFoundException) e; result.setNotFoundIsSet(true); msg = result; } else if (e instanceof TInvocationException) { result.serverError = (TInvocationException) e; result.setServerErrorIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, deleteImageVersion_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.deleteImageVersion(args.userToken, args.imageVersionId,resultHandler); } } public static class deleteImageBase extends org.apache.thrift.AsyncProcessFunction { public deleteImageBase() { super("deleteImageBase"); } @Override public deleteImageBase_args getEmptyArgsInstance() { return new deleteImageBase_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback() { @Override public void onComplete(Void o) { deleteImageBase_result result = new deleteImageBase_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; deleteImageBase_result result = new deleteImageBase_result(); if (e instanceof TAuthorizationException) { result.authError = (TAuthorizationException) e; result.setAuthErrorIsSet(true); msg = result; } else if (e instanceof TNotFoundException) { result.notFound = (TNotFoundException) e; result.setNotFoundIsSet(true); msg = result; } else if (e instanceof TInvocationException) { result.serverError = (TInvocationException) e; result.setServerErrorIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, deleteImageBase_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.deleteImageBase(args.userToken, args.imageBaseId,resultHandler); } } public static class writeImagePermissions extends org.apache.thrift.AsyncProcessFunction { public writeImagePermissions() { super("writeImagePermissions"); } @Override public writeImagePermissions_args getEmptyArgsInstance() { return new writeImagePermissions_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback() { @Override public void onComplete(Void o) { writeImagePermissions_result result = new writeImagePermissions_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; writeImagePermissions_result result = new writeImagePermissions_result(); if (e instanceof TAuthorizationException) { result.authError = (TAuthorizationException) e; result.setAuthErrorIsSet(true); msg = result; } else if (e instanceof TNotFoundException) { result.notFound = (TNotFoundException) e; result.setNotFoundIsSet(true); msg = result; } else if (e instanceof TInvocationException) { result.serverError = (TInvocationException) e; result.setServerErrorIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, writeImagePermissions_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.writeImagePermissions(args.userToken, args.imageBaseId, args.permissions,resultHandler); } } public static class getImagePermissions extends org.apache.thrift.AsyncProcessFunction> { public getImagePermissions() { super("getImagePermissions"); } @Override public getImagePermissions_args getEmptyArgsInstance() { return new getImagePermissions_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback>() { @Override public void onComplete(java.util.Map o) { getImagePermissions_result result = new getImagePermissions_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; getImagePermissions_result result = new getImagePermissions_result(); if (e instanceof TAuthorizationException) { result.authError = (TAuthorizationException) e; result.setAuthErrorIsSet(true); msg = result; } else if (e instanceof TNotFoundException) { result.notFound = (TNotFoundException) e; result.setNotFoundIsSet(true); msg = result; } else if (e instanceof TInvocationException) { result.serverError = (TInvocationException) e; result.setServerErrorIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, getImagePermissions_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException { iface.getImagePermissions(args.userToken, args.imageBaseId,resultHandler); } } public static class setImageOwner extends org.apache.thrift.AsyncProcessFunction { public setImageOwner() { super("setImageOwner"); } @Override public setImageOwner_args getEmptyArgsInstance() { return new setImageOwner_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback() { @Override public void onComplete(Void o) { setImageOwner_result result = new setImageOwner_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; setImageOwner_result result = new setImageOwner_result(); if (e instanceof TAuthorizationException) { result.authError = (TAuthorizationException) e; result.setAuthErrorIsSet(true); msg = result; } else if (e instanceof TNotFoundException) { result.notFound = (TNotFoundException) e; result.setNotFoundIsSet(true); msg = result; } else if (e instanceof TInvocationException) { result.serverError = (TInvocationException) e; result.setServerErrorIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, setImageOwner_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.setImageOwner(args.userToken, args.imageBaseId, args.newOwnerId,resultHandler); } } public static class setImageVersionExpiry extends org.apache.thrift.AsyncProcessFunction { public setImageVersionExpiry() { super("setImageVersionExpiry"); } @Override public setImageVersionExpiry_args getEmptyArgsInstance() { return new setImageVersionExpiry_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback() { @Override public void onComplete(Void o) { setImageVersionExpiry_result result = new setImageVersionExpiry_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; setImageVersionExpiry_result result = new setImageVersionExpiry_result(); if (e instanceof TAuthorizationException) { result.authError = (TAuthorizationException) e; result.setAuthErrorIsSet(true); msg = result; } else if (e instanceof TNotFoundException) { result.notFound = (TNotFoundException) e; result.setNotFoundIsSet(true); msg = result; } else if (e instanceof TInvocationException) { result.serverError = (TInvocationException) e; result.setServerErrorIsSet(true); msg = result; } else if (e instanceof TInvalidDateParam) { result.dateError = (TInvalidDateParam) e; result.setDateErrorIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, setImageVersionExpiry_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.setImageVersionExpiry(args.userToken, args.imageBaseId, args.expireTime,resultHandler); } } public static class getImageVersionVirtConfig extends org.apache.thrift.AsyncProcessFunction { public getImageVersionVirtConfig() { super("getImageVersionVirtConfig"); } @Override public getImageVersionVirtConfig_args getEmptyArgsInstance() { return new getImageVersionVirtConfig_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback() { @Override public void onComplete(java.nio.ByteBuffer o) { getImageVersionVirtConfig_result result = new getImageVersionVirtConfig_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; getImageVersionVirtConfig_result result = new getImageVersionVirtConfig_result(); if (e instanceof TAuthorizationException) { result.authError = (TAuthorizationException) e; result.setAuthErrorIsSet(true); msg = result; } else if (e instanceof TNotFoundException) { result.notFound = (TNotFoundException) e; result.setNotFoundIsSet(true); msg = result; } else if (e instanceof TInvocationException) { result.serverError = (TInvocationException) e; result.setServerErrorIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, getImageVersionVirtConfig_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.getImageVersionVirtConfig(args.userToken, args.imageVersionId,resultHandler); } } public static class setImageVersionVirtConfig extends org.apache.thrift.AsyncProcessFunction { public setImageVersionVirtConfig() { super("setImageVersionVirtConfig"); } @Override public setImageVersionVirtConfig_args getEmptyArgsInstance() { return new setImageVersionVirtConfig_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback() { @Override public void onComplete(Void o) { setImageVersionVirtConfig_result result = new setImageVersionVirtConfig_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; setImageVersionVirtConfig_result result = new setImageVersionVirtConfig_result(); if (e instanceof TAuthorizationException) { result.authError = (TAuthorizationException) e; result.setAuthErrorIsSet(true); msg = result; } else if (e instanceof TNotFoundException) { result.notFound = (TNotFoundException) e; result.setNotFoundIsSet(true); msg = result; } else if (e instanceof TInvocationException) { result.serverError = (TInvocationException) e; result.setServerErrorIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, setImageVersionVirtConfig_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.setImageVersionVirtConfig(args.userToken, args.imageVersionId, args.meta,resultHandler); } } public static class requestImageReplication extends org.apache.thrift.AsyncProcessFunction { public requestImageReplication() { super("requestImageReplication"); } @Override public requestImageReplication_args getEmptyArgsInstance() { return new requestImageReplication_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback() { @Override public void onComplete(java.lang.String o) { requestImageReplication_result result = new requestImageReplication_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; requestImageReplication_result result = new requestImageReplication_result(); if (e instanceof TAuthorizationException) { result.authError = (TAuthorizationException) e; result.setAuthErrorIsSet(true); msg = result; } else if (e instanceof TNotFoundException) { result.notFound = (TNotFoundException) e; result.setNotFoundIsSet(true); msg = result; } else if (e instanceof TInvocationException) { result.serverError = (TInvocationException) e; result.setServerErrorIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, requestImageReplication_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.requestImageReplication(args.userToken, args.imageVersionId,resultHandler); } } public static class publishImageVersion extends org.apache.thrift.AsyncProcessFunction { public publishImageVersion() { super("publishImageVersion"); } @Override public publishImageVersion_args getEmptyArgsInstance() { return new publishImageVersion_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback() { @Override public void onComplete(java.lang.String o) { publishImageVersion_result result = new publishImageVersion_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; publishImageVersion_result result = new publishImageVersion_result(); if (e instanceof TAuthorizationException) { result.authError = (TAuthorizationException) e; result.setAuthErrorIsSet(true); msg = result; } else if (e instanceof TNotFoundException) { result.notFound = (TNotFoundException) e; result.setNotFoundIsSet(true); msg = result; } else if (e instanceof TInvocationException) { result.serverError = (TInvocationException) e; result.setServerErrorIsSet(true); msg = result; } else if (e instanceof TTransferRejectedException) { result.tre = (TTransferRejectedException) e; result.setTreIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, publishImageVersion_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.publishImageVersion(args.userToken, args.imageVersionId,resultHandler); } } public static class createLecture extends org.apache.thrift.AsyncProcessFunction { public createLecture() { super("createLecture"); } @Override public createLecture_args getEmptyArgsInstance() { return new createLecture_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback() { @Override public void onComplete(java.lang.String o) { createLecture_result result = new createLecture_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; createLecture_result result = new createLecture_result(); if (e instanceof TAuthorizationException) { result.authError = (TAuthorizationException) e; result.setAuthErrorIsSet(true); msg = result; } else if (e instanceof TInvocationException) { result.serverError = (TInvocationException) e; result.setServerErrorIsSet(true); msg = result; } else if (e instanceof TInvalidDateParam) { result.dateError = (TInvalidDateParam) e; result.setDateErrorIsSet(true); msg = result; } else if (e instanceof TNotFoundException) { result.notFound = (TNotFoundException) e; result.setNotFoundIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, createLecture_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.createLecture(args.userToken, args.lecture,resultHandler); } } public static class updateLecture extends org.apache.thrift.AsyncProcessFunction { public updateLecture() { super("updateLecture"); } @Override public updateLecture_args getEmptyArgsInstance() { return new updateLecture_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback() { @Override public void onComplete(Void o) { updateLecture_result result = new updateLecture_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; updateLecture_result result = new updateLecture_result(); if (e instanceof TAuthorizationException) { result.authError = (TAuthorizationException) e; result.setAuthErrorIsSet(true); msg = result; } else if (e instanceof TNotFoundException) { result.notFound = (TNotFoundException) e; result.setNotFoundIsSet(true); msg = result; } else if (e instanceof TInvocationException) { result.serverError = (TInvocationException) e; result.setServerErrorIsSet(true); msg = result; } else if (e instanceof TInvalidDateParam) { result.dateError = (TInvalidDateParam) e; result.setDateErrorIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, updateLecture_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.updateLecture(args.userToken, args.lectureId, args.lecture,resultHandler); } } public static class getLectureList extends org.apache.thrift.AsyncProcessFunction> { public getLectureList() { super("getLectureList"); } @Override public getLectureList_args getEmptyArgsInstance() { return new getLectureList_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback>() { @Override public void onComplete(java.util.List o) { getLectureList_result result = new getLectureList_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; getLectureList_result result = new getLectureList_result(); if (e instanceof TAuthorizationException) { result.authError = (TAuthorizationException) e; result.setAuthErrorIsSet(true); msg = result; } else if (e instanceof TInvocationException) { result.serverError = (TInvocationException) e; result.setServerErrorIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, getLectureList_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException { iface.getLectureList(args.userToken, args.page,resultHandler); } } public static class getLectureDetails extends org.apache.thrift.AsyncProcessFunction { public getLectureDetails() { super("getLectureDetails"); } @Override public getLectureDetails_args getEmptyArgsInstance() { return new getLectureDetails_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback() { @Override 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); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; getLectureDetails_result result = new getLectureDetails_result(); if (e instanceof TAuthorizationException) { result.authError = (TAuthorizationException) e; result.setAuthErrorIsSet(true); msg = result; } else if (e instanceof TNotFoundException) { result.notFound = (TNotFoundException) e; result.setNotFoundIsSet(true); msg = result; } else if (e instanceof TInvocationException) { result.serverError = (TInvocationException) e; result.setServerErrorIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, getLectureDetails_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.getLectureDetails(args.userToken, args.lectureId,resultHandler); } } public static class deleteLecture extends org.apache.thrift.AsyncProcessFunction { public deleteLecture() { super("deleteLecture"); } @Override public deleteLecture_args getEmptyArgsInstance() { return new deleteLecture_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback() { @Override public void onComplete(Void o) { deleteLecture_result result = new deleteLecture_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; deleteLecture_result result = new deleteLecture_result(); if (e instanceof TAuthorizationException) { result.authError = (TAuthorizationException) e; result.setAuthErrorIsSet(true); msg = result; } else if (e instanceof TNotFoundException) { result.notFound = (TNotFoundException) e; result.setNotFoundIsSet(true); msg = result; } else if (e instanceof TInvocationException) { result.serverError = (TInvocationException) e; result.setServerErrorIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, deleteLecture_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.deleteLecture(args.userToken, args.lectureId,resultHandler); } } public static class writeLecturePermissions extends org.apache.thrift.AsyncProcessFunction { public writeLecturePermissions() { super("writeLecturePermissions"); } @Override public writeLecturePermissions_args getEmptyArgsInstance() { return new writeLecturePermissions_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback() { @Override public void onComplete(Void o) { writeLecturePermissions_result result = new writeLecturePermissions_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; writeLecturePermissions_result result = new writeLecturePermissions_result(); if (e instanceof TAuthorizationException) { result.authError = (TAuthorizationException) e; result.setAuthErrorIsSet(true); msg = result; } else if (e instanceof TNotFoundException) { result.notFound = (TNotFoundException) e; result.setNotFoundIsSet(true); msg = result; } else if (e instanceof TInvocationException) { result.serverError = (TInvocationException) e; result.setServerErrorIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, writeLecturePermissions_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.writeLecturePermissions(args.userToken, args.lectureId, args.permissions,resultHandler); } } public static class getLecturePermissions extends org.apache.thrift.AsyncProcessFunction> { public getLecturePermissions() { super("getLecturePermissions"); } @Override public getLecturePermissions_args getEmptyArgsInstance() { return new getLecturePermissions_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback>() { @Override public void onComplete(java.util.Map o) { getLecturePermissions_result result = new getLecturePermissions_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; getLecturePermissions_result result = new getLecturePermissions_result(); if (e instanceof TAuthorizationException) { result.authError = (TAuthorizationException) e; result.setAuthErrorIsSet(true); msg = result; } else if (e instanceof TNotFoundException) { result.notFound = (TNotFoundException) e; result.setNotFoundIsSet(true); msg = result; } else if (e instanceof TInvocationException) { result.serverError = (TInvocationException) e; result.setServerErrorIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, getLecturePermissions_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException { iface.getLecturePermissions(args.userToken, args.lectureId,resultHandler); } } public static class setLectureOwner extends org.apache.thrift.AsyncProcessFunction { public setLectureOwner() { super("setLectureOwner"); } @Override public setLectureOwner_args getEmptyArgsInstance() { return new setLectureOwner_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback() { @Override public void onComplete(Void o) { setLectureOwner_result result = new setLectureOwner_result(); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; setLectureOwner_result result = new setLectureOwner_result(); if (e instanceof TAuthorizationException) { result.authError = (TAuthorizationException) e; result.setAuthErrorIsSet(true); msg = result; } else if (e instanceof TNotFoundException) { result.notFound = (TNotFoundException) e; result.setNotFoundIsSet(true); msg = result; } else if (e instanceof TInvocationException) { result.serverError = (TInvocationException) e; result.setServerErrorIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, setLectureOwner_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.setLectureOwner(args.userToken, args.lectureId, args.newOwnerId,resultHandler); } } public static class getPredefinedData extends org.apache.thrift.AsyncProcessFunction { public getPredefinedData() { super("getPredefinedData"); } @Override public getPredefinedData_args getEmptyArgsInstance() { return new getPredefinedData_args(); } @Override public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new org.apache.thrift.async.AsyncMethodCallback() { @Override public void onComplete(PredefinedData o) { getPredefinedData_result result = new getPredefinedData_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } @Override public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TSerializable msg; getPredefinedData_result result = new getPredefinedData_result(); if (e instanceof TAuthorizationException) { result.authError = (TAuthorizationException) e; result.setAuthErrorIsSet(true); msg = result; } else if (e instanceof TInvocationException) { result.serverError = (TInvocationException) e; result.setServerErrorIsSet(true); msg = result; } else if (e instanceof org.apache.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); fb.close(); return; } else if (e instanceof org.apache.thrift.TApplicationException) { _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TApplicationException)e; } else { _LOGGER.error("Exception inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); } catch (java.lang.Exception ex) { _LOGGER.error("Exception writing to internal frame buffer", ex); fb.close(); } } }; } @Override protected boolean isOneway() { return false; } @Override public void start(I iface, getPredefinedData_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.getPredefinedData(args.userToken,resultHandler); } } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 org.apache.thrift.protocol.TField CLIENT_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("clientVersion", org.apache.thrift.protocol.TType.I64, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getVersion_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getVersion_argsTupleSchemeFactory(); public long clientVersion; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { CLIENT_VERSION((short)1, "clientVersion"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // CLIENT_VERSION return CLIENT_VERSION; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __CLIENTVERSION_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.CLIENT_VERSION, new org.apache.thrift.meta_data.FieldMetaData("clientVersion", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "int"))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getVersion_args.class, metaDataMap); } public getVersion_args() { } public getVersion_args( long clientVersion) { this(); this.clientVersion = clientVersion; setClientVersionIsSet(true); } /** * Performs a deep copy on other. */ public getVersion_args(getVersion_args other) { __isset_bitfield = other.__isset_bitfield; this.clientVersion = other.clientVersion; } @Override public getVersion_args deepCopy() { return new getVersion_args(this); } @Override public void clear() { setClientVersionIsSet(false); this.clientVersion = 0; } public long getClientVersion() { return this.clientVersion; } public getVersion_args setClientVersion(long clientVersion) { this.clientVersion = clientVersion; setClientVersionIsSet(true); return this; } public void unsetClientVersion() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __CLIENTVERSION_ISSET_ID); } /** Returns true if field clientVersion is set (has been assigned a value) and false otherwise */ public boolean isSetClientVersion() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CLIENTVERSION_ISSET_ID); } public void setClientVersionIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CLIENTVERSION_ISSET_ID, value); } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case CLIENT_VERSION: if (value == null) { unsetClientVersion(); } else { setClientVersion((java.lang.Long)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case CLIENT_VERSION: return getClientVersion(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case CLIENT_VERSION: return isSetClientVersion(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getVersion_args) return this.equals((getVersion_args)that); return false; } public boolean equals(getVersion_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_clientVersion = true; boolean that_present_clientVersion = true; if (this_present_clientVersion || that_present_clientVersion) { if (!(this_present_clientVersion && that_present_clientVersion)) return false; if (this.clientVersion != that.clientVersion) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(clientVersion); return hashCode; } @Override public int compareTo(getVersion_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetClientVersion(), other.isSetClientVersion()); if (lastComparison != 0) { return lastComparison; } if (isSetClientVersion()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.clientVersion, other.clientVersion); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("getVersion_args("); boolean first = true; sb.append("clientVersion:"); sb.append(this.clientVersion); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class getVersion_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getVersion_argsStandardScheme getScheme() { return new getVersion_argsStandardScheme(); } } private static class getVersion_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, getVersion_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // CLIENT_VERSION if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.clientVersion = iprot.readI64(); struct.setClientVersionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, getVersion_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(CLIENT_VERSION_FIELD_DESC); oprot.writeI64(struct.clientVersion); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getVersion_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getVersion_argsTupleScheme getScheme() { return new getVersion_argsTupleScheme(); } } private static class getVersion_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getVersion_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetClientVersion()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetClientVersion()) { oprot.writeI64(struct.clientVersion); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getVersion_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.clientVersion = iprot.readI64(); struct.setClientVersionIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getVersion_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = 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 java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.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; } @Override 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 = org.apache.thrift.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 org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.lang.Long)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getVersion_result) return this.equals((getVersion_result)that); return false; } public boolean equals(getVersion_result that) { if (that == null) return false; if (this == that) return true; 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() { int hashCode = 1; hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(success); return hashCode; } @Override public int compareTo(getVersion_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), 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; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory { @Override public getVersion_resultStandardScheme getScheme() { return new getVersion_resultStandardScheme(); } } private static class getVersion_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override 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(); } @Override 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 org.apache.thrift.scheme.SchemeFactory { @Override public getVersion_resultTupleScheme getScheme() { return new getVersion_resultTupleScheme(); } } private static class getVersion_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getVersion_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.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 { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readI64(); struct.setSuccessIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class getSupportedFeatures_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("getSupportedFeatures_args"); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getSupportedFeatures_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getSupportedFeatures_argsTupleSchemeFactory(); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSupportedFeatures_args.class, metaDataMap); } public getSupportedFeatures_args() { } /** * Performs a deep copy on other. */ public getSupportedFeatures_args(getSupportedFeatures_args other) { } @Override public getSupportedFeatures_args deepCopy() { return new getSupportedFeatures_args(this); } @Override public void clear() { } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getSupportedFeatures_args) return this.equals((getSupportedFeatures_args)that); return false; } public boolean equals(getSupportedFeatures_args that) { if (that == null) return false; if (this == that) return true; return true; } @Override public int hashCode() { int hashCode = 1; return hashCode; } @Override public int compareTo(getSupportedFeatures_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("getSupportedFeatures_args("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class getSupportedFeatures_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getSupportedFeatures_argsStandardScheme getScheme() { return new getSupportedFeatures_argsStandardScheme(); } } private static class getSupportedFeatures_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, getSupportedFeatures_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, getSupportedFeatures_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getSupportedFeatures_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getSupportedFeatures_argsTupleScheme getScheme() { return new getSupportedFeatures_argsTupleScheme(); } } private static class getSupportedFeatures_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getSupportedFeatures_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getSupportedFeatures_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class getSupportedFeatures_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("getSupportedFeatures_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getSupportedFeatures_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getSupportedFeatures_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSupportedFeatures_result.class, metaDataMap); } public getSupportedFeatures_result() { } public getSupportedFeatures_result( java.lang.String success) { this(); this.success = success; } /** * Performs a deep copy on other. */ public getSupportedFeatures_result(getSupportedFeatures_result other) { if (other.isSetSuccess()) { this.success = other.success; } } @Override public getSupportedFeatures_result deepCopy() { return new getSupportedFeatures_result(this); } @Override public void clear() { this.success = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSuccess() { return this.success; } public getSupportedFeatures_result setSuccess(@org.apache.thrift.annotation.Nullable java.lang.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; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getSupportedFeatures_result) return this.equals((getSupportedFeatures_result)that); return false; } public boolean equals(getSupportedFeatures_result that) { if (that == null) return false; if (this == that) return true; 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() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); return hashCode; } @Override public int compareTo(getSupportedFeatures_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), 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; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("getSupportedFeatures_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class getSupportedFeatures_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getSupportedFeatures_resultStandardScheme getScheme() { return new getSupportedFeatures_resultStandardScheme(); } } private static class getSupportedFeatures_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, getSupportedFeatures_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, getSupportedFeatures_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeString(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getSupportedFeatures_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getSupportedFeatures_resultTupleScheme getScheme() { return new getSupportedFeatures_resultTupleScheme(); } } private static class getSupportedFeatures_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getSupportedFeatures_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { oprot.writeString(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getSupportedFeatures_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class getConfiguration_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("getConfiguration_args"); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getConfiguration_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getConfiguration_argsTupleSchemeFactory(); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getConfiguration_args.class, metaDataMap); } public getConfiguration_args() { } /** * Performs a deep copy on other. */ public getConfiguration_args(getConfiguration_args other) { } @Override public getConfiguration_args deepCopy() { return new getConfiguration_args(this); } @Override public void clear() { } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getConfiguration_args) return this.equals((getConfiguration_args)that); return false; } public boolean equals(getConfiguration_args that) { if (that == null) return false; if (this == that) return true; return true; } @Override public int hashCode() { int hashCode = 1; return hashCode; } @Override public int compareTo(getConfiguration_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("getConfiguration_args("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class getConfiguration_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getConfiguration_argsStandardScheme getScheme() { return new getConfiguration_argsStandardScheme(); } } private static class getConfiguration_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, getConfiguration_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, getConfiguration_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getConfiguration_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getConfiguration_argsTupleScheme getScheme() { return new getConfiguration_argsTupleScheme(); } } private static class getConfiguration_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getConfiguration_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getConfiguration_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class getConfiguration_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("getConfiguration_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getConfiguration_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getConfiguration_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable SatelliteConfig success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SatelliteConfig.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getConfiguration_result.class, metaDataMap); } public getConfiguration_result() { } public getConfiguration_result( SatelliteConfig success) { this(); this.success = success; } /** * Performs a deep copy on other. */ public getConfiguration_result(getConfiguration_result other) { if (other.isSetSuccess()) { this.success = new SatelliteConfig(other.success); } } @Override public getConfiguration_result deepCopy() { return new getConfiguration_result(this); } @Override public void clear() { this.success = null; } @org.apache.thrift.annotation.Nullable public SatelliteConfig getSuccess() { return this.success; } public getConfiguration_result setSuccess(@org.apache.thrift.annotation.Nullable SatelliteConfig success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((SatelliteConfig)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getConfiguration_result) return this.equals((getConfiguration_result)that); return false; } public boolean equals(getConfiguration_result that) { if (that == null) return false; if (this == that) return true; 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() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); return hashCode; } @Override public int compareTo(getConfiguration_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), 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; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("getConfiguration_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class getConfiguration_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getConfiguration_resultStandardScheme getScheme() { return new getConfiguration_resultStandardScheme(); } } private static class getConfiguration_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, getConfiguration_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new SatelliteConfig(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, getConfiguration_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getConfiguration_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getConfiguration_resultTupleScheme getScheme() { return new getConfiguration_resultTupleScheme(); } } private static class getConfiguration_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getConfiguration_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { struct.success.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getConfiguration_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = new SatelliteConfig(); struct.success.read(iprot); struct.setSuccessIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 org.apache.thrift.protocol.TField MACHINE_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("machineDescription", org.apache.thrift.protocol.TType.STRING, (short)5); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new requestImageVersionUpload_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new requestImageVersionUpload_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required public @org.apache.thrift.annotation.Nullable java.lang.String imageBaseId; // required public long fileSize; // required public @org.apache.thrift.annotation.Nullable java.util.List blockHashes; // required public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer machineDescription; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { USER_TOKEN((short)1, "userToken"), IMAGE_BASE_ID((short)2, "imageBaseId"), FILE_SIZE((short)3, "fileSize"), BLOCK_HASHES((short)4, "blockHashes"), MACHINE_DESCRIPTION((short)5, "machineDescription"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // USER_TOKEN return USER_TOKEN; case 2: // IMAGE_BASE_ID return IMAGE_BASE_ID; case 3: // FILE_SIZE return FILE_SIZE; case 4: // BLOCK_HASHES return BLOCK_HASHES; case 5: // MACHINE_DESCRIPTION return MACHINE_DESCRIPTION; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __FILESIZE_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); tmpMap.put(_Fields.IMAGE_BASE_ID, new org.apache.thrift.meta_data.FieldMetaData("imageBaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); tmpMap.put(_Fields.FILE_SIZE, new org.apache.thrift.meta_data.FieldMetaData("fileSize", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.BLOCK_HASHES, new org.apache.thrift.meta_data.FieldMetaData("blockHashes", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); tmpMap.put(_Fields.MACHINE_DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("machineDescription", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestImageVersionUpload_args.class, metaDataMap); } public requestImageVersionUpload_args() { } public requestImageVersionUpload_args( java.lang.String userToken, java.lang.String imageBaseId, long fileSize, java.util.List blockHashes, java.nio.ByteBuffer machineDescription) { this(); this.userToken = userToken; this.imageBaseId = imageBaseId; this.fileSize = fileSize; setFileSizeIsSet(true); this.blockHashes = blockHashes; this.machineDescription = org.apache.thrift.TBaseHelper.copyBinary(machineDescription); } /** * Performs a deep copy on 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()) { java.util.List __this__blockHashes = new java.util.ArrayList(other.blockHashes); this.blockHashes = __this__blockHashes; } if (other.isSetMachineDescription()) { this.machineDescription = org.apache.thrift.TBaseHelper.copyBinary(other.machineDescription); } } @Override public requestImageVersionUpload_args deepCopy() { return new requestImageVersionUpload_args(this); } @Override public void clear() { this.userToken = null; this.imageBaseId = null; setFileSizeIsSet(false); this.fileSize = 0; this.blockHashes = null; this.machineDescription = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getUserToken() { return this.userToken; } public requestImageVersionUpload_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.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; } } @org.apache.thrift.annotation.Nullable public java.lang.String getImageBaseId() { return this.imageBaseId; } public requestImageVersionUpload_args setImageBaseId(@org.apache.thrift.annotation.Nullable java.lang.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 = org.apache.thrift.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 org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FILESIZE_ISSET_ID); } public void setFileSizeIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FILESIZE_ISSET_ID, value); } public int getBlockHashesSize() { return (this.blockHashes == null) ? 0 : this.blockHashes.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator getBlockHashesIterator() { return (this.blockHashes == null) ? null : this.blockHashes.iterator(); } public void addToBlockHashes(java.nio.ByteBuffer elem) { if (this.blockHashes == null) { this.blockHashes = new java.util.ArrayList(); } this.blockHashes.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List getBlockHashes() { return this.blockHashes; } public requestImageVersionUpload_args setBlockHashes(@org.apache.thrift.annotation.Nullable java.util.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 byte[] getMachineDescription() { setMachineDescription(org.apache.thrift.TBaseHelper.rightSize(machineDescription)); return machineDescription == null ? null : machineDescription.array(); } public java.nio.ByteBuffer bufferForMachineDescription() { return org.apache.thrift.TBaseHelper.copyBinary(machineDescription); } public requestImageVersionUpload_args setMachineDescription(byte[] machineDescription) { this.machineDescription = machineDescription == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(machineDescription.clone()); return this; } public requestImageVersionUpload_args setMachineDescription(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer machineDescription) { this.machineDescription = org.apache.thrift.TBaseHelper.copyBinary(machineDescription); return this; } public void unsetMachineDescription() { this.machineDescription = null; } /** Returns true if field machineDescription is set (has been assigned a value) and false otherwise */ public boolean isSetMachineDescription() { return this.machineDescription != null; } public void setMachineDescriptionIsSet(boolean value) { if (!value) { this.machineDescription = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case USER_TOKEN: if (value == null) { unsetUserToken(); } else { setUserToken((java.lang.String)value); } break; case IMAGE_BASE_ID: if (value == null) { unsetImageBaseId(); } else { setImageBaseId((java.lang.String)value); } break; case FILE_SIZE: if (value == null) { unsetFileSize(); } else { setFileSize((java.lang.Long)value); } break; case BLOCK_HASHES: if (value == null) { unsetBlockHashes(); } else { setBlockHashes((java.util.List)value); } break; case MACHINE_DESCRIPTION: if (value == null) { unsetMachineDescription(); } else { if (value instanceof byte[]) { setMachineDescription((byte[])value); } else { setMachineDescription((java.nio.ByteBuffer)value); } } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case USER_TOKEN: return getUserToken(); case IMAGE_BASE_ID: return getImageBaseId(); case FILE_SIZE: return getFileSize(); case BLOCK_HASHES: return getBlockHashes(); case MACHINE_DESCRIPTION: return getMachineDescription(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case USER_TOKEN: return isSetUserToken(); case IMAGE_BASE_ID: return isSetImageBaseId(); case FILE_SIZE: return isSetFileSize(); case BLOCK_HASHES: return isSetBlockHashes(); case MACHINE_DESCRIPTION: return isSetMachineDescription(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof requestImageVersionUpload_args) return this.equals((requestImageVersionUpload_args)that); return false; } public boolean equals(requestImageVersionUpload_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_userToken = true && this.isSetUserToken(); boolean that_present_userToken = true && that.isSetUserToken(); if (this_present_userToken || that_present_userToken) { if (!(this_present_userToken && that_present_userToken)) return false; if (!this.userToken.equals(that.userToken)) return false; } boolean this_present_imageBaseId = true && this.isSetImageBaseId(); boolean that_present_imageBaseId = true && that.isSetImageBaseId(); if (this_present_imageBaseId || that_present_imageBaseId) { if (!(this_present_imageBaseId && that_present_imageBaseId)) return false; if (!this.imageBaseId.equals(that.imageBaseId)) return false; } boolean this_present_fileSize = true; boolean that_present_fileSize = true; if (this_present_fileSize || that_present_fileSize) { if (!(this_present_fileSize && that_present_fileSize)) return false; if (this.fileSize != that.fileSize) return false; } boolean this_present_blockHashes = true && this.isSetBlockHashes(); boolean that_present_blockHashes = true && that.isSetBlockHashes(); if (this_present_blockHashes || that_present_blockHashes) { if (!(this_present_blockHashes && that_present_blockHashes)) return false; if (!this.blockHashes.equals(that.blockHashes)) return false; } boolean this_present_machineDescription = true && this.isSetMachineDescription(); boolean that_present_machineDescription = true && that.isSetMachineDescription(); if (this_present_machineDescription || that_present_machineDescription) { if (!(this_present_machineDescription && that_present_machineDescription)) return false; if (!this.machineDescription.equals(that.machineDescription)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287); if (isSetUserToken()) hashCode = hashCode * 8191 + userToken.hashCode(); hashCode = hashCode * 8191 + ((isSetImageBaseId()) ? 131071 : 524287); if (isSetImageBaseId()) hashCode = hashCode * 8191 + imageBaseId.hashCode(); hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(fileSize); hashCode = hashCode * 8191 + ((isSetBlockHashes()) ? 131071 : 524287); if (isSetBlockHashes()) hashCode = hashCode * 8191 + blockHashes.hashCode(); hashCode = hashCode * 8191 + ((isSetMachineDescription()) ? 131071 : 524287); if (isSetMachineDescription()) hashCode = hashCode * 8191 + machineDescription.hashCode(); return hashCode; } @Override public int compareTo(requestImageVersionUpload_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetUserToken(), 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 = java.lang.Boolean.compare(isSetImageBaseId(), 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 = java.lang.Boolean.compare(isSetFileSize(), 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 = java.lang.Boolean.compare(isSetBlockHashes(), other.isSetBlockHashes()); if (lastComparison != 0) { return lastComparison; } if (isSetBlockHashes()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockHashes, other.blockHashes); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetMachineDescription(), other.isSetMachineDescription()); if (lastComparison != 0) { return lastComparison; } if (isSetMachineDescription()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.machineDescription, other.machineDescription); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("requestImageVersionUpload_args("); boolean first = true; sb.append("userToken:"); if (this.userToken == null) { sb.append("null"); } else { sb.append(this.userToken); } first = false; if (!first) sb.append(", "); sb.append("imageBaseId:"); if (this.imageBaseId == null) { sb.append("null"); } else { sb.append(this.imageBaseId); } first = false; if (!first) sb.append(", "); sb.append("fileSize:"); sb.append(this.fileSize); first = false; if (!first) sb.append(", "); sb.append("blockHashes:"); if (this.blockHashes == null) { sb.append("null"); } else { org.apache.thrift.TBaseHelper.toString(this.blockHashes, sb); } first = false; if (!first) sb.append(", "); sb.append("machineDescription:"); if (this.machineDescription == null) { sb.append("null"); } else { org.apache.thrift.TBaseHelper.toString(this.machineDescription, sb); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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 org.apache.thrift.scheme.SchemeFactory { @Override public requestImageVersionUpload_argsStandardScheme getScheme() { return new requestImageVersionUpload_argsStandardScheme(); } } private static class requestImageVersionUpload_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override 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 _list298 = iprot.readListBegin(); struct.blockHashes = new java.util.ArrayList(_list298.size); @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem299; for (int _i300 = 0; _i300 < _list298.size; ++_i300) { _elem299 = iprot.readBinary(); struct.blockHashes.add(_elem299); } iprot.readListEnd(); } struct.setBlockHashesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // MACHINE_DESCRIPTION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.machineDescription = iprot.readBinary(); struct.setMachineDescriptionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override 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 (java.nio.ByteBuffer _iter301 : struct.blockHashes) { oprot.writeBinary(_iter301); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.machineDescription != null) { oprot.writeFieldBegin(MACHINE_DESCRIPTION_FIELD_DESC); oprot.writeBinary(struct.machineDescription); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class requestImageVersionUpload_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public requestImageVersionUpload_argsTupleScheme getScheme() { return new requestImageVersionUpload_argsTupleScheme(); } } private static class requestImageVersionUpload_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, requestImageVersionUpload_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetUserToken()) { optionals.set(0); } if (struct.isSetImageBaseId()) { optionals.set(1); } if (struct.isSetFileSize()) { optionals.set(2); } if (struct.isSetBlockHashes()) { optionals.set(3); } if (struct.isSetMachineDescription()) { optionals.set(4); } oprot.writeBitSet(optionals, 5); if (struct.isSetUserToken()) { oprot.writeString(struct.userToken); } if (struct.isSetImageBaseId()) { oprot.writeString(struct.imageBaseId); } if (struct.isSetFileSize()) { oprot.writeI64(struct.fileSize); } if (struct.isSetBlockHashes()) { { oprot.writeI32(struct.blockHashes.size()); for (java.nio.ByteBuffer _iter302 : struct.blockHashes) { oprot.writeBinary(_iter302); } } } if (struct.isSetMachineDescription()) { oprot.writeBinary(struct.machineDescription); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, requestImageVersionUpload_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(5); if (incoming.get(0)) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); } if (incoming.get(1)) { struct.imageBaseId = iprot.readString(); struct.setImageBaseIdIsSet(true); } if (incoming.get(2)) { struct.fileSize = iprot.readI64(); struct.setFileSizeIsSet(true); } if (incoming.get(3)) { { org.apache.thrift.protocol.TList _list303 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); struct.blockHashes = new java.util.ArrayList(_list303.size); @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem304; for (int _i305 = 0; _i305 < _list303.size; ++_i305) { _elem304 = iprot.readBinary(); struct.blockHashes.add(_elem304); } } struct.setBlockHashesIsSet(true); } if (incoming.get(4)) { struct.machineDescription = iprot.readBinary(); struct.setMachineDescriptionIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 org.apache.thrift.protocol.TField FFFF_FIELD_DESC = new org.apache.thrift.protocol.TField("ffff", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField SDF_FIELD_DESC = new org.apache.thrift.protocol.TField("sdf", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new requestImageVersionUpload_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new requestImageVersionUpload_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TransferInformation success; // required public @org.apache.thrift.annotation.Nullable TTransferRejectedException rejection; // required public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required public @org.apache.thrift.annotation.Nullable TInvocationException ffff; // required public @org.apache.thrift.annotation.Nullable TNotFoundException sdf; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), REJECTION((short)1, "rejection"), AUTH_ERROR((short)2, "authError"), FFFF((short)3, "ffff"), SDF((short)4, "sdf"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // REJECTION return REJECTION; case 2: // AUTH_ERROR return AUTH_ERROR; case 3: // FFFF return FFFF; case 4: // SDF return SDF; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTransferRejectedException.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.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class))); tmpMap.put(_Fields.FFFF, new org.apache.thrift.meta_data.FieldMetaData("ffff", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class))); tmpMap.put(_Fields.SDF, new org.apache.thrift.meta_data.FieldMetaData("sdf", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestImageVersionUpload_result.class, metaDataMap); } public requestImageVersionUpload_result() { } public requestImageVersionUpload_result( TransferInformation success, TTransferRejectedException rejection, TAuthorizationException authError, TInvocationException ffff, TNotFoundException sdf) { this(); this.success = success; this.rejection = rejection; this.authError = authError; this.ffff = ffff; this.sdf = sdf; } /** * Performs a deep copy on 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); } if (other.isSetFfff()) { this.ffff = new TInvocationException(other.ffff); } if (other.isSetSdf()) { this.sdf = new TNotFoundException(other.sdf); } } @Override public requestImageVersionUpload_result deepCopy() { return new requestImageVersionUpload_result(this); } @Override public void clear() { this.success = null; this.rejection = null; this.authError = null; this.ffff = null; this.sdf = null; } @org.apache.thrift.annotation.Nullable public TransferInformation getSuccess() { return this.success; } public requestImageVersionUpload_result setSuccess(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TTransferRejectedException getRejection() { return this.rejection; } public requestImageVersionUpload_result setRejection(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TAuthorizationException getAuthError() { return this.authError; } public requestImageVersionUpload_result setAuthError(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TInvocationException getFfff() { return this.ffff; } public requestImageVersionUpload_result setFfff(@org.apache.thrift.annotation.Nullable TInvocationException ffff) { this.ffff = ffff; return this; } public void unsetFfff() { this.ffff = null; } /** Returns true if field ffff is set (has been assigned a value) and false otherwise */ public boolean isSetFfff() { return this.ffff != null; } public void setFfffIsSet(boolean value) { if (!value) { this.ffff = null; } } @org.apache.thrift.annotation.Nullable public TNotFoundException getSdf() { return this.sdf; } public requestImageVersionUpload_result setSdf(@org.apache.thrift.annotation.Nullable TNotFoundException sdf) { this.sdf = sdf; return this; } public void unsetSdf() { this.sdf = null; } /** Returns true if field sdf is set (has been assigned a value) and false otherwise */ public boolean isSetSdf() { return this.sdf != null; } public void setSdfIsSet(boolean value) { if (!value) { this.sdf = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((TransferInformation)value); } break; case REJECTION: if (value == null) { unsetRejection(); } else { setRejection((TTransferRejectedException)value); } break; case AUTH_ERROR: if (value == null) { unsetAuthError(); } else { setAuthError((TAuthorizationException)value); } break; case FFFF: if (value == null) { unsetFfff(); } else { setFfff((TInvocationException)value); } break; case SDF: if (value == null) { unsetSdf(); } else { setSdf((TNotFoundException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case REJECTION: return getRejection(); case AUTH_ERROR: return getAuthError(); case FFFF: return getFfff(); case SDF: return getSdf(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case REJECTION: return isSetRejection(); case AUTH_ERROR: return isSetAuthError(); case FFFF: return isSetFfff(); case SDF: return isSetSdf(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof requestImageVersionUpload_result) return this.equals((requestImageVersionUpload_result)that); return false; } public boolean equals(requestImageVersionUpload_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_rejection = true && this.isSetRejection(); boolean that_present_rejection = true && that.isSetRejection(); if (this_present_rejection || that_present_rejection) { if (!(this_present_rejection && that_present_rejection)) return false; if (!this.rejection.equals(that.rejection)) return false; } boolean this_present_authError = true && this.isSetAuthError(); boolean that_present_authError = true && that.isSetAuthError(); if (this_present_authError || that_present_authError) { if (!(this_present_authError && that_present_authError)) return false; if (!this.authError.equals(that.authError)) return false; } boolean this_present_ffff = true && this.isSetFfff(); boolean that_present_ffff = true && that.isSetFfff(); if (this_present_ffff || that_present_ffff) { if (!(this_present_ffff && that_present_ffff)) return false; if (!this.ffff.equals(that.ffff)) return false; } boolean this_present_sdf = true && this.isSetSdf(); boolean that_present_sdf = true && that.isSetSdf(); if (this_present_sdf || that_present_sdf) { if (!(this_present_sdf && that_present_sdf)) return false; if (!this.sdf.equals(that.sdf)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetRejection()) ? 131071 : 524287); if (isSetRejection()) hashCode = hashCode * 8191 + rejection.hashCode(); hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287); if (isSetAuthError()) hashCode = hashCode * 8191 + authError.hashCode(); hashCode = hashCode * 8191 + ((isSetFfff()) ? 131071 : 524287); if (isSetFfff()) hashCode = hashCode * 8191 + ffff.hashCode(); hashCode = hashCode * 8191 + ((isSetSdf()) ? 131071 : 524287); if (isSetSdf()) hashCode = hashCode * 8191 + sdf.hashCode(); return hashCode; } @Override public int compareTo(requestImageVersionUpload_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), 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 = java.lang.Boolean.compare(isSetRejection(), 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 = java.lang.Boolean.compare(isSetAuthError(), 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 = java.lang.Boolean.compare(isSetFfff(), other.isSetFfff()); if (lastComparison != 0) { return lastComparison; } if (isSetFfff()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ffff, other.ffff); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetSdf(), other.isSetSdf()); if (lastComparison != 0) { return lastComparison; } if (isSetSdf()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sdf, other.sdf); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("requestImageVersionUpload_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("rejection:"); if (this.rejection == null) { sb.append("null"); } else { sb.append(this.rejection); } first = false; if (!first) sb.append(", "); sb.append("authError:"); if (this.authError == null) { sb.append("null"); } else { sb.append(this.authError); } first = false; if (!first) sb.append(", "); sb.append("ffff:"); if (this.ffff == null) { sb.append("null"); } else { sb.append(this.ffff); } first = false; if (!first) sb.append(", "); sb.append("sdf:"); if (this.sdf == null) { sb.append("null"); } else { sb.append(this.sdf); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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 org.apache.thrift.scheme.SchemeFactory { @Override public requestImageVersionUpload_resultStandardScheme getScheme() { return new requestImageVersionUpload_resultStandardScheme(); } } private static class requestImageVersionUpload_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, requestImageVersionUpload_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new TransferInformation(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // REJECTION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.rejection = new TTransferRejectedException(); struct.rejection.read(iprot); struct.setRejectionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // AUTH_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // FFFF if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.ffff = new TInvocationException(); struct.ffff.read(iprot); struct.setFfffIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // SDF if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.sdf = new TNotFoundException(); struct.sdf.read(iprot); struct.setSdfIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, requestImageVersionUpload_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.rejection != null) { oprot.writeFieldBegin(REJECTION_FIELD_DESC); struct.rejection.write(oprot); oprot.writeFieldEnd(); } if (struct.authError != null) { oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); struct.authError.write(oprot); oprot.writeFieldEnd(); } if (struct.ffff != null) { oprot.writeFieldBegin(FFFF_FIELD_DESC); struct.ffff.write(oprot); oprot.writeFieldEnd(); } if (struct.sdf != null) { oprot.writeFieldBegin(SDF_FIELD_DESC); struct.sdf.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class requestImageVersionUpload_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public requestImageVersionUpload_resultTupleScheme getScheme() { return new requestImageVersionUpload_resultTupleScheme(); } } private static class requestImageVersionUpload_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, requestImageVersionUpload_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetRejection()) { optionals.set(1); } if (struct.isSetAuthError()) { optionals.set(2); } if (struct.isSetFfff()) { optionals.set(3); } if (struct.isSetSdf()) { optionals.set(4); } oprot.writeBitSet(optionals, 5); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetRejection()) { struct.rejection.write(oprot); } if (struct.isSetAuthError()) { struct.authError.write(oprot); } if (struct.isSetFfff()) { struct.ffff.write(oprot); } if (struct.isSetSdf()) { struct.sdf.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, requestImageVersionUpload_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(5); if (incoming.get(0)) { struct.success = new TransferInformation(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.rejection = new TTransferRejectedException(); struct.rejection.read(iprot); struct.setRejectionIsSet(true); } if (incoming.get(2)) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } if (incoming.get(3)) { struct.ffff = new TInvocationException(); struct.ffff.read(iprot); struct.setFfffIsSet(true); } if (incoming.get(4)) { struct.sdf = new TNotFoundException(); struct.sdf.read(iprot); struct.setSdfIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class updateBlockHashes_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("updateBlockHashes_args"); private static final org.apache.thrift.protocol.TField UPLOAD_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("uploadToken", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField BLOCK_HASHES_FIELD_DESC = new org.apache.thrift.protocol.TField("blockHashes", org.apache.thrift.protocol.TType.LIST, (short)2); private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new updateBlockHashes_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new updateBlockHashes_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String uploadToken; // required public @org.apache.thrift.annotation.Nullable java.util.List blockHashes; // required public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { UPLOAD_TOKEN((short)1, "uploadToken"), BLOCK_HASHES((short)2, "blockHashes"), USER_TOKEN((short)3, "userToken"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // UPLOAD_TOKEN return UPLOAD_TOKEN; case 2: // BLOCK_HASHES return BLOCK_HASHES; case 3: // USER_TOKEN return USER_TOKEN; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.UPLOAD_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("uploadToken", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); tmpMap.put(_Fields.BLOCK_HASHES, new org.apache.thrift.meta_data.FieldMetaData("blockHashes", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); tmpMap.put(_Fields.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateBlockHashes_args.class, metaDataMap); } public updateBlockHashes_args() { } public updateBlockHashes_args( java.lang.String uploadToken, java.util.List blockHashes, java.lang.String userToken) { this(); this.uploadToken = uploadToken; this.blockHashes = blockHashes; this.userToken = userToken; } /** * Performs a deep copy on other. */ public updateBlockHashes_args(updateBlockHashes_args other) { if (other.isSetUploadToken()) { this.uploadToken = other.uploadToken; } if (other.isSetBlockHashes()) { java.util.List __this__blockHashes = new java.util.ArrayList(other.blockHashes); this.blockHashes = __this__blockHashes; } if (other.isSetUserToken()) { this.userToken = other.userToken; } } @Override public updateBlockHashes_args deepCopy() { return new updateBlockHashes_args(this); } @Override public void clear() { this.uploadToken = null; this.blockHashes = null; this.userToken = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getUploadToken() { return this.uploadToken; } public updateBlockHashes_args setUploadToken(@org.apache.thrift.annotation.Nullable java.lang.String uploadToken) { this.uploadToken = uploadToken; return this; } public void unsetUploadToken() { this.uploadToken = null; } /** Returns true if field uploadToken is set (has been assigned a value) and false otherwise */ public boolean isSetUploadToken() { return this.uploadToken != null; } public void setUploadTokenIsSet(boolean value) { if (!value) { this.uploadToken = null; } } public int getBlockHashesSize() { return (this.blockHashes == null) ? 0 : this.blockHashes.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator getBlockHashesIterator() { return (this.blockHashes == null) ? null : this.blockHashes.iterator(); } public void addToBlockHashes(java.nio.ByteBuffer elem) { if (this.blockHashes == null) { this.blockHashes = new java.util.ArrayList(); } this.blockHashes.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List getBlockHashes() { return this.blockHashes; } public updateBlockHashes_args setBlockHashes(@org.apache.thrift.annotation.Nullable java.util.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; } } @org.apache.thrift.annotation.Nullable public java.lang.String getUserToken() { return this.userToken; } public updateBlockHashes_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.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; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case UPLOAD_TOKEN: if (value == null) { unsetUploadToken(); } else { setUploadToken((java.lang.String)value); } break; case BLOCK_HASHES: if (value == null) { unsetBlockHashes(); } else { setBlockHashes((java.util.List)value); } break; case USER_TOKEN: if (value == null) { unsetUserToken(); } else { setUserToken((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case UPLOAD_TOKEN: return getUploadToken(); case BLOCK_HASHES: return getBlockHashes(); case USER_TOKEN: return getUserToken(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case UPLOAD_TOKEN: return isSetUploadToken(); case BLOCK_HASHES: return isSetBlockHashes(); case USER_TOKEN: return isSetUserToken(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof updateBlockHashes_args) return this.equals((updateBlockHashes_args)that); return false; } public boolean equals(updateBlockHashes_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_uploadToken = true && this.isSetUploadToken(); boolean that_present_uploadToken = true && that.isSetUploadToken(); if (this_present_uploadToken || that_present_uploadToken) { if (!(this_present_uploadToken && that_present_uploadToken)) return false; if (!this.uploadToken.equals(that.uploadToken)) return false; } boolean this_present_blockHashes = true && this.isSetBlockHashes(); boolean that_present_blockHashes = true && that.isSetBlockHashes(); if (this_present_blockHashes || that_present_blockHashes) { if (!(this_present_blockHashes && that_present_blockHashes)) return false; if (!this.blockHashes.equals(that.blockHashes)) return false; } boolean this_present_userToken = true && this.isSetUserToken(); boolean that_present_userToken = true && that.isSetUserToken(); if (this_present_userToken || that_present_userToken) { if (!(this_present_userToken && that_present_userToken)) return false; if (!this.userToken.equals(that.userToken)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUploadToken()) ? 131071 : 524287); if (isSetUploadToken()) hashCode = hashCode * 8191 + uploadToken.hashCode(); hashCode = hashCode * 8191 + ((isSetBlockHashes()) ? 131071 : 524287); if (isSetBlockHashes()) hashCode = hashCode * 8191 + blockHashes.hashCode(); hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287); if (isSetUserToken()) hashCode = hashCode * 8191 + userToken.hashCode(); return hashCode; } @Override public int compareTo(updateBlockHashes_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetUploadToken(), other.isSetUploadToken()); if (lastComparison != 0) { return lastComparison; } if (isSetUploadToken()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uploadToken, other.uploadToken); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetBlockHashes(), other.isSetBlockHashes()); if (lastComparison != 0) { return lastComparison; } if (isSetBlockHashes()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockHashes, other.blockHashes); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetUserToken(), 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; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("updateBlockHashes_args("); boolean first = true; sb.append("uploadToken:"); if (this.uploadToken == null) { sb.append("null"); } else { sb.append(this.uploadToken); } first = false; if (!first) sb.append(", "); sb.append("blockHashes:"); if (this.blockHashes == null) { sb.append("null"); } else { org.apache.thrift.TBaseHelper.toString(this.blockHashes, sb); } first = false; if (!first) sb.append(", "); sb.append("userToken:"); if (this.userToken == null) { sb.append("null"); } else { sb.append(this.userToken); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class updateBlockHashes_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public updateBlockHashes_argsStandardScheme getScheme() { return new updateBlockHashes_argsStandardScheme(); } } private static class updateBlockHashes_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, updateBlockHashes_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // UPLOAD_TOKEN if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.uploadToken = iprot.readString(); struct.setUploadTokenIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // BLOCK_HASHES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list306 = iprot.readListBegin(); struct.blockHashes = new java.util.ArrayList(_list306.size); @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem307; for (int _i308 = 0; _i308 < _list306.size; ++_i308) { _elem307 = iprot.readBinary(); struct.blockHashes.add(_elem307); } iprot.readListEnd(); } struct.setBlockHashesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // USER_TOKEN if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, updateBlockHashes_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.uploadToken != null) { oprot.writeFieldBegin(UPLOAD_TOKEN_FIELD_DESC); oprot.writeString(struct.uploadToken); oprot.writeFieldEnd(); } if (struct.blockHashes != null) { oprot.writeFieldBegin(BLOCK_HASHES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.blockHashes.size())); for (java.nio.ByteBuffer _iter309 : struct.blockHashes) { oprot.writeBinary(_iter309); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.userToken != null) { oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC); oprot.writeString(struct.userToken); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class updateBlockHashes_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public updateBlockHashes_argsTupleScheme getScheme() { return new updateBlockHashes_argsTupleScheme(); } } private static class updateBlockHashes_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, updateBlockHashes_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetUploadToken()) { optionals.set(0); } if (struct.isSetBlockHashes()) { optionals.set(1); } if (struct.isSetUserToken()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetUploadToken()) { oprot.writeString(struct.uploadToken); } if (struct.isSetBlockHashes()) { { oprot.writeI32(struct.blockHashes.size()); for (java.nio.ByteBuffer _iter310 : struct.blockHashes) { oprot.writeBinary(_iter310); } } } if (struct.isSetUserToken()) { oprot.writeString(struct.userToken); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, updateBlockHashes_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.uploadToken = iprot.readString(); struct.setUploadTokenIsSet(true); } if (incoming.get(1)) { { org.apache.thrift.protocol.TList _list311 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); struct.blockHashes = new java.util.ArrayList(_list311.size); @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem312; for (int _i313 = 0; _i313 < _list311.size; ++_i313) { _elem312 = iprot.readBinary(); struct.blockHashes.add(_elem312); } } struct.setBlockHashesIsSet(true); } if (incoming.get(2)) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class updateBlockHashes_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("updateBlockHashes_result"); private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new updateBlockHashes_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new updateBlockHashes_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TInvalidTokenException ex1; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { EX1((short)1, "ex1"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // EX1 return EX1; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvalidTokenException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateBlockHashes_result.class, metaDataMap); } public updateBlockHashes_result() { } public updateBlockHashes_result( TInvalidTokenException ex1) { this(); this.ex1 = ex1; } /** * Performs a deep copy on other. */ public updateBlockHashes_result(updateBlockHashes_result other) { if (other.isSetEx1()) { this.ex1 = new TInvalidTokenException(other.ex1); } } @Override public updateBlockHashes_result deepCopy() { return new updateBlockHashes_result(this); } @Override public void clear() { this.ex1 = null; } @org.apache.thrift.annotation.Nullable public TInvalidTokenException getEx1() { return this.ex1; } public updateBlockHashes_result setEx1(@org.apache.thrift.annotation.Nullable 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; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case EX1: if (value == null) { unsetEx1(); } else { setEx1((TInvalidTokenException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case EX1: return getEx1(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case EX1: return isSetEx1(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof updateBlockHashes_result) return this.equals((updateBlockHashes_result)that); return false; } public boolean equals(updateBlockHashes_result that) { if (that == null) return false; if (this == that) return true; 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() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetEx1()) ? 131071 : 524287); if (isSetEx1()) hashCode = hashCode * 8191 + ex1.hashCode(); return hashCode; } @Override public int compareTo(updateBlockHashes_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetEx1(), 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; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("updateBlockHashes_result("); boolean first = true; sb.append("ex1:"); if (this.ex1 == null) { sb.append("null"); } else { sb.append(this.ex1); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class updateBlockHashes_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public updateBlockHashes_resultStandardScheme getScheme() { return new updateBlockHashes_resultStandardScheme(); } } private static class updateBlockHashes_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, updateBlockHashes_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // EX1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.ex1 = new TInvalidTokenException(); struct.ex1.read(iprot); struct.setEx1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, updateBlockHashes_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.ex1 != null) { oprot.writeFieldBegin(EX1_FIELD_DESC); struct.ex1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class updateBlockHashes_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public updateBlockHashes_resultTupleScheme getScheme() { return new updateBlockHashes_resultTupleScheme(); } } private static class updateBlockHashes_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, updateBlockHashes_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetEx1()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetEx1()) { struct.ex1.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, updateBlockHashes_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.ex1 = new TInvalidTokenException(); struct.ex1.read(iprot); struct.setEx1IsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class setUploadOptions_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("setUploadOptions_args"); private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField UPLOAD_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("uploadToken", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("options", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setUploadOptions_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setUploadOptions_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required public @org.apache.thrift.annotation.Nullable java.lang.String uploadToken; // required public @org.apache.thrift.annotation.Nullable UploadOptions options; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { USER_TOKEN((short)1, "userToken"), UPLOAD_TOKEN((short)2, "uploadToken"), OPTIONS((short)3, "options"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // USER_TOKEN return USER_TOKEN; case 2: // UPLOAD_TOKEN return UPLOAD_TOKEN; case 3: // OPTIONS return OPTIONS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); tmpMap.put(_Fields.UPLOAD_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("uploadToken", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); tmpMap.put(_Fields.OPTIONS, new org.apache.thrift.meta_data.FieldMetaData("options", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UploadOptions.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setUploadOptions_args.class, metaDataMap); } public setUploadOptions_args() { } public setUploadOptions_args( java.lang.String userToken, java.lang.String uploadToken, UploadOptions options) { this(); this.userToken = userToken; this.uploadToken = uploadToken; this.options = options; } /** * Performs a deep copy on other. */ public setUploadOptions_args(setUploadOptions_args other) { if (other.isSetUserToken()) { this.userToken = other.userToken; } if (other.isSetUploadToken()) { this.uploadToken = other.uploadToken; } if (other.isSetOptions()) { this.options = new UploadOptions(other.options); } } @Override public setUploadOptions_args deepCopy() { return new setUploadOptions_args(this); } @Override public void clear() { this.userToken = null; this.uploadToken = null; this.options = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getUserToken() { return this.userToken; } public setUploadOptions_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.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; } } @org.apache.thrift.annotation.Nullable public java.lang.String getUploadToken() { return this.uploadToken; } public setUploadOptions_args setUploadToken(@org.apache.thrift.annotation.Nullable java.lang.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; } } @org.apache.thrift.annotation.Nullable public UploadOptions getOptions() { return this.options; } public setUploadOptions_args setOptions(@org.apache.thrift.annotation.Nullable UploadOptions options) { this.options = options; return this; } public void unsetOptions() { this.options = null; } /** Returns true if field options is set (has been assigned a value) and false otherwise */ public boolean isSetOptions() { return this.options != null; } public void setOptionsIsSet(boolean value) { if (!value) { this.options = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case USER_TOKEN: if (value == null) { unsetUserToken(); } else { setUserToken((java.lang.String)value); } break; case UPLOAD_TOKEN: if (value == null) { unsetUploadToken(); } else { setUploadToken((java.lang.String)value); } break; case OPTIONS: if (value == null) { unsetOptions(); } else { setOptions((UploadOptions)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case USER_TOKEN: return getUserToken(); case UPLOAD_TOKEN: return getUploadToken(); case OPTIONS: return getOptions(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case USER_TOKEN: return isSetUserToken(); case UPLOAD_TOKEN: return isSetUploadToken(); case OPTIONS: return isSetOptions(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof setUploadOptions_args) return this.equals((setUploadOptions_args)that); return false; } public boolean equals(setUploadOptions_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_userToken = true && this.isSetUserToken(); boolean that_present_userToken = true && that.isSetUserToken(); if (this_present_userToken || that_present_userToken) { if (!(this_present_userToken && that_present_userToken)) return false; if (!this.userToken.equals(that.userToken)) return false; } boolean this_present_uploadToken = true && this.isSetUploadToken(); boolean that_present_uploadToken = true && that.isSetUploadToken(); if (this_present_uploadToken || that_present_uploadToken) { if (!(this_present_uploadToken && that_present_uploadToken)) return false; if (!this.uploadToken.equals(that.uploadToken)) return false; } boolean this_present_options = true && this.isSetOptions(); boolean that_present_options = true && that.isSetOptions(); if (this_present_options || that_present_options) { if (!(this_present_options && that_present_options)) return false; if (!this.options.equals(that.options)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287); if (isSetUserToken()) hashCode = hashCode * 8191 + userToken.hashCode(); hashCode = hashCode * 8191 + ((isSetUploadToken()) ? 131071 : 524287); if (isSetUploadToken()) hashCode = hashCode * 8191 + uploadToken.hashCode(); hashCode = hashCode * 8191 + ((isSetOptions()) ? 131071 : 524287); if (isSetOptions()) hashCode = hashCode * 8191 + options.hashCode(); return hashCode; } @Override public int compareTo(setUploadOptions_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetUserToken(), 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 = java.lang.Boolean.compare(isSetUploadToken(), other.isSetUploadToken()); if (lastComparison != 0) { return lastComparison; } if (isSetUploadToken()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uploadToken, other.uploadToken); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetOptions(), other.isSetOptions()); if (lastComparison != 0) { return lastComparison; } if (isSetOptions()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.options, other.options); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("setUploadOptions_args("); boolean first = true; sb.append("userToken:"); if (this.userToken == null) { sb.append("null"); } else { sb.append(this.userToken); } first = false; if (!first) sb.append(", "); sb.append("uploadToken:"); if (this.uploadToken == null) { sb.append("null"); } else { sb.append(this.uploadToken); } first = false; if (!first) sb.append(", "); sb.append("options:"); if (this.options == null) { sb.append("null"); } else { sb.append(this.options); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (options != null) { options.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class setUploadOptions_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public setUploadOptions_argsStandardScheme getScheme() { return new setUploadOptions_argsStandardScheme(); } } private static class setUploadOptions_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, setUploadOptions_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // USER_TOKEN if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // UPLOAD_TOKEN if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.uploadToken = iprot.readString(); struct.setUploadTokenIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // OPTIONS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.options = new UploadOptions(); struct.options.read(iprot); struct.setOptionsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, setUploadOptions_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.userToken != null) { oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC); oprot.writeString(struct.userToken); oprot.writeFieldEnd(); } if (struct.uploadToken != null) { oprot.writeFieldBegin(UPLOAD_TOKEN_FIELD_DESC); oprot.writeString(struct.uploadToken); oprot.writeFieldEnd(); } if (struct.options != null) { oprot.writeFieldBegin(OPTIONS_FIELD_DESC); struct.options.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class setUploadOptions_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public setUploadOptions_argsTupleScheme getScheme() { return new setUploadOptions_argsTupleScheme(); } } private static class setUploadOptions_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, setUploadOptions_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetUserToken()) { optionals.set(0); } if (struct.isSetUploadToken()) { optionals.set(1); } if (struct.isSetOptions()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetUserToken()) { oprot.writeString(struct.userToken); } if (struct.isSetUploadToken()) { oprot.writeString(struct.uploadToken); } if (struct.isSetOptions()) { struct.options.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, setUploadOptions_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); } if (incoming.get(1)) { struct.uploadToken = iprot.readString(); struct.setUploadTokenIsSet(true); } if (incoming.get(2)) { struct.options = new UploadOptions(); struct.options.read(iprot); struct.setOptionsIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class setUploadOptions_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("setUploadOptions_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField FROOTLOOPS_FIELD_DESC = new org.apache.thrift.protocol.TField("frootloops", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField IMCYBORGBUTTHATSOK_FIELD_DESC = new org.apache.thrift.protocol.TField("imcyborgbutthatsok", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setUploadOptions_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setUploadOptions_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable UploadOptions success; // required public @org.apache.thrift.annotation.Nullable TAuthorizationException frootloops; // required public @org.apache.thrift.annotation.Nullable TInvalidTokenException imcyborgbutthatsok; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), FROOTLOOPS((short)1, "frootloops"), IMCYBORGBUTTHATSOK((short)2, "imcyborgbutthatsok"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // FROOTLOOPS return FROOTLOOPS; case 2: // IMCYBORGBUTTHATSOK return IMCYBORGBUTTHATSOK; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UploadOptions.class))); tmpMap.put(_Fields.FROOTLOOPS, new org.apache.thrift.meta_data.FieldMetaData("frootloops", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class))); tmpMap.put(_Fields.IMCYBORGBUTTHATSOK, new org.apache.thrift.meta_data.FieldMetaData("imcyborgbutthatsok", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvalidTokenException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setUploadOptions_result.class, metaDataMap); } public setUploadOptions_result() { } public setUploadOptions_result( UploadOptions success, TAuthorizationException frootloops, TInvalidTokenException imcyborgbutthatsok) { this(); this.success = success; this.frootloops = frootloops; this.imcyborgbutthatsok = imcyborgbutthatsok; } /** * Performs a deep copy on other. */ public setUploadOptions_result(setUploadOptions_result other) { if (other.isSetSuccess()) { this.success = new UploadOptions(other.success); } if (other.isSetFrootloops()) { this.frootloops = new TAuthorizationException(other.frootloops); } if (other.isSetImcyborgbutthatsok()) { this.imcyborgbutthatsok = new TInvalidTokenException(other.imcyborgbutthatsok); } } @Override public setUploadOptions_result deepCopy() { return new setUploadOptions_result(this); } @Override public void clear() { this.success = null; this.frootloops = null; this.imcyborgbutthatsok = null; } @org.apache.thrift.annotation.Nullable public UploadOptions getSuccess() { return this.success; } public setUploadOptions_result setSuccess(@org.apache.thrift.annotation.Nullable UploadOptions success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TAuthorizationException getFrootloops() { return this.frootloops; } public setUploadOptions_result setFrootloops(@org.apache.thrift.annotation.Nullable TAuthorizationException frootloops) { this.frootloops = frootloops; return this; } public void unsetFrootloops() { this.frootloops = null; } /** Returns true if field frootloops is set (has been assigned a value) and false otherwise */ public boolean isSetFrootloops() { return this.frootloops != null; } public void setFrootloopsIsSet(boolean value) { if (!value) { this.frootloops = null; } } @org.apache.thrift.annotation.Nullable public TInvalidTokenException getImcyborgbutthatsok() { return this.imcyborgbutthatsok; } public setUploadOptions_result setImcyborgbutthatsok(@org.apache.thrift.annotation.Nullable TInvalidTokenException imcyborgbutthatsok) { this.imcyborgbutthatsok = imcyborgbutthatsok; return this; } public void unsetImcyborgbutthatsok() { this.imcyborgbutthatsok = null; } /** Returns true if field imcyborgbutthatsok is set (has been assigned a value) and false otherwise */ public boolean isSetImcyborgbutthatsok() { return this.imcyborgbutthatsok != null; } public void setImcyborgbutthatsokIsSet(boolean value) { if (!value) { this.imcyborgbutthatsok = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((UploadOptions)value); } break; case FROOTLOOPS: if (value == null) { unsetFrootloops(); } else { setFrootloops((TAuthorizationException)value); } break; case IMCYBORGBUTTHATSOK: if (value == null) { unsetImcyborgbutthatsok(); } else { setImcyborgbutthatsok((TInvalidTokenException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case FROOTLOOPS: return getFrootloops(); case IMCYBORGBUTTHATSOK: return getImcyborgbutthatsok(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case FROOTLOOPS: return isSetFrootloops(); case IMCYBORGBUTTHATSOK: return isSetImcyborgbutthatsok(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof setUploadOptions_result) return this.equals((setUploadOptions_result)that); return false; } public boolean equals(setUploadOptions_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_frootloops = true && this.isSetFrootloops(); boolean that_present_frootloops = true && that.isSetFrootloops(); if (this_present_frootloops || that_present_frootloops) { if (!(this_present_frootloops && that_present_frootloops)) return false; if (!this.frootloops.equals(that.frootloops)) return false; } boolean this_present_imcyborgbutthatsok = true && this.isSetImcyborgbutthatsok(); boolean that_present_imcyborgbutthatsok = true && that.isSetImcyborgbutthatsok(); if (this_present_imcyborgbutthatsok || that_present_imcyborgbutthatsok) { if (!(this_present_imcyborgbutthatsok && that_present_imcyborgbutthatsok)) return false; if (!this.imcyborgbutthatsok.equals(that.imcyborgbutthatsok)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetFrootloops()) ? 131071 : 524287); if (isSetFrootloops()) hashCode = hashCode * 8191 + frootloops.hashCode(); hashCode = hashCode * 8191 + ((isSetImcyborgbutthatsok()) ? 131071 : 524287); if (isSetImcyborgbutthatsok()) hashCode = hashCode * 8191 + imcyborgbutthatsok.hashCode(); return hashCode; } @Override public int compareTo(setUploadOptions_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), 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 = java.lang.Boolean.compare(isSetFrootloops(), other.isSetFrootloops()); if (lastComparison != 0) { return lastComparison; } if (isSetFrootloops()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.frootloops, other.frootloops); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetImcyborgbutthatsok(), other.isSetImcyborgbutthatsok()); if (lastComparison != 0) { return lastComparison; } if (isSetImcyborgbutthatsok()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imcyborgbutthatsok, other.imcyborgbutthatsok); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("setUploadOptions_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("frootloops:"); if (this.frootloops == null) { sb.append("null"); } else { sb.append(this.frootloops); } first = false; if (!first) sb.append(", "); sb.append("imcyborgbutthatsok:"); if (this.imcyborgbutthatsok == null) { sb.append("null"); } else { sb.append(this.imcyborgbutthatsok); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class setUploadOptions_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public setUploadOptions_resultStandardScheme getScheme() { return new setUploadOptions_resultStandardScheme(); } } private static class setUploadOptions_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, setUploadOptions_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new UploadOptions(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // FROOTLOOPS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.frootloops = new TAuthorizationException(); struct.frootloops.read(iprot); struct.setFrootloopsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // IMCYBORGBUTTHATSOK if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.imcyborgbutthatsok = new TInvalidTokenException(); struct.imcyborgbutthatsok.read(iprot); struct.setImcyborgbutthatsokIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, setUploadOptions_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.frootloops != null) { oprot.writeFieldBegin(FROOTLOOPS_FIELD_DESC); struct.frootloops.write(oprot); oprot.writeFieldEnd(); } if (struct.imcyborgbutthatsok != null) { oprot.writeFieldBegin(IMCYBORGBUTTHATSOK_FIELD_DESC); struct.imcyborgbutthatsok.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class setUploadOptions_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public setUploadOptions_resultTupleScheme getScheme() { return new setUploadOptions_resultTupleScheme(); } } private static class setUploadOptions_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, setUploadOptions_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetFrootloops()) { optionals.set(1); } if (struct.isSetImcyborgbutthatsok()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetFrootloops()) { struct.frootloops.write(oprot); } if (struct.isSetImcyborgbutthatsok()) { struct.imcyborgbutthatsok.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, setUploadOptions_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.success = new UploadOptions(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.frootloops = new TAuthorizationException(); struct.frootloops.read(iprot); struct.setFrootloopsIsSet(true); } if (incoming.get(2)) { struct.imcyborgbutthatsok = new TInvalidTokenException(); struct.imcyborgbutthatsok.read(iprot); struct.setImcyborgbutthatsokIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new cancelUpload_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new cancelUpload_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.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 java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelUpload_args.class, metaDataMap); } public cancelUpload_args() { } public cancelUpload_args( java.lang.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; } } @Override public cancelUpload_args deepCopy() { return new cancelUpload_args(this); } @Override public void clear() { this.uploadToken = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getUploadToken() { return this.uploadToken; } public cancelUpload_args setUploadToken(@org.apache.thrift.annotation.Nullable java.lang.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; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case UPLOAD_TOKEN: if (value == null) { unsetUploadToken(); } else { setUploadToken((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case UPLOAD_TOKEN: return getUploadToken(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case UPLOAD_TOKEN: return isSetUploadToken(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof cancelUpload_args) return this.equals((cancelUpload_args)that); return false; } public boolean equals(cancelUpload_args that) { if (that == null) return false; if (this == that) return true; 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() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUploadToken()) ? 131071 : 524287); if (isSetUploadToken()) hashCode = hashCode * 8191 + uploadToken.hashCode(); return hashCode; } @Override public int compareTo(cancelUpload_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetUploadToken(), 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; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory { @Override public cancelUpload_argsStandardScheme getScheme() { return new cancelUpload_argsStandardScheme(); } } private static class cancelUpload_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override 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(); } @Override 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 org.apache.thrift.scheme.SchemeFactory { @Override public cancelUpload_argsTupleScheme getScheme() { return new cancelUpload_argsTupleScheme(); } } private static class cancelUpload_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, cancelUpload_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.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 { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.uploadToken = iprot.readString(); struct.setUploadTokenIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new cancelUpload_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new cancelUpload_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TInvalidTokenException ex1; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { EX1((short)1, "ex1"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // EX1 return EX1; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvalidTokenException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelUpload_result.class, metaDataMap); } public cancelUpload_result() { } public cancelUpload_result( TInvalidTokenException ex1) { this(); this.ex1 = ex1; } /** * Performs a deep copy on other. */ public cancelUpload_result(cancelUpload_result other) { if (other.isSetEx1()) { this.ex1 = new TInvalidTokenException(other.ex1); } } @Override public cancelUpload_result deepCopy() { return new cancelUpload_result(this); } @Override public void clear() { this.ex1 = null; } @org.apache.thrift.annotation.Nullable public TInvalidTokenException getEx1() { return this.ex1; } public cancelUpload_result setEx1(@org.apache.thrift.annotation.Nullable 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; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case EX1: if (value == null) { unsetEx1(); } else { setEx1((TInvalidTokenException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case EX1: return getEx1(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case EX1: return isSetEx1(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof cancelUpload_result) return this.equals((cancelUpload_result)that); return false; } public boolean equals(cancelUpload_result that) { if (that == null) return false; if (this == that) return true; 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() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetEx1()) ? 131071 : 524287); if (isSetEx1()) hashCode = hashCode * 8191 + ex1.hashCode(); return hashCode; } @Override public int compareTo(cancelUpload_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetEx1(), 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; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("cancelUpload_result("); boolean first = true; sb.append("ex1:"); if (this.ex1 == null) { sb.append("null"); } else { sb.append(this.ex1); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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 org.apache.thrift.scheme.SchemeFactory { @Override public cancelUpload_resultStandardScheme getScheme() { return new cancelUpload_resultStandardScheme(); } } private static class cancelUpload_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, cancelUpload_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // EX1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.ex1 = new TInvalidTokenException(); struct.ex1.read(iprot); struct.setEx1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, cancelUpload_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.ex1 != null) { oprot.writeFieldBegin(EX1_FIELD_DESC); struct.ex1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class cancelUpload_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public cancelUpload_resultTupleScheme getScheme() { return new cancelUpload_resultTupleScheme(); } } private static class cancelUpload_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, cancelUpload_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetEx1()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetEx1()) { struct.ex1.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, cancelUpload_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.ex1 = new TInvalidTokenException(); struct.ex1.read(iprot); struct.setEx1IsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new queryUploadStatus_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new queryUploadStatus_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.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 java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(queryUploadStatus_args.class, metaDataMap); } public queryUploadStatus_args() { } public queryUploadStatus_args( java.lang.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; } } @Override public queryUploadStatus_args deepCopy() { return new queryUploadStatus_args(this); } @Override public void clear() { this.uploadToken = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getUploadToken() { return this.uploadToken; } public queryUploadStatus_args setUploadToken(@org.apache.thrift.annotation.Nullable java.lang.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; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case UPLOAD_TOKEN: if (value == null) { unsetUploadToken(); } else { setUploadToken((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case UPLOAD_TOKEN: return getUploadToken(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case UPLOAD_TOKEN: return isSetUploadToken(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof queryUploadStatus_args) return this.equals((queryUploadStatus_args)that); return false; } public boolean equals(queryUploadStatus_args that) { if (that == null) return false; if (this == that) return true; 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() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUploadToken()) ? 131071 : 524287); if (isSetUploadToken()) hashCode = hashCode * 8191 + uploadToken.hashCode(); return hashCode; } @Override public int compareTo(queryUploadStatus_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetUploadToken(), 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; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory { @Override public queryUploadStatus_argsStandardScheme getScheme() { return new queryUploadStatus_argsStandardScheme(); } } private static class queryUploadStatus_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override 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(); } @Override 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 org.apache.thrift.scheme.SchemeFactory { @Override public queryUploadStatus_argsTupleScheme getScheme() { return new queryUploadStatus_argsTupleScheme(); } } private static class queryUploadStatus_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, queryUploadStatus_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.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 { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.uploadToken = iprot.readString(); struct.setUploadTokenIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new queryUploadStatus_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new queryUploadStatus_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TransferStatus success; // required public @org.apache.thrift.annotation.Nullable 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 java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TransferStatus.class))); tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvalidTokenException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(queryUploadStatus_result.class, metaDataMap); } public queryUploadStatus_result() { } public queryUploadStatus_result( TransferStatus success, TInvalidTokenException ex1) { this(); this.success = success; this.ex1 = ex1; } /** * Performs a deep copy on other. */ public queryUploadStatus_result(queryUploadStatus_result other) { if (other.isSetSuccess()) { this.success = new TransferStatus(other.success); } if (other.isSetEx1()) { this.ex1 = new TInvalidTokenException(other.ex1); } } @Override public queryUploadStatus_result deepCopy() { return new queryUploadStatus_result(this); } @Override public void clear() { this.success = null; this.ex1 = null; } @org.apache.thrift.annotation.Nullable public TransferStatus getSuccess() { return this.success; } public queryUploadStatus_result setSuccess(@org.apache.thrift.annotation.Nullable TransferStatus success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TInvalidTokenException getEx1() { return this.ex1; } public queryUploadStatus_result setEx1(@org.apache.thrift.annotation.Nullable 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; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((TransferStatus)value); } break; case EX1: if (value == null) { unsetEx1(); } else { setEx1((TInvalidTokenException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case EX1: return getEx1(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case EX1: return isSetEx1(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof queryUploadStatus_result) return this.equals((queryUploadStatus_result)that); return false; } public boolean equals(queryUploadStatus_result that) { if (that == null) return false; if (this == that) return true; 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() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetEx1()) ? 131071 : 524287); if (isSetEx1()) hashCode = hashCode * 8191 + ex1.hashCode(); return hashCode; } @Override public int compareTo(queryUploadStatus_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), 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 = java.lang.Boolean.compare(isSetEx1(), 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; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory { @Override public queryUploadStatus_resultStandardScheme getScheme() { return new queryUploadStatus_resultStandardScheme(); } } private static class queryUploadStatus_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, queryUploadStatus_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new TransferStatus(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // EX1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.ex1 = new TInvalidTokenException(); struct.ex1.read(iprot); struct.setEx1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override 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 org.apache.thrift.scheme.SchemeFactory { @Override public queryUploadStatus_resultTupleScheme getScheme() { return new queryUploadStatus_resultTupleScheme(); } } private static class queryUploadStatus_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, queryUploadStatus_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.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 { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new TransferStatus(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.ex1 = new TInvalidTokenException(); struct.ex1.read(iprot); struct.setEx1IsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new requestDownload_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new requestDownload_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required public @org.apache.thrift.annotation.Nullable java.lang.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 java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestDownload_args.class, metaDataMap); } public requestDownload_args() { } public requestDownload_args( java.lang.String userToken, java.lang.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; } } @Override public requestDownload_args deepCopy() { return new requestDownload_args(this); } @Override public void clear() { this.userToken = null; this.imageVersionId = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getUserToken() { return this.userToken; } public requestDownload_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.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; } } @org.apache.thrift.annotation.Nullable public java.lang.String getImageVersionId() { return this.imageVersionId; } public requestDownload_args setImageVersionId(@org.apache.thrift.annotation.Nullable java.lang.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; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case USER_TOKEN: if (value == null) { unsetUserToken(); } else { setUserToken((java.lang.String)value); } break; case IMAGE_VERSION_ID: if (value == null) { unsetImageVersionId(); } else { setImageVersionId((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case USER_TOKEN: return getUserToken(); case IMAGE_VERSION_ID: return getImageVersionId(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case USER_TOKEN: return isSetUserToken(); case IMAGE_VERSION_ID: return isSetImageVersionId(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof requestDownload_args) return this.equals((requestDownload_args)that); return false; } public boolean equals(requestDownload_args that) { if (that == null) return false; if (this == that) return true; 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() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287); if (isSetUserToken()) hashCode = hashCode * 8191 + userToken.hashCode(); hashCode = hashCode * 8191 + ((isSetImageVersionId()) ? 131071 : 524287); if (isSetImageVersionId()) hashCode = hashCode * 8191 + imageVersionId.hashCode(); return hashCode; } @Override public int compareTo(requestDownload_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetUserToken(), 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 = java.lang.Boolean.compare(isSetImageVersionId(), 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; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory { @Override public requestDownload_argsStandardScheme getScheme() { return new requestDownload_argsStandardScheme(); } } private static class requestDownload_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override 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(); } @Override 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 org.apache.thrift.scheme.SchemeFactory { @Override public requestDownload_argsTupleScheme getScheme() { return new requestDownload_argsTupleScheme(); } } private static class requestDownload_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, requestDownload_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.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 { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.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); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 REJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("rejection", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField FFFF_FIELD_DESC = new org.apache.thrift.protocol.TField("ffff", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField SDF_FIELD_DESC = new org.apache.thrift.protocol.TField("sdf", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new requestDownload_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new requestDownload_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TransferInformation success; // required public @org.apache.thrift.annotation.Nullable TTransferRejectedException rejection; // required public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required public @org.apache.thrift.annotation.Nullable TInvocationException ffff; // required public @org.apache.thrift.annotation.Nullable TNotFoundException sdf; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), REJECTION((short)1, "rejection"), AUTH_ERROR((short)2, "authError"), FFFF((short)3, "ffff"), SDF((short)4, "sdf"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // REJECTION return REJECTION; case 2: // AUTH_ERROR return AUTH_ERROR; case 3: // FFFF return FFFF; case 4: // SDF return SDF; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTransferRejectedException.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.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class))); tmpMap.put(_Fields.FFFF, new org.apache.thrift.meta_data.FieldMetaData("ffff", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class))); tmpMap.put(_Fields.SDF, new org.apache.thrift.meta_data.FieldMetaData("sdf", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestDownload_result.class, metaDataMap); } public requestDownload_result() { } public requestDownload_result( TransferInformation success, TTransferRejectedException rejection, TAuthorizationException authError, TInvocationException ffff, TNotFoundException sdf) { this(); this.success = success; this.rejection = rejection; this.authError = authError; this.ffff = ffff; this.sdf = sdf; } /** * Performs a deep copy on other. */ public requestDownload_result(requestDownload_result other) { if (other.isSetSuccess()) { this.success = new TransferInformation(other.success); } if (other.isSetRejection()) { this.rejection = new TTransferRejectedException(other.rejection); } if (other.isSetAuthError()) { this.authError = new TAuthorizationException(other.authError); } if (other.isSetFfff()) { this.ffff = new TInvocationException(other.ffff); } if (other.isSetSdf()) { this.sdf = new TNotFoundException(other.sdf); } } @Override public requestDownload_result deepCopy() { return new requestDownload_result(this); } @Override public void clear() { this.success = null; this.rejection = null; this.authError = null; this.ffff = null; this.sdf = null; } @org.apache.thrift.annotation.Nullable public TransferInformation getSuccess() { return this.success; } public requestDownload_result setSuccess(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TTransferRejectedException getRejection() { return this.rejection; } public requestDownload_result setRejection(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TAuthorizationException getAuthError() { return this.authError; } public requestDownload_result setAuthError(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TInvocationException getFfff() { return this.ffff; } public requestDownload_result setFfff(@org.apache.thrift.annotation.Nullable TInvocationException ffff) { this.ffff = ffff; return this; } public void unsetFfff() { this.ffff = null; } /** Returns true if field ffff is set (has been assigned a value) and false otherwise */ public boolean isSetFfff() { return this.ffff != null; } public void setFfffIsSet(boolean value) { if (!value) { this.ffff = null; } } @org.apache.thrift.annotation.Nullable public TNotFoundException getSdf() { return this.sdf; } public requestDownload_result setSdf(@org.apache.thrift.annotation.Nullable TNotFoundException sdf) { this.sdf = sdf; return this; } public void unsetSdf() { this.sdf = null; } /** Returns true if field sdf is set (has been assigned a value) and false otherwise */ public boolean isSetSdf() { return this.sdf != null; } public void setSdfIsSet(boolean value) { if (!value) { this.sdf = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((TransferInformation)value); } break; case REJECTION: if (value == null) { unsetRejection(); } else { setRejection((TTransferRejectedException)value); } break; case AUTH_ERROR: if (value == null) { unsetAuthError(); } else { setAuthError((TAuthorizationException)value); } break; case FFFF: if (value == null) { unsetFfff(); } else { setFfff((TInvocationException)value); } break; case SDF: if (value == null) { unsetSdf(); } else { setSdf((TNotFoundException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case REJECTION: return getRejection(); case AUTH_ERROR: return getAuthError(); case FFFF: return getFfff(); case SDF: return getSdf(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case REJECTION: return isSetRejection(); case AUTH_ERROR: return isSetAuthError(); case FFFF: return isSetFfff(); case SDF: return isSetSdf(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof requestDownload_result) return this.equals((requestDownload_result)that); return false; } public boolean equals(requestDownload_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_rejection = true && this.isSetRejection(); boolean that_present_rejection = true && that.isSetRejection(); if (this_present_rejection || that_present_rejection) { if (!(this_present_rejection && that_present_rejection)) return false; if (!this.rejection.equals(that.rejection)) return false; } boolean this_present_authError = true && this.isSetAuthError(); boolean that_present_authError = true && that.isSetAuthError(); if (this_present_authError || that_present_authError) { if (!(this_present_authError && that_present_authError)) return false; if (!this.authError.equals(that.authError)) return false; } boolean this_present_ffff = true && this.isSetFfff(); boolean that_present_ffff = true && that.isSetFfff(); if (this_present_ffff || that_present_ffff) { if (!(this_present_ffff && that_present_ffff)) return false; if (!this.ffff.equals(that.ffff)) return false; } boolean this_present_sdf = true && this.isSetSdf(); boolean that_present_sdf = true && that.isSetSdf(); if (this_present_sdf || that_present_sdf) { if (!(this_present_sdf && that_present_sdf)) return false; if (!this.sdf.equals(that.sdf)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetRejection()) ? 131071 : 524287); if (isSetRejection()) hashCode = hashCode * 8191 + rejection.hashCode(); hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287); if (isSetAuthError()) hashCode = hashCode * 8191 + authError.hashCode(); hashCode = hashCode * 8191 + ((isSetFfff()) ? 131071 : 524287); if (isSetFfff()) hashCode = hashCode * 8191 + ffff.hashCode(); hashCode = hashCode * 8191 + ((isSetSdf()) ? 131071 : 524287); if (isSetSdf()) hashCode = hashCode * 8191 + sdf.hashCode(); return hashCode; } @Override public int compareTo(requestDownload_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), 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 = java.lang.Boolean.compare(isSetRejection(), 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 = java.lang.Boolean.compare(isSetAuthError(), 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 = java.lang.Boolean.compare(isSetFfff(), other.isSetFfff()); if (lastComparison != 0) { return lastComparison; } if (isSetFfff()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ffff, other.ffff); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetSdf(), other.isSetSdf()); if (lastComparison != 0) { return lastComparison; } if (isSetSdf()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sdf, other.sdf); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("requestDownload_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("rejection:"); if (this.rejection == null) { sb.append("null"); } else { sb.append(this.rejection); } first = false; if (!first) sb.append(", "); sb.append("authError:"); if (this.authError == null) { sb.append("null"); } else { sb.append(this.authError); } first = false; if (!first) sb.append(", "); sb.append("ffff:"); if (this.ffff == null) { sb.append("null"); } else { sb.append(this.ffff); } first = false; if (!first) sb.append(", "); sb.append("sdf:"); if (this.sdf == null) { sb.append("null"); } else { sb.append(this.sdf); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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 org.apache.thrift.scheme.SchemeFactory { @Override public requestDownload_resultStandardScheme getScheme() { return new requestDownload_resultStandardScheme(); } } private static class requestDownload_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, requestDownload_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new TransferInformation(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // REJECTION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.rejection = new TTransferRejectedException(); struct.rejection.read(iprot); struct.setRejectionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // AUTH_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // FFFF if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.ffff = new TInvocationException(); struct.ffff.read(iprot); struct.setFfffIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // SDF if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.sdf = new TNotFoundException(); struct.sdf.read(iprot); struct.setSdfIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, requestDownload_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.rejection != null) { oprot.writeFieldBegin(REJECTION_FIELD_DESC); struct.rejection.write(oprot); oprot.writeFieldEnd(); } if (struct.authError != null) { oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); struct.authError.write(oprot); oprot.writeFieldEnd(); } if (struct.ffff != null) { oprot.writeFieldBegin(FFFF_FIELD_DESC); struct.ffff.write(oprot); oprot.writeFieldEnd(); } if (struct.sdf != null) { oprot.writeFieldBegin(SDF_FIELD_DESC); struct.sdf.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class requestDownload_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public requestDownload_resultTupleScheme getScheme() { return new requestDownload_resultTupleScheme(); } } private static class requestDownload_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, requestDownload_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetRejection()) { optionals.set(1); } if (struct.isSetAuthError()) { optionals.set(2); } if (struct.isSetFfff()) { optionals.set(3); } if (struct.isSetSdf()) { optionals.set(4); } oprot.writeBitSet(optionals, 5); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetRejection()) { struct.rejection.write(oprot); } if (struct.isSetAuthError()) { struct.authError.write(oprot); } if (struct.isSetFfff()) { struct.ffff.write(oprot); } if (struct.isSetSdf()) { struct.sdf.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, requestDownload_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(5); if (incoming.get(0)) { struct.success = new TransferInformation(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.rejection = new TTransferRejectedException(); struct.rejection.read(iprot); struct.setRejectionIsSet(true); } if (incoming.get(2)) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } if (incoming.get(3)) { struct.ffff = new TInvocationException(); struct.ffff.read(iprot); struct.setFfffIsSet(true); } if (incoming.get(4)) { struct.sdf = new TNotFoundException(); struct.sdf.read(iprot); struct.setSdfIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new cancelDownload_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new cancelDownload_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.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 java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelDownload_args.class, metaDataMap); } public cancelDownload_args() { } public cancelDownload_args( java.lang.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; } } @Override public cancelDownload_args deepCopy() { return new cancelDownload_args(this); } @Override public void clear() { this.downloadToken = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getDownloadToken() { return this.downloadToken; } public cancelDownload_args setDownloadToken(@org.apache.thrift.annotation.Nullable java.lang.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; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case DOWNLOAD_TOKEN: if (value == null) { unsetDownloadToken(); } else { setDownloadToken((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case DOWNLOAD_TOKEN: return getDownloadToken(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case DOWNLOAD_TOKEN: return isSetDownloadToken(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof cancelDownload_args) return this.equals((cancelDownload_args)that); return false; } public boolean equals(cancelDownload_args that) { if (that == null) return false; if (this == that) return true; 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() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetDownloadToken()) ? 131071 : 524287); if (isSetDownloadToken()) hashCode = hashCode * 8191 + downloadToken.hashCode(); return hashCode; } @Override public int compareTo(cancelDownload_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetDownloadToken(), 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; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory { @Override public cancelDownload_argsStandardScheme getScheme() { return new cancelDownload_argsStandardScheme(); } } private static class cancelDownload_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override 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(); } @Override 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 org.apache.thrift.scheme.SchemeFactory { @Override public cancelDownload_argsTupleScheme getScheme() { return new cancelDownload_argsTupleScheme(); } } private static class cancelDownload_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, cancelDownload_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.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 { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.downloadToken = iprot.readString(); struct.setDownloadTokenIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new cancelDownload_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new cancelDownload_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TInvalidTokenException ex1; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { EX1((short)1, "ex1"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // EX1 return EX1; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvalidTokenException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelDownload_result.class, metaDataMap); } public cancelDownload_result() { } public cancelDownload_result( TInvalidTokenException ex1) { this(); this.ex1 = ex1; } /** * Performs a deep copy on other. */ public cancelDownload_result(cancelDownload_result other) { if (other.isSetEx1()) { this.ex1 = new TInvalidTokenException(other.ex1); } } @Override public cancelDownload_result deepCopy() { return new cancelDownload_result(this); } @Override public void clear() { this.ex1 = null; } @org.apache.thrift.annotation.Nullable public TInvalidTokenException getEx1() { return this.ex1; } public cancelDownload_result setEx1(@org.apache.thrift.annotation.Nullable 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; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case EX1: if (value == null) { unsetEx1(); } else { setEx1((TInvalidTokenException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case EX1: return getEx1(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case EX1: return isSetEx1(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof cancelDownload_result) return this.equals((cancelDownload_result)that); return false; } public boolean equals(cancelDownload_result that) { if (that == null) return false; if (this == that) return true; 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() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetEx1()) ? 131071 : 524287); if (isSetEx1()) hashCode = hashCode * 8191 + ex1.hashCode(); return hashCode; } @Override public int compareTo(cancelDownload_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetEx1(), 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; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("cancelDownload_result("); boolean first = true; sb.append("ex1:"); if (this.ex1 == null) { sb.append("null"); } else { sb.append(this.ex1); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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 org.apache.thrift.scheme.SchemeFactory { @Override public cancelDownload_resultStandardScheme getScheme() { return new cancelDownload_resultStandardScheme(); } } private static class cancelDownload_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, cancelDownload_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // EX1 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.ex1 = new TInvalidTokenException(); struct.ex1.read(iprot); struct.setEx1IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, cancelDownload_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.ex1 != null) { oprot.writeFieldBegin(EX1_FIELD_DESC); struct.ex1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class cancelDownload_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public cancelDownload_resultTupleScheme getScheme() { return new cancelDownload_resultTupleScheme(); } } private static class cancelDownload_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, cancelDownload_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetEx1()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetEx1()) { struct.ex1.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, cancelDownload_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.ex1 = new TInvalidTokenException(); struct.ex1.read(iprot); struct.setEx1IsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new isAuthenticated_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new isAuthenticated_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.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 java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isAuthenticated_args.class, metaDataMap); } public isAuthenticated_args() { } public isAuthenticated_args( java.lang.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; } } @Override public isAuthenticated_args deepCopy() { return new isAuthenticated_args(this); } @Override public void clear() { this.userToken = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getUserToken() { return this.userToken; } public isAuthenticated_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.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; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case USER_TOKEN: if (value == null) { unsetUserToken(); } else { setUserToken((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case USER_TOKEN: return getUserToken(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case USER_TOKEN: return isSetUserToken(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof isAuthenticated_args) return this.equals((isAuthenticated_args)that); return false; } public boolean equals(isAuthenticated_args that) { if (that == null) return false; if (this == that) return true; 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() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287); if (isSetUserToken()) hashCode = hashCode * 8191 + userToken.hashCode(); return hashCode; } @Override public int compareTo(isAuthenticated_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetUserToken(), 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; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory { @Override public isAuthenticated_argsStandardScheme getScheme() { return new isAuthenticated_argsStandardScheme(); } } private static class isAuthenticated_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override 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(); } @Override 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 org.apache.thrift.scheme.SchemeFactory { @Override public isAuthenticated_argsTupleScheme getScheme() { return new isAuthenticated_argsTupleScheme(); } } private static class isAuthenticated_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, isAuthenticated_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.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 { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new isAuthenticated_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new isAuthenticated_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { AUTH_ERROR((short)1, "authError"), SERVER_ERROR((short)2, "serverError"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // AUTH_ERROR return AUTH_ERROR; case 2: // SERVER_ERROR return SERVER_ERROR; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class))); tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isAuthenticated_result.class, metaDataMap); } public isAuthenticated_result() { } public isAuthenticated_result( TAuthorizationException authError, TInvocationException serverError) { this(); this.authError = authError; this.serverError = serverError; } /** * Performs a deep copy on other. */ public isAuthenticated_result(isAuthenticated_result other) { if (other.isSetAuthError()) { this.authError = new TAuthorizationException(other.authError); } if (other.isSetServerError()) { this.serverError = new TInvocationException(other.serverError); } } @Override public isAuthenticated_result deepCopy() { return new isAuthenticated_result(this); } @Override public void clear() { this.authError = null; this.serverError = null; } @org.apache.thrift.annotation.Nullable public TAuthorizationException getAuthError() { return this.authError; } public isAuthenticated_result setAuthError(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TInvocationException getServerError() { return this.serverError; } public isAuthenticated_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) { this.serverError = serverError; return this; } public void unsetServerError() { this.serverError = null; } /** Returns true if field serverError is set (has been assigned a value) and false otherwise */ public boolean isSetServerError() { return this.serverError != null; } public void setServerErrorIsSet(boolean value) { if (!value) { this.serverError = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case AUTH_ERROR: if (value == null) { unsetAuthError(); } else { setAuthError((TAuthorizationException)value); } break; case SERVER_ERROR: if (value == null) { unsetServerError(); } else { setServerError((TInvocationException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case AUTH_ERROR: return getAuthError(); case SERVER_ERROR: return getServerError(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case AUTH_ERROR: return isSetAuthError(); case SERVER_ERROR: return isSetServerError(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof isAuthenticated_result) return this.equals((isAuthenticated_result)that); return false; } public boolean equals(isAuthenticated_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_authError = true && this.isSetAuthError(); boolean that_present_authError = true && that.isSetAuthError(); if (this_present_authError || that_present_authError) { if (!(this_present_authError && that_present_authError)) return false; if (!this.authError.equals(that.authError)) return false; } boolean this_present_serverError = true && this.isSetServerError(); boolean that_present_serverError = true && that.isSetServerError(); if (this_present_serverError || that_present_serverError) { if (!(this_present_serverError && that_present_serverError)) return false; if (!this.serverError.equals(that.serverError)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287); if (isSetAuthError()) hashCode = hashCode * 8191 + authError.hashCode(); hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287); if (isSetServerError()) hashCode = hashCode * 8191 + serverError.hashCode(); return hashCode; } @Override public int compareTo(isAuthenticated_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetAuthError(), 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 = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError()); if (lastComparison != 0) { return lastComparison; } if (isSetServerError()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("isAuthenticated_result("); boolean first = true; sb.append("authError:"); if (this.authError == null) { sb.append("null"); } else { sb.append(this.authError); } first = false; if (!first) sb.append(", "); sb.append("serverError:"); if (this.serverError == null) { sb.append("null"); } else { sb.append(this.serverError); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class isAuthenticated_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public isAuthenticated_resultStandardScheme getScheme() { return new isAuthenticated_resultStandardScheme(); } } private static class isAuthenticated_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, isAuthenticated_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // AUTH_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // SERVER_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, isAuthenticated_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.authError != null) { oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); struct.authError.write(oprot); oprot.writeFieldEnd(); } if (struct.serverError != null) { oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC); struct.serverError.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class isAuthenticated_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public isAuthenticated_resultTupleScheme getScheme() { return new isAuthenticated_resultTupleScheme(); } } private static class isAuthenticated_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, isAuthenticated_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetAuthError()) { optionals.set(0); } if (struct.isSetServerError()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetAuthError()) { struct.authError.write(oprot); } if (struct.isSetServerError()) { struct.serverError.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, isAuthenticated_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } if (incoming.get(1)) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class whoami_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("whoami_args"); private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new whoami_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new whoami_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.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 java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(whoami_args.class, metaDataMap); } public whoami_args() { } public whoami_args( java.lang.String userToken) { this(); this.userToken = userToken; } /** * Performs a deep copy on other. */ public whoami_args(whoami_args other) { if (other.isSetUserToken()) { this.userToken = other.userToken; } } @Override public whoami_args deepCopy() { return new whoami_args(this); } @Override public void clear() { this.userToken = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getUserToken() { return this.userToken; } public whoami_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.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; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case USER_TOKEN: if (value == null) { unsetUserToken(); } else { setUserToken((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case USER_TOKEN: return getUserToken(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case USER_TOKEN: return isSetUserToken(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof whoami_args) return this.equals((whoami_args)that); return false; } public boolean equals(whoami_args that) { if (that == null) return false; if (this == that) return true; 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() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287); if (isSetUserToken()) hashCode = hashCode * 8191 + userToken.hashCode(); return hashCode; } @Override public int compareTo(whoami_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetUserToken(), 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; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("whoami_args("); boolean first = true; sb.append("userToken:"); if (this.userToken == null) { sb.append("null"); } else { sb.append(this.userToken); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class whoami_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public whoami_argsStandardScheme getScheme() { return new whoami_argsStandardScheme(); } } private static class whoami_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, whoami_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // USER_TOKEN if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, whoami_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.userToken != null) { oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC); oprot.writeString(struct.userToken); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class whoami_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public whoami_argsTupleScheme getScheme() { return new whoami_argsTupleScheme(); } } private static class whoami_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, whoami_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetUserToken()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetUserToken()) { oprot.writeString(struct.userToken); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, whoami_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class whoami_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("whoami_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new whoami_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new whoami_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable WhoamiInfo success; // required public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), AUTH_ERROR((short)1, "authError"), SERVER_ERROR((short)2, "serverError"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // AUTH_ERROR return AUTH_ERROR; case 2: // SERVER_ERROR return SERVER_ERROR; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, WhoamiInfo.class))); tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class))); tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(whoami_result.class, metaDataMap); } public whoami_result() { } public whoami_result( WhoamiInfo success, TAuthorizationException authError, TInvocationException serverError) { this(); this.success = success; this.authError = authError; this.serverError = serverError; } /** * Performs a deep copy on other. */ public whoami_result(whoami_result other) { if (other.isSetSuccess()) { this.success = new WhoamiInfo(other.success); } if (other.isSetAuthError()) { this.authError = new TAuthorizationException(other.authError); } if (other.isSetServerError()) { this.serverError = new TInvocationException(other.serverError); } } @Override public whoami_result deepCopy() { return new whoami_result(this); } @Override public void clear() { this.success = null; this.authError = null; this.serverError = null; } @org.apache.thrift.annotation.Nullable public WhoamiInfo getSuccess() { return this.success; } public whoami_result setSuccess(@org.apache.thrift.annotation.Nullable WhoamiInfo success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TAuthorizationException getAuthError() { return this.authError; } public whoami_result setAuthError(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TInvocationException getServerError() { return this.serverError; } public whoami_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) { this.serverError = serverError; return this; } public void unsetServerError() { this.serverError = null; } /** Returns true if field serverError is set (has been assigned a value) and false otherwise */ public boolean isSetServerError() { return this.serverError != null; } public void setServerErrorIsSet(boolean value) { if (!value) { this.serverError = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((WhoamiInfo)value); } break; case AUTH_ERROR: if (value == null) { unsetAuthError(); } else { setAuthError((TAuthorizationException)value); } break; case SERVER_ERROR: if (value == null) { unsetServerError(); } else { setServerError((TInvocationException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case AUTH_ERROR: return getAuthError(); case SERVER_ERROR: return getServerError(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case AUTH_ERROR: return isSetAuthError(); case SERVER_ERROR: return isSetServerError(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof whoami_result) return this.equals((whoami_result)that); return false; } public boolean equals(whoami_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_authError = true && this.isSetAuthError(); boolean that_present_authError = true && that.isSetAuthError(); if (this_present_authError || that_present_authError) { if (!(this_present_authError && that_present_authError)) return false; if (!this.authError.equals(that.authError)) return false; } boolean this_present_serverError = true && this.isSetServerError(); boolean that_present_serverError = true && that.isSetServerError(); if (this_present_serverError || that_present_serverError) { if (!(this_present_serverError && that_present_serverError)) return false; if (!this.serverError.equals(that.serverError)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287); if (isSetAuthError()) hashCode = hashCode * 8191 + authError.hashCode(); hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287); if (isSetServerError()) hashCode = hashCode * 8191 + serverError.hashCode(); return hashCode; } @Override public int compareTo(whoami_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), 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 = java.lang.Boolean.compare(isSetAuthError(), 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 = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError()); if (lastComparison != 0) { return lastComparison; } if (isSetServerError()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("whoami_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("authError:"); if (this.authError == null) { sb.append("null"); } else { sb.append(this.authError); } first = false; if (!first) sb.append(", "); sb.append("serverError:"); if (this.serverError == null) { sb.append("null"); } else { sb.append(this.serverError); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class whoami_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public whoami_resultStandardScheme getScheme() { return new whoami_resultStandardScheme(); } } private static class whoami_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, whoami_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new WhoamiInfo(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // AUTH_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // SERVER_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, whoami_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.authError != null) { oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); struct.authError.write(oprot); oprot.writeFieldEnd(); } if (struct.serverError != null) { oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC); struct.serverError.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class whoami_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public whoami_resultTupleScheme getScheme() { return new whoami_resultTupleScheme(); } } private static class whoami_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, whoami_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetAuthError()) { optionals.set(1); } if (struct.isSetServerError()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetAuthError()) { struct.authError.write(oprot); } if (struct.isSetServerError()) { struct.serverError.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, whoami_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.success = new WhoamiInfo(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } if (incoming.get(2)) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new invalidateSession_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new invalidateSession_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.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 java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(invalidateSession_args.class, metaDataMap); } public invalidateSession_args() { } public invalidateSession_args( java.lang.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; } } @Override public invalidateSession_args deepCopy() { return new invalidateSession_args(this); } @Override public void clear() { this.userToken = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getUserToken() { return this.userToken; } public invalidateSession_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.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; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case USER_TOKEN: if (value == null) { unsetUserToken(); } else { setUserToken((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case USER_TOKEN: return getUserToken(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case USER_TOKEN: return isSetUserToken(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof invalidateSession_args) return this.equals((invalidateSession_args)that); return false; } public boolean equals(invalidateSession_args that) { if (that == null) return false; if (this == that) return true; 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() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287); if (isSetUserToken()) hashCode = hashCode * 8191 + userToken.hashCode(); return hashCode; } @Override public int compareTo(invalidateSession_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetUserToken(), 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; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory { @Override public invalidateSession_argsStandardScheme getScheme() { return new invalidateSession_argsStandardScheme(); } } private static class invalidateSession_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override 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(); } @Override 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 org.apache.thrift.scheme.SchemeFactory { @Override public invalidateSession_argsTupleScheme getScheme() { return new invalidateSession_argsTupleScheme(); } } private static class invalidateSession_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, invalidateSession_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.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 { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 org.apache.thrift.protocol.TField EX_FIELD_DESC = new org.apache.thrift.protocol.TField("ex", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new invalidateSession_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new invalidateSession_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TInvalidTokenException ex; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { EX((short)1, "ex"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // EX return EX; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.EX, new org.apache.thrift.meta_data.FieldMetaData("ex", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvalidTokenException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(invalidateSession_result.class, metaDataMap); } public invalidateSession_result() { } public invalidateSession_result( TInvalidTokenException ex) { this(); this.ex = ex; } /** * Performs a deep copy on other. */ public invalidateSession_result(invalidateSession_result other) { if (other.isSetEx()) { this.ex = new TInvalidTokenException(other.ex); } } @Override public invalidateSession_result deepCopy() { return new invalidateSession_result(this); } @Override public void clear() { this.ex = null; } @org.apache.thrift.annotation.Nullable public TInvalidTokenException getEx() { return this.ex; } public invalidateSession_result setEx(@org.apache.thrift.annotation.Nullable TInvalidTokenException ex) { this.ex = ex; return this; } public void unsetEx() { this.ex = null; } /** Returns true if field ex is set (has been assigned a value) and false otherwise */ public boolean isSetEx() { return this.ex != null; } public void setExIsSet(boolean value) { if (!value) { this.ex = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case EX: if (value == null) { unsetEx(); } else { setEx((TInvalidTokenException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case EX: return getEx(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case EX: return isSetEx(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof invalidateSession_result) return this.equals((invalidateSession_result)that); return false; } public boolean equals(invalidateSession_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_ex = true && this.isSetEx(); boolean that_present_ex = true && that.isSetEx(); if (this_present_ex || that_present_ex) { if (!(this_present_ex && that_present_ex)) return false; if (!this.ex.equals(that.ex)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetEx()) ? 131071 : 524287); if (isSetEx()) hashCode = hashCode * 8191 + ex.hashCode(); return hashCode; } @Override public int compareTo(invalidateSession_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetEx(), other.isSetEx()); if (lastComparison != 0) { return lastComparison; } if (isSetEx()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex, other.ex); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("invalidateSession_result("); boolean first = true; sb.append("ex:"); if (this.ex == null) { sb.append("null"); } else { sb.append(this.ex); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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 org.apache.thrift.scheme.SchemeFactory { @Override public invalidateSession_resultStandardScheme getScheme() { return new invalidateSession_resultStandardScheme(); } } private static class invalidateSession_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, invalidateSession_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // EX if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.ex = new TInvalidTokenException(); struct.ex.read(iprot); struct.setExIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, invalidateSession_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.ex != null) { oprot.writeFieldBegin(EX_FIELD_DESC); struct.ex.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class invalidateSession_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public invalidateSession_resultTupleScheme getScheme() { return new invalidateSession_resultTupleScheme(); } } private static class invalidateSession_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, invalidateSession_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetEx()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetEx()) { struct.ex.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, invalidateSession_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.ex = new TInvalidTokenException(); struct.ex.read(iprot); struct.setExIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class getUserList_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("getUserList_args"); private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField PAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("page", org.apache.thrift.protocol.TType.I32, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getUserList_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getUserList_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required public int page; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { USER_TOKEN((short)1, "userToken"), PAGE((short)2, "page"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // USER_TOKEN return USER_TOKEN; case 2: // PAGE return PAGE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __PAGE_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); tmpMap.put(_Fields.PAGE, new org.apache.thrift.meta_data.FieldMetaData("page", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserList_args.class, metaDataMap); } public getUserList_args() { } public getUserList_args( java.lang.String userToken, int page) { this(); this.userToken = userToken; this.page = page; setPageIsSet(true); } /** * Performs a deep copy on other. */ public getUserList_args(getUserList_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetUserToken()) { this.userToken = other.userToken; } this.page = other.page; } @Override public getUserList_args deepCopy() { return new getUserList_args(this); } @Override public void clear() { this.userToken = null; setPageIsSet(false); this.page = 0; } @org.apache.thrift.annotation.Nullable public java.lang.String getUserToken() { return this.userToken; } public getUserList_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.String userToken) { this.userToken = userToken; return this; } public void unsetUserToken() { this.userToken = null; } /** Returns true if field userToken is set (has been assigned a value) and false otherwise */ public boolean isSetUserToken() { return this.userToken != null; } public void setUserTokenIsSet(boolean value) { if (!value) { this.userToken = null; } } public int getPage() { return this.page; } public getUserList_args setPage(int page) { this.page = page; setPageIsSet(true); return this; } public void unsetPage() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PAGE_ISSET_ID); } /** Returns true if field page is set (has been assigned a value) and false otherwise */ public boolean isSetPage() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PAGE_ISSET_ID); } public void setPageIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PAGE_ISSET_ID, value); } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case USER_TOKEN: if (value == null) { unsetUserToken(); } else { setUserToken((java.lang.String)value); } break; case PAGE: if (value == null) { unsetPage(); } else { setPage((java.lang.Integer)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case USER_TOKEN: return getUserToken(); case PAGE: return getPage(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case USER_TOKEN: return isSetUserToken(); case PAGE: return isSetPage(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getUserList_args) return this.equals((getUserList_args)that); return false; } public boolean equals(getUserList_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_userToken = true && this.isSetUserToken(); boolean that_present_userToken = true && that.isSetUserToken(); if (this_present_userToken || that_present_userToken) { if (!(this_present_userToken && that_present_userToken)) return false; if (!this.userToken.equals(that.userToken)) return false; } boolean this_present_page = true; boolean that_present_page = true; if (this_present_page || that_present_page) { if (!(this_present_page && that_present_page)) return false; if (this.page != that.page) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287); if (isSetUserToken()) hashCode = hashCode * 8191 + userToken.hashCode(); hashCode = hashCode * 8191 + page; return hashCode; } @Override public int compareTo(getUserList_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetUserToken(), 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 = java.lang.Boolean.compare(isSetPage(), other.isSetPage()); if (lastComparison != 0) { return lastComparison; } if (isSetPage()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.page, other.page); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("getUserList_args("); boolean first = true; sb.append("userToken:"); if (this.userToken == null) { sb.append("null"); } else { sb.append(this.userToken); } first = false; if (!first) sb.append(", "); sb.append("page:"); sb.append(this.page); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class getUserList_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getUserList_argsStandardScheme getScheme() { return new getUserList_argsStandardScheme(); } } private static class getUserList_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, getUserList_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // USER_TOKEN if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // PAGE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.page = iprot.readI32(); struct.setPageIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, getUserList_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.userToken != null) { oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC); oprot.writeString(struct.userToken); oprot.writeFieldEnd(); } oprot.writeFieldBegin(PAGE_FIELD_DESC); oprot.writeI32(struct.page); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getUserList_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getUserList_argsTupleScheme getScheme() { return new getUserList_argsTupleScheme(); } } private static class getUserList_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getUserList_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetUserToken()) { optionals.set(0); } if (struct.isSetPage()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetUserToken()) { oprot.writeString(struct.userToken); } if (struct.isSetPage()) { oprot.writeI32(struct.page); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getUserList_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); } if (incoming.get(1)) { struct.page = iprot.readI32(); struct.setPageIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class getUserList_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("getUserList_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getUserList_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getUserList_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.List success; // required public @org.apache.thrift.annotation.Nullable TAuthorizationException failure; // required public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), FAILURE((short)1, "failure"), SERVER_ERROR((short)2, "serverError"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // FAILURE return FAILURE; case 2: // SERVER_ERROR return SERVER_ERROR; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UserInfo.class)))); tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class))); tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserList_result.class, metaDataMap); } public getUserList_result() { } public getUserList_result( java.util.List success, TAuthorizationException failure, TInvocationException serverError) { this(); this.success = success; this.failure = failure; this.serverError = serverError; } /** * Performs a deep copy on other. */ public getUserList_result(getUserList_result other) { if (other.isSetSuccess()) { java.util.List __this__success = new java.util.ArrayList(other.success.size()); for (UserInfo other_element : other.success) { __this__success.add(new UserInfo(other_element)); } this.success = __this__success; } if (other.isSetFailure()) { this.failure = new TAuthorizationException(other.failure); } if (other.isSetServerError()) { this.serverError = new TInvocationException(other.serverError); } } @Override public getUserList_result deepCopy() { return new getUserList_result(this); } @Override public void clear() { this.success = null; this.failure = null; this.serverError = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(UserInfo elem) { if (this.success == null) { this.success = new java.util.ArrayList(); } this.success.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List getSuccess() { return this.success; } public getUserList_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.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; } } @org.apache.thrift.annotation.Nullable public TAuthorizationException getFailure() { return this.failure; } public getUserList_result setFailure(@org.apache.thrift.annotation.Nullable TAuthorizationException failure) { this.failure = failure; return this; } public void unsetFailure() { this.failure = null; } /** Returns true if field failure is set (has been assigned a value) and false otherwise */ public boolean isSetFailure() { return this.failure != null; } public void setFailureIsSet(boolean value) { if (!value) { this.failure = null; } } @org.apache.thrift.annotation.Nullable public TInvocationException getServerError() { return this.serverError; } public getUserList_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) { this.serverError = serverError; return this; } public void unsetServerError() { this.serverError = null; } /** Returns true if field serverError is set (has been assigned a value) and false otherwise */ public boolean isSetServerError() { return this.serverError != null; } public void setServerErrorIsSet(boolean value) { if (!value) { this.serverError = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.util.List)value); } break; case FAILURE: if (value == null) { unsetFailure(); } else { setFailure((TAuthorizationException)value); } break; case SERVER_ERROR: if (value == null) { unsetServerError(); } else { setServerError((TInvocationException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case FAILURE: return getFailure(); case SERVER_ERROR: return getServerError(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case FAILURE: return isSetFailure(); case SERVER_ERROR: return isSetServerError(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getUserList_result) return this.equals((getUserList_result)that); return false; } public boolean equals(getUserList_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_failure = true && this.isSetFailure(); boolean that_present_failure = true && that.isSetFailure(); if (this_present_failure || that_present_failure) { if (!(this_present_failure && that_present_failure)) return false; if (!this.failure.equals(that.failure)) return false; } boolean this_present_serverError = true && this.isSetServerError(); boolean that_present_serverError = true && that.isSetServerError(); if (this_present_serverError || that_present_serverError) { if (!(this_present_serverError && that_present_serverError)) return false; if (!this.serverError.equals(that.serverError)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetFailure()) ? 131071 : 524287); if (isSetFailure()) hashCode = hashCode * 8191 + failure.hashCode(); hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287); if (isSetServerError()) hashCode = hashCode * 8191 + serverError.hashCode(); return hashCode; } @Override public int compareTo(getUserList_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), 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 = java.lang.Boolean.compare(isSetFailure(), other.isSetFailure()); if (lastComparison != 0) { return lastComparison; } if (isSetFailure()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, other.failure); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError()); if (lastComparison != 0) { return lastComparison; } if (isSetServerError()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("getUserList_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("failure:"); if (this.failure == null) { sb.append("null"); } else { sb.append(this.failure); } first = false; if (!first) sb.append(", "); sb.append("serverError:"); if (this.serverError == null) { sb.append("null"); } else { sb.append(this.serverError); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class getUserList_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getUserList_resultStandardScheme getScheme() { return new getUserList_resultStandardScheme(); } } private static class getUserList_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, getUserList_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list314 = iprot.readListBegin(); struct.success = new java.util.ArrayList(_list314.size); @org.apache.thrift.annotation.Nullable UserInfo _elem315; for (int _i316 = 0; _i316 < _list314.size; ++_i316) { _elem315 = new UserInfo(); _elem315.read(iprot); struct.success.add(_elem315); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // FAILURE if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.failure = new TAuthorizationException(); struct.failure.read(iprot); struct.setFailureIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // SERVER_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, getUserList_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (UserInfo _iter317 : struct.success) { _iter317.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.failure != null) { oprot.writeFieldBegin(FAILURE_FIELD_DESC); struct.failure.write(oprot); oprot.writeFieldEnd(); } if (struct.serverError != null) { oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC); struct.serverError.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getUserList_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getUserList_resultTupleScheme getScheme() { return new getUserList_resultTupleScheme(); } } private static class getUserList_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getUserList_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetFailure()) { optionals.set(1); } if (struct.isSetServerError()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (UserInfo _iter318 : struct.success) { _iter318.write(oprot); } } } if (struct.isSetFailure()) { struct.failure.write(oprot); } if (struct.isSetServerError()) { struct.serverError.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getUserList_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list319 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.success = new java.util.ArrayList(_list319.size); @org.apache.thrift.annotation.Nullable UserInfo _elem320; for (int _i321 = 0; _i321 < _list319.size; ++_i321) { _elem320 = new UserInfo(); _elem320.read(iprot); struct.success.add(_elem320); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.failure = new TAuthorizationException(); struct.failure.read(iprot); struct.setFailureIsSet(true); } if (incoming.get(2)) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class getUserConfig_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("getUserConfig_args"); private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getUserConfig_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getUserConfig_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.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 java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserConfig_args.class, metaDataMap); } public getUserConfig_args() { } public getUserConfig_args( java.lang.String userToken) { this(); this.userToken = userToken; } /** * Performs a deep copy on other. */ public getUserConfig_args(getUserConfig_args other) { if (other.isSetUserToken()) { this.userToken = other.userToken; } } @Override public getUserConfig_args deepCopy() { return new getUserConfig_args(this); } @Override public void clear() { this.userToken = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getUserToken() { return this.userToken; } public getUserConfig_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.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; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case USER_TOKEN: if (value == null) { unsetUserToken(); } else { setUserToken((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case USER_TOKEN: return getUserToken(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case USER_TOKEN: return isSetUserToken(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getUserConfig_args) return this.equals((getUserConfig_args)that); return false; } public boolean equals(getUserConfig_args that) { if (that == null) return false; if (this == that) return true; 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() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287); if (isSetUserToken()) hashCode = hashCode * 8191 + userToken.hashCode(); return hashCode; } @Override public int compareTo(getUserConfig_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetUserToken(), 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; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("getUserConfig_args("); boolean first = true; sb.append("userToken:"); if (this.userToken == null) { sb.append("null"); } else { sb.append(this.userToken); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class getUserConfig_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getUserConfig_argsStandardScheme getScheme() { return new getUserConfig_argsStandardScheme(); } } private static class getUserConfig_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, getUserConfig_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // USER_TOKEN if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, getUserConfig_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.userToken != null) { oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC); oprot.writeString(struct.userToken); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getUserConfig_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getUserConfig_argsTupleScheme getScheme() { return new getUserConfig_argsTupleScheme(); } } private static class getUserConfig_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getUserConfig_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetUserToken()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetUserToken()) { oprot.writeString(struct.userToken); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getUserConfig_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class getUserConfig_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("getUserConfig_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getUserConfig_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getUserConfig_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable SatelliteUserConfig success; // required public @org.apache.thrift.annotation.Nullable TAuthorizationException failure; // required public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), FAILURE((short)1, "failure"), SERVER_ERROR((short)2, "serverError"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // FAILURE return FAILURE; case 2: // SERVER_ERROR return SERVER_ERROR; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SatelliteUserConfig.class))); tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class))); tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserConfig_result.class, metaDataMap); } public getUserConfig_result() { } public getUserConfig_result( SatelliteUserConfig success, TAuthorizationException failure, TInvocationException serverError) { this(); this.success = success; this.failure = failure; this.serverError = serverError; } /** * Performs a deep copy on other. */ public getUserConfig_result(getUserConfig_result other) { if (other.isSetSuccess()) { this.success = new SatelliteUserConfig(other.success); } if (other.isSetFailure()) { this.failure = new TAuthorizationException(other.failure); } if (other.isSetServerError()) { this.serverError = new TInvocationException(other.serverError); } } @Override public getUserConfig_result deepCopy() { return new getUserConfig_result(this); } @Override public void clear() { this.success = null; this.failure = null; this.serverError = null; } @org.apache.thrift.annotation.Nullable public SatelliteUserConfig getSuccess() { return this.success; } public getUserConfig_result setSuccess(@org.apache.thrift.annotation.Nullable SatelliteUserConfig success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TAuthorizationException getFailure() { return this.failure; } public getUserConfig_result setFailure(@org.apache.thrift.annotation.Nullable TAuthorizationException failure) { this.failure = failure; return this; } public void unsetFailure() { this.failure = null; } /** Returns true if field failure is set (has been assigned a value) and false otherwise */ public boolean isSetFailure() { return this.failure != null; } public void setFailureIsSet(boolean value) { if (!value) { this.failure = null; } } @org.apache.thrift.annotation.Nullable public TInvocationException getServerError() { return this.serverError; } public getUserConfig_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) { this.serverError = serverError; return this; } public void unsetServerError() { this.serverError = null; } /** Returns true if field serverError is set (has been assigned a value) and false otherwise */ public boolean isSetServerError() { return this.serverError != null; } public void setServerErrorIsSet(boolean value) { if (!value) { this.serverError = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((SatelliteUserConfig)value); } break; case FAILURE: if (value == null) { unsetFailure(); } else { setFailure((TAuthorizationException)value); } break; case SERVER_ERROR: if (value == null) { unsetServerError(); } else { setServerError((TInvocationException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case FAILURE: return getFailure(); case SERVER_ERROR: return getServerError(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case FAILURE: return isSetFailure(); case SERVER_ERROR: return isSetServerError(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getUserConfig_result) return this.equals((getUserConfig_result)that); return false; } public boolean equals(getUserConfig_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_failure = true && this.isSetFailure(); boolean that_present_failure = true && that.isSetFailure(); if (this_present_failure || that_present_failure) { if (!(this_present_failure && that_present_failure)) return false; if (!this.failure.equals(that.failure)) return false; } boolean this_present_serverError = true && this.isSetServerError(); boolean that_present_serverError = true && that.isSetServerError(); if (this_present_serverError || that_present_serverError) { if (!(this_present_serverError && that_present_serverError)) return false; if (!this.serverError.equals(that.serverError)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetFailure()) ? 131071 : 524287); if (isSetFailure()) hashCode = hashCode * 8191 + failure.hashCode(); hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287); if (isSetServerError()) hashCode = hashCode * 8191 + serverError.hashCode(); return hashCode; } @Override public int compareTo(getUserConfig_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), 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 = java.lang.Boolean.compare(isSetFailure(), other.isSetFailure()); if (lastComparison != 0) { return lastComparison; } if (isSetFailure()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, other.failure); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError()); if (lastComparison != 0) { return lastComparison; } if (isSetServerError()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("getUserConfig_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("failure:"); if (this.failure == null) { sb.append("null"); } else { sb.append(this.failure); } first = false; if (!first) sb.append(", "); sb.append("serverError:"); if (this.serverError == null) { sb.append("null"); } else { sb.append(this.serverError); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class getUserConfig_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getUserConfig_resultStandardScheme getScheme() { return new getUserConfig_resultStandardScheme(); } } private static class getUserConfig_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, getUserConfig_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new SatelliteUserConfig(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // FAILURE if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.failure = new TAuthorizationException(); struct.failure.read(iprot); struct.setFailureIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // SERVER_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, getUserConfig_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.failure != null) { oprot.writeFieldBegin(FAILURE_FIELD_DESC); struct.failure.write(oprot); oprot.writeFieldEnd(); } if (struct.serverError != null) { oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC); struct.serverError.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getUserConfig_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getUserConfig_resultTupleScheme getScheme() { return new getUserConfig_resultTupleScheme(); } } private static class getUserConfig_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getUserConfig_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetFailure()) { optionals.set(1); } if (struct.isSetServerError()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetFailure()) { struct.failure.write(oprot); } if (struct.isSetServerError()) { struct.serverError.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getUserConfig_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.success = new SatelliteUserConfig(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.failure = new TAuthorizationException(); struct.failure.read(iprot); struct.setFailureIsSet(true); } if (incoming.get(2)) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class setUserConfig_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("setUserConfig_args"); private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField CONFIG_FIELD_DESC = new org.apache.thrift.protocol.TField("config", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setUserConfig_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setUserConfig_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required public @org.apache.thrift.annotation.Nullable SatelliteUserConfig config; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { USER_TOKEN((short)1, "userToken"), CONFIG((short)2, "config"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // USER_TOKEN return USER_TOKEN; case 2: // CONFIG return CONFIG; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); tmpMap.put(_Fields.CONFIG, new org.apache.thrift.meta_data.FieldMetaData("config", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SatelliteUserConfig.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setUserConfig_args.class, metaDataMap); } public setUserConfig_args() { } public setUserConfig_args( java.lang.String userToken, SatelliteUserConfig config) { this(); this.userToken = userToken; this.config = config; } /** * Performs a deep copy on other. */ public setUserConfig_args(setUserConfig_args other) { if (other.isSetUserToken()) { this.userToken = other.userToken; } if (other.isSetConfig()) { this.config = new SatelliteUserConfig(other.config); } } @Override public setUserConfig_args deepCopy() { return new setUserConfig_args(this); } @Override public void clear() { this.userToken = null; this.config = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getUserToken() { return this.userToken; } public setUserConfig_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.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; } } @org.apache.thrift.annotation.Nullable public SatelliteUserConfig getConfig() { return this.config; } public setUserConfig_args setConfig(@org.apache.thrift.annotation.Nullable SatelliteUserConfig config) { this.config = config; return this; } public void unsetConfig() { this.config = null; } /** Returns true if field config is set (has been assigned a value) and false otherwise */ public boolean isSetConfig() { return this.config != null; } public void setConfigIsSet(boolean value) { if (!value) { this.config = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case USER_TOKEN: if (value == null) { unsetUserToken(); } else { setUserToken((java.lang.String)value); } break; case CONFIG: if (value == null) { unsetConfig(); } else { setConfig((SatelliteUserConfig)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case USER_TOKEN: return getUserToken(); case CONFIG: return getConfig(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case USER_TOKEN: return isSetUserToken(); case CONFIG: return isSetConfig(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof setUserConfig_args) return this.equals((setUserConfig_args)that); return false; } public boolean equals(setUserConfig_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_userToken = true && this.isSetUserToken(); boolean that_present_userToken = true && that.isSetUserToken(); if (this_present_userToken || that_present_userToken) { if (!(this_present_userToken && that_present_userToken)) return false; if (!this.userToken.equals(that.userToken)) return false; } boolean this_present_config = true && this.isSetConfig(); boolean that_present_config = true && that.isSetConfig(); if (this_present_config || that_present_config) { if (!(this_present_config && that_present_config)) return false; if (!this.config.equals(that.config)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287); if (isSetUserToken()) hashCode = hashCode * 8191 + userToken.hashCode(); hashCode = hashCode * 8191 + ((isSetConfig()) ? 131071 : 524287); if (isSetConfig()) hashCode = hashCode * 8191 + config.hashCode(); return hashCode; } @Override public int compareTo(setUserConfig_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetUserToken(), 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 = java.lang.Boolean.compare(isSetConfig(), other.isSetConfig()); if (lastComparison != 0) { return lastComparison; } if (isSetConfig()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.config, other.config); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("setUserConfig_args("); boolean first = true; sb.append("userToken:"); if (this.userToken == null) { sb.append("null"); } else { sb.append(this.userToken); } first = false; if (!first) sb.append(", "); sb.append("config:"); if (this.config == null) { sb.append("null"); } else { sb.append(this.config); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (config != null) { config.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class setUserConfig_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public setUserConfig_argsStandardScheme getScheme() { return new setUserConfig_argsStandardScheme(); } } private static class setUserConfig_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, setUserConfig_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // USER_TOKEN if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // CONFIG if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.config = new SatelliteUserConfig(); struct.config.read(iprot); struct.setConfigIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, setUserConfig_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.userToken != null) { oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC); oprot.writeString(struct.userToken); oprot.writeFieldEnd(); } if (struct.config != null) { oprot.writeFieldBegin(CONFIG_FIELD_DESC); struct.config.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class setUserConfig_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public setUserConfig_argsTupleScheme getScheme() { return new setUserConfig_argsTupleScheme(); } } private static class setUserConfig_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, setUserConfig_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetUserToken()) { optionals.set(0); } if (struct.isSetConfig()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetUserToken()) { oprot.writeString(struct.userToken); } if (struct.isSetConfig()) { struct.config.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, setUserConfig_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); } if (incoming.get(1)) { struct.config = new SatelliteUserConfig(); struct.config.read(iprot); struct.setConfigIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class setUserConfig_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("setUserConfig_result"); private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setUserConfig_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setUserConfig_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TAuthorizationException failure; // required public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { FAILURE((short)1, "failure"), SERVER_ERROR((short)2, "serverError"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // FAILURE return FAILURE; case 2: // SERVER_ERROR return SERVER_ERROR; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class))); tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setUserConfig_result.class, metaDataMap); } public setUserConfig_result() { } public setUserConfig_result( TAuthorizationException failure, TInvocationException serverError) { this(); this.failure = failure; this.serverError = serverError; } /** * Performs a deep copy on other. */ public setUserConfig_result(setUserConfig_result other) { if (other.isSetFailure()) { this.failure = new TAuthorizationException(other.failure); } if (other.isSetServerError()) { this.serverError = new TInvocationException(other.serverError); } } @Override public setUserConfig_result deepCopy() { return new setUserConfig_result(this); } @Override public void clear() { this.failure = null; this.serverError = null; } @org.apache.thrift.annotation.Nullable public TAuthorizationException getFailure() { return this.failure; } public setUserConfig_result setFailure(@org.apache.thrift.annotation.Nullable TAuthorizationException failure) { this.failure = failure; return this; } public void unsetFailure() { this.failure = null; } /** Returns true if field failure is set (has been assigned a value) and false otherwise */ public boolean isSetFailure() { return this.failure != null; } public void setFailureIsSet(boolean value) { if (!value) { this.failure = null; } } @org.apache.thrift.annotation.Nullable public TInvocationException getServerError() { return this.serverError; } public setUserConfig_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) { this.serverError = serverError; return this; } public void unsetServerError() { this.serverError = null; } /** Returns true if field serverError is set (has been assigned a value) and false otherwise */ public boolean isSetServerError() { return this.serverError != null; } public void setServerErrorIsSet(boolean value) { if (!value) { this.serverError = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case FAILURE: if (value == null) { unsetFailure(); } else { setFailure((TAuthorizationException)value); } break; case SERVER_ERROR: if (value == null) { unsetServerError(); } else { setServerError((TInvocationException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case FAILURE: return getFailure(); case SERVER_ERROR: return getServerError(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case FAILURE: return isSetFailure(); case SERVER_ERROR: return isSetServerError(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof setUserConfig_result) return this.equals((setUserConfig_result)that); return false; } public boolean equals(setUserConfig_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_failure = true && this.isSetFailure(); boolean that_present_failure = true && that.isSetFailure(); if (this_present_failure || that_present_failure) { if (!(this_present_failure && that_present_failure)) return false; if (!this.failure.equals(that.failure)) return false; } boolean this_present_serverError = true && this.isSetServerError(); boolean that_present_serverError = true && that.isSetServerError(); if (this_present_serverError || that_present_serverError) { if (!(this_present_serverError && that_present_serverError)) return false; if (!this.serverError.equals(that.serverError)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetFailure()) ? 131071 : 524287); if (isSetFailure()) hashCode = hashCode * 8191 + failure.hashCode(); hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287); if (isSetServerError()) hashCode = hashCode * 8191 + serverError.hashCode(); return hashCode; } @Override public int compareTo(setUserConfig_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetFailure(), other.isSetFailure()); if (lastComparison != 0) { return lastComparison; } if (isSetFailure()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, other.failure); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError()); if (lastComparison != 0) { return lastComparison; } if (isSetServerError()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("setUserConfig_result("); boolean first = true; sb.append("failure:"); if (this.failure == null) { sb.append("null"); } else { sb.append(this.failure); } first = false; if (!first) sb.append(", "); sb.append("serverError:"); if (this.serverError == null) { sb.append("null"); } else { sb.append(this.serverError); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class setUserConfig_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public setUserConfig_resultStandardScheme getScheme() { return new setUserConfig_resultStandardScheme(); } } private static class setUserConfig_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, setUserConfig_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // FAILURE if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.failure = new TAuthorizationException(); struct.failure.read(iprot); struct.setFailureIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // SERVER_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, setUserConfig_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.failure != null) { oprot.writeFieldBegin(FAILURE_FIELD_DESC); struct.failure.write(oprot); oprot.writeFieldEnd(); } if (struct.serverError != null) { oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC); struct.serverError.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class setUserConfig_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public setUserConfig_resultTupleScheme getScheme() { return new setUserConfig_resultTupleScheme(); } } private static class setUserConfig_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, setUserConfig_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetFailure()) { optionals.set(0); } if (struct.isSetServerError()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetFailure()) { struct.failure.write(oprot); } if (struct.isSetServerError()) { struct.serverError.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, setUserConfig_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.failure = new TAuthorizationException(); struct.failure.read(iprot); struct.setFailureIsSet(true); } if (incoming.get(1)) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getOperatingSystems_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = 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 java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = java.util.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) { } @Override public getOperatingSystems_args deepCopy() { return new getOperatingSystems_args(this); } @Override public void clear() { } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getOperatingSystems_args) return this.equals((getOperatingSystems_args)that); return false; } public boolean equals(getOperatingSystems_args that) { if (that == null) return false; if (this == that) return true; return true; } @Override public int hashCode() { int hashCode = 1; return hashCode; } @Override public int compareTo(getOperatingSystems_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory { @Override public getOperatingSystems_argsStandardScheme getScheme() { return new getOperatingSystems_argsStandardScheme(); } } private static class getOperatingSystems_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override 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(); } @Override 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 org.apache.thrift.scheme.SchemeFactory { @Override public getOperatingSystems_argsTupleScheme getScheme() { return new getOperatingSystems_argsTupleScheme(); } } private static class getOperatingSystems_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getOperatingSystems_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getOperatingSystems_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getOperatingSystems_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getOperatingSystems_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.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 java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getOperatingSystems_result.class, metaDataMap); } public getOperatingSystems_result() { } public getOperatingSystems_result( java.util.List success) { this(); this.success = success; } /** * Performs a deep copy on other. */ public getOperatingSystems_result(getOperatingSystems_result other) { if (other.isSetSuccess()) { java.util.List __this__success = new java.util.ArrayList(other.success.size()); for (OperatingSystem other_element : other.success) { __this__success.add(new OperatingSystem(other_element)); } this.success = __this__success; } } @Override 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(); } @org.apache.thrift.annotation.Nullable 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 java.util.ArrayList(); } this.success.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List getSuccess() { return this.success; } public getOperatingSystems_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.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; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.util.List)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getOperatingSystems_result) return this.equals((getOperatingSystems_result)that); return false; } public boolean equals(getOperatingSystems_result that) { if (that == null) return false; if (this == that) return true; 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() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); return hashCode; } @Override public int compareTo(getOperatingSystems_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), 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; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory { @Override public getOperatingSystems_resultStandardScheme getScheme() { return new getOperatingSystems_resultStandardScheme(); } } private static class getOperatingSystems_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override 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 _list322 = iprot.readListBegin(); struct.success = new java.util.ArrayList(_list322.size); @org.apache.thrift.annotation.Nullable OperatingSystem _elem323; for (int _i324 = 0; _i324 < _list322.size; ++_i324) { _elem323 = new OperatingSystem(); _elem323.read(iprot); struct.success.add(_elem323); } 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(); } @Override 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 _iter325 : struct.success) { _iter325.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getOperatingSystems_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getOperatingSystems_resultTupleScheme getScheme() { return new getOperatingSystems_resultTupleScheme(); } } private static class getOperatingSystems_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getOperatingSystems_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (OperatingSystem _iter326 : struct.success) { _iter326.write(oprot); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getOperatingSystems_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list327 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.success = new java.util.ArrayList(_list327.size); @org.apache.thrift.annotation.Nullable OperatingSystem _elem328; for (int _i329 = 0; _i329 < _list327.size; ++_i329) { _elem328 = new OperatingSystem(); _elem328.read(iprot); struct.success.add(_elem328); } } struct.setSuccessIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getVirtualizers_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = 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 java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = java.util.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) { } @Override public getVirtualizers_args deepCopy() { return new getVirtualizers_args(this); } @Override public void clear() { } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getVirtualizers_args) return this.equals((getVirtualizers_args)that); return false; } public boolean equals(getVirtualizers_args that) { if (that == null) return false; if (this == that) return true; return true; } @Override public int hashCode() { int hashCode = 1; return hashCode; } @Override public int compareTo(getVirtualizers_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory { @Override public getVirtualizers_argsStandardScheme getScheme() { return new getVirtualizers_argsStandardScheme(); } } private static class getVirtualizers_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override 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(); } @Override 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 org.apache.thrift.scheme.SchemeFactory { @Override public getVirtualizers_argsTupleScheme getScheme() { return new getVirtualizers_argsTupleScheme(); } } private static class getVirtualizers_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getVirtualizers_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getVirtualizers_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getVirtualizers_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getVirtualizers_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.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 java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getVirtualizers_result.class, metaDataMap); } public getVirtualizers_result() { } public getVirtualizers_result( java.util.List success) { this(); this.success = success; } /** * Performs a deep copy on other. */ public getVirtualizers_result(getVirtualizers_result other) { if (other.isSetSuccess()) { java.util.List __this__success = new java.util.ArrayList(other.success.size()); for (Virtualizer other_element : other.success) { __this__success.add(new Virtualizer(other_element)); } this.success = __this__success; } } @Override 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(); } @org.apache.thrift.annotation.Nullable 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 java.util.ArrayList(); } this.success.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List getSuccess() { return this.success; } public getVirtualizers_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.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; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.util.List)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getVirtualizers_result) return this.equals((getVirtualizers_result)that); return false; } public boolean equals(getVirtualizers_result that) { if (that == null) return false; if (this == that) return true; 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() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); return hashCode; } @Override public int compareTo(getVirtualizers_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), 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; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory { @Override public getVirtualizers_resultStandardScheme getScheme() { return new getVirtualizers_resultStandardScheme(); } } private static class getVirtualizers_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override 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 _list330 = iprot.readListBegin(); struct.success = new java.util.ArrayList(_list330.size); @org.apache.thrift.annotation.Nullable Virtualizer _elem331; for (int _i332 = 0; _i332 < _list330.size; ++_i332) { _elem331 = new Virtualizer(); _elem331.read(iprot); struct.success.add(_elem331); } 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(); } @Override 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 _iter333 : struct.success) { _iter333.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getVirtualizers_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getVirtualizers_resultTupleScheme getScheme() { return new getVirtualizers_resultTupleScheme(); } } private static class getVirtualizers_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getVirtualizers_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (Virtualizer _iter334 : struct.success) { _iter334.write(oprot); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getVirtualizers_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list335 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.success = new java.util.ArrayList(_list335.size); @org.apache.thrift.annotation.Nullable Virtualizer _elem336; for (int _i337 = 0; _i337 < _list335.size; ++_i337) { _elem336 = new Virtualizer(); _elem336.read(iprot); struct.success.add(_elem336); } } struct.setSuccessIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getAllOrganizations_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = 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 java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = java.util.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) { } @Override public getAllOrganizations_args deepCopy() { return new getAllOrganizations_args(this); } @Override public void clear() { } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getAllOrganizations_args) return this.equals((getAllOrganizations_args)that); return false; } public boolean equals(getAllOrganizations_args that) { if (that == null) return false; if (this == that) return true; return true; } @Override public int hashCode() { int hashCode = 1; return hashCode; } @Override public int compareTo(getAllOrganizations_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory { @Override public getAllOrganizations_argsStandardScheme getScheme() { return new getAllOrganizations_argsStandardScheme(); } } private static class getAllOrganizations_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override 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(); } @Override 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 org.apache.thrift.scheme.SchemeFactory { @Override public getAllOrganizations_argsTupleScheme getScheme() { return new getAllOrganizations_argsTupleScheme(); } } private static class getAllOrganizations_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getAllOrganizations_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getAllOrganizations_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getAllOrganizations_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getAllOrganizations_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.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 java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllOrganizations_result.class, metaDataMap); } public getAllOrganizations_result() { } public getAllOrganizations_result( java.util.List success) { this(); this.success = success; } /** * Performs a deep copy on other. */ public getAllOrganizations_result(getAllOrganizations_result other) { if (other.isSetSuccess()) { java.util.List __this__success = new java.util.ArrayList(other.success.size()); for (Organization other_element : other.success) { __this__success.add(new Organization(other_element)); } this.success = __this__success; } } @Override 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(); } @org.apache.thrift.annotation.Nullable 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 java.util.ArrayList(); } this.success.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List getSuccess() { return this.success; } public getAllOrganizations_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.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; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.util.List)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getAllOrganizations_result) return this.equals((getAllOrganizations_result)that); return false; } public boolean equals(getAllOrganizations_result that) { if (that == null) return false; if (this == that) return true; 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() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); return hashCode; } @Override public int compareTo(getAllOrganizations_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), 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; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory { @Override public getAllOrganizations_resultStandardScheme getScheme() { return new getAllOrganizations_resultStandardScheme(); } } private static class getAllOrganizations_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override 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 _list338 = iprot.readListBegin(); struct.success = new java.util.ArrayList(_list338.size); @org.apache.thrift.annotation.Nullable Organization _elem339; for (int _i340 = 0; _i340 < _list338.size; ++_i340) { _elem339 = new Organization(); _elem339.read(iprot); struct.success.add(_elem339); } 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(); } @Override 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 _iter341 : struct.success) { _iter341.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getAllOrganizations_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getAllOrganizations_resultTupleScheme getScheme() { return new getAllOrganizations_resultTupleScheme(); } } private static class getAllOrganizations_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getAllOrganizations_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (Organization _iter342 : struct.success) { _iter342.write(oprot); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getAllOrganizations_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list343 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.success = new java.util.ArrayList(_list343.size); @org.apache.thrift.annotation.Nullable Organization _elem344; for (int _i345 = 0; _i345 < _list343.size; ++_i345) { _elem344 = new Organization(); _elem344.read(iprot); struct.success.add(_elem344); } } struct.setSuccessIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class getLocations_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("getLocations_args"); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getLocations_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getLocations_argsTupleSchemeFactory(); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLocations_args.class, metaDataMap); } public getLocations_args() { } /** * Performs a deep copy on other. */ public getLocations_args(getLocations_args other) { } @Override public getLocations_args deepCopy() { return new getLocations_args(this); } @Override public void clear() { } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getLocations_args) return this.equals((getLocations_args)that); return false; } public boolean equals(getLocations_args that) { if (that == null) return false; if (this == that) return true; return true; } @Override public int hashCode() { int hashCode = 1; return hashCode; } @Override public int compareTo(getLocations_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("getLocations_args("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class getLocations_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getLocations_argsStandardScheme getScheme() { return new getLocations_argsStandardScheme(); } } private static class getLocations_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, getLocations_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, getLocations_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getLocations_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getLocations_argsTupleScheme getScheme() { return new getLocations_argsTupleScheme(); } } private static class getLocations_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getLocations_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getLocations_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class getLocations_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("getLocations_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getLocations_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getLocations_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.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 java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Location.class)))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLocations_result.class, metaDataMap); } public getLocations_result() { } public getLocations_result( java.util.List success) { this(); this.success = success; } /** * Performs a deep copy on other. */ public getLocations_result(getLocations_result other) { if (other.isSetSuccess()) { java.util.List __this__success = new java.util.ArrayList(other.success.size()); for (Location other_element : other.success) { __this__success.add(new Location(other_element)); } this.success = __this__success; } } @Override public getLocations_result deepCopy() { return new getLocations_result(this); } @Override public void clear() { this.success = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(Location elem) { if (this.success == null) { this.success = new java.util.ArrayList(); } this.success.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List getSuccess() { return this.success; } public getLocations_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.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; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.util.List)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getLocations_result) return this.equals((getLocations_result)that); return false; } public boolean equals(getLocations_result that) { if (that == null) return false; if (this == that) return true; 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() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); return hashCode; } @Override public int compareTo(getLocations_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), 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; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("getLocations_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class getLocations_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getLocations_resultStandardScheme getScheme() { return new getLocations_resultStandardScheme(); } } private static class getLocations_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, getLocations_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list346 = iprot.readListBegin(); struct.success = new java.util.ArrayList(_list346.size); @org.apache.thrift.annotation.Nullable Location _elem347; for (int _i348 = 0; _i348 < _list346.size; ++_i348) { _elem347 = new Location(); _elem347.read(iprot); struct.success.add(_elem347); } 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(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, getLocations_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (Location _iter349 : struct.success) { _iter349.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getLocations_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getLocations_resultTupleScheme getScheme() { return new getLocations_resultTupleScheme(); } } private static class getLocations_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getLocations_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (Location _iter350 : struct.success) { _iter350.write(oprot); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getLocations_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list351 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.success = new java.util.ArrayList(_list351.size); @org.apache.thrift.annotation.Nullable Location _elem352; for (int _i353 = 0; _i353 < _list351.size; ++_i353) { _elem352 = new Location(); _elem352.read(iprot); struct.success.add(_elem352); } } struct.setSuccessIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class getStatus_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("getStatus_args"); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getStatus_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getStatus_argsTupleSchemeFactory(); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getStatus_args.class, metaDataMap); } public getStatus_args() { } /** * Performs a deep copy on other. */ public getStatus_args(getStatus_args other) { } @Override public getStatus_args deepCopy() { return new getStatus_args(this); } @Override public void clear() { } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getStatus_args) return this.equals((getStatus_args)that); return false; } public boolean equals(getStatus_args that) { if (that == null) return false; if (this == that) return true; return true; } @Override public int hashCode() { int hashCode = 1; return hashCode; } @Override public int compareTo(getStatus_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("getStatus_args("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class getStatus_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getStatus_argsStandardScheme getScheme() { return new getStatus_argsStandardScheme(); } } private static class getStatus_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, getStatus_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, getStatus_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getStatus_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getStatus_argsTupleScheme getScheme() { return new getStatus_argsTupleScheme(); } } private static class getStatus_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getStatus_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getStatus_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class getStatus_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("getStatus_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getStatus_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getStatus_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable SatelliteStatus success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SatelliteStatus.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getStatus_result.class, metaDataMap); } public getStatus_result() { } public getStatus_result( SatelliteStatus success) { this(); this.success = success; } /** * Performs a deep copy on other. */ public getStatus_result(getStatus_result other) { if (other.isSetSuccess()) { this.success = new SatelliteStatus(other.success); } } @Override public getStatus_result deepCopy() { return new getStatus_result(this); } @Override public void clear() { this.success = null; } @org.apache.thrift.annotation.Nullable public SatelliteStatus getSuccess() { return this.success; } public getStatus_result setSuccess(@org.apache.thrift.annotation.Nullable SatelliteStatus success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((SatelliteStatus)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getStatus_result) return this.equals((getStatus_result)that); return false; } public boolean equals(getStatus_result that) { if (that == null) return false; if (this == that) return true; 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() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); return hashCode; } @Override public int compareTo(getStatus_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), 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; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("getStatus_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class getStatus_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getStatus_resultStandardScheme getScheme() { return new getStatus_resultStandardScheme(); } } private static class getStatus_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, getStatus_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new SatelliteStatus(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, getStatus_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getStatus_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getStatus_resultTupleScheme getScheme() { return new getStatus_resultTupleScheme(); } } private static class getStatus_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getStatus_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { struct.success.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getStatus_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = new SatelliteStatus(); struct.success.read(iprot); struct.setSuccessIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 org.apache.thrift.protocol.TField PAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("page", org.apache.thrift.protocol.TType.I32, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getImageList_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getImageList_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required public @org.apache.thrift.annotation.Nullable java.util.List tagSearch; // required public int page; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { USER_TOKEN((short)1, "userToken"), TAG_SEARCH((short)2, "tagSearch"), PAGE((short)3, "page"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // USER_TOKEN return USER_TOKEN; case 2: // TAG_SEARCH return TAG_SEARCH; case 3: // PAGE return PAGE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __PAGE_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); tmpMap.put(_Fields.TAG_SEARCH, new org.apache.thrift.meta_data.FieldMetaData("tagSearch", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); tmpMap.put(_Fields.PAGE, new org.apache.thrift.meta_data.FieldMetaData("page", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageList_args.class, metaDataMap); } public getImageList_args() { } public getImageList_args( java.lang.String userToken, java.util.List tagSearch, int page) { this(); this.userToken = userToken; this.tagSearch = tagSearch; this.page = page; setPageIsSet(true); } /** * Performs a deep copy on other. */ public getImageList_args(getImageList_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetUserToken()) { this.userToken = other.userToken; } if (other.isSetTagSearch()) { java.util.List __this__tagSearch = new java.util.ArrayList(other.tagSearch); this.tagSearch = __this__tagSearch; } this.page = other.page; } @Override public getImageList_args deepCopy() { return new getImageList_args(this); } @Override public void clear() { this.userToken = null; this.tagSearch = null; setPageIsSet(false); this.page = 0; } @org.apache.thrift.annotation.Nullable public java.lang.String getUserToken() { return this.userToken; } public getImageList_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.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(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator getTagSearchIterator() { return (this.tagSearch == null) ? null : this.tagSearch.iterator(); } public void addToTagSearch(java.lang.String elem) { if (this.tagSearch == null) { this.tagSearch = new java.util.ArrayList(); } this.tagSearch.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List getTagSearch() { return this.tagSearch; } public getImageList_args setTagSearch(@org.apache.thrift.annotation.Nullable java.util.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 int getPage() { return this.page; } public getImageList_args setPage(int page) { this.page = page; setPageIsSet(true); return this; } public void unsetPage() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PAGE_ISSET_ID); } /** Returns true if field page is set (has been assigned a value) and false otherwise */ public boolean isSetPage() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PAGE_ISSET_ID); } public void setPageIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PAGE_ISSET_ID, value); } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case USER_TOKEN: if (value == null) { unsetUserToken(); } else { setUserToken((java.lang.String)value); } break; case TAG_SEARCH: if (value == null) { unsetTagSearch(); } else { setTagSearch((java.util.List)value); } break; case PAGE: if (value == null) { unsetPage(); } else { setPage((java.lang.Integer)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case USER_TOKEN: return getUserToken(); case TAG_SEARCH: return getTagSearch(); case PAGE: return getPage(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case USER_TOKEN: return isSetUserToken(); case TAG_SEARCH: return isSetTagSearch(); case PAGE: return isSetPage(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getImageList_args) return this.equals((getImageList_args)that); return false; } public boolean equals(getImageList_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_userToken = true && this.isSetUserToken(); boolean that_present_userToken = true && that.isSetUserToken(); if (this_present_userToken || that_present_userToken) { if (!(this_present_userToken && that_present_userToken)) return false; if (!this.userToken.equals(that.userToken)) return false; } boolean this_present_tagSearch = true && this.isSetTagSearch(); boolean that_present_tagSearch = true && that.isSetTagSearch(); if (this_present_tagSearch || that_present_tagSearch) { if (!(this_present_tagSearch && that_present_tagSearch)) return false; if (!this.tagSearch.equals(that.tagSearch)) return false; } boolean this_present_page = true; boolean that_present_page = true; if (this_present_page || that_present_page) { if (!(this_present_page && that_present_page)) return false; if (this.page != that.page) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287); if (isSetUserToken()) hashCode = hashCode * 8191 + userToken.hashCode(); hashCode = hashCode * 8191 + ((isSetTagSearch()) ? 131071 : 524287); if (isSetTagSearch()) hashCode = hashCode * 8191 + tagSearch.hashCode(); hashCode = hashCode * 8191 + page; return hashCode; } @Override public int compareTo(getImageList_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetUserToken(), 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 = java.lang.Boolean.compare(isSetTagSearch(), other.isSetTagSearch()); if (lastComparison != 0) { return lastComparison; } if (isSetTagSearch()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tagSearch, other.tagSearch); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetPage(), other.isSetPage()); if (lastComparison != 0) { return lastComparison; } if (isSetPage()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.page, other.page); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("getImageList_args("); boolean first = true; sb.append("userToken:"); if (this.userToken == null) { sb.append("null"); } else { sb.append(this.userToken); } first = false; if (!first) sb.append(", "); sb.append("tagSearch:"); if (this.tagSearch == null) { sb.append("null"); } else { sb.append(this.tagSearch); } first = false; if (!first) sb.append(", "); sb.append("page:"); sb.append(this.page); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class getImageList_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getImageList_argsStandardScheme getScheme() { return new getImageList_argsStandardScheme(); } } private static class getImageList_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override 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 _list354 = iprot.readListBegin(); struct.tagSearch = new java.util.ArrayList(_list354.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem355; for (int _i356 = 0; _i356 < _list354.size; ++_i356) { _elem355 = iprot.readString(); struct.tagSearch.add(_elem355); } iprot.readListEnd(); } struct.setTagSearchIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // PAGE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.page = iprot.readI32(); struct.setPageIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override 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 (java.lang.String _iter357 : struct.tagSearch) { oprot.writeString(_iter357); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldBegin(PAGE_FIELD_DESC); oprot.writeI32(struct.page); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getImageList_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getImageList_argsTupleScheme getScheme() { return new getImageList_argsTupleScheme(); } } private static class getImageList_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getImageList_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetUserToken()) { optionals.set(0); } if (struct.isSetTagSearch()) { optionals.set(1); } if (struct.isSetPage()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetUserToken()) { oprot.writeString(struct.userToken); } if (struct.isSetTagSearch()) { { oprot.writeI32(struct.tagSearch.size()); for (java.lang.String _iter358 : struct.tagSearch) { oprot.writeString(_iter358); } } } if (struct.isSetPage()) { oprot.writeI32(struct.page); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getImageList_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); } if (incoming.get(1)) { { org.apache.thrift.protocol.TList _list359 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); struct.tagSearch = new java.util.ArrayList(_list359.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem360; for (int _i361 = 0; _i361 < _list359.size; ++_i361) { _elem360 = iprot.readString(); struct.tagSearch.add(_elem360); } } struct.setTagSearchIsSet(true); } if (incoming.get(2)) { struct.page = iprot.readI32(); struct.setPageIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getImageList_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getImageList_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.List success; // required public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), AUTH_ERROR((short)1, "authError"), SERVER_ERROR((short)2, "serverError"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // AUTH_ERROR return AUTH_ERROR; case 2: // SERVER_ERROR return SERVER_ERROR; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class))); tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageList_result.class, metaDataMap); } public getImageList_result() { } public getImageList_result( java.util.List success, TAuthorizationException authError, TInvocationException serverError) { this(); this.success = success; this.authError = authError; this.serverError = serverError; } /** * Performs a deep copy on other. */ public getImageList_result(getImageList_result other) { if (other.isSetSuccess()) { java.util.List __this__success = new java.util.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); } if (other.isSetServerError()) { this.serverError = new TInvocationException(other.serverError); } } @Override public getImageList_result deepCopy() { return new getImageList_result(this); } @Override public void clear() { this.success = null; this.authError = null; this.serverError = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @org.apache.thrift.annotation.Nullable 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 java.util.ArrayList(); } this.success.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List getSuccess() { return this.success; } public getImageList_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.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; } } @org.apache.thrift.annotation.Nullable public TAuthorizationException getAuthError() { return this.authError; } public getImageList_result setAuthError(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TInvocationException getServerError() { return this.serverError; } public getImageList_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) { this.serverError = serverError; return this; } public void unsetServerError() { this.serverError = null; } /** Returns true if field serverError is set (has been assigned a value) and false otherwise */ public boolean isSetServerError() { return this.serverError != null; } public void setServerErrorIsSet(boolean value) { if (!value) { this.serverError = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.util.List)value); } break; case AUTH_ERROR: if (value == null) { unsetAuthError(); } else { setAuthError((TAuthorizationException)value); } break; case SERVER_ERROR: if (value == null) { unsetServerError(); } else { setServerError((TInvocationException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case AUTH_ERROR: return getAuthError(); case SERVER_ERROR: return getServerError(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case AUTH_ERROR: return isSetAuthError(); case SERVER_ERROR: return isSetServerError(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getImageList_result) return this.equals((getImageList_result)that); return false; } public boolean equals(getImageList_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_authError = true && this.isSetAuthError(); boolean that_present_authError = true && that.isSetAuthError(); if (this_present_authError || that_present_authError) { if (!(this_present_authError && that_present_authError)) return false; if (!this.authError.equals(that.authError)) return false; } boolean this_present_serverError = true && this.isSetServerError(); boolean that_present_serverError = true && that.isSetServerError(); if (this_present_serverError || that_present_serverError) { if (!(this_present_serverError && that_present_serverError)) return false; if (!this.serverError.equals(that.serverError)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287); if (isSetAuthError()) hashCode = hashCode * 8191 + authError.hashCode(); hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287); if (isSetServerError()) hashCode = hashCode * 8191 + serverError.hashCode(); return hashCode; } @Override public int compareTo(getImageList_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), 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 = java.lang.Boolean.compare(isSetAuthError(), 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 = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError()); if (lastComparison != 0) { return lastComparison; } if (isSetServerError()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("getImageList_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("authError:"); if (this.authError == null) { sb.append("null"); } else { sb.append(this.authError); } first = false; if (!first) sb.append(", "); sb.append("serverError:"); if (this.serverError == null) { sb.append("null"); } else { sb.append(this.serverError); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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 org.apache.thrift.scheme.SchemeFactory { @Override public getImageList_resultStandardScheme getScheme() { return new getImageList_resultStandardScheme(); } } private static class getImageList_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override 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 _list362 = iprot.readListBegin(); struct.success = new java.util.ArrayList(_list362.size); @org.apache.thrift.annotation.Nullable ImageSummaryRead _elem363; for (int _i364 = 0; _i364 < _list362.size; ++_i364) { _elem363 = new ImageSummaryRead(); _elem363.read(iprot); struct.success.add(_elem363); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // AUTH_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // SERVER_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override 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 _iter365 : struct.success) { _iter365.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.authError != null) { oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); struct.authError.write(oprot); oprot.writeFieldEnd(); } if (struct.serverError != null) { oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC); struct.serverError.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getImageList_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getImageList_resultTupleScheme getScheme() { return new getImageList_resultTupleScheme(); } } private static class getImageList_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getImageList_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetAuthError()) { optionals.set(1); } if (struct.isSetServerError()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (ImageSummaryRead _iter366 : struct.success) { _iter366.write(oprot); } } } if (struct.isSetAuthError()) { struct.authError.write(oprot); } if (struct.isSetServerError()) { struct.serverError.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getImageList_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list367 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.success = new java.util.ArrayList(_list367.size); @org.apache.thrift.annotation.Nullable ImageSummaryRead _elem368; for (int _i369 = 0; _i369 < _list367.size; ++_i369) { _elem368 = new ImageSummaryRead(); _elem368.read(iprot); struct.success.add(_elem368); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } if (incoming.get(2)) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getImageDetails_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getImageDetails_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required public @org.apache.thrift.annotation.Nullable java.lang.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 java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageDetails_args.class, metaDataMap); } public getImageDetails_args() { } public getImageDetails_args( java.lang.String userToken, java.lang.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; } } @Override public getImageDetails_args deepCopy() { return new getImageDetails_args(this); } @Override public void clear() { this.userToken = null; this.imageBaseId = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getUserToken() { return this.userToken; } public getImageDetails_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.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; } } @org.apache.thrift.annotation.Nullable public java.lang.String getImageBaseId() { return this.imageBaseId; } public getImageDetails_args setImageBaseId(@org.apache.thrift.annotation.Nullable java.lang.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; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case USER_TOKEN: if (value == null) { unsetUserToken(); } else { setUserToken((java.lang.String)value); } break; case IMAGE_BASE_ID: if (value == null) { unsetImageBaseId(); } else { setImageBaseId((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case USER_TOKEN: return getUserToken(); case IMAGE_BASE_ID: return getImageBaseId(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case USER_TOKEN: return isSetUserToken(); case IMAGE_BASE_ID: return isSetImageBaseId(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getImageDetails_args) return this.equals((getImageDetails_args)that); return false; } public boolean equals(getImageDetails_args that) { if (that == null) return false; if (this == that) return true; 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() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287); if (isSetUserToken()) hashCode = hashCode * 8191 + userToken.hashCode(); hashCode = hashCode * 8191 + ((isSetImageBaseId()) ? 131071 : 524287); if (isSetImageBaseId()) hashCode = hashCode * 8191 + imageBaseId.hashCode(); return hashCode; } @Override public int compareTo(getImageDetails_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetUserToken(), 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 = java.lang.Boolean.compare(isSetImageBaseId(), 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; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory { @Override public getImageDetails_argsStandardScheme getScheme() { return new getImageDetails_argsStandardScheme(); } } private static class getImageDetails_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override 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(); } @Override 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 org.apache.thrift.scheme.SchemeFactory { @Override public getImageDetails_argsTupleScheme getScheme() { return new getImageDetails_argsTupleScheme(); } } private static class getImageDetails_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getImageDetails_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.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 { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.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); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getImageDetails_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getImageDetails_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable ImageDetailsRead success; // required public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), AUTH_ERROR((short)1, "authError"), NOT_FOUND((short)2, "notFound"), SERVER_ERROR((short)3, "serverError"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // AUTH_ERROR return AUTH_ERROR; case 2: // NOT_FOUND return NOT_FOUND; case 3: // SERVER_ERROR return SERVER_ERROR; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class))); tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class))); tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageDetails_result.class, metaDataMap); } public getImageDetails_result() { } public getImageDetails_result( ImageDetailsRead success, TAuthorizationException authError, TNotFoundException notFound, TInvocationException serverError) { this(); this.success = success; this.authError = authError; this.notFound = notFound; this.serverError = serverError; } /** * Performs a deep copy on 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); } if (other.isSetServerError()) { this.serverError = new TInvocationException(other.serverError); } } @Override public getImageDetails_result deepCopy() { return new getImageDetails_result(this); } @Override public void clear() { this.success = null; this.authError = null; this.notFound = null; this.serverError = null; } @org.apache.thrift.annotation.Nullable public ImageDetailsRead getSuccess() { return this.success; } public getImageDetails_result setSuccess(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TAuthorizationException getAuthError() { return this.authError; } public getImageDetails_result setAuthError(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TNotFoundException getNotFound() { return this.notFound; } public getImageDetails_result setNotFound(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TInvocationException getServerError() { return this.serverError; } public getImageDetails_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) { this.serverError = serverError; return this; } public void unsetServerError() { this.serverError = null; } /** Returns true if field serverError is set (has been assigned a value) and false otherwise */ public boolean isSetServerError() { return this.serverError != null; } public void setServerErrorIsSet(boolean value) { if (!value) { this.serverError = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((ImageDetailsRead)value); } break; case AUTH_ERROR: if (value == null) { unsetAuthError(); } else { setAuthError((TAuthorizationException)value); } break; case NOT_FOUND: if (value == null) { unsetNotFound(); } else { setNotFound((TNotFoundException)value); } break; case SERVER_ERROR: if (value == null) { unsetServerError(); } else { setServerError((TInvocationException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case AUTH_ERROR: return getAuthError(); case NOT_FOUND: return getNotFound(); case SERVER_ERROR: return getServerError(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case AUTH_ERROR: return isSetAuthError(); case NOT_FOUND: return isSetNotFound(); case SERVER_ERROR: return isSetServerError(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getImageDetails_result) return this.equals((getImageDetails_result)that); return false; } public boolean equals(getImageDetails_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_authError = true && this.isSetAuthError(); boolean that_present_authError = true && that.isSetAuthError(); if (this_present_authError || that_present_authError) { if (!(this_present_authError && that_present_authError)) return false; if (!this.authError.equals(that.authError)) return false; } boolean this_present_notFound = true && this.isSetNotFound(); boolean that_present_notFound = true && that.isSetNotFound(); if (this_present_notFound || that_present_notFound) { if (!(this_present_notFound && that_present_notFound)) return false; if (!this.notFound.equals(that.notFound)) return false; } boolean this_present_serverError = true && this.isSetServerError(); boolean that_present_serverError = true && that.isSetServerError(); if (this_present_serverError || that_present_serverError) { if (!(this_present_serverError && that_present_serverError)) return false; if (!this.serverError.equals(that.serverError)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287); if (isSetAuthError()) hashCode = hashCode * 8191 + authError.hashCode(); hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287); if (isSetNotFound()) hashCode = hashCode * 8191 + notFound.hashCode(); hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287); if (isSetServerError()) hashCode = hashCode * 8191 + serverError.hashCode(); return hashCode; } @Override public int compareTo(getImageDetails_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), 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 = java.lang.Boolean.compare(isSetAuthError(), 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 = java.lang.Boolean.compare(isSetNotFound(), other.isSetNotFound()); if (lastComparison != 0) { return lastComparison; } if (isSetNotFound()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError()); if (lastComparison != 0) { return lastComparison; } if (isSetServerError()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("getImageDetails_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("authError:"); if (this.authError == null) { sb.append("null"); } else { sb.append(this.authError); } first = false; if (!first) sb.append(", "); sb.append("notFound:"); if (this.notFound == null) { sb.append("null"); } else { sb.append(this.notFound); } first = false; if (!first) sb.append(", "); sb.append("serverError:"); if (this.serverError == null) { sb.append("null"); } else { sb.append(this.serverError); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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 org.apache.thrift.scheme.SchemeFactory { @Override public getImageDetails_resultStandardScheme getScheme() { return new getImageDetails_resultStandardScheme(); } } private static class getImageDetails_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, getImageDetails_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new ImageDetailsRead(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // AUTH_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // NOT_FOUND if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // SERVER_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, getImageDetails_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.authError != null) { oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); struct.authError.write(oprot); oprot.writeFieldEnd(); } if (struct.notFound != null) { oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC); struct.notFound.write(oprot); oprot.writeFieldEnd(); } if (struct.serverError != null) { oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC); struct.serverError.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getImageDetails_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getImageDetails_resultTupleScheme getScheme() { return new getImageDetails_resultTupleScheme(); } } private static class getImageDetails_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getImageDetails_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetAuthError()) { optionals.set(1); } if (struct.isSetNotFound()) { optionals.set(2); } if (struct.isSetServerError()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetAuthError()) { struct.authError.write(oprot); } if (struct.isSetNotFound()) { struct.notFound.write(oprot); } if (struct.isSetServerError()) { struct.serverError.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getImageDetails_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.success = new ImageDetailsRead(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } if (incoming.get(2)) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } if (incoming.get(3)) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class createImage_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("createImage_args"); private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField IMAGE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("imageName", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createImage_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createImage_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required public @org.apache.thrift.annotation.Nullable java.lang.String imageName; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { USER_TOKEN((short)1, "userToken"), IMAGE_NAME((short)2, "imageName"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // USER_TOKEN return USER_TOKEN; case 2: // IMAGE_NAME return IMAGE_NAME; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); tmpMap.put(_Fields.IMAGE_NAME, new org.apache.thrift.meta_data.FieldMetaData("imageName", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createImage_args.class, metaDataMap); } public createImage_args() { } public createImage_args( java.lang.String userToken, java.lang.String imageName) { this(); this.userToken = userToken; this.imageName = imageName; } /** * Performs a deep copy on other. */ public createImage_args(createImage_args other) { if (other.isSetUserToken()) { this.userToken = other.userToken; } if (other.isSetImageName()) { this.imageName = other.imageName; } } @Override public createImage_args deepCopy() { return new createImage_args(this); } @Override public void clear() { this.userToken = null; this.imageName = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getUserToken() { return this.userToken; } public createImage_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.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; } } @org.apache.thrift.annotation.Nullable public java.lang.String getImageName() { return this.imageName; } public createImage_args setImageName(@org.apache.thrift.annotation.Nullable java.lang.String imageName) { this.imageName = imageName; return this; } public void unsetImageName() { this.imageName = null; } /** Returns true if field imageName is set (has been assigned a value) and false otherwise */ public boolean isSetImageName() { return this.imageName != null; } public void setImageNameIsSet(boolean value) { if (!value) { this.imageName = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case USER_TOKEN: if (value == null) { unsetUserToken(); } else { setUserToken((java.lang.String)value); } break; case IMAGE_NAME: if (value == null) { unsetImageName(); } else { setImageName((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case USER_TOKEN: return getUserToken(); case IMAGE_NAME: return getImageName(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case USER_TOKEN: return isSetUserToken(); case IMAGE_NAME: return isSetImageName(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof createImage_args) return this.equals((createImage_args)that); return false; } public boolean equals(createImage_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_userToken = true && this.isSetUserToken(); boolean that_present_userToken = true && that.isSetUserToken(); if (this_present_userToken || that_present_userToken) { if (!(this_present_userToken && that_present_userToken)) return false; if (!this.userToken.equals(that.userToken)) return false; } boolean this_present_imageName = true && this.isSetImageName(); boolean that_present_imageName = true && that.isSetImageName(); if (this_present_imageName || that_present_imageName) { if (!(this_present_imageName && that_present_imageName)) return false; if (!this.imageName.equals(that.imageName)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287); if (isSetUserToken()) hashCode = hashCode * 8191 + userToken.hashCode(); hashCode = hashCode * 8191 + ((isSetImageName()) ? 131071 : 524287); if (isSetImageName()) hashCode = hashCode * 8191 + imageName.hashCode(); return hashCode; } @Override public int compareTo(createImage_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetUserToken(), 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 = java.lang.Boolean.compare(isSetImageName(), other.isSetImageName()); if (lastComparison != 0) { return lastComparison; } if (isSetImageName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageName, other.imageName); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("createImage_args("); boolean first = true; sb.append("userToken:"); if (this.userToken == null) { sb.append("null"); } else { sb.append(this.userToken); } first = false; if (!first) sb.append(", "); sb.append("imageName:"); if (this.imageName == null) { sb.append("null"); } else { sb.append(this.imageName); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class createImage_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public createImage_argsStandardScheme getScheme() { return new createImage_argsStandardScheme(); } } private static class createImage_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, createImage_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // USER_TOKEN if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // IMAGE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.imageName = iprot.readString(); struct.setImageNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, createImage_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.userToken != null) { oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC); oprot.writeString(struct.userToken); oprot.writeFieldEnd(); } if (struct.imageName != null) { oprot.writeFieldBegin(IMAGE_NAME_FIELD_DESC); oprot.writeString(struct.imageName); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class createImage_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public createImage_argsTupleScheme getScheme() { return new createImage_argsTupleScheme(); } } private static class createImage_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, createImage_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetUserToken()) { optionals.set(0); } if (struct.isSetImageName()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetUserToken()) { oprot.writeString(struct.userToken); } if (struct.isSetImageName()) { oprot.writeString(struct.imageName); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, createImage_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); } if (incoming.get(1)) { struct.imageName = iprot.readString(); struct.setImageNameIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class createImage_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("createImage_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("error", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createImage_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createImage_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String success; // required public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required public @org.apache.thrift.annotation.Nullable TInvocationException error; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), AUTH_ERROR((short)1, "authError"), ERROR((short)2, "error"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // AUTH_ERROR return AUTH_ERROR; case 2: // ERROR return ERROR; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class))); tmpMap.put(_Fields.ERROR, new org.apache.thrift.meta_data.FieldMetaData("error", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createImage_result.class, metaDataMap); } public createImage_result() { } public createImage_result( java.lang.String success, TAuthorizationException authError, TInvocationException error) { this(); this.success = success; this.authError = authError; this.error = error; } /** * Performs a deep copy on other. */ public createImage_result(createImage_result other) { if (other.isSetSuccess()) { this.success = other.success; } if (other.isSetAuthError()) { this.authError = new TAuthorizationException(other.authError); } if (other.isSetError()) { this.error = new TInvocationException(other.error); } } @Override public createImage_result deepCopy() { return new createImage_result(this); } @Override public void clear() { this.success = null; this.authError = null; this.error = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSuccess() { return this.success; } public createImage_result setSuccess(@org.apache.thrift.annotation.Nullable java.lang.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; } } @org.apache.thrift.annotation.Nullable public TAuthorizationException getAuthError() { return this.authError; } public createImage_result setAuthError(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TInvocationException getError() { return this.error; } public createImage_result setError(@org.apache.thrift.annotation.Nullable TInvocationException error) { this.error = error; return this; } public void unsetError() { this.error = null; } /** Returns true if field error is set (has been assigned a value) and false otherwise */ public boolean isSetError() { return this.error != null; } public void setErrorIsSet(boolean value) { if (!value) { this.error = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.lang.String)value); } break; case AUTH_ERROR: if (value == null) { unsetAuthError(); } else { setAuthError((TAuthorizationException)value); } break; case ERROR: if (value == null) { unsetError(); } else { setError((TInvocationException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case AUTH_ERROR: return getAuthError(); case ERROR: return getError(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case AUTH_ERROR: return isSetAuthError(); case ERROR: return isSetError(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof createImage_result) return this.equals((createImage_result)that); return false; } public boolean equals(createImage_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_authError = true && this.isSetAuthError(); boolean that_present_authError = true && that.isSetAuthError(); if (this_present_authError || that_present_authError) { if (!(this_present_authError && that_present_authError)) return false; if (!this.authError.equals(that.authError)) return false; } boolean this_present_error = true && this.isSetError(); boolean that_present_error = true && that.isSetError(); if (this_present_error || that_present_error) { if (!(this_present_error && that_present_error)) return false; if (!this.error.equals(that.error)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287); if (isSetAuthError()) hashCode = hashCode * 8191 + authError.hashCode(); hashCode = hashCode * 8191 + ((isSetError()) ? 131071 : 524287); if (isSetError()) hashCode = hashCode * 8191 + error.hashCode(); return hashCode; } @Override public int compareTo(createImage_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), 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 = java.lang.Boolean.compare(isSetAuthError(), 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 = java.lang.Boolean.compare(isSetError(), other.isSetError()); if (lastComparison != 0) { return lastComparison; } if (isSetError()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.error, other.error); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("createImage_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("authError:"); if (this.authError == null) { sb.append("null"); } else { sb.append(this.authError); } first = false; if (!first) sb.append(", "); sb.append("error:"); if (this.error == null) { sb.append("null"); } else { sb.append(this.error); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class createImage_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public createImage_resultStandardScheme getScheme() { return new createImage_resultStandardScheme(); } } private static class createImage_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, createImage_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // AUTH_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.error = new TInvocationException(); struct.error.read(iprot); struct.setErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, createImage_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeString(struct.success); oprot.writeFieldEnd(); } if (struct.authError != null) { oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); struct.authError.write(oprot); oprot.writeFieldEnd(); } if (struct.error != null) { oprot.writeFieldBegin(ERROR_FIELD_DESC); struct.error.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class createImage_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public createImage_resultTupleScheme getScheme() { return new createImage_resultTupleScheme(); } } private static class createImage_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, createImage_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetAuthError()) { optionals.set(1); } if (struct.isSetError()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { oprot.writeString(struct.success); } if (struct.isSetAuthError()) { struct.authError.write(oprot); } if (struct.isSetError()) { struct.error.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, createImage_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } if (incoming.get(2)) { struct.error = new TInvocationException(); struct.error.read(iprot); struct.setErrorIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new updateImageBase_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new updateImageBase_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required public @org.apache.thrift.annotation.Nullable java.lang.String imageBaseId; // required public @org.apache.thrift.annotation.Nullable 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 java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateImageBase_args.class, metaDataMap); } public updateImageBase_args() { } public updateImageBase_args( java.lang.String userToken, java.lang.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); } } @Override public updateImageBase_args deepCopy() { return new updateImageBase_args(this); } @Override public void clear() { this.userToken = null; this.imageBaseId = null; this.image = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getUserToken() { return this.userToken; } public updateImageBase_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.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; } } @org.apache.thrift.annotation.Nullable public java.lang.String getImageBaseId() { return this.imageBaseId; } public updateImageBase_args setImageBaseId(@org.apache.thrift.annotation.Nullable java.lang.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; } } @org.apache.thrift.annotation.Nullable public ImageBaseWrite getImage() { return this.image; } public updateImageBase_args setImage(@org.apache.thrift.annotation.Nullable 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; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case USER_TOKEN: if (value == null) { unsetUserToken(); } else { setUserToken((java.lang.String)value); } break; case IMAGE_BASE_ID: if (value == null) { unsetImageBaseId(); } else { setImageBaseId((java.lang.String)value); } break; case IMAGE: if (value == null) { unsetImage(); } else { setImage((ImageBaseWrite)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case USER_TOKEN: return getUserToken(); case IMAGE_BASE_ID: return getImageBaseId(); case IMAGE: return getImage(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case USER_TOKEN: return isSetUserToken(); case IMAGE_BASE_ID: return isSetImageBaseId(); case IMAGE: return isSetImage(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof updateImageBase_args) return this.equals((updateImageBase_args)that); return false; } public boolean equals(updateImageBase_args that) { if (that == null) return false; if (this == that) return true; 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() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287); if (isSetUserToken()) hashCode = hashCode * 8191 + userToken.hashCode(); hashCode = hashCode * 8191 + ((isSetImageBaseId()) ? 131071 : 524287); if (isSetImageBaseId()) hashCode = hashCode * 8191 + imageBaseId.hashCode(); hashCode = hashCode * 8191 + ((isSetImage()) ? 131071 : 524287); if (isSetImage()) hashCode = hashCode * 8191 + image.hashCode(); return hashCode; } @Override public int compareTo(updateImageBase_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetUserToken(), 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 = java.lang.Boolean.compare(isSetImageBaseId(), 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 = java.lang.Boolean.compare(isSetImage(), 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; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory { @Override public updateImageBase_argsStandardScheme getScheme() { return new updateImageBase_argsStandardScheme(); } } private static class updateImageBase_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override 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(); } @Override 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 org.apache.thrift.scheme.SchemeFactory { @Override public updateImageBase_argsTupleScheme getScheme() { return new updateImageBase_argsTupleScheme(); } } private static class updateImageBase_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, updateImageBase_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.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 { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.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); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField IMG_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("imgError", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new updateImageBase_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new updateImageBase_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required public @org.apache.thrift.annotation.Nullable TInvocationException imgError; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { AUTH_ERROR((short)1, "authError"), NOT_FOUND((short)2, "notFound"), IMG_ERROR((short)3, "imgError"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // AUTH_ERROR return AUTH_ERROR; case 2: // NOT_FOUND return NOT_FOUND; case 3: // IMG_ERROR return IMG_ERROR; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class))); tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class))); tmpMap.put(_Fields.IMG_ERROR, new org.apache.thrift.meta_data.FieldMetaData("imgError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateImageBase_result.class, metaDataMap); } public updateImageBase_result() { } public updateImageBase_result( TAuthorizationException authError, TNotFoundException notFound, TInvocationException imgError) { this(); this.authError = authError; this.notFound = notFound; this.imgError = imgError; } /** * Performs a deep copy on other. */ public updateImageBase_result(updateImageBase_result other) { if (other.isSetAuthError()) { this.authError = new TAuthorizationException(other.authError); } if (other.isSetNotFound()) { this.notFound = new TNotFoundException(other.notFound); } if (other.isSetImgError()) { this.imgError = new TInvocationException(other.imgError); } } @Override public updateImageBase_result deepCopy() { return new updateImageBase_result(this); } @Override public void clear() { this.authError = null; this.notFound = null; this.imgError = null; } @org.apache.thrift.annotation.Nullable public TAuthorizationException getAuthError() { return this.authError; } public updateImageBase_result setAuthError(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TNotFoundException getNotFound() { return this.notFound; } public updateImageBase_result setNotFound(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TInvocationException getImgError() { return this.imgError; } public updateImageBase_result setImgError(@org.apache.thrift.annotation.Nullable TInvocationException imgError) { this.imgError = imgError; return this; } public void unsetImgError() { this.imgError = null; } /** Returns true if field imgError is set (has been assigned a value) and false otherwise */ public boolean isSetImgError() { return this.imgError != null; } public void setImgErrorIsSet(boolean value) { if (!value) { this.imgError = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case AUTH_ERROR: if (value == null) { unsetAuthError(); } else { setAuthError((TAuthorizationException)value); } break; case NOT_FOUND: if (value == null) { unsetNotFound(); } else { setNotFound((TNotFoundException)value); } break; case IMG_ERROR: if (value == null) { unsetImgError(); } else { setImgError((TInvocationException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case AUTH_ERROR: return getAuthError(); case NOT_FOUND: return getNotFound(); case IMG_ERROR: return getImgError(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case AUTH_ERROR: return isSetAuthError(); case NOT_FOUND: return isSetNotFound(); case IMG_ERROR: return isSetImgError(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof updateImageBase_result) return this.equals((updateImageBase_result)that); return false; } public boolean equals(updateImageBase_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_authError = true && this.isSetAuthError(); boolean that_present_authError = true && that.isSetAuthError(); if (this_present_authError || that_present_authError) { if (!(this_present_authError && that_present_authError)) return false; if (!this.authError.equals(that.authError)) return false; } boolean this_present_notFound = true && this.isSetNotFound(); boolean that_present_notFound = true && that.isSetNotFound(); if (this_present_notFound || that_present_notFound) { if (!(this_present_notFound && that_present_notFound)) return false; if (!this.notFound.equals(that.notFound)) return false; } boolean this_present_imgError = true && this.isSetImgError(); boolean that_present_imgError = true && that.isSetImgError(); if (this_present_imgError || that_present_imgError) { if (!(this_present_imgError && that_present_imgError)) return false; if (!this.imgError.equals(that.imgError)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287); if (isSetAuthError()) hashCode = hashCode * 8191 + authError.hashCode(); hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287); if (isSetNotFound()) hashCode = hashCode * 8191 + notFound.hashCode(); hashCode = hashCode * 8191 + ((isSetImgError()) ? 131071 : 524287); if (isSetImgError()) hashCode = hashCode * 8191 + imgError.hashCode(); return hashCode; } @Override public int compareTo(updateImageBase_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetAuthError(), 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 = java.lang.Boolean.compare(isSetNotFound(), other.isSetNotFound()); if (lastComparison != 0) { return lastComparison; } if (isSetNotFound()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetImgError(), other.isSetImgError()); if (lastComparison != 0) { return lastComparison; } if (isSetImgError()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imgError, other.imgError); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("updateImageBase_result("); boolean first = true; sb.append("authError:"); if (this.authError == null) { sb.append("null"); } else { sb.append(this.authError); } first = false; if (!first) sb.append(", "); sb.append("notFound:"); if (this.notFound == null) { sb.append("null"); } else { sb.append(this.notFound); } first = false; if (!first) sb.append(", "); sb.append("imgError:"); if (this.imgError == null) { sb.append("null"); } else { sb.append(this.imgError); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class updateImageBase_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public updateImageBase_resultStandardScheme getScheme() { return new updateImageBase_resultStandardScheme(); } } private static class updateImageBase_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, updateImageBase_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // AUTH_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // NOT_FOUND if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // IMG_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.imgError = new TInvocationException(); struct.imgError.read(iprot); struct.setImgErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, updateImageBase_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.authError != null) { oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); struct.authError.write(oprot); oprot.writeFieldEnd(); } if (struct.notFound != null) { oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC); struct.notFound.write(oprot); oprot.writeFieldEnd(); } if (struct.imgError != null) { oprot.writeFieldBegin(IMG_ERROR_FIELD_DESC); struct.imgError.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class updateImageBase_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public updateImageBase_resultTupleScheme getScheme() { return new updateImageBase_resultTupleScheme(); } } private static class updateImageBase_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, updateImageBase_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetAuthError()) { optionals.set(0); } if (struct.isSetNotFound()) { optionals.set(1); } if (struct.isSetImgError()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetAuthError()) { struct.authError.write(oprot); } if (struct.isSetNotFound()) { struct.notFound.write(oprot); } if (struct.isSetImgError()) { struct.imgError.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, updateImageBase_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } if (incoming.get(1)) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } if (incoming.get(2)) { struct.imgError = new TInvocationException(); struct.imgError.read(iprot); struct.setImgErrorIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new updateImageVersion_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new updateImageVersion_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required public @org.apache.thrift.annotation.Nullable java.lang.String imageVersionId; // required public @org.apache.thrift.annotation.Nullable 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 java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateImageVersion_args.class, metaDataMap); } public updateImageVersion_args() { } public updateImageVersion_args( java.lang.String userToken, java.lang.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); } } @Override public updateImageVersion_args deepCopy() { return new updateImageVersion_args(this); } @Override public void clear() { this.userToken = null; this.imageVersionId = null; this.image = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getUserToken() { return this.userToken; } public updateImageVersion_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.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; } } @org.apache.thrift.annotation.Nullable public java.lang.String getImageVersionId() { return this.imageVersionId; } public updateImageVersion_args setImageVersionId(@org.apache.thrift.annotation.Nullable java.lang.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; } } @org.apache.thrift.annotation.Nullable public ImageVersionWrite getImage() { return this.image; } public updateImageVersion_args setImage(@org.apache.thrift.annotation.Nullable 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; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case USER_TOKEN: if (value == null) { unsetUserToken(); } else { setUserToken((java.lang.String)value); } break; case IMAGE_VERSION_ID: if (value == null) { unsetImageVersionId(); } else { setImageVersionId((java.lang.String)value); } break; case IMAGE: if (value == null) { unsetImage(); } else { setImage((ImageVersionWrite)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case USER_TOKEN: return getUserToken(); case IMAGE_VERSION_ID: return getImageVersionId(); case IMAGE: return getImage(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case USER_TOKEN: return isSetUserToken(); case IMAGE_VERSION_ID: return isSetImageVersionId(); case IMAGE: return isSetImage(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof updateImageVersion_args) return this.equals((updateImageVersion_args)that); return false; } public boolean equals(updateImageVersion_args that) { if (that == null) return false; if (this == that) return true; 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() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287); if (isSetUserToken()) hashCode = hashCode * 8191 + userToken.hashCode(); hashCode = hashCode * 8191 + ((isSetImageVersionId()) ? 131071 : 524287); if (isSetImageVersionId()) hashCode = hashCode * 8191 + imageVersionId.hashCode(); hashCode = hashCode * 8191 + ((isSetImage()) ? 131071 : 524287); if (isSetImage()) hashCode = hashCode * 8191 + image.hashCode(); return hashCode; } @Override public int compareTo(updateImageVersion_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetUserToken(), 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 = java.lang.Boolean.compare(isSetImageVersionId(), 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 = java.lang.Boolean.compare(isSetImage(), 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; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory { @Override public updateImageVersion_argsStandardScheme getScheme() { return new updateImageVersion_argsStandardScheme(); } } private static class updateImageVersion_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override 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(); } @Override 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 org.apache.thrift.scheme.SchemeFactory { @Override public updateImageVersion_argsTupleScheme getScheme() { return new updateImageVersion_argsTupleScheme(); } } private static class updateImageVersion_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, updateImageVersion_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.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 { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.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); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField IMG_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("imgError", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new updateImageVersion_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new updateImageVersion_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required public @org.apache.thrift.annotation.Nullable TInvocationException imgError; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { AUTH_ERROR((short)1, "authError"), NOT_FOUND((short)2, "notFound"), IMG_ERROR((short)3, "imgError"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // AUTH_ERROR return AUTH_ERROR; case 2: // NOT_FOUND return NOT_FOUND; case 3: // IMG_ERROR return IMG_ERROR; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class))); tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class))); tmpMap.put(_Fields.IMG_ERROR, new org.apache.thrift.meta_data.FieldMetaData("imgError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateImageVersion_result.class, metaDataMap); } public updateImageVersion_result() { } public updateImageVersion_result( TAuthorizationException authError, TNotFoundException notFound, TInvocationException imgError) { this(); this.authError = authError; this.notFound = notFound; this.imgError = imgError; } /** * Performs a deep copy on other. */ public updateImageVersion_result(updateImageVersion_result other) { if (other.isSetAuthError()) { this.authError = new TAuthorizationException(other.authError); } if (other.isSetNotFound()) { this.notFound = new TNotFoundException(other.notFound); } if (other.isSetImgError()) { this.imgError = new TInvocationException(other.imgError); } } @Override public updateImageVersion_result deepCopy() { return new updateImageVersion_result(this); } @Override public void clear() { this.authError = null; this.notFound = null; this.imgError = null; } @org.apache.thrift.annotation.Nullable public TAuthorizationException getAuthError() { return this.authError; } public updateImageVersion_result setAuthError(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TNotFoundException getNotFound() { return this.notFound; } public updateImageVersion_result setNotFound(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TInvocationException getImgError() { return this.imgError; } public updateImageVersion_result setImgError(@org.apache.thrift.annotation.Nullable TInvocationException imgError) { this.imgError = imgError; return this; } public void unsetImgError() { this.imgError = null; } /** Returns true if field imgError is set (has been assigned a value) and false otherwise */ public boolean isSetImgError() { return this.imgError != null; } public void setImgErrorIsSet(boolean value) { if (!value) { this.imgError = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case AUTH_ERROR: if (value == null) { unsetAuthError(); } else { setAuthError((TAuthorizationException)value); } break; case NOT_FOUND: if (value == null) { unsetNotFound(); } else { setNotFound((TNotFoundException)value); } break; case IMG_ERROR: if (value == null) { unsetImgError(); } else { setImgError((TInvocationException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case AUTH_ERROR: return getAuthError(); case NOT_FOUND: return getNotFound(); case IMG_ERROR: return getImgError(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case AUTH_ERROR: return isSetAuthError(); case NOT_FOUND: return isSetNotFound(); case IMG_ERROR: return isSetImgError(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof updateImageVersion_result) return this.equals((updateImageVersion_result)that); return false; } public boolean equals(updateImageVersion_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_authError = true && this.isSetAuthError(); boolean that_present_authError = true && that.isSetAuthError(); if (this_present_authError || that_present_authError) { if (!(this_present_authError && that_present_authError)) return false; if (!this.authError.equals(that.authError)) return false; } boolean this_present_notFound = true && this.isSetNotFound(); boolean that_present_notFound = true && that.isSetNotFound(); if (this_present_notFound || that_present_notFound) { if (!(this_present_notFound && that_present_notFound)) return false; if (!this.notFound.equals(that.notFound)) return false; } boolean this_present_imgError = true && this.isSetImgError(); boolean that_present_imgError = true && that.isSetImgError(); if (this_present_imgError || that_present_imgError) { if (!(this_present_imgError && that_present_imgError)) return false; if (!this.imgError.equals(that.imgError)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287); if (isSetAuthError()) hashCode = hashCode * 8191 + authError.hashCode(); hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287); if (isSetNotFound()) hashCode = hashCode * 8191 + notFound.hashCode(); hashCode = hashCode * 8191 + ((isSetImgError()) ? 131071 : 524287); if (isSetImgError()) hashCode = hashCode * 8191 + imgError.hashCode(); return hashCode; } @Override public int compareTo(updateImageVersion_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetAuthError(), 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 = java.lang.Boolean.compare(isSetNotFound(), other.isSetNotFound()); if (lastComparison != 0) { return lastComparison; } if (isSetNotFound()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetImgError(), other.isSetImgError()); if (lastComparison != 0) { return lastComparison; } if (isSetImgError()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imgError, other.imgError); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("updateImageVersion_result("); boolean first = true; sb.append("authError:"); if (this.authError == null) { sb.append("null"); } else { sb.append(this.authError); } first = false; if (!first) sb.append(", "); sb.append("notFound:"); if (this.notFound == null) { sb.append("null"); } else { sb.append(this.notFound); } first = false; if (!first) sb.append(", "); sb.append("imgError:"); if (this.imgError == null) { sb.append("null"); } else { sb.append(this.imgError); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class updateImageVersion_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public updateImageVersion_resultStandardScheme getScheme() { return new updateImageVersion_resultStandardScheme(); } } private static class updateImageVersion_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, updateImageVersion_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // AUTH_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // NOT_FOUND if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // IMG_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.imgError = new TInvocationException(); struct.imgError.read(iprot); struct.setImgErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, updateImageVersion_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.authError != null) { oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); struct.authError.write(oprot); oprot.writeFieldEnd(); } if (struct.notFound != null) { oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC); struct.notFound.write(oprot); oprot.writeFieldEnd(); } if (struct.imgError != null) { oprot.writeFieldBegin(IMG_ERROR_FIELD_DESC); struct.imgError.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class updateImageVersion_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public updateImageVersion_resultTupleScheme getScheme() { return new updateImageVersion_resultTupleScheme(); } } private static class updateImageVersion_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, updateImageVersion_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetAuthError()) { optionals.set(0); } if (struct.isSetNotFound()) { optionals.set(1); } if (struct.isSetImgError()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetAuthError()) { struct.authError.write(oprot); } if (struct.isSetNotFound()) { struct.notFound.write(oprot); } if (struct.isSetImgError()) { struct.imgError.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, updateImageVersion_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } if (incoming.get(1)) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } if (incoming.get(2)) { struct.imgError = new TInvocationException(); struct.imgError.read(iprot); struct.setImgErrorIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new deleteImageVersion_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new deleteImageVersion_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required public @org.apache.thrift.annotation.Nullable java.lang.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 java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteImageVersion_args.class, metaDataMap); } public deleteImageVersion_args() { } public deleteImageVersion_args( java.lang.String userToken, java.lang.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; } } @Override public deleteImageVersion_args deepCopy() { return new deleteImageVersion_args(this); } @Override public void clear() { this.userToken = null; this.imageVersionId = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getUserToken() { return this.userToken; } public deleteImageVersion_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.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; } } @org.apache.thrift.annotation.Nullable public java.lang.String getImageVersionId() { return this.imageVersionId; } public deleteImageVersion_args setImageVersionId(@org.apache.thrift.annotation.Nullable java.lang.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; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case USER_TOKEN: if (value == null) { unsetUserToken(); } else { setUserToken((java.lang.String)value); } break; case IMAGE_VERSION_ID: if (value == null) { unsetImageVersionId(); } else { setImageVersionId((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case USER_TOKEN: return getUserToken(); case IMAGE_VERSION_ID: return getImageVersionId(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case USER_TOKEN: return isSetUserToken(); case IMAGE_VERSION_ID: return isSetImageVersionId(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof deleteImageVersion_args) return this.equals((deleteImageVersion_args)that); return false; } public boolean equals(deleteImageVersion_args that) { if (that == null) return false; if (this == that) return true; 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() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287); if (isSetUserToken()) hashCode = hashCode * 8191 + userToken.hashCode(); hashCode = hashCode * 8191 + ((isSetImageVersionId()) ? 131071 : 524287); if (isSetImageVersionId()) hashCode = hashCode * 8191 + imageVersionId.hashCode(); return hashCode; } @Override public int compareTo(deleteImageVersion_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetUserToken(), 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 = java.lang.Boolean.compare(isSetImageVersionId(), 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; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory { @Override public deleteImageVersion_argsStandardScheme getScheme() { return new deleteImageVersion_argsStandardScheme(); } } private static class deleteImageVersion_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override 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(); } @Override 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 org.apache.thrift.scheme.SchemeFactory { @Override public deleteImageVersion_argsTupleScheme getScheme() { return new deleteImageVersion_argsTupleScheme(); } } private static class deleteImageVersion_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, deleteImageVersion_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.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 { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.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); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new deleteImageVersion_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new deleteImageVersion_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { AUTH_ERROR((short)1, "authError"), NOT_FOUND((short)2, "notFound"), SERVER_ERROR((short)3, "serverError"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // AUTH_ERROR return AUTH_ERROR; case 2: // NOT_FOUND return NOT_FOUND; case 3: // SERVER_ERROR return SERVER_ERROR; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class))); tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class))); tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteImageVersion_result.class, metaDataMap); } public deleteImageVersion_result() { } public deleteImageVersion_result( TAuthorizationException authError, TNotFoundException notFound, TInvocationException serverError) { this(); this.authError = authError; this.notFound = notFound; this.serverError = serverError; } /** * Performs a deep copy on other. */ public deleteImageVersion_result(deleteImageVersion_result other) { if (other.isSetAuthError()) { this.authError = new TAuthorizationException(other.authError); } if (other.isSetNotFound()) { this.notFound = new TNotFoundException(other.notFound); } if (other.isSetServerError()) { this.serverError = new TInvocationException(other.serverError); } } @Override public deleteImageVersion_result deepCopy() { return new deleteImageVersion_result(this); } @Override public void clear() { this.authError = null; this.notFound = null; this.serverError = null; } @org.apache.thrift.annotation.Nullable public TAuthorizationException getAuthError() { return this.authError; } public deleteImageVersion_result setAuthError(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TNotFoundException getNotFound() { return this.notFound; } public deleteImageVersion_result setNotFound(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TInvocationException getServerError() { return this.serverError; } public deleteImageVersion_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) { this.serverError = serverError; return this; } public void unsetServerError() { this.serverError = null; } /** Returns true if field serverError is set (has been assigned a value) and false otherwise */ public boolean isSetServerError() { return this.serverError != null; } public void setServerErrorIsSet(boolean value) { if (!value) { this.serverError = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case AUTH_ERROR: if (value == null) { unsetAuthError(); } else { setAuthError((TAuthorizationException)value); } break; case NOT_FOUND: if (value == null) { unsetNotFound(); } else { setNotFound((TNotFoundException)value); } break; case SERVER_ERROR: if (value == null) { unsetServerError(); } else { setServerError((TInvocationException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case AUTH_ERROR: return getAuthError(); case NOT_FOUND: return getNotFound(); case SERVER_ERROR: return getServerError(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case AUTH_ERROR: return isSetAuthError(); case NOT_FOUND: return isSetNotFound(); case SERVER_ERROR: return isSetServerError(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof deleteImageVersion_result) return this.equals((deleteImageVersion_result)that); return false; } public boolean equals(deleteImageVersion_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_authError = true && this.isSetAuthError(); boolean that_present_authError = true && that.isSetAuthError(); if (this_present_authError || that_present_authError) { if (!(this_present_authError && that_present_authError)) return false; if (!this.authError.equals(that.authError)) return false; } boolean this_present_notFound = true && this.isSetNotFound(); boolean that_present_notFound = true && that.isSetNotFound(); if (this_present_notFound || that_present_notFound) { if (!(this_present_notFound && that_present_notFound)) return false; if (!this.notFound.equals(that.notFound)) return false; } boolean this_present_serverError = true && this.isSetServerError(); boolean that_present_serverError = true && that.isSetServerError(); if (this_present_serverError || that_present_serverError) { if (!(this_present_serverError && that_present_serverError)) return false; if (!this.serverError.equals(that.serverError)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287); if (isSetAuthError()) hashCode = hashCode * 8191 + authError.hashCode(); hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287); if (isSetNotFound()) hashCode = hashCode * 8191 + notFound.hashCode(); hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287); if (isSetServerError()) hashCode = hashCode * 8191 + serverError.hashCode(); return hashCode; } @Override public int compareTo(deleteImageVersion_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetAuthError(), 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 = java.lang.Boolean.compare(isSetNotFound(), other.isSetNotFound()); if (lastComparison != 0) { return lastComparison; } if (isSetNotFound()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError()); if (lastComparison != 0) { return lastComparison; } if (isSetServerError()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("deleteImageVersion_result("); boolean first = true; sb.append("authError:"); if (this.authError == null) { sb.append("null"); } else { sb.append(this.authError); } first = false; if (!first) sb.append(", "); sb.append("notFound:"); if (this.notFound == null) { sb.append("null"); } else { sb.append(this.notFound); } first = false; if (!first) sb.append(", "); sb.append("serverError:"); if (this.serverError == null) { sb.append("null"); } else { sb.append(this.serverError); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class deleteImageVersion_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public deleteImageVersion_resultStandardScheme getScheme() { return new deleteImageVersion_resultStandardScheme(); } } private static class deleteImageVersion_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, deleteImageVersion_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // AUTH_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // NOT_FOUND if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // SERVER_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, deleteImageVersion_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.authError != null) { oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); struct.authError.write(oprot); oprot.writeFieldEnd(); } if (struct.notFound != null) { oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC); struct.notFound.write(oprot); oprot.writeFieldEnd(); } if (struct.serverError != null) { oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC); struct.serverError.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class deleteImageVersion_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public deleteImageVersion_resultTupleScheme getScheme() { return new deleteImageVersion_resultTupleScheme(); } } private static class deleteImageVersion_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, deleteImageVersion_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetAuthError()) { optionals.set(0); } if (struct.isSetNotFound()) { optionals.set(1); } if (struct.isSetServerError()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetAuthError()) { struct.authError.write(oprot); } if (struct.isSetNotFound()) { struct.notFound.write(oprot); } if (struct.isSetServerError()) { struct.serverError.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, deleteImageVersion_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } if (incoming.get(1)) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } if (incoming.get(2)) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class deleteImageBase_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("deleteImageBase_args"); private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField IMAGE_BASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageBaseId", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new deleteImageBase_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new deleteImageBase_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required public @org.apache.thrift.annotation.Nullable java.lang.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 java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteImageBase_args.class, metaDataMap); } public deleteImageBase_args() { } public deleteImageBase_args( java.lang.String userToken, java.lang.String imageBaseId) { this(); this.userToken = userToken; this.imageBaseId = imageBaseId; } /** * Performs a deep copy on other. */ public deleteImageBase_args(deleteImageBase_args other) { if (other.isSetUserToken()) { this.userToken = other.userToken; } if (other.isSetImageBaseId()) { this.imageBaseId = other.imageBaseId; } } @Override public deleteImageBase_args deepCopy() { return new deleteImageBase_args(this); } @Override public void clear() { this.userToken = null; this.imageBaseId = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getUserToken() { return this.userToken; } public deleteImageBase_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.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; } } @org.apache.thrift.annotation.Nullable public java.lang.String getImageBaseId() { return this.imageBaseId; } public deleteImageBase_args setImageBaseId(@org.apache.thrift.annotation.Nullable java.lang.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; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case USER_TOKEN: if (value == null) { unsetUserToken(); } else { setUserToken((java.lang.String)value); } break; case IMAGE_BASE_ID: if (value == null) { unsetImageBaseId(); } else { setImageBaseId((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case USER_TOKEN: return getUserToken(); case IMAGE_BASE_ID: return getImageBaseId(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case USER_TOKEN: return isSetUserToken(); case IMAGE_BASE_ID: return isSetImageBaseId(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof deleteImageBase_args) return this.equals((deleteImageBase_args)that); return false; } public boolean equals(deleteImageBase_args that) { if (that == null) return false; if (this == that) return true; 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() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287); if (isSetUserToken()) hashCode = hashCode * 8191 + userToken.hashCode(); hashCode = hashCode * 8191 + ((isSetImageBaseId()) ? 131071 : 524287); if (isSetImageBaseId()) hashCode = hashCode * 8191 + imageBaseId.hashCode(); return hashCode; } @Override public int compareTo(deleteImageBase_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetUserToken(), 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 = java.lang.Boolean.compare(isSetImageBaseId(), 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; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("deleteImageBase_args("); boolean first = true; sb.append("userToken:"); if (this.userToken == null) { sb.append("null"); } else { sb.append(this.userToken); } first = false; if (!first) sb.append(", "); sb.append("imageBaseId:"); if (this.imageBaseId == null) { sb.append("null"); } else { sb.append(this.imageBaseId); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class deleteImageBase_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public deleteImageBase_argsStandardScheme getScheme() { return new deleteImageBase_argsStandardScheme(); } } private static class deleteImageBase_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, deleteImageBase_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // USER_TOKEN if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // IMAGE_BASE_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.imageBaseId = iprot.readString(); struct.setImageBaseIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, deleteImageBase_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.userToken != null) { oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC); oprot.writeString(struct.userToken); oprot.writeFieldEnd(); } if (struct.imageBaseId != null) { oprot.writeFieldBegin(IMAGE_BASE_ID_FIELD_DESC); oprot.writeString(struct.imageBaseId); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class deleteImageBase_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public deleteImageBase_argsTupleScheme getScheme() { return new deleteImageBase_argsTupleScheme(); } } private static class deleteImageBase_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, deleteImageBase_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetUserToken()) { optionals.set(0); } if (struct.isSetImageBaseId()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetUserToken()) { oprot.writeString(struct.userToken); } if (struct.isSetImageBaseId()) { oprot.writeString(struct.imageBaseId); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, deleteImageBase_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.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); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class deleteImageBase_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("deleteImageBase_result"); private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new deleteImageBase_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new deleteImageBase_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { AUTH_ERROR((short)1, "authError"), NOT_FOUND((short)2, "notFound"), SERVER_ERROR((short)3, "serverError"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // AUTH_ERROR return AUTH_ERROR; case 2: // NOT_FOUND return NOT_FOUND; case 3: // SERVER_ERROR return SERVER_ERROR; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class))); tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class))); tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteImageBase_result.class, metaDataMap); } public deleteImageBase_result() { } public deleteImageBase_result( TAuthorizationException authError, TNotFoundException notFound, TInvocationException serverError) { this(); this.authError = authError; this.notFound = notFound; this.serverError = serverError; } /** * Performs a deep copy on other. */ public deleteImageBase_result(deleteImageBase_result other) { if (other.isSetAuthError()) { this.authError = new TAuthorizationException(other.authError); } if (other.isSetNotFound()) { this.notFound = new TNotFoundException(other.notFound); } if (other.isSetServerError()) { this.serverError = new TInvocationException(other.serverError); } } @Override public deleteImageBase_result deepCopy() { return new deleteImageBase_result(this); } @Override public void clear() { this.authError = null; this.notFound = null; this.serverError = null; } @org.apache.thrift.annotation.Nullable public TAuthorizationException getAuthError() { return this.authError; } public deleteImageBase_result setAuthError(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TNotFoundException getNotFound() { return this.notFound; } public deleteImageBase_result setNotFound(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TInvocationException getServerError() { return this.serverError; } public deleteImageBase_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) { this.serverError = serverError; return this; } public void unsetServerError() { this.serverError = null; } /** Returns true if field serverError is set (has been assigned a value) and false otherwise */ public boolean isSetServerError() { return this.serverError != null; } public void setServerErrorIsSet(boolean value) { if (!value) { this.serverError = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case AUTH_ERROR: if (value == null) { unsetAuthError(); } else { setAuthError((TAuthorizationException)value); } break; case NOT_FOUND: if (value == null) { unsetNotFound(); } else { setNotFound((TNotFoundException)value); } break; case SERVER_ERROR: if (value == null) { unsetServerError(); } else { setServerError((TInvocationException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case AUTH_ERROR: return getAuthError(); case NOT_FOUND: return getNotFound(); case SERVER_ERROR: return getServerError(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case AUTH_ERROR: return isSetAuthError(); case NOT_FOUND: return isSetNotFound(); case SERVER_ERROR: return isSetServerError(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof deleteImageBase_result) return this.equals((deleteImageBase_result)that); return false; } public boolean equals(deleteImageBase_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_authError = true && this.isSetAuthError(); boolean that_present_authError = true && that.isSetAuthError(); if (this_present_authError || that_present_authError) { if (!(this_present_authError && that_present_authError)) return false; if (!this.authError.equals(that.authError)) return false; } boolean this_present_notFound = true && this.isSetNotFound(); boolean that_present_notFound = true && that.isSetNotFound(); if (this_present_notFound || that_present_notFound) { if (!(this_present_notFound && that_present_notFound)) return false; if (!this.notFound.equals(that.notFound)) return false; } boolean this_present_serverError = true && this.isSetServerError(); boolean that_present_serverError = true && that.isSetServerError(); if (this_present_serverError || that_present_serverError) { if (!(this_present_serverError && that_present_serverError)) return false; if (!this.serverError.equals(that.serverError)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287); if (isSetAuthError()) hashCode = hashCode * 8191 + authError.hashCode(); hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287); if (isSetNotFound()) hashCode = hashCode * 8191 + notFound.hashCode(); hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287); if (isSetServerError()) hashCode = hashCode * 8191 + serverError.hashCode(); return hashCode; } @Override public int compareTo(deleteImageBase_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetAuthError(), 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 = java.lang.Boolean.compare(isSetNotFound(), other.isSetNotFound()); if (lastComparison != 0) { return lastComparison; } if (isSetNotFound()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError()); if (lastComparison != 0) { return lastComparison; } if (isSetServerError()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("deleteImageBase_result("); boolean first = true; sb.append("authError:"); if (this.authError == null) { sb.append("null"); } else { sb.append(this.authError); } first = false; if (!first) sb.append(", "); sb.append("notFound:"); if (this.notFound == null) { sb.append("null"); } else { sb.append(this.notFound); } first = false; if (!first) sb.append(", "); sb.append("serverError:"); if (this.serverError == null) { sb.append("null"); } else { sb.append(this.serverError); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class deleteImageBase_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public deleteImageBase_resultStandardScheme getScheme() { return new deleteImageBase_resultStandardScheme(); } } private static class deleteImageBase_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, deleteImageBase_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // AUTH_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // NOT_FOUND if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // SERVER_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, deleteImageBase_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.authError != null) { oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); struct.authError.write(oprot); oprot.writeFieldEnd(); } if (struct.notFound != null) { oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC); struct.notFound.write(oprot); oprot.writeFieldEnd(); } if (struct.serverError != null) { oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC); struct.serverError.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class deleteImageBase_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public deleteImageBase_resultTupleScheme getScheme() { return new deleteImageBase_resultTupleScheme(); } } private static class deleteImageBase_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, deleteImageBase_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetAuthError()) { optionals.set(0); } if (struct.isSetNotFound()) { optionals.set(1); } if (struct.isSetServerError()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetAuthError()) { struct.authError.write(oprot); } if (struct.isSetNotFound()) { struct.notFound.write(oprot); } if (struct.isSetServerError()) { struct.serverError.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, deleteImageBase_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } if (incoming.get(1)) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } if (incoming.get(2)) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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_BASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageBaseId", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PERMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("permissions", org.apache.thrift.protocol.TType.MAP, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new writeImagePermissions_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new writeImagePermissions_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required public @org.apache.thrift.annotation.Nullable java.lang.String imageBaseId; // required public @org.apache.thrift.annotation.Nullable java.util.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_BASE_ID((short)2, "imageBaseId"), PERMISSIONS((short)3, "permissions"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // USER_TOKEN return USER_TOKEN; case 2: // IMAGE_BASE_ID return IMAGE_BASE_ID; case 3: // PERMISSIONS return PERMISSIONS; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); tmpMap.put(_Fields.IMAGE_BASE_ID, new org.apache.thrift.meta_data.FieldMetaData("imageBaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); tmpMap.put(_Fields.PERMISSIONS, new org.apache.thrift.meta_data.FieldMetaData("permissions", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"), new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ImagePermissions.class)))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(writeImagePermissions_args.class, metaDataMap); } public writeImagePermissions_args() { } public writeImagePermissions_args( java.lang.String userToken, java.lang.String imageBaseId, java.util.Map permissions) { this(); this.userToken = userToken; this.imageBaseId = imageBaseId; this.permissions = permissions; } /** * Performs a deep copy on other. */ public writeImagePermissions_args(writeImagePermissions_args other) { if (other.isSetUserToken()) { this.userToken = other.userToken; } if (other.isSetImageBaseId()) { this.imageBaseId = other.imageBaseId; } if (other.isSetPermissions()) { java.util.Map __this__permissions = new java.util.HashMap(other.permissions.size()); for (java.util.Map.Entry other_element : other.permissions.entrySet()) { java.lang.String other_element_key = other_element.getKey(); ImagePermissions other_element_value = other_element.getValue(); java.lang.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; } } @Override public writeImagePermissions_args deepCopy() { return new writeImagePermissions_args(this); } @Override public void clear() { this.userToken = null; this.imageBaseId = null; this.permissions = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getUserToken() { return this.userToken; } public writeImagePermissions_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.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; } } @org.apache.thrift.annotation.Nullable public java.lang.String getImageBaseId() { return this.imageBaseId; } public writeImagePermissions_args setImageBaseId(@org.apache.thrift.annotation.Nullable java.lang.String imageBaseId) { this.imageBaseId = imageBaseId; return this; } public void unsetImageBaseId() { this.imageBaseId = null; } /** Returns true if field imageBaseId is set (has been assigned a value) and false otherwise */ public boolean isSetImageBaseId() { return this.imageBaseId != null; } public void setImageBaseIdIsSet(boolean value) { if (!value) { this.imageBaseId = null; } } public int getPermissionsSize() { return (this.permissions == null) ? 0 : this.permissions.size(); } public void putToPermissions(java.lang.String key, ImagePermissions val) { if (this.permissions == null) { this.permissions = new java.util.HashMap(); } this.permissions.put(key, val); } @org.apache.thrift.annotation.Nullable public java.util.Map getPermissions() { return this.permissions; } public writeImagePermissions_args setPermissions(@org.apache.thrift.annotation.Nullable java.util.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; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case USER_TOKEN: if (value == null) { unsetUserToken(); } else { setUserToken((java.lang.String)value); } break; case IMAGE_BASE_ID: if (value == null) { unsetImageBaseId(); } else { setImageBaseId((java.lang.String)value); } break; case PERMISSIONS: if (value == null) { unsetPermissions(); } else { setPermissions((java.util.Map)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case USER_TOKEN: return getUserToken(); case IMAGE_BASE_ID: return getImageBaseId(); case PERMISSIONS: return getPermissions(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case USER_TOKEN: return isSetUserToken(); case IMAGE_BASE_ID: return isSetImageBaseId(); case PERMISSIONS: return isSetPermissions(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof writeImagePermissions_args) return this.equals((writeImagePermissions_args)that); return false; } public boolean equals(writeImagePermissions_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_userToken = true && this.isSetUserToken(); boolean that_present_userToken = true && that.isSetUserToken(); if (this_present_userToken || that_present_userToken) { if (!(this_present_userToken && that_present_userToken)) return false; if (!this.userToken.equals(that.userToken)) return false; } boolean this_present_imageBaseId = true && this.isSetImageBaseId(); boolean that_present_imageBaseId = true && that.isSetImageBaseId(); if (this_present_imageBaseId || that_present_imageBaseId) { if (!(this_present_imageBaseId && that_present_imageBaseId)) return false; if (!this.imageBaseId.equals(that.imageBaseId)) return false; } boolean this_present_permissions = true && this.isSetPermissions(); boolean that_present_permissions = true && that.isSetPermissions(); if (this_present_permissions || that_present_permissions) { if (!(this_present_permissions && that_present_permissions)) return false; if (!this.permissions.equals(that.permissions)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287); if (isSetUserToken()) hashCode = hashCode * 8191 + userToken.hashCode(); hashCode = hashCode * 8191 + ((isSetImageBaseId()) ? 131071 : 524287); if (isSetImageBaseId()) hashCode = hashCode * 8191 + imageBaseId.hashCode(); hashCode = hashCode * 8191 + ((isSetPermissions()) ? 131071 : 524287); if (isSetPermissions()) hashCode = hashCode * 8191 + permissions.hashCode(); return hashCode; } @Override public int compareTo(writeImagePermissions_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetUserToken(), 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 = java.lang.Boolean.compare(isSetImageBaseId(), 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 = java.lang.Boolean.compare(isSetPermissions(), 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; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("writeImagePermissions_args("); boolean first = true; sb.append("userToken:"); if (this.userToken == null) { sb.append("null"); } else { sb.append(this.userToken); } first = false; if (!first) sb.append(", "); sb.append("imageBaseId:"); if (this.imageBaseId == null) { sb.append("null"); } else { sb.append(this.imageBaseId); } first = false; if (!first) sb.append(", "); sb.append("permissions:"); if (this.permissions == null) { sb.append("null"); } else { sb.append(this.permissions); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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 org.apache.thrift.scheme.SchemeFactory { @Override public writeImagePermissions_argsStandardScheme getScheme() { return new writeImagePermissions_argsStandardScheme(); } } private static class writeImagePermissions_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, writeImagePermissions_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // USER_TOKEN if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // IMAGE_BASE_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.imageBaseId = iprot.readString(); struct.setImageBaseIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // PERMISSIONS if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map370 = iprot.readMapBegin(); struct.permissions = new java.util.HashMap(2*_map370.size); @org.apache.thrift.annotation.Nullable java.lang.String _key371; @org.apache.thrift.annotation.Nullable ImagePermissions _val372; for (int _i373 = 0; _i373 < _map370.size; ++_i373) { _key371 = iprot.readString(); _val372 = new ImagePermissions(); _val372.read(iprot); struct.permissions.put(_key371, _val372); } 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(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, writeImagePermissions_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.userToken != null) { oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC); oprot.writeString(struct.userToken); oprot.writeFieldEnd(); } if (struct.imageBaseId != null) { oprot.writeFieldBegin(IMAGE_BASE_ID_FIELD_DESC); oprot.writeString(struct.imageBaseId); oprot.writeFieldEnd(); } if (struct.permissions != null) { oprot.writeFieldBegin(PERMISSIONS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.permissions.size())); for (java.util.Map.Entry _iter374 : struct.permissions.entrySet()) { oprot.writeString(_iter374.getKey()); _iter374.getValue().write(oprot); } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class writeImagePermissions_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public writeImagePermissions_argsTupleScheme getScheme() { return new writeImagePermissions_argsTupleScheme(); } } private static class writeImagePermissions_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, writeImagePermissions_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetUserToken()) { optionals.set(0); } if (struct.isSetImageBaseId()) { optionals.set(1); } if (struct.isSetPermissions()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetUserToken()) { oprot.writeString(struct.userToken); } if (struct.isSetImageBaseId()) { oprot.writeString(struct.imageBaseId); } if (struct.isSetPermissions()) { { oprot.writeI32(struct.permissions.size()); for (java.util.Map.Entry _iter375 : struct.permissions.entrySet()) { oprot.writeString(_iter375.getKey()); _iter375.getValue().write(oprot); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, writeImagePermissions_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); } if (incoming.get(1)) { struct.imageBaseId = iprot.readString(); struct.setImageBaseIdIsSet(true); } if (incoming.get(2)) { { org.apache.thrift.protocol.TMap _map376 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT); struct.permissions = new java.util.HashMap(2*_map376.size); @org.apache.thrift.annotation.Nullable java.lang.String _key377; @org.apache.thrift.annotation.Nullable ImagePermissions _val378; for (int _i379 = 0; _i379 < _map376.size; ++_i379) { _key377 = iprot.readString(); _val378 = new ImagePermissions(); _val378.read(iprot); struct.permissions.put(_key377, _val378); } } struct.setPermissionsIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new writeImagePermissions_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new writeImagePermissions_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { AUTH_ERROR((short)1, "authError"), NOT_FOUND((short)2, "notFound"), SERVER_ERROR((short)3, "serverError"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // AUTH_ERROR return AUTH_ERROR; case 2: // NOT_FOUND return NOT_FOUND; case 3: // SERVER_ERROR return SERVER_ERROR; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class))); tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class))); tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(writeImagePermissions_result.class, metaDataMap); } public writeImagePermissions_result() { } public writeImagePermissions_result( TAuthorizationException authError, TNotFoundException notFound, TInvocationException serverError) { this(); this.authError = authError; this.notFound = notFound; this.serverError = serverError; } /** * Performs a deep copy on other. */ public writeImagePermissions_result(writeImagePermissions_result other) { if (other.isSetAuthError()) { this.authError = new TAuthorizationException(other.authError); } if (other.isSetNotFound()) { this.notFound = new TNotFoundException(other.notFound); } if (other.isSetServerError()) { this.serverError = new TInvocationException(other.serverError); } } @Override public writeImagePermissions_result deepCopy() { return new writeImagePermissions_result(this); } @Override public void clear() { this.authError = null; this.notFound = null; this.serverError = null; } @org.apache.thrift.annotation.Nullable public TAuthorizationException getAuthError() { return this.authError; } public writeImagePermissions_result setAuthError(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TNotFoundException getNotFound() { return this.notFound; } public writeImagePermissions_result setNotFound(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TInvocationException getServerError() { return this.serverError; } public writeImagePermissions_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) { this.serverError = serverError; return this; } public void unsetServerError() { this.serverError = null; } /** Returns true if field serverError is set (has been assigned a value) and false otherwise */ public boolean isSetServerError() { return this.serverError != null; } public void setServerErrorIsSet(boolean value) { if (!value) { this.serverError = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case AUTH_ERROR: if (value == null) { unsetAuthError(); } else { setAuthError((TAuthorizationException)value); } break; case NOT_FOUND: if (value == null) { unsetNotFound(); } else { setNotFound((TNotFoundException)value); } break; case SERVER_ERROR: if (value == null) { unsetServerError(); } else { setServerError((TInvocationException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case AUTH_ERROR: return getAuthError(); case NOT_FOUND: return getNotFound(); case SERVER_ERROR: return getServerError(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case AUTH_ERROR: return isSetAuthError(); case NOT_FOUND: return isSetNotFound(); case SERVER_ERROR: return isSetServerError(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof writeImagePermissions_result) return this.equals((writeImagePermissions_result)that); return false; } public boolean equals(writeImagePermissions_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_authError = true && this.isSetAuthError(); boolean that_present_authError = true && that.isSetAuthError(); if (this_present_authError || that_present_authError) { if (!(this_present_authError && that_present_authError)) return false; if (!this.authError.equals(that.authError)) return false; } boolean this_present_notFound = true && this.isSetNotFound(); boolean that_present_notFound = true && that.isSetNotFound(); if (this_present_notFound || that_present_notFound) { if (!(this_present_notFound && that_present_notFound)) return false; if (!this.notFound.equals(that.notFound)) return false; } boolean this_present_serverError = true && this.isSetServerError(); boolean that_present_serverError = true && that.isSetServerError(); if (this_present_serverError || that_present_serverError) { if (!(this_present_serverError && that_present_serverError)) return false; if (!this.serverError.equals(that.serverError)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287); if (isSetAuthError()) hashCode = hashCode * 8191 + authError.hashCode(); hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287); if (isSetNotFound()) hashCode = hashCode * 8191 + notFound.hashCode(); hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287); if (isSetServerError()) hashCode = hashCode * 8191 + serverError.hashCode(); return hashCode; } @Override public int compareTo(writeImagePermissions_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetAuthError(), 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 = java.lang.Boolean.compare(isSetNotFound(), other.isSetNotFound()); if (lastComparison != 0) { return lastComparison; } if (isSetNotFound()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError()); if (lastComparison != 0) { return lastComparison; } if (isSetServerError()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("writeImagePermissions_result("); boolean first = true; sb.append("authError:"); if (this.authError == null) { sb.append("null"); } else { sb.append(this.authError); } first = false; if (!first) sb.append(", "); sb.append("notFound:"); if (this.notFound == null) { sb.append("null"); } else { sb.append(this.notFound); } first = false; if (!first) sb.append(", "); sb.append("serverError:"); if (this.serverError == null) { sb.append("null"); } else { sb.append(this.serverError); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class writeImagePermissions_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public writeImagePermissions_resultStandardScheme getScheme() { return new writeImagePermissions_resultStandardScheme(); } } private static class writeImagePermissions_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, writeImagePermissions_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // AUTH_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // NOT_FOUND if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // SERVER_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, writeImagePermissions_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.authError != null) { oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); struct.authError.write(oprot); oprot.writeFieldEnd(); } if (struct.notFound != null) { oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC); struct.notFound.write(oprot); oprot.writeFieldEnd(); } if (struct.serverError != null) { oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC); struct.serverError.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class writeImagePermissions_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public writeImagePermissions_resultTupleScheme getScheme() { return new writeImagePermissions_resultTupleScheme(); } } private static class writeImagePermissions_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, writeImagePermissions_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetAuthError()) { optionals.set(0); } if (struct.isSetNotFound()) { optionals.set(1); } if (struct.isSetServerError()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetAuthError()) { struct.authError.write(oprot); } if (struct.isSetNotFound()) { struct.notFound.write(oprot); } if (struct.isSetServerError()) { struct.serverError.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, writeImagePermissions_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } if (incoming.get(1)) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } if (incoming.get(2)) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getImagePermissions_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getImagePermissions_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required public @org.apache.thrift.annotation.Nullable java.lang.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 java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImagePermissions_args.class, metaDataMap); } public getImagePermissions_args() { } public getImagePermissions_args( java.lang.String userToken, java.lang.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; } } @Override public getImagePermissions_args deepCopy() { return new getImagePermissions_args(this); } @Override public void clear() { this.userToken = null; this.imageBaseId = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getUserToken() { return this.userToken; } public getImagePermissions_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.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; } } @org.apache.thrift.annotation.Nullable public java.lang.String getImageBaseId() { return this.imageBaseId; } public getImagePermissions_args setImageBaseId(@org.apache.thrift.annotation.Nullable java.lang.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; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case USER_TOKEN: if (value == null) { unsetUserToken(); } else { setUserToken((java.lang.String)value); } break; case IMAGE_BASE_ID: if (value == null) { unsetImageBaseId(); } else { setImageBaseId((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case USER_TOKEN: return getUserToken(); case IMAGE_BASE_ID: return getImageBaseId(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case USER_TOKEN: return isSetUserToken(); case IMAGE_BASE_ID: return isSetImageBaseId(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getImagePermissions_args) return this.equals((getImagePermissions_args)that); return false; } public boolean equals(getImagePermissions_args that) { if (that == null) return false; if (this == that) return true; 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() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287); if (isSetUserToken()) hashCode = hashCode * 8191 + userToken.hashCode(); hashCode = hashCode * 8191 + ((isSetImageBaseId()) ? 131071 : 524287); if (isSetImageBaseId()) hashCode = hashCode * 8191 + imageBaseId.hashCode(); return hashCode; } @Override public int compareTo(getImagePermissions_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetUserToken(), 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 = java.lang.Boolean.compare(isSetImageBaseId(), 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; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory { @Override public getImagePermissions_argsStandardScheme getScheme() { return new getImagePermissions_argsStandardScheme(); } } private static class getImagePermissions_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override 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(); } @Override 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 org.apache.thrift.scheme.SchemeFactory { @Override public getImagePermissions_argsTupleScheme getScheme() { return new getImagePermissions_argsTupleScheme(); } } private static class getImagePermissions_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getImagePermissions_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.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 { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.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); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getImagePermissions_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getImagePermissions_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.Map success; // required public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), AUTH_ERROR((short)1, "authError"), NOT_FOUND((short)2, "notFound"), SERVER_ERROR((short)3, "serverError"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // AUTH_ERROR return AUTH_ERROR; case 2: // NOT_FOUND return NOT_FOUND; case 3: // SERVER_ERROR return SERVER_ERROR; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class))); tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class))); tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImagePermissions_result.class, metaDataMap); } public getImagePermissions_result() { } public getImagePermissions_result( java.util.Map success, TAuthorizationException authError, TNotFoundException notFound, TInvocationException serverError) { this(); this.success = success; this.authError = authError; this.notFound = notFound; this.serverError = serverError; } /** * Performs a deep copy on other. */ public getImagePermissions_result(getImagePermissions_result other) { if (other.isSetSuccess()) { java.util.Map __this__success = new java.util.HashMap(other.success.size()); for (java.util.Map.Entry other_element : other.success.entrySet()) { java.lang.String other_element_key = other_element.getKey(); ImagePermissions other_element_value = other_element.getValue(); java.lang.String __this__success_copy_key = other_element_key; ImagePermissions __this__success_copy_value = new ImagePermissions(other_element_value); __this__success.put(__this__success_copy_key, __this__success_copy_value); } this.success = __this__success; } if (other.isSetAuthError()) { this.authError = new TAuthorizationException(other.authError); } if (other.isSetNotFound()) { this.notFound = new TNotFoundException(other.notFound); } if (other.isSetServerError()) { this.serverError = new TInvocationException(other.serverError); } } @Override public getImagePermissions_result deepCopy() { return new getImagePermissions_result(this); } @Override public void clear() { this.success = null; this.authError = null; this.notFound = null; this.serverError = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public void putToSuccess(java.lang.String key, ImagePermissions val) { if (this.success == null) { this.success = new java.util.HashMap(); } this.success.put(key, val); } @org.apache.thrift.annotation.Nullable public java.util.Map getSuccess() { return this.success; } public getImagePermissions_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.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; } } @org.apache.thrift.annotation.Nullable public TAuthorizationException getAuthError() { return this.authError; } public getImagePermissions_result setAuthError(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TNotFoundException getNotFound() { return this.notFound; } public getImagePermissions_result setNotFound(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TInvocationException getServerError() { return this.serverError; } public getImagePermissions_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) { this.serverError = serverError; return this; } public void unsetServerError() { this.serverError = null; } /** Returns true if field serverError is set (has been assigned a value) and false otherwise */ public boolean isSetServerError() { return this.serverError != null; } public void setServerErrorIsSet(boolean value) { if (!value) { this.serverError = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.util.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; case SERVER_ERROR: if (value == null) { unsetServerError(); } else { setServerError((TInvocationException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case AUTH_ERROR: return getAuthError(); case NOT_FOUND: return getNotFound(); case SERVER_ERROR: return getServerError(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case AUTH_ERROR: return isSetAuthError(); case NOT_FOUND: return isSetNotFound(); case SERVER_ERROR: return isSetServerError(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getImagePermissions_result) return this.equals((getImagePermissions_result)that); return false; } public boolean equals(getImagePermissions_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_authError = true && this.isSetAuthError(); boolean that_present_authError = true && that.isSetAuthError(); if (this_present_authError || that_present_authError) { if (!(this_present_authError && that_present_authError)) return false; if (!this.authError.equals(that.authError)) return false; } boolean this_present_notFound = true && this.isSetNotFound(); boolean that_present_notFound = true && that.isSetNotFound(); if (this_present_notFound || that_present_notFound) { if (!(this_present_notFound && that_present_notFound)) return false; if (!this.notFound.equals(that.notFound)) return false; } boolean this_present_serverError = true && this.isSetServerError(); boolean that_present_serverError = true && that.isSetServerError(); if (this_present_serverError || that_present_serverError) { if (!(this_present_serverError && that_present_serverError)) return false; if (!this.serverError.equals(that.serverError)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287); if (isSetAuthError()) hashCode = hashCode * 8191 + authError.hashCode(); hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287); if (isSetNotFound()) hashCode = hashCode * 8191 + notFound.hashCode(); hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287); if (isSetServerError()) hashCode = hashCode * 8191 + serverError.hashCode(); return hashCode; } @Override public int compareTo(getImagePermissions_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), 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 = java.lang.Boolean.compare(isSetAuthError(), 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 = java.lang.Boolean.compare(isSetNotFound(), other.isSetNotFound()); if (lastComparison != 0) { return lastComparison; } if (isSetNotFound()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError()); if (lastComparison != 0) { return lastComparison; } if (isSetServerError()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("getImagePermissions_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("authError:"); if (this.authError == null) { sb.append("null"); } else { sb.append(this.authError); } first = false; if (!first) sb.append(", "); sb.append("notFound:"); if (this.notFound == null) { sb.append("null"); } else { sb.append(this.notFound); } first = false; if (!first) sb.append(", "); sb.append("serverError:"); if (this.serverError == null) { sb.append("null"); } else { sb.append(this.serverError); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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 org.apache.thrift.scheme.SchemeFactory { @Override public getImagePermissions_resultStandardScheme getScheme() { return new getImagePermissions_resultStandardScheme(); } } private static class getImagePermissions_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override 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 _map380 = iprot.readMapBegin(); struct.success = new java.util.HashMap(2*_map380.size); @org.apache.thrift.annotation.Nullable java.lang.String _key381; @org.apache.thrift.annotation.Nullable ImagePermissions _val382; for (int _i383 = 0; _i383 < _map380.size; ++_i383) { _key381 = iprot.readString(); _val382 = new ImagePermissions(); _val382.read(iprot); struct.success.put(_key381, _val382); } iprot.readMapEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // AUTH_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // NOT_FOUND if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // SERVER_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override 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 (java.util.Map.Entry _iter384 : struct.success.entrySet()) { oprot.writeString(_iter384.getKey()); _iter384.getValue().write(oprot); } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } if (struct.authError != null) { oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); struct.authError.write(oprot); oprot.writeFieldEnd(); } if (struct.notFound != null) { oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC); struct.notFound.write(oprot); oprot.writeFieldEnd(); } if (struct.serverError != null) { oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC); struct.serverError.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getImagePermissions_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getImagePermissions_resultTupleScheme getScheme() { return new getImagePermissions_resultTupleScheme(); } } private static class getImagePermissions_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getImagePermissions_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetAuthError()) { optionals.set(1); } if (struct.isSetNotFound()) { optionals.set(2); } if (struct.isSetServerError()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (java.util.Map.Entry _iter385 : struct.success.entrySet()) { oprot.writeString(_iter385.getKey()); _iter385.getValue().write(oprot); } } } if (struct.isSetAuthError()) { struct.authError.write(oprot); } if (struct.isSetNotFound()) { struct.notFound.write(oprot); } if (struct.isSetServerError()) { struct.serverError.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getImagePermissions_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { { org.apache.thrift.protocol.TMap _map386 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT); struct.success = new java.util.HashMap(2*_map386.size); @org.apache.thrift.annotation.Nullable java.lang.String _key387; @org.apache.thrift.annotation.Nullable ImagePermissions _val388; for (int _i389 = 0; _i389 < _map386.size; ++_i389) { _key387 = iprot.readString(); _val388 = new ImagePermissions(); _val388.read(iprot); struct.success.put(_key387, _val388); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } if (incoming.get(2)) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } if (incoming.get(3)) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class setImageOwner_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("setImageOwner_args"); private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField IMAGE_BASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageBaseId", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField NEW_OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("newOwnerId", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setImageOwner_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setImageOwner_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required public @org.apache.thrift.annotation.Nullable java.lang.String imageBaseId; // required public @org.apache.thrift.annotation.Nullable java.lang.String newOwnerId; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { USER_TOKEN((short)1, "userToken"), IMAGE_BASE_ID((short)2, "imageBaseId"), NEW_OWNER_ID((short)3, "newOwnerId"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // USER_TOKEN return USER_TOKEN; case 2: // IMAGE_BASE_ID return IMAGE_BASE_ID; case 3: // NEW_OWNER_ID return NEW_OWNER_ID; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); tmpMap.put(_Fields.IMAGE_BASE_ID, new org.apache.thrift.meta_data.FieldMetaData("imageBaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); tmpMap.put(_Fields.NEW_OWNER_ID, new org.apache.thrift.meta_data.FieldMetaData("newOwnerId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setImageOwner_args.class, metaDataMap); } public setImageOwner_args() { } public setImageOwner_args( java.lang.String userToken, java.lang.String imageBaseId, java.lang.String newOwnerId) { this(); this.userToken = userToken; this.imageBaseId = imageBaseId; this.newOwnerId = newOwnerId; } /** * Performs a deep copy on other. */ public setImageOwner_args(setImageOwner_args other) { if (other.isSetUserToken()) { this.userToken = other.userToken; } if (other.isSetImageBaseId()) { this.imageBaseId = other.imageBaseId; } if (other.isSetNewOwnerId()) { this.newOwnerId = other.newOwnerId; } } @Override public setImageOwner_args deepCopy() { return new setImageOwner_args(this); } @Override public void clear() { this.userToken = null; this.imageBaseId = null; this.newOwnerId = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getUserToken() { return this.userToken; } public setImageOwner_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.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; } } @org.apache.thrift.annotation.Nullable public java.lang.String getImageBaseId() { return this.imageBaseId; } public setImageOwner_args setImageBaseId(@org.apache.thrift.annotation.Nullable java.lang.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; } } @org.apache.thrift.annotation.Nullable public java.lang.String getNewOwnerId() { return this.newOwnerId; } public setImageOwner_args setNewOwnerId(@org.apache.thrift.annotation.Nullable java.lang.String newOwnerId) { this.newOwnerId = newOwnerId; return this; } public void unsetNewOwnerId() { this.newOwnerId = null; } /** Returns true if field newOwnerId is set (has been assigned a value) and false otherwise */ public boolean isSetNewOwnerId() { return this.newOwnerId != null; } public void setNewOwnerIdIsSet(boolean value) { if (!value) { this.newOwnerId = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case USER_TOKEN: if (value == null) { unsetUserToken(); } else { setUserToken((java.lang.String)value); } break; case IMAGE_BASE_ID: if (value == null) { unsetImageBaseId(); } else { setImageBaseId((java.lang.String)value); } break; case NEW_OWNER_ID: if (value == null) { unsetNewOwnerId(); } else { setNewOwnerId((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case USER_TOKEN: return getUserToken(); case IMAGE_BASE_ID: return getImageBaseId(); case NEW_OWNER_ID: return getNewOwnerId(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case USER_TOKEN: return isSetUserToken(); case IMAGE_BASE_ID: return isSetImageBaseId(); case NEW_OWNER_ID: return isSetNewOwnerId(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof setImageOwner_args) return this.equals((setImageOwner_args)that); return false; } public boolean equals(setImageOwner_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_userToken = true && this.isSetUserToken(); boolean that_present_userToken = true && that.isSetUserToken(); if (this_present_userToken || that_present_userToken) { if (!(this_present_userToken && that_present_userToken)) return false; if (!this.userToken.equals(that.userToken)) return false; } boolean this_present_imageBaseId = true && this.isSetImageBaseId(); boolean that_present_imageBaseId = true && that.isSetImageBaseId(); if (this_present_imageBaseId || that_present_imageBaseId) { if (!(this_present_imageBaseId && that_present_imageBaseId)) return false; if (!this.imageBaseId.equals(that.imageBaseId)) return false; } boolean this_present_newOwnerId = true && this.isSetNewOwnerId(); boolean that_present_newOwnerId = true && that.isSetNewOwnerId(); if (this_present_newOwnerId || that_present_newOwnerId) { if (!(this_present_newOwnerId && that_present_newOwnerId)) return false; if (!this.newOwnerId.equals(that.newOwnerId)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287); if (isSetUserToken()) hashCode = hashCode * 8191 + userToken.hashCode(); hashCode = hashCode * 8191 + ((isSetImageBaseId()) ? 131071 : 524287); if (isSetImageBaseId()) hashCode = hashCode * 8191 + imageBaseId.hashCode(); hashCode = hashCode * 8191 + ((isSetNewOwnerId()) ? 131071 : 524287); if (isSetNewOwnerId()) hashCode = hashCode * 8191 + newOwnerId.hashCode(); return hashCode; } @Override public int compareTo(setImageOwner_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetUserToken(), 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 = java.lang.Boolean.compare(isSetImageBaseId(), 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 = java.lang.Boolean.compare(isSetNewOwnerId(), other.isSetNewOwnerId()); if (lastComparison != 0) { return lastComparison; } if (isSetNewOwnerId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.newOwnerId, other.newOwnerId); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("setImageOwner_args("); boolean first = true; sb.append("userToken:"); if (this.userToken == null) { sb.append("null"); } else { sb.append(this.userToken); } first = false; if (!first) sb.append(", "); sb.append("imageBaseId:"); if (this.imageBaseId == null) { sb.append("null"); } else { sb.append(this.imageBaseId); } first = false; if (!first) sb.append(", "); sb.append("newOwnerId:"); if (this.newOwnerId == null) { sb.append("null"); } else { sb.append(this.newOwnerId); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class setImageOwner_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public setImageOwner_argsStandardScheme getScheme() { return new setImageOwner_argsStandardScheme(); } } private static class setImageOwner_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, setImageOwner_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // USER_TOKEN if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // IMAGE_BASE_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.imageBaseId = iprot.readString(); struct.setImageBaseIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // NEW_OWNER_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.newOwnerId = iprot.readString(); struct.setNewOwnerIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, setImageOwner_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.userToken != null) { oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC); oprot.writeString(struct.userToken); oprot.writeFieldEnd(); } if (struct.imageBaseId != null) { oprot.writeFieldBegin(IMAGE_BASE_ID_FIELD_DESC); oprot.writeString(struct.imageBaseId); oprot.writeFieldEnd(); } if (struct.newOwnerId != null) { oprot.writeFieldBegin(NEW_OWNER_ID_FIELD_DESC); oprot.writeString(struct.newOwnerId); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class setImageOwner_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public setImageOwner_argsTupleScheme getScheme() { return new setImageOwner_argsTupleScheme(); } } private static class setImageOwner_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, setImageOwner_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetUserToken()) { optionals.set(0); } if (struct.isSetImageBaseId()) { optionals.set(1); } if (struct.isSetNewOwnerId()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetUserToken()) { oprot.writeString(struct.userToken); } if (struct.isSetImageBaseId()) { oprot.writeString(struct.imageBaseId); } if (struct.isSetNewOwnerId()) { oprot.writeString(struct.newOwnerId); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, setImageOwner_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); } if (incoming.get(1)) { struct.imageBaseId = iprot.readString(); struct.setImageBaseIdIsSet(true); } if (incoming.get(2)) { struct.newOwnerId = iprot.readString(); struct.setNewOwnerIdIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class setImageOwner_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("setImageOwner_result"); private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setImageOwner_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setImageOwner_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { AUTH_ERROR((short)1, "authError"), NOT_FOUND((short)2, "notFound"), SERVER_ERROR((short)3, "serverError"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // AUTH_ERROR return AUTH_ERROR; case 2: // NOT_FOUND return NOT_FOUND; case 3: // SERVER_ERROR return SERVER_ERROR; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class))); tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class))); tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setImageOwner_result.class, metaDataMap); } public setImageOwner_result() { } public setImageOwner_result( TAuthorizationException authError, TNotFoundException notFound, TInvocationException serverError) { this(); this.authError = authError; this.notFound = notFound; this.serverError = serverError; } /** * Performs a deep copy on other. */ public setImageOwner_result(setImageOwner_result other) { if (other.isSetAuthError()) { this.authError = new TAuthorizationException(other.authError); } if (other.isSetNotFound()) { this.notFound = new TNotFoundException(other.notFound); } if (other.isSetServerError()) { this.serverError = new TInvocationException(other.serverError); } } @Override public setImageOwner_result deepCopy() { return new setImageOwner_result(this); } @Override public void clear() { this.authError = null; this.notFound = null; this.serverError = null; } @org.apache.thrift.annotation.Nullable public TAuthorizationException getAuthError() { return this.authError; } public setImageOwner_result setAuthError(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TNotFoundException getNotFound() { return this.notFound; } public setImageOwner_result setNotFound(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TInvocationException getServerError() { return this.serverError; } public setImageOwner_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) { this.serverError = serverError; return this; } public void unsetServerError() { this.serverError = null; } /** Returns true if field serverError is set (has been assigned a value) and false otherwise */ public boolean isSetServerError() { return this.serverError != null; } public void setServerErrorIsSet(boolean value) { if (!value) { this.serverError = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case AUTH_ERROR: if (value == null) { unsetAuthError(); } else { setAuthError((TAuthorizationException)value); } break; case NOT_FOUND: if (value == null) { unsetNotFound(); } else { setNotFound((TNotFoundException)value); } break; case SERVER_ERROR: if (value == null) { unsetServerError(); } else { setServerError((TInvocationException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case AUTH_ERROR: return getAuthError(); case NOT_FOUND: return getNotFound(); case SERVER_ERROR: return getServerError(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case AUTH_ERROR: return isSetAuthError(); case NOT_FOUND: return isSetNotFound(); case SERVER_ERROR: return isSetServerError(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof setImageOwner_result) return this.equals((setImageOwner_result)that); return false; } public boolean equals(setImageOwner_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_authError = true && this.isSetAuthError(); boolean that_present_authError = true && that.isSetAuthError(); if (this_present_authError || that_present_authError) { if (!(this_present_authError && that_present_authError)) return false; if (!this.authError.equals(that.authError)) return false; } boolean this_present_notFound = true && this.isSetNotFound(); boolean that_present_notFound = true && that.isSetNotFound(); if (this_present_notFound || that_present_notFound) { if (!(this_present_notFound && that_present_notFound)) return false; if (!this.notFound.equals(that.notFound)) return false; } boolean this_present_serverError = true && this.isSetServerError(); boolean that_present_serverError = true && that.isSetServerError(); if (this_present_serverError || that_present_serverError) { if (!(this_present_serverError && that_present_serverError)) return false; if (!this.serverError.equals(that.serverError)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287); if (isSetAuthError()) hashCode = hashCode * 8191 + authError.hashCode(); hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287); if (isSetNotFound()) hashCode = hashCode * 8191 + notFound.hashCode(); hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287); if (isSetServerError()) hashCode = hashCode * 8191 + serverError.hashCode(); return hashCode; } @Override public int compareTo(setImageOwner_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetAuthError(), 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 = java.lang.Boolean.compare(isSetNotFound(), other.isSetNotFound()); if (lastComparison != 0) { return lastComparison; } if (isSetNotFound()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError()); if (lastComparison != 0) { return lastComparison; } if (isSetServerError()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("setImageOwner_result("); boolean first = true; sb.append("authError:"); if (this.authError == null) { sb.append("null"); } else { sb.append(this.authError); } first = false; if (!first) sb.append(", "); sb.append("notFound:"); if (this.notFound == null) { sb.append("null"); } else { sb.append(this.notFound); } first = false; if (!first) sb.append(", "); sb.append("serverError:"); if (this.serverError == null) { sb.append("null"); } else { sb.append(this.serverError); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class setImageOwner_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public setImageOwner_resultStandardScheme getScheme() { return new setImageOwner_resultStandardScheme(); } } private static class setImageOwner_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, setImageOwner_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // AUTH_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // NOT_FOUND if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // SERVER_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, setImageOwner_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.authError != null) { oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); struct.authError.write(oprot); oprot.writeFieldEnd(); } if (struct.notFound != null) { oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC); struct.notFound.write(oprot); oprot.writeFieldEnd(); } if (struct.serverError != null) { oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC); struct.serverError.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class setImageOwner_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public setImageOwner_resultTupleScheme getScheme() { return new setImageOwner_resultTupleScheme(); } } private static class setImageOwner_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, setImageOwner_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetAuthError()) { optionals.set(0); } if (struct.isSetNotFound()) { optionals.set(1); } if (struct.isSetServerError()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetAuthError()) { struct.authError.write(oprot); } if (struct.isSetNotFound()) { struct.notFound.write(oprot); } if (struct.isSetServerError()) { struct.serverError.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, setImageOwner_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } if (incoming.get(1)) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } if (incoming.get(2)) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class setImageVersionExpiry_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("setImageVersionExpiry_args"); private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField IMAGE_BASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageBaseId", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField EXPIRE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("expireTime", org.apache.thrift.protocol.TType.I64, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setImageVersionExpiry_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setImageVersionExpiry_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required public @org.apache.thrift.annotation.Nullable java.lang.String imageBaseId; // required public long expireTime; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { USER_TOKEN((short)1, "userToken"), IMAGE_BASE_ID((short)2, "imageBaseId"), EXPIRE_TIME((short)3, "expireTime"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // USER_TOKEN return USER_TOKEN; case 2: // IMAGE_BASE_ID return IMAGE_BASE_ID; case 3: // EXPIRE_TIME return EXPIRE_TIME; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __EXPIRETIME_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); tmpMap.put(_Fields.IMAGE_BASE_ID, new org.apache.thrift.meta_data.FieldMetaData("imageBaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); tmpMap.put(_Fields.EXPIRE_TIME, new org.apache.thrift.meta_data.FieldMetaData("expireTime", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp"))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setImageVersionExpiry_args.class, metaDataMap); } public setImageVersionExpiry_args() { } public setImageVersionExpiry_args( java.lang.String userToken, java.lang.String imageBaseId, long expireTime) { this(); this.userToken = userToken; this.imageBaseId = imageBaseId; this.expireTime = expireTime; setExpireTimeIsSet(true); } /** * Performs a deep copy on other. */ public setImageVersionExpiry_args(setImageVersionExpiry_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetUserToken()) { this.userToken = other.userToken; } if (other.isSetImageBaseId()) { this.imageBaseId = other.imageBaseId; } this.expireTime = other.expireTime; } @Override public setImageVersionExpiry_args deepCopy() { return new setImageVersionExpiry_args(this); } @Override public void clear() { this.userToken = null; this.imageBaseId = null; setExpireTimeIsSet(false); this.expireTime = 0; } @org.apache.thrift.annotation.Nullable public java.lang.String getUserToken() { return this.userToken; } public setImageVersionExpiry_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.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; } } @org.apache.thrift.annotation.Nullable public java.lang.String getImageBaseId() { return this.imageBaseId; } public setImageVersionExpiry_args setImageBaseId(@org.apache.thrift.annotation.Nullable java.lang.String imageBaseId) { this.imageBaseId = imageBaseId; return this; } public void unsetImageBaseId() { this.imageBaseId = null; } /** Returns true if field imageBaseId is set (has been assigned a value) and false otherwise */ public boolean isSetImageBaseId() { return this.imageBaseId != null; } public void setImageBaseIdIsSet(boolean value) { if (!value) { this.imageBaseId = null; } } public long getExpireTime() { return this.expireTime; } public setImageVersionExpiry_args setExpireTime(long expireTime) { this.expireTime = expireTime; setExpireTimeIsSet(true); return this; } public void unsetExpireTime() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __EXPIRETIME_ISSET_ID); } /** Returns true if field expireTime is set (has been assigned a value) and false otherwise */ public boolean isSetExpireTime() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EXPIRETIME_ISSET_ID); } public void setExpireTimeIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __EXPIRETIME_ISSET_ID, value); } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case USER_TOKEN: if (value == null) { unsetUserToken(); } else { setUserToken((java.lang.String)value); } break; case IMAGE_BASE_ID: if (value == null) { unsetImageBaseId(); } else { setImageBaseId((java.lang.String)value); } break; case EXPIRE_TIME: if (value == null) { unsetExpireTime(); } else { setExpireTime((java.lang.Long)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case USER_TOKEN: return getUserToken(); case IMAGE_BASE_ID: return getImageBaseId(); case EXPIRE_TIME: return getExpireTime(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case USER_TOKEN: return isSetUserToken(); case IMAGE_BASE_ID: return isSetImageBaseId(); case EXPIRE_TIME: return isSetExpireTime(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof setImageVersionExpiry_args) return this.equals((setImageVersionExpiry_args)that); return false; } public boolean equals(setImageVersionExpiry_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_userToken = true && this.isSetUserToken(); boolean that_present_userToken = true && that.isSetUserToken(); if (this_present_userToken || that_present_userToken) { if (!(this_present_userToken && that_present_userToken)) return false; if (!this.userToken.equals(that.userToken)) return false; } boolean this_present_imageBaseId = true && this.isSetImageBaseId(); boolean that_present_imageBaseId = true && that.isSetImageBaseId(); if (this_present_imageBaseId || that_present_imageBaseId) { if (!(this_present_imageBaseId && that_present_imageBaseId)) return false; if (!this.imageBaseId.equals(that.imageBaseId)) return false; } boolean this_present_expireTime = true; boolean that_present_expireTime = true; if (this_present_expireTime || that_present_expireTime) { if (!(this_present_expireTime && that_present_expireTime)) return false; if (this.expireTime != that.expireTime) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287); if (isSetUserToken()) hashCode = hashCode * 8191 + userToken.hashCode(); hashCode = hashCode * 8191 + ((isSetImageBaseId()) ? 131071 : 524287); if (isSetImageBaseId()) hashCode = hashCode * 8191 + imageBaseId.hashCode(); hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(expireTime); return hashCode; } @Override public int compareTo(setImageVersionExpiry_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetUserToken(), 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 = java.lang.Boolean.compare(isSetImageBaseId(), 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 = java.lang.Boolean.compare(isSetExpireTime(), other.isSetExpireTime()); if (lastComparison != 0) { return lastComparison; } if (isSetExpireTime()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.expireTime, other.expireTime); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("setImageVersionExpiry_args("); boolean first = true; sb.append("userToken:"); if (this.userToken == null) { sb.append("null"); } else { sb.append(this.userToken); } first = false; if (!first) sb.append(", "); sb.append("imageBaseId:"); if (this.imageBaseId == null) { sb.append("null"); } else { sb.append(this.imageBaseId); } first = false; if (!first) sb.append(", "); sb.append("expireTime:"); sb.append(this.expireTime); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class setImageVersionExpiry_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public setImageVersionExpiry_argsStandardScheme getScheme() { return new setImageVersionExpiry_argsStandardScheme(); } } private static class setImageVersionExpiry_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, setImageVersionExpiry_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // USER_TOKEN if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // IMAGE_BASE_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.imageBaseId = iprot.readString(); struct.setImageBaseIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // EXPIRE_TIME if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.expireTime = iprot.readI64(); struct.setExpireTimeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, setImageVersionExpiry_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.userToken != null) { oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC); oprot.writeString(struct.userToken); oprot.writeFieldEnd(); } if (struct.imageBaseId != null) { oprot.writeFieldBegin(IMAGE_BASE_ID_FIELD_DESC); oprot.writeString(struct.imageBaseId); oprot.writeFieldEnd(); } oprot.writeFieldBegin(EXPIRE_TIME_FIELD_DESC); oprot.writeI64(struct.expireTime); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class setImageVersionExpiry_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public setImageVersionExpiry_argsTupleScheme getScheme() { return new setImageVersionExpiry_argsTupleScheme(); } } private static class setImageVersionExpiry_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, setImageVersionExpiry_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetUserToken()) { optionals.set(0); } if (struct.isSetImageBaseId()) { optionals.set(1); } if (struct.isSetExpireTime()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetUserToken()) { oprot.writeString(struct.userToken); } if (struct.isSetImageBaseId()) { oprot.writeString(struct.imageBaseId); } if (struct.isSetExpireTime()) { oprot.writeI64(struct.expireTime); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, setImageVersionExpiry_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); } if (incoming.get(1)) { struct.imageBaseId = iprot.readString(); struct.setImageBaseIdIsSet(true); } if (incoming.get(2)) { struct.expireTime = iprot.readI64(); struct.setExpireTimeIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class setImageVersionExpiry_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("setImageVersionExpiry_result"); private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField DATE_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("dateError", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setImageVersionExpiry_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setImageVersionExpiry_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // required public @org.apache.thrift.annotation.Nullable TInvalidDateParam dateError; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { AUTH_ERROR((short)1, "authError"), NOT_FOUND((short)2, "notFound"), SERVER_ERROR((short)3, "serverError"), DATE_ERROR((short)4, "dateError"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // AUTH_ERROR return AUTH_ERROR; case 2: // NOT_FOUND return NOT_FOUND; case 3: // SERVER_ERROR return SERVER_ERROR; case 4: // DATE_ERROR return DATE_ERROR; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class))); tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class))); tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class))); tmpMap.put(_Fields.DATE_ERROR, new org.apache.thrift.meta_data.FieldMetaData("dateError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvalidDateParam.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setImageVersionExpiry_result.class, metaDataMap); } public setImageVersionExpiry_result() { } public setImageVersionExpiry_result( TAuthorizationException authError, TNotFoundException notFound, TInvocationException serverError, TInvalidDateParam dateError) { this(); this.authError = authError; this.notFound = notFound; this.serverError = serverError; this.dateError = dateError; } /** * Performs a deep copy on other. */ public setImageVersionExpiry_result(setImageVersionExpiry_result other) { if (other.isSetAuthError()) { this.authError = new TAuthorizationException(other.authError); } if (other.isSetNotFound()) { this.notFound = new TNotFoundException(other.notFound); } if (other.isSetServerError()) { this.serverError = new TInvocationException(other.serverError); } if (other.isSetDateError()) { this.dateError = new TInvalidDateParam(other.dateError); } } @Override public setImageVersionExpiry_result deepCopy() { return new setImageVersionExpiry_result(this); } @Override public void clear() { this.authError = null; this.notFound = null; this.serverError = null; this.dateError = null; } @org.apache.thrift.annotation.Nullable public TAuthorizationException getAuthError() { return this.authError; } public setImageVersionExpiry_result setAuthError(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TNotFoundException getNotFound() { return this.notFound; } public setImageVersionExpiry_result setNotFound(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TInvocationException getServerError() { return this.serverError; } public setImageVersionExpiry_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) { this.serverError = serverError; return this; } public void unsetServerError() { this.serverError = null; } /** Returns true if field serverError is set (has been assigned a value) and false otherwise */ public boolean isSetServerError() { return this.serverError != null; } public void setServerErrorIsSet(boolean value) { if (!value) { this.serverError = null; } } @org.apache.thrift.annotation.Nullable public TInvalidDateParam getDateError() { return this.dateError; } public setImageVersionExpiry_result setDateError(@org.apache.thrift.annotation.Nullable TInvalidDateParam dateError) { this.dateError = dateError; return this; } public void unsetDateError() { this.dateError = null; } /** Returns true if field dateError is set (has been assigned a value) and false otherwise */ public boolean isSetDateError() { return this.dateError != null; } public void setDateErrorIsSet(boolean value) { if (!value) { this.dateError = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case AUTH_ERROR: if (value == null) { unsetAuthError(); } else { setAuthError((TAuthorizationException)value); } break; case NOT_FOUND: if (value == null) { unsetNotFound(); } else { setNotFound((TNotFoundException)value); } break; case SERVER_ERROR: if (value == null) { unsetServerError(); } else { setServerError((TInvocationException)value); } break; case DATE_ERROR: if (value == null) { unsetDateError(); } else { setDateError((TInvalidDateParam)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case AUTH_ERROR: return getAuthError(); case NOT_FOUND: return getNotFound(); case SERVER_ERROR: return getServerError(); case DATE_ERROR: return getDateError(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case AUTH_ERROR: return isSetAuthError(); case NOT_FOUND: return isSetNotFound(); case SERVER_ERROR: return isSetServerError(); case DATE_ERROR: return isSetDateError(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof setImageVersionExpiry_result) return this.equals((setImageVersionExpiry_result)that); return false; } public boolean equals(setImageVersionExpiry_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_authError = true && this.isSetAuthError(); boolean that_present_authError = true && that.isSetAuthError(); if (this_present_authError || that_present_authError) { if (!(this_present_authError && that_present_authError)) return false; if (!this.authError.equals(that.authError)) return false; } boolean this_present_notFound = true && this.isSetNotFound(); boolean that_present_notFound = true && that.isSetNotFound(); if (this_present_notFound || that_present_notFound) { if (!(this_present_notFound && that_present_notFound)) return false; if (!this.notFound.equals(that.notFound)) return false; } boolean this_present_serverError = true && this.isSetServerError(); boolean that_present_serverError = true && that.isSetServerError(); if (this_present_serverError || that_present_serverError) { if (!(this_present_serverError && that_present_serverError)) return false; if (!this.serverError.equals(that.serverError)) return false; } boolean this_present_dateError = true && this.isSetDateError(); boolean that_present_dateError = true && that.isSetDateError(); if (this_present_dateError || that_present_dateError) { if (!(this_present_dateError && that_present_dateError)) return false; if (!this.dateError.equals(that.dateError)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287); if (isSetAuthError()) hashCode = hashCode * 8191 + authError.hashCode(); hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287); if (isSetNotFound()) hashCode = hashCode * 8191 + notFound.hashCode(); hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287); if (isSetServerError()) hashCode = hashCode * 8191 + serverError.hashCode(); hashCode = hashCode * 8191 + ((isSetDateError()) ? 131071 : 524287); if (isSetDateError()) hashCode = hashCode * 8191 + dateError.hashCode(); return hashCode; } @Override public int compareTo(setImageVersionExpiry_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetAuthError(), 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 = java.lang.Boolean.compare(isSetNotFound(), other.isSetNotFound()); if (lastComparison != 0) { return lastComparison; } if (isSetNotFound()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError()); if (lastComparison != 0) { return lastComparison; } if (isSetServerError()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetDateError(), other.isSetDateError()); if (lastComparison != 0) { return lastComparison; } if (isSetDateError()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dateError, other.dateError); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("setImageVersionExpiry_result("); boolean first = true; sb.append("authError:"); if (this.authError == null) { sb.append("null"); } else { sb.append(this.authError); } first = false; if (!first) sb.append(", "); sb.append("notFound:"); if (this.notFound == null) { sb.append("null"); } else { sb.append(this.notFound); } first = false; if (!first) sb.append(", "); sb.append("serverError:"); if (this.serverError == null) { sb.append("null"); } else { sb.append(this.serverError); } first = false; if (!first) sb.append(", "); sb.append("dateError:"); if (this.dateError == null) { sb.append("null"); } else { sb.append(this.dateError); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class setImageVersionExpiry_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public setImageVersionExpiry_resultStandardScheme getScheme() { return new setImageVersionExpiry_resultStandardScheme(); } } private static class setImageVersionExpiry_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, setImageVersionExpiry_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // AUTH_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // NOT_FOUND if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // SERVER_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // DATE_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.dateError = new TInvalidDateParam(); struct.dateError.read(iprot); struct.setDateErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, setImageVersionExpiry_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.authError != null) { oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); struct.authError.write(oprot); oprot.writeFieldEnd(); } if (struct.notFound != null) { oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC); struct.notFound.write(oprot); oprot.writeFieldEnd(); } if (struct.serverError != null) { oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC); struct.serverError.write(oprot); oprot.writeFieldEnd(); } if (struct.dateError != null) { oprot.writeFieldBegin(DATE_ERROR_FIELD_DESC); struct.dateError.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class setImageVersionExpiry_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public setImageVersionExpiry_resultTupleScheme getScheme() { return new setImageVersionExpiry_resultTupleScheme(); } } private static class setImageVersionExpiry_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, setImageVersionExpiry_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetAuthError()) { optionals.set(0); } if (struct.isSetNotFound()) { optionals.set(1); } if (struct.isSetServerError()) { optionals.set(2); } if (struct.isSetDateError()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetAuthError()) { struct.authError.write(oprot); } if (struct.isSetNotFound()) { struct.notFound.write(oprot); } if (struct.isSetServerError()) { struct.serverError.write(oprot); } if (struct.isSetDateError()) { struct.dateError.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, setImageVersionExpiry_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } if (incoming.get(1)) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } if (incoming.get(2)) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } if (incoming.get(3)) { struct.dateError = new TInvalidDateParam(); struct.dateError.read(iprot); struct.setDateErrorIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class getImageVersionVirtConfig_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("getImageVersionVirtConfig_args"); private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField IMAGE_VERSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageVersionId", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getImageVersionVirtConfig_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getImageVersionVirtConfig_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required public @org.apache.thrift.annotation.Nullable java.lang.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 java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageVersionVirtConfig_args.class, metaDataMap); } public getImageVersionVirtConfig_args() { } public getImageVersionVirtConfig_args( java.lang.String userToken, java.lang.String imageVersionId) { this(); this.userToken = userToken; this.imageVersionId = imageVersionId; } /** * Performs a deep copy on other. */ public getImageVersionVirtConfig_args(getImageVersionVirtConfig_args other) { if (other.isSetUserToken()) { this.userToken = other.userToken; } if (other.isSetImageVersionId()) { this.imageVersionId = other.imageVersionId; } } @Override public getImageVersionVirtConfig_args deepCopy() { return new getImageVersionVirtConfig_args(this); } @Override public void clear() { this.userToken = null; this.imageVersionId = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getUserToken() { return this.userToken; } public getImageVersionVirtConfig_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.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; } } @org.apache.thrift.annotation.Nullable public java.lang.String getImageVersionId() { return this.imageVersionId; } public getImageVersionVirtConfig_args setImageVersionId(@org.apache.thrift.annotation.Nullable java.lang.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; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case USER_TOKEN: if (value == null) { unsetUserToken(); } else { setUserToken((java.lang.String)value); } break; case IMAGE_VERSION_ID: if (value == null) { unsetImageVersionId(); } else { setImageVersionId((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case USER_TOKEN: return getUserToken(); case IMAGE_VERSION_ID: return getImageVersionId(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case USER_TOKEN: return isSetUserToken(); case IMAGE_VERSION_ID: return isSetImageVersionId(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getImageVersionVirtConfig_args) return this.equals((getImageVersionVirtConfig_args)that); return false; } public boolean equals(getImageVersionVirtConfig_args that) { if (that == null) return false; if (this == that) return true; 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() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287); if (isSetUserToken()) hashCode = hashCode * 8191 + userToken.hashCode(); hashCode = hashCode * 8191 + ((isSetImageVersionId()) ? 131071 : 524287); if (isSetImageVersionId()) hashCode = hashCode * 8191 + imageVersionId.hashCode(); return hashCode; } @Override public int compareTo(getImageVersionVirtConfig_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetUserToken(), 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 = java.lang.Boolean.compare(isSetImageVersionId(), 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; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("getImageVersionVirtConfig_args("); boolean first = true; sb.append("userToken:"); if (this.userToken == null) { sb.append("null"); } else { sb.append(this.userToken); } first = false; if (!first) sb.append(", "); sb.append("imageVersionId:"); if (this.imageVersionId == null) { sb.append("null"); } else { sb.append(this.imageVersionId); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class getImageVersionVirtConfig_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getImageVersionVirtConfig_argsStandardScheme getScheme() { return new getImageVersionVirtConfig_argsStandardScheme(); } } private static class getImageVersionVirtConfig_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, getImageVersionVirtConfig_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // USER_TOKEN if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // IMAGE_VERSION_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.imageVersionId = iprot.readString(); struct.setImageVersionIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, getImageVersionVirtConfig_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.userToken != null) { oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC); oprot.writeString(struct.userToken); oprot.writeFieldEnd(); } if (struct.imageVersionId != null) { oprot.writeFieldBegin(IMAGE_VERSION_ID_FIELD_DESC); oprot.writeString(struct.imageVersionId); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getImageVersionVirtConfig_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getImageVersionVirtConfig_argsTupleScheme getScheme() { return new getImageVersionVirtConfig_argsTupleScheme(); } } private static class getImageVersionVirtConfig_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getImageVersionVirtConfig_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetUserToken()) { optionals.set(0); } if (struct.isSetImageVersionId()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetUserToken()) { oprot.writeString(struct.userToken); } if (struct.isSetImageVersionId()) { oprot.writeString(struct.imageVersionId); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getImageVersionVirtConfig_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.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); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class getImageVersionVirtConfig_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("getImageVersionVirtConfig_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getImageVersionVirtConfig_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getImageVersionVirtConfig_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer success; // required public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), AUTH_ERROR((short)1, "authError"), NOT_FOUND((short)2, "notFound"), SERVER_ERROR((short)3, "serverError"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // AUTH_ERROR return AUTH_ERROR; case 2: // NOT_FOUND return NOT_FOUND; case 3: // SERVER_ERROR return SERVER_ERROR; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class))); tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class))); tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageVersionVirtConfig_result.class, metaDataMap); } public getImageVersionVirtConfig_result() { } public getImageVersionVirtConfig_result( java.nio.ByteBuffer success, TAuthorizationException authError, TNotFoundException notFound, TInvocationException serverError) { this(); this.success = org.apache.thrift.TBaseHelper.copyBinary(success); this.authError = authError; this.notFound = notFound; this.serverError = serverError; } /** * Performs a deep copy on other. */ public getImageVersionVirtConfig_result(getImageVersionVirtConfig_result other) { if (other.isSetSuccess()) { this.success = org.apache.thrift.TBaseHelper.copyBinary(other.success); } if (other.isSetAuthError()) { this.authError = new TAuthorizationException(other.authError); } if (other.isSetNotFound()) { this.notFound = new TNotFoundException(other.notFound); } if (other.isSetServerError()) { this.serverError = new TInvocationException(other.serverError); } } @Override public getImageVersionVirtConfig_result deepCopy() { return new getImageVersionVirtConfig_result(this); } @Override public void clear() { this.success = null; this.authError = null; this.notFound = null; this.serverError = null; } public byte[] getSuccess() { setSuccess(org.apache.thrift.TBaseHelper.rightSize(success)); return success == null ? null : success.array(); } public java.nio.ByteBuffer bufferForSuccess() { return org.apache.thrift.TBaseHelper.copyBinary(success); } public getImageVersionVirtConfig_result setSuccess(byte[] success) { this.success = success == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(success.clone()); return this; } public getImageVersionVirtConfig_result setSuccess(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer success) { this.success = org.apache.thrift.TBaseHelper.copyBinary(success); return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TAuthorizationException getAuthError() { return this.authError; } public getImageVersionVirtConfig_result setAuthError(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TNotFoundException getNotFound() { return this.notFound; } public getImageVersionVirtConfig_result setNotFound(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TInvocationException getServerError() { return this.serverError; } public getImageVersionVirtConfig_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) { this.serverError = serverError; return this; } public void unsetServerError() { this.serverError = null; } /** Returns true if field serverError is set (has been assigned a value) and false otherwise */ public boolean isSetServerError() { return this.serverError != null; } public void setServerErrorIsSet(boolean value) { if (!value) { this.serverError = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { if (value instanceof byte[]) { setSuccess((byte[])value); } else { setSuccess((java.nio.ByteBuffer)value); } } break; case AUTH_ERROR: if (value == null) { unsetAuthError(); } else { setAuthError((TAuthorizationException)value); } break; case NOT_FOUND: if (value == null) { unsetNotFound(); } else { setNotFound((TNotFoundException)value); } break; case SERVER_ERROR: if (value == null) { unsetServerError(); } else { setServerError((TInvocationException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case AUTH_ERROR: return getAuthError(); case NOT_FOUND: return getNotFound(); case SERVER_ERROR: return getServerError(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case AUTH_ERROR: return isSetAuthError(); case NOT_FOUND: return isSetNotFound(); case SERVER_ERROR: return isSetServerError(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getImageVersionVirtConfig_result) return this.equals((getImageVersionVirtConfig_result)that); return false; } public boolean equals(getImageVersionVirtConfig_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_authError = true && this.isSetAuthError(); boolean that_present_authError = true && that.isSetAuthError(); if (this_present_authError || that_present_authError) { if (!(this_present_authError && that_present_authError)) return false; if (!this.authError.equals(that.authError)) return false; } boolean this_present_notFound = true && this.isSetNotFound(); boolean that_present_notFound = true && that.isSetNotFound(); if (this_present_notFound || that_present_notFound) { if (!(this_present_notFound && that_present_notFound)) return false; if (!this.notFound.equals(that.notFound)) return false; } boolean this_present_serverError = true && this.isSetServerError(); boolean that_present_serverError = true && that.isSetServerError(); if (this_present_serverError || that_present_serverError) { if (!(this_present_serverError && that_present_serverError)) return false; if (!this.serverError.equals(that.serverError)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287); if (isSetAuthError()) hashCode = hashCode * 8191 + authError.hashCode(); hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287); if (isSetNotFound()) hashCode = hashCode * 8191 + notFound.hashCode(); hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287); if (isSetServerError()) hashCode = hashCode * 8191 + serverError.hashCode(); return hashCode; } @Override public int compareTo(getImageVersionVirtConfig_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), 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 = java.lang.Boolean.compare(isSetAuthError(), 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 = java.lang.Boolean.compare(isSetNotFound(), other.isSetNotFound()); if (lastComparison != 0) { return lastComparison; } if (isSetNotFound()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError()); if (lastComparison != 0) { return lastComparison; } if (isSetServerError()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("getImageVersionVirtConfig_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { org.apache.thrift.TBaseHelper.toString(this.success, sb); } first = false; if (!first) sb.append(", "); sb.append("authError:"); if (this.authError == null) { sb.append("null"); } else { sb.append(this.authError); } first = false; if (!first) sb.append(", "); sb.append("notFound:"); if (this.notFound == null) { sb.append("null"); } else { sb.append(this.notFound); } first = false; if (!first) sb.append(", "); sb.append("serverError:"); if (this.serverError == null) { sb.append("null"); } else { sb.append(this.serverError); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class getImageVersionVirtConfig_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getImageVersionVirtConfig_resultStandardScheme getScheme() { return new getImageVersionVirtConfig_resultStandardScheme(); } } private static class getImageVersionVirtConfig_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, getImageVersionVirtConfig_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.success = iprot.readBinary(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // AUTH_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // NOT_FOUND if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // SERVER_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, getImageVersionVirtConfig_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBinary(struct.success); oprot.writeFieldEnd(); } if (struct.authError != null) { oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); struct.authError.write(oprot); oprot.writeFieldEnd(); } if (struct.notFound != null) { oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC); struct.notFound.write(oprot); oprot.writeFieldEnd(); } if (struct.serverError != null) { oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC); struct.serverError.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getImageVersionVirtConfig_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getImageVersionVirtConfig_resultTupleScheme getScheme() { return new getImageVersionVirtConfig_resultTupleScheme(); } } private static class getImageVersionVirtConfig_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getImageVersionVirtConfig_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetAuthError()) { optionals.set(1); } if (struct.isSetNotFound()) { optionals.set(2); } if (struct.isSetServerError()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetSuccess()) { oprot.writeBinary(struct.success); } if (struct.isSetAuthError()) { struct.authError.write(oprot); } if (struct.isSetNotFound()) { struct.notFound.write(oprot); } if (struct.isSetServerError()) { struct.serverError.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getImageVersionVirtConfig_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.success = iprot.readBinary(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } if (incoming.get(2)) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } if (incoming.get(3)) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class setImageVersionVirtConfig_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("setImageVersionVirtConfig_args"); private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField IMAGE_VERSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageVersionId", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField META_FIELD_DESC = new org.apache.thrift.protocol.TField("meta", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setImageVersionVirtConfig_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setImageVersionVirtConfig_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required public @org.apache.thrift.annotation.Nullable java.lang.String imageVersionId; // required public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer meta; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { USER_TOKEN((short)1, "userToken"), IMAGE_VERSION_ID((short)2, "imageVersionId"), META((short)3, "meta"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // USER_TOKEN return USER_TOKEN; case 2: // IMAGE_VERSION_ID return IMAGE_VERSION_ID; case 3: // META return META; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); tmpMap.put(_Fields.IMAGE_VERSION_ID, new org.apache.thrift.meta_data.FieldMetaData("imageVersionId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); tmpMap.put(_Fields.META, new org.apache.thrift.meta_data.FieldMetaData("meta", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setImageVersionVirtConfig_args.class, metaDataMap); } public setImageVersionVirtConfig_args() { } public setImageVersionVirtConfig_args( java.lang.String userToken, java.lang.String imageVersionId, java.nio.ByteBuffer meta) { this(); this.userToken = userToken; this.imageVersionId = imageVersionId; this.meta = org.apache.thrift.TBaseHelper.copyBinary(meta); } /** * Performs a deep copy on other. */ public setImageVersionVirtConfig_args(setImageVersionVirtConfig_args other) { if (other.isSetUserToken()) { this.userToken = other.userToken; } if (other.isSetImageVersionId()) { this.imageVersionId = other.imageVersionId; } if (other.isSetMeta()) { this.meta = org.apache.thrift.TBaseHelper.copyBinary(other.meta); } } @Override public setImageVersionVirtConfig_args deepCopy() { return new setImageVersionVirtConfig_args(this); } @Override public void clear() { this.userToken = null; this.imageVersionId = null; this.meta = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getUserToken() { return this.userToken; } public setImageVersionVirtConfig_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.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; } } @org.apache.thrift.annotation.Nullable public java.lang.String getImageVersionId() { return this.imageVersionId; } public setImageVersionVirtConfig_args setImageVersionId(@org.apache.thrift.annotation.Nullable java.lang.String imageVersionId) { this.imageVersionId = imageVersionId; return this; } public void unsetImageVersionId() { this.imageVersionId = null; } /** Returns true if field imageVersionId is set (has been assigned a value) and false otherwise */ public boolean isSetImageVersionId() { return this.imageVersionId != null; } public void setImageVersionIdIsSet(boolean value) { if (!value) { this.imageVersionId = null; } } public byte[] getMeta() { setMeta(org.apache.thrift.TBaseHelper.rightSize(meta)); return meta == null ? null : meta.array(); } public java.nio.ByteBuffer bufferForMeta() { return org.apache.thrift.TBaseHelper.copyBinary(meta); } public setImageVersionVirtConfig_args setMeta(byte[] meta) { this.meta = meta == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(meta.clone()); return this; } public setImageVersionVirtConfig_args setMeta(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer meta) { this.meta = org.apache.thrift.TBaseHelper.copyBinary(meta); return this; } public void unsetMeta() { this.meta = null; } /** Returns true if field meta is set (has been assigned a value) and false otherwise */ public boolean isSetMeta() { return this.meta != null; } public void setMetaIsSet(boolean value) { if (!value) { this.meta = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case USER_TOKEN: if (value == null) { unsetUserToken(); } else { setUserToken((java.lang.String)value); } break; case IMAGE_VERSION_ID: if (value == null) { unsetImageVersionId(); } else { setImageVersionId((java.lang.String)value); } break; case META: if (value == null) { unsetMeta(); } else { if (value instanceof byte[]) { setMeta((byte[])value); } else { setMeta((java.nio.ByteBuffer)value); } } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case USER_TOKEN: return getUserToken(); case IMAGE_VERSION_ID: return getImageVersionId(); case META: return getMeta(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case USER_TOKEN: return isSetUserToken(); case IMAGE_VERSION_ID: return isSetImageVersionId(); case META: return isSetMeta(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof setImageVersionVirtConfig_args) return this.equals((setImageVersionVirtConfig_args)that); return false; } public boolean equals(setImageVersionVirtConfig_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_userToken = true && this.isSetUserToken(); boolean that_present_userToken = true && that.isSetUserToken(); if (this_present_userToken || that_present_userToken) { if (!(this_present_userToken && that_present_userToken)) return false; if (!this.userToken.equals(that.userToken)) return false; } boolean this_present_imageVersionId = true && this.isSetImageVersionId(); boolean that_present_imageVersionId = true && that.isSetImageVersionId(); if (this_present_imageVersionId || that_present_imageVersionId) { if (!(this_present_imageVersionId && that_present_imageVersionId)) return false; if (!this.imageVersionId.equals(that.imageVersionId)) return false; } boolean this_present_meta = true && this.isSetMeta(); boolean that_present_meta = true && that.isSetMeta(); if (this_present_meta || that_present_meta) { if (!(this_present_meta && that_present_meta)) return false; if (!this.meta.equals(that.meta)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287); if (isSetUserToken()) hashCode = hashCode * 8191 + userToken.hashCode(); hashCode = hashCode * 8191 + ((isSetImageVersionId()) ? 131071 : 524287); if (isSetImageVersionId()) hashCode = hashCode * 8191 + imageVersionId.hashCode(); hashCode = hashCode * 8191 + ((isSetMeta()) ? 131071 : 524287); if (isSetMeta()) hashCode = hashCode * 8191 + meta.hashCode(); return hashCode; } @Override public int compareTo(setImageVersionVirtConfig_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetUserToken(), 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 = java.lang.Boolean.compare(isSetImageVersionId(), 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 = java.lang.Boolean.compare(isSetMeta(), other.isSetMeta()); if (lastComparison != 0) { return lastComparison; } if (isSetMeta()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.meta, other.meta); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("setImageVersionVirtConfig_args("); boolean first = true; sb.append("userToken:"); if (this.userToken == null) { sb.append("null"); } else { sb.append(this.userToken); } first = false; if (!first) sb.append(", "); sb.append("imageVersionId:"); if (this.imageVersionId == null) { sb.append("null"); } else { sb.append(this.imageVersionId); } first = false; if (!first) sb.append(", "); sb.append("meta:"); if (this.meta == null) { sb.append("null"); } else { org.apache.thrift.TBaseHelper.toString(this.meta, sb); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class setImageVersionVirtConfig_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public setImageVersionVirtConfig_argsStandardScheme getScheme() { return new setImageVersionVirtConfig_argsStandardScheme(); } } private static class setImageVersionVirtConfig_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, setImageVersionVirtConfig_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // USER_TOKEN if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // IMAGE_VERSION_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.imageVersionId = iprot.readString(); struct.setImageVersionIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // META if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.meta = iprot.readBinary(); struct.setMetaIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, setImageVersionVirtConfig_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.userToken != null) { oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC); oprot.writeString(struct.userToken); oprot.writeFieldEnd(); } if (struct.imageVersionId != null) { oprot.writeFieldBegin(IMAGE_VERSION_ID_FIELD_DESC); oprot.writeString(struct.imageVersionId); oprot.writeFieldEnd(); } if (struct.meta != null) { oprot.writeFieldBegin(META_FIELD_DESC); oprot.writeBinary(struct.meta); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class setImageVersionVirtConfig_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public setImageVersionVirtConfig_argsTupleScheme getScheme() { return new setImageVersionVirtConfig_argsTupleScheme(); } } private static class setImageVersionVirtConfig_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, setImageVersionVirtConfig_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetUserToken()) { optionals.set(0); } if (struct.isSetImageVersionId()) { optionals.set(1); } if (struct.isSetMeta()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetUserToken()) { oprot.writeString(struct.userToken); } if (struct.isSetImageVersionId()) { oprot.writeString(struct.imageVersionId); } if (struct.isSetMeta()) { oprot.writeBinary(struct.meta); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, setImageVersionVirtConfig_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); } if (incoming.get(1)) { struct.imageVersionId = iprot.readString(); struct.setImageVersionIdIsSet(true); } if (incoming.get(2)) { struct.meta = iprot.readBinary(); struct.setMetaIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class setImageVersionVirtConfig_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("setImageVersionVirtConfig_result"); private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setImageVersionVirtConfig_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setImageVersionVirtConfig_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { AUTH_ERROR((short)1, "authError"), NOT_FOUND((short)2, "notFound"), SERVER_ERROR((short)3, "serverError"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // AUTH_ERROR return AUTH_ERROR; case 2: // NOT_FOUND return NOT_FOUND; case 3: // SERVER_ERROR return SERVER_ERROR; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class))); tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class))); tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setImageVersionVirtConfig_result.class, metaDataMap); } public setImageVersionVirtConfig_result() { } public setImageVersionVirtConfig_result( TAuthorizationException authError, TNotFoundException notFound, TInvocationException serverError) { this(); this.authError = authError; this.notFound = notFound; this.serverError = serverError; } /** * Performs a deep copy on other. */ public setImageVersionVirtConfig_result(setImageVersionVirtConfig_result other) { if (other.isSetAuthError()) { this.authError = new TAuthorizationException(other.authError); } if (other.isSetNotFound()) { this.notFound = new TNotFoundException(other.notFound); } if (other.isSetServerError()) { this.serverError = new TInvocationException(other.serverError); } } @Override public setImageVersionVirtConfig_result deepCopy() { return new setImageVersionVirtConfig_result(this); } @Override public void clear() { this.authError = null; this.notFound = null; this.serverError = null; } @org.apache.thrift.annotation.Nullable public TAuthorizationException getAuthError() { return this.authError; } public setImageVersionVirtConfig_result setAuthError(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TNotFoundException getNotFound() { return this.notFound; } public setImageVersionVirtConfig_result setNotFound(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TInvocationException getServerError() { return this.serverError; } public setImageVersionVirtConfig_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) { this.serverError = serverError; return this; } public void unsetServerError() { this.serverError = null; } /** Returns true if field serverError is set (has been assigned a value) and false otherwise */ public boolean isSetServerError() { return this.serverError != null; } public void setServerErrorIsSet(boolean value) { if (!value) { this.serverError = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case AUTH_ERROR: if (value == null) { unsetAuthError(); } else { setAuthError((TAuthorizationException)value); } break; case NOT_FOUND: if (value == null) { unsetNotFound(); } else { setNotFound((TNotFoundException)value); } break; case SERVER_ERROR: if (value == null) { unsetServerError(); } else { setServerError((TInvocationException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case AUTH_ERROR: return getAuthError(); case NOT_FOUND: return getNotFound(); case SERVER_ERROR: return getServerError(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case AUTH_ERROR: return isSetAuthError(); case NOT_FOUND: return isSetNotFound(); case SERVER_ERROR: return isSetServerError(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof setImageVersionVirtConfig_result) return this.equals((setImageVersionVirtConfig_result)that); return false; } public boolean equals(setImageVersionVirtConfig_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_authError = true && this.isSetAuthError(); boolean that_present_authError = true && that.isSetAuthError(); if (this_present_authError || that_present_authError) { if (!(this_present_authError && that_present_authError)) return false; if (!this.authError.equals(that.authError)) return false; } boolean this_present_notFound = true && this.isSetNotFound(); boolean that_present_notFound = true && that.isSetNotFound(); if (this_present_notFound || that_present_notFound) { if (!(this_present_notFound && that_present_notFound)) return false; if (!this.notFound.equals(that.notFound)) return false; } boolean this_present_serverError = true && this.isSetServerError(); boolean that_present_serverError = true && that.isSetServerError(); if (this_present_serverError || that_present_serverError) { if (!(this_present_serverError && that_present_serverError)) return false; if (!this.serverError.equals(that.serverError)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287); if (isSetAuthError()) hashCode = hashCode * 8191 + authError.hashCode(); hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287); if (isSetNotFound()) hashCode = hashCode * 8191 + notFound.hashCode(); hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287); if (isSetServerError()) hashCode = hashCode * 8191 + serverError.hashCode(); return hashCode; } @Override public int compareTo(setImageVersionVirtConfig_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetAuthError(), 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 = java.lang.Boolean.compare(isSetNotFound(), other.isSetNotFound()); if (lastComparison != 0) { return lastComparison; } if (isSetNotFound()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError()); if (lastComparison != 0) { return lastComparison; } if (isSetServerError()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("setImageVersionVirtConfig_result("); boolean first = true; sb.append("authError:"); if (this.authError == null) { sb.append("null"); } else { sb.append(this.authError); } first = false; if (!first) sb.append(", "); sb.append("notFound:"); if (this.notFound == null) { sb.append("null"); } else { sb.append(this.notFound); } first = false; if (!first) sb.append(", "); sb.append("serverError:"); if (this.serverError == null) { sb.append("null"); } else { sb.append(this.serverError); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class setImageVersionVirtConfig_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public setImageVersionVirtConfig_resultStandardScheme getScheme() { return new setImageVersionVirtConfig_resultStandardScheme(); } } private static class setImageVersionVirtConfig_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, setImageVersionVirtConfig_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // AUTH_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // NOT_FOUND if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // SERVER_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, setImageVersionVirtConfig_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.authError != null) { oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); struct.authError.write(oprot); oprot.writeFieldEnd(); } if (struct.notFound != null) { oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC); struct.notFound.write(oprot); oprot.writeFieldEnd(); } if (struct.serverError != null) { oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC); struct.serverError.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class setImageVersionVirtConfig_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public setImageVersionVirtConfig_resultTupleScheme getScheme() { return new setImageVersionVirtConfig_resultTupleScheme(); } } private static class setImageVersionVirtConfig_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, setImageVersionVirtConfig_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetAuthError()) { optionals.set(0); } if (struct.isSetNotFound()) { optionals.set(1); } if (struct.isSetServerError()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetAuthError()) { struct.authError.write(oprot); } if (struct.isSetNotFound()) { struct.notFound.write(oprot); } if (struct.isSetServerError()) { struct.serverError.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, setImageVersionVirtConfig_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } if (incoming.get(1)) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } if (incoming.get(2)) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class requestImageReplication_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("requestImageReplication_args"); private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField IMAGE_VERSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageVersionId", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new requestImageReplication_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new requestImageReplication_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required public @org.apache.thrift.annotation.Nullable java.lang.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 java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestImageReplication_args.class, metaDataMap); } public requestImageReplication_args() { } public requestImageReplication_args( java.lang.String userToken, java.lang.String imageVersionId) { this(); this.userToken = userToken; this.imageVersionId = imageVersionId; } /** * Performs a deep copy on other. */ public requestImageReplication_args(requestImageReplication_args other) { if (other.isSetUserToken()) { this.userToken = other.userToken; } if (other.isSetImageVersionId()) { this.imageVersionId = other.imageVersionId; } } @Override public requestImageReplication_args deepCopy() { return new requestImageReplication_args(this); } @Override public void clear() { this.userToken = null; this.imageVersionId = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getUserToken() { return this.userToken; } public requestImageReplication_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.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; } } @org.apache.thrift.annotation.Nullable public java.lang.String getImageVersionId() { return this.imageVersionId; } public requestImageReplication_args setImageVersionId(@org.apache.thrift.annotation.Nullable java.lang.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; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case USER_TOKEN: if (value == null) { unsetUserToken(); } else { setUserToken((java.lang.String)value); } break; case IMAGE_VERSION_ID: if (value == null) { unsetImageVersionId(); } else { setImageVersionId((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case USER_TOKEN: return getUserToken(); case IMAGE_VERSION_ID: return getImageVersionId(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case USER_TOKEN: return isSetUserToken(); case IMAGE_VERSION_ID: return isSetImageVersionId(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof requestImageReplication_args) return this.equals((requestImageReplication_args)that); return false; } public boolean equals(requestImageReplication_args that) { if (that == null) return false; if (this == that) return true; 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() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287); if (isSetUserToken()) hashCode = hashCode * 8191 + userToken.hashCode(); hashCode = hashCode * 8191 + ((isSetImageVersionId()) ? 131071 : 524287); if (isSetImageVersionId()) hashCode = hashCode * 8191 + imageVersionId.hashCode(); return hashCode; } @Override public int compareTo(requestImageReplication_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetUserToken(), 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 = java.lang.Boolean.compare(isSetImageVersionId(), 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; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("requestImageReplication_args("); boolean first = true; sb.append("userToken:"); if (this.userToken == null) { sb.append("null"); } else { sb.append(this.userToken); } first = false; if (!first) sb.append(", "); sb.append("imageVersionId:"); if (this.imageVersionId == null) { sb.append("null"); } else { sb.append(this.imageVersionId); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class requestImageReplication_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public requestImageReplication_argsStandardScheme getScheme() { return new requestImageReplication_argsStandardScheme(); } } private static class requestImageReplication_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, requestImageReplication_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // USER_TOKEN if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // IMAGE_VERSION_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.imageVersionId = iprot.readString(); struct.setImageVersionIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, requestImageReplication_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.userToken != null) { oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC); oprot.writeString(struct.userToken); oprot.writeFieldEnd(); } if (struct.imageVersionId != null) { oprot.writeFieldBegin(IMAGE_VERSION_ID_FIELD_DESC); oprot.writeString(struct.imageVersionId); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class requestImageReplication_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public requestImageReplication_argsTupleScheme getScheme() { return new requestImageReplication_argsTupleScheme(); } } private static class requestImageReplication_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, requestImageReplication_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetUserToken()) { optionals.set(0); } if (struct.isSetImageVersionId()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetUserToken()) { oprot.writeString(struct.userToken); } if (struct.isSetImageVersionId()) { oprot.writeString(struct.imageVersionId); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, requestImageReplication_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.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); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class requestImageReplication_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("requestImageReplication_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new requestImageReplication_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new requestImageReplication_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String success; // required public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), AUTH_ERROR((short)1, "authError"), NOT_FOUND((short)2, "notFound"), SERVER_ERROR((short)3, "serverError"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // AUTH_ERROR return AUTH_ERROR; case 2: // NOT_FOUND return NOT_FOUND; case 3: // SERVER_ERROR return SERVER_ERROR; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class))); tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class))); tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestImageReplication_result.class, metaDataMap); } public requestImageReplication_result() { } public requestImageReplication_result( java.lang.String success, TAuthorizationException authError, TNotFoundException notFound, TInvocationException serverError) { this(); this.success = success; this.authError = authError; this.notFound = notFound; this.serverError = serverError; } /** * Performs a deep copy on other. */ public requestImageReplication_result(requestImageReplication_result other) { if (other.isSetSuccess()) { this.success = other.success; } if (other.isSetAuthError()) { this.authError = new TAuthorizationException(other.authError); } if (other.isSetNotFound()) { this.notFound = new TNotFoundException(other.notFound); } if (other.isSetServerError()) { this.serverError = new TInvocationException(other.serverError); } } @Override public requestImageReplication_result deepCopy() { return new requestImageReplication_result(this); } @Override public void clear() { this.success = null; this.authError = null; this.notFound = null; this.serverError = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSuccess() { return this.success; } public requestImageReplication_result setSuccess(@org.apache.thrift.annotation.Nullable java.lang.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; } } @org.apache.thrift.annotation.Nullable public TAuthorizationException getAuthError() { return this.authError; } public requestImageReplication_result setAuthError(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TNotFoundException getNotFound() { return this.notFound; } public requestImageReplication_result setNotFound(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TInvocationException getServerError() { return this.serverError; } public requestImageReplication_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) { this.serverError = serverError; return this; } public void unsetServerError() { this.serverError = null; } /** Returns true if field serverError is set (has been assigned a value) and false otherwise */ public boolean isSetServerError() { return this.serverError != null; } public void setServerErrorIsSet(boolean value) { if (!value) { this.serverError = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.lang.String)value); } break; case AUTH_ERROR: if (value == null) { unsetAuthError(); } else { setAuthError((TAuthorizationException)value); } break; case NOT_FOUND: if (value == null) { unsetNotFound(); } else { setNotFound((TNotFoundException)value); } break; case SERVER_ERROR: if (value == null) { unsetServerError(); } else { setServerError((TInvocationException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case AUTH_ERROR: return getAuthError(); case NOT_FOUND: return getNotFound(); case SERVER_ERROR: return getServerError(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case AUTH_ERROR: return isSetAuthError(); case NOT_FOUND: return isSetNotFound(); case SERVER_ERROR: return isSetServerError(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof requestImageReplication_result) return this.equals((requestImageReplication_result)that); return false; } public boolean equals(requestImageReplication_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_authError = true && this.isSetAuthError(); boolean that_present_authError = true && that.isSetAuthError(); if (this_present_authError || that_present_authError) { if (!(this_present_authError && that_present_authError)) return false; if (!this.authError.equals(that.authError)) return false; } boolean this_present_notFound = true && this.isSetNotFound(); boolean that_present_notFound = true && that.isSetNotFound(); if (this_present_notFound || that_present_notFound) { if (!(this_present_notFound && that_present_notFound)) return false; if (!this.notFound.equals(that.notFound)) return false; } boolean this_present_serverError = true && this.isSetServerError(); boolean that_present_serverError = true && that.isSetServerError(); if (this_present_serverError || that_present_serverError) { if (!(this_present_serverError && that_present_serverError)) return false; if (!this.serverError.equals(that.serverError)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287); if (isSetAuthError()) hashCode = hashCode * 8191 + authError.hashCode(); hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287); if (isSetNotFound()) hashCode = hashCode * 8191 + notFound.hashCode(); hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287); if (isSetServerError()) hashCode = hashCode * 8191 + serverError.hashCode(); return hashCode; } @Override public int compareTo(requestImageReplication_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), 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 = java.lang.Boolean.compare(isSetAuthError(), 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 = java.lang.Boolean.compare(isSetNotFound(), other.isSetNotFound()); if (lastComparison != 0) { return lastComparison; } if (isSetNotFound()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError()); if (lastComparison != 0) { return lastComparison; } if (isSetServerError()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("requestImageReplication_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("authError:"); if (this.authError == null) { sb.append("null"); } else { sb.append(this.authError); } first = false; if (!first) sb.append(", "); sb.append("notFound:"); if (this.notFound == null) { sb.append("null"); } else { sb.append(this.notFound); } first = false; if (!first) sb.append(", "); sb.append("serverError:"); if (this.serverError == null) { sb.append("null"); } else { sb.append(this.serverError); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class requestImageReplication_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public requestImageReplication_resultStandardScheme getScheme() { return new requestImageReplication_resultStandardScheme(); } } private static class requestImageReplication_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, requestImageReplication_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // AUTH_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // NOT_FOUND if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // SERVER_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, requestImageReplication_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeString(struct.success); oprot.writeFieldEnd(); } if (struct.authError != null) { oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); struct.authError.write(oprot); oprot.writeFieldEnd(); } if (struct.notFound != null) { oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC); struct.notFound.write(oprot); oprot.writeFieldEnd(); } if (struct.serverError != null) { oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC); struct.serverError.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class requestImageReplication_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public requestImageReplication_resultTupleScheme getScheme() { return new requestImageReplication_resultTupleScheme(); } } private static class requestImageReplication_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, requestImageReplication_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetAuthError()) { optionals.set(1); } if (struct.isSetNotFound()) { optionals.set(2); } if (struct.isSetServerError()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetSuccess()) { oprot.writeString(struct.success); } if (struct.isSetAuthError()) { struct.authError.write(oprot); } if (struct.isSetNotFound()) { struct.notFound.write(oprot); } if (struct.isSetServerError()) { struct.serverError.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, requestImageReplication_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } if (incoming.get(2)) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } if (incoming.get(3)) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class publishImageVersion_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("publishImageVersion_args"); private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField IMAGE_VERSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageVersionId", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new publishImageVersion_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new publishImageVersion_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required public @org.apache.thrift.annotation.Nullable java.lang.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 java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(publishImageVersion_args.class, metaDataMap); } public publishImageVersion_args() { } public publishImageVersion_args( java.lang.String userToken, java.lang.String imageVersionId) { this(); this.userToken = userToken; this.imageVersionId = imageVersionId; } /** * Performs a deep copy on other. */ public publishImageVersion_args(publishImageVersion_args other) { if (other.isSetUserToken()) { this.userToken = other.userToken; } if (other.isSetImageVersionId()) { this.imageVersionId = other.imageVersionId; } } @Override public publishImageVersion_args deepCopy() { return new publishImageVersion_args(this); } @Override public void clear() { this.userToken = null; this.imageVersionId = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getUserToken() { return this.userToken; } public publishImageVersion_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.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; } } @org.apache.thrift.annotation.Nullable public java.lang.String getImageVersionId() { return this.imageVersionId; } public publishImageVersion_args setImageVersionId(@org.apache.thrift.annotation.Nullable java.lang.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; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case USER_TOKEN: if (value == null) { unsetUserToken(); } else { setUserToken((java.lang.String)value); } break; case IMAGE_VERSION_ID: if (value == null) { unsetImageVersionId(); } else { setImageVersionId((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case USER_TOKEN: return getUserToken(); case IMAGE_VERSION_ID: return getImageVersionId(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case USER_TOKEN: return isSetUserToken(); case IMAGE_VERSION_ID: return isSetImageVersionId(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof publishImageVersion_args) return this.equals((publishImageVersion_args)that); return false; } public boolean equals(publishImageVersion_args that) { if (that == null) return false; if (this == that) return true; 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() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287); if (isSetUserToken()) hashCode = hashCode * 8191 + userToken.hashCode(); hashCode = hashCode * 8191 + ((isSetImageVersionId()) ? 131071 : 524287); if (isSetImageVersionId()) hashCode = hashCode * 8191 + imageVersionId.hashCode(); return hashCode; } @Override public int compareTo(publishImageVersion_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetUserToken(), 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 = java.lang.Boolean.compare(isSetImageVersionId(), 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; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("publishImageVersion_args("); boolean first = true; sb.append("userToken:"); if (this.userToken == null) { sb.append("null"); } else { sb.append(this.userToken); } first = false; if (!first) sb.append(", "); sb.append("imageVersionId:"); if (this.imageVersionId == null) { sb.append("null"); } else { sb.append(this.imageVersionId); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class publishImageVersion_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public publishImageVersion_argsStandardScheme getScheme() { return new publishImageVersion_argsStandardScheme(); } } private static class publishImageVersion_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, publishImageVersion_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // USER_TOKEN if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // IMAGE_VERSION_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.imageVersionId = iprot.readString(); struct.setImageVersionIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, publishImageVersion_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.userToken != null) { oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC); oprot.writeString(struct.userToken); oprot.writeFieldEnd(); } if (struct.imageVersionId != null) { oprot.writeFieldBegin(IMAGE_VERSION_ID_FIELD_DESC); oprot.writeString(struct.imageVersionId); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class publishImageVersion_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public publishImageVersion_argsTupleScheme getScheme() { return new publishImageVersion_argsTupleScheme(); } } private static class publishImageVersion_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, publishImageVersion_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetUserToken()) { optionals.set(0); } if (struct.isSetImageVersionId()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetUserToken()) { oprot.writeString(struct.userToken); } if (struct.isSetImageVersionId()) { oprot.writeString(struct.imageVersionId); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, publishImageVersion_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.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); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class publishImageVersion_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("publishImageVersion_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField TRE_FIELD_DESC = new org.apache.thrift.protocol.TField("tre", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new publishImageVersion_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new publishImageVersion_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String success; // required public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // required public @org.apache.thrift.annotation.Nullable TTransferRejectedException tre; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), AUTH_ERROR((short)1, "authError"), NOT_FOUND((short)2, "notFound"), SERVER_ERROR((short)3, "serverError"), TRE((short)4, "tre"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // AUTH_ERROR return AUTH_ERROR; case 2: // NOT_FOUND return NOT_FOUND; case 3: // SERVER_ERROR return SERVER_ERROR; case 4: // TRE return TRE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class))); tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class))); tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class))); tmpMap.put(_Fields.TRE, new org.apache.thrift.meta_data.FieldMetaData("tre", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTransferRejectedException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(publishImageVersion_result.class, metaDataMap); } public publishImageVersion_result() { } public publishImageVersion_result( java.lang.String success, TAuthorizationException authError, TNotFoundException notFound, TInvocationException serverError, TTransferRejectedException tre) { this(); this.success = success; this.authError = authError; this.notFound = notFound; this.serverError = serverError; this.tre = tre; } /** * Performs a deep copy on other. */ public publishImageVersion_result(publishImageVersion_result other) { if (other.isSetSuccess()) { this.success = other.success; } if (other.isSetAuthError()) { this.authError = new TAuthorizationException(other.authError); } if (other.isSetNotFound()) { this.notFound = new TNotFoundException(other.notFound); } if (other.isSetServerError()) { this.serverError = new TInvocationException(other.serverError); } if (other.isSetTre()) { this.tre = new TTransferRejectedException(other.tre); } } @Override public publishImageVersion_result deepCopy() { return new publishImageVersion_result(this); } @Override public void clear() { this.success = null; this.authError = null; this.notFound = null; this.serverError = null; this.tre = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSuccess() { return this.success; } public publishImageVersion_result setSuccess(@org.apache.thrift.annotation.Nullable java.lang.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; } } @org.apache.thrift.annotation.Nullable public TAuthorizationException getAuthError() { return this.authError; } public publishImageVersion_result setAuthError(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TNotFoundException getNotFound() { return this.notFound; } public publishImageVersion_result setNotFound(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TInvocationException getServerError() { return this.serverError; } public publishImageVersion_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) { this.serverError = serverError; return this; } public void unsetServerError() { this.serverError = null; } /** Returns true if field serverError is set (has been assigned a value) and false otherwise */ public boolean isSetServerError() { return this.serverError != null; } public void setServerErrorIsSet(boolean value) { if (!value) { this.serverError = null; } } @org.apache.thrift.annotation.Nullable public TTransferRejectedException getTre() { return this.tre; } public publishImageVersion_result setTre(@org.apache.thrift.annotation.Nullable TTransferRejectedException tre) { this.tre = tre; return this; } public void unsetTre() { this.tre = null; } /** Returns true if field tre is set (has been assigned a value) and false otherwise */ public boolean isSetTre() { return this.tre != null; } public void setTreIsSet(boolean value) { if (!value) { this.tre = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.lang.String)value); } break; case AUTH_ERROR: if (value == null) { unsetAuthError(); } else { setAuthError((TAuthorizationException)value); } break; case NOT_FOUND: if (value == null) { unsetNotFound(); } else { setNotFound((TNotFoundException)value); } break; case SERVER_ERROR: if (value == null) { unsetServerError(); } else { setServerError((TInvocationException)value); } break; case TRE: if (value == null) { unsetTre(); } else { setTre((TTransferRejectedException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case AUTH_ERROR: return getAuthError(); case NOT_FOUND: return getNotFound(); case SERVER_ERROR: return getServerError(); case TRE: return getTre(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case AUTH_ERROR: return isSetAuthError(); case NOT_FOUND: return isSetNotFound(); case SERVER_ERROR: return isSetServerError(); case TRE: return isSetTre(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof publishImageVersion_result) return this.equals((publishImageVersion_result)that); return false; } public boolean equals(publishImageVersion_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_authError = true && this.isSetAuthError(); boolean that_present_authError = true && that.isSetAuthError(); if (this_present_authError || that_present_authError) { if (!(this_present_authError && that_present_authError)) return false; if (!this.authError.equals(that.authError)) return false; } boolean this_present_notFound = true && this.isSetNotFound(); boolean that_present_notFound = true && that.isSetNotFound(); if (this_present_notFound || that_present_notFound) { if (!(this_present_notFound && that_present_notFound)) return false; if (!this.notFound.equals(that.notFound)) return false; } boolean this_present_serverError = true && this.isSetServerError(); boolean that_present_serverError = true && that.isSetServerError(); if (this_present_serverError || that_present_serverError) { if (!(this_present_serverError && that_present_serverError)) return false; if (!this.serverError.equals(that.serverError)) return false; } boolean this_present_tre = true && this.isSetTre(); boolean that_present_tre = true && that.isSetTre(); if (this_present_tre || that_present_tre) { if (!(this_present_tre && that_present_tre)) return false; if (!this.tre.equals(that.tre)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287); if (isSetAuthError()) hashCode = hashCode * 8191 + authError.hashCode(); hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287); if (isSetNotFound()) hashCode = hashCode * 8191 + notFound.hashCode(); hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287); if (isSetServerError()) hashCode = hashCode * 8191 + serverError.hashCode(); hashCode = hashCode * 8191 + ((isSetTre()) ? 131071 : 524287); if (isSetTre()) hashCode = hashCode * 8191 + tre.hashCode(); return hashCode; } @Override public int compareTo(publishImageVersion_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), 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 = java.lang.Boolean.compare(isSetAuthError(), 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 = java.lang.Boolean.compare(isSetNotFound(), other.isSetNotFound()); if (lastComparison != 0) { return lastComparison; } if (isSetNotFound()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError()); if (lastComparison != 0) { return lastComparison; } if (isSetServerError()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetTre(), other.isSetTre()); if (lastComparison != 0) { return lastComparison; } if (isSetTre()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tre, other.tre); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("publishImageVersion_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("authError:"); if (this.authError == null) { sb.append("null"); } else { sb.append(this.authError); } first = false; if (!first) sb.append(", "); sb.append("notFound:"); if (this.notFound == null) { sb.append("null"); } else { sb.append(this.notFound); } first = false; if (!first) sb.append(", "); sb.append("serverError:"); if (this.serverError == null) { sb.append("null"); } else { sb.append(this.serverError); } first = false; if (!first) sb.append(", "); sb.append("tre:"); if (this.tre == null) { sb.append("null"); } else { sb.append(this.tre); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class publishImageVersion_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public publishImageVersion_resultStandardScheme getScheme() { return new publishImageVersion_resultStandardScheme(); } } private static class publishImageVersion_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, publishImageVersion_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // AUTH_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // NOT_FOUND if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // SERVER_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // TRE if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.tre = new TTransferRejectedException(); struct.tre.read(iprot); struct.setTreIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, publishImageVersion_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeString(struct.success); oprot.writeFieldEnd(); } if (struct.authError != null) { oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); struct.authError.write(oprot); oprot.writeFieldEnd(); } if (struct.notFound != null) { oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC); struct.notFound.write(oprot); oprot.writeFieldEnd(); } if (struct.serverError != null) { oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC); struct.serverError.write(oprot); oprot.writeFieldEnd(); } if (struct.tre != null) { oprot.writeFieldBegin(TRE_FIELD_DESC); struct.tre.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class publishImageVersion_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public publishImageVersion_resultTupleScheme getScheme() { return new publishImageVersion_resultTupleScheme(); } } private static class publishImageVersion_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, publishImageVersion_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetAuthError()) { optionals.set(1); } if (struct.isSetNotFound()) { optionals.set(2); } if (struct.isSetServerError()) { optionals.set(3); } if (struct.isSetTre()) { optionals.set(4); } oprot.writeBitSet(optionals, 5); if (struct.isSetSuccess()) { oprot.writeString(struct.success); } if (struct.isSetAuthError()) { struct.authError.write(oprot); } if (struct.isSetNotFound()) { struct.notFound.write(oprot); } if (struct.isSetServerError()) { struct.serverError.write(oprot); } if (struct.isSetTre()) { struct.tre.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, publishImageVersion_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(5); if (incoming.get(0)) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } if (incoming.get(2)) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } if (incoming.get(3)) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } if (incoming.get(4)) { struct.tre = new TTransferRejectedException(); struct.tre.read(iprot); struct.setTreIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createLecture_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createLecture_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required public @org.apache.thrift.annotation.Nullable 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 java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createLecture_args.class, metaDataMap); } public createLecture_args() { } public createLecture_args( java.lang.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); } } @Override public createLecture_args deepCopy() { return new createLecture_args(this); } @Override public void clear() { this.userToken = null; this.lecture = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getUserToken() { return this.userToken; } public createLecture_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.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; } } @org.apache.thrift.annotation.Nullable public LectureWrite getLecture() { return this.lecture; } public createLecture_args setLecture(@org.apache.thrift.annotation.Nullable 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; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case USER_TOKEN: if (value == null) { unsetUserToken(); } else { setUserToken((java.lang.String)value); } break; case LECTURE: if (value == null) { unsetLecture(); } else { setLecture((LectureWrite)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case USER_TOKEN: return getUserToken(); case LECTURE: return getLecture(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case USER_TOKEN: return isSetUserToken(); case LECTURE: return isSetLecture(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof createLecture_args) return this.equals((createLecture_args)that); return false; } public boolean equals(createLecture_args that) { if (that == null) return false; if (this == that) return true; 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() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287); if (isSetUserToken()) hashCode = hashCode * 8191 + userToken.hashCode(); hashCode = hashCode * 8191 + ((isSetLecture()) ? 131071 : 524287); if (isSetLecture()) hashCode = hashCode * 8191 + lecture.hashCode(); return hashCode; } @Override public int compareTo(createLecture_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetUserToken(), 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 = java.lang.Boolean.compare(isSetLecture(), 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; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory { @Override public createLecture_argsStandardScheme getScheme() { return new createLecture_argsStandardScheme(); } } private static class createLecture_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override 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(); } @Override 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 org.apache.thrift.scheme.SchemeFactory { @Override public createLecture_argsTupleScheme getScheme() { return new createLecture_argsTupleScheme(); } } private static class createLecture_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, createLecture_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.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 { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.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); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField DATE_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("dateError", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createLecture_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createLecture_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String success; // required public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // required public @org.apache.thrift.annotation.Nullable TInvalidDateParam dateError; // required public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), AUTH_ERROR((short)1, "authError"), SERVER_ERROR((short)2, "serverError"), DATE_ERROR((short)3, "dateError"), NOT_FOUND((short)4, "notFound"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // AUTH_ERROR return AUTH_ERROR; case 2: // SERVER_ERROR return SERVER_ERROR; case 3: // DATE_ERROR return DATE_ERROR; case 4: // NOT_FOUND return NOT_FOUND; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class))); tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class))); tmpMap.put(_Fields.DATE_ERROR, new org.apache.thrift.meta_data.FieldMetaData("dateError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvalidDateParam.class))); tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createLecture_result.class, metaDataMap); } public createLecture_result() { } public createLecture_result( java.lang.String success, TAuthorizationException authError, TInvocationException serverError, TInvalidDateParam dateError, TNotFoundException notFound) { this(); this.success = success; this.authError = authError; this.serverError = serverError; this.dateError = dateError; this.notFound = notFound; } /** * Performs a deep copy on other. */ public createLecture_result(createLecture_result other) { if (other.isSetSuccess()) { this.success = other.success; } if (other.isSetAuthError()) { this.authError = new TAuthorizationException(other.authError); } if (other.isSetServerError()) { this.serverError = new TInvocationException(other.serverError); } if (other.isSetDateError()) { this.dateError = new TInvalidDateParam(other.dateError); } if (other.isSetNotFound()) { this.notFound = new TNotFoundException(other.notFound); } } @Override public createLecture_result deepCopy() { return new createLecture_result(this); } @Override public void clear() { this.success = null; this.authError = null; this.serverError = null; this.dateError = null; this.notFound = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSuccess() { return this.success; } public createLecture_result setSuccess(@org.apache.thrift.annotation.Nullable java.lang.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; } } @org.apache.thrift.annotation.Nullable public TAuthorizationException getAuthError() { return this.authError; } public createLecture_result setAuthError(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TInvocationException getServerError() { return this.serverError; } public createLecture_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) { this.serverError = serverError; return this; } public void unsetServerError() { this.serverError = null; } /** Returns true if field serverError is set (has been assigned a value) and false otherwise */ public boolean isSetServerError() { return this.serverError != null; } public void setServerErrorIsSet(boolean value) { if (!value) { this.serverError = null; } } @org.apache.thrift.annotation.Nullable public TInvalidDateParam getDateError() { return this.dateError; } public createLecture_result setDateError(@org.apache.thrift.annotation.Nullable TInvalidDateParam dateError) { this.dateError = dateError; return this; } public void unsetDateError() { this.dateError = null; } /** Returns true if field dateError is set (has been assigned a value) and false otherwise */ public boolean isSetDateError() { return this.dateError != null; } public void setDateErrorIsSet(boolean value) { if (!value) { this.dateError = null; } } @org.apache.thrift.annotation.Nullable public TNotFoundException getNotFound() { return this.notFound; } public createLecture_result setNotFound(@org.apache.thrift.annotation.Nullable 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; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.lang.String)value); } break; case AUTH_ERROR: if (value == null) { unsetAuthError(); } else { setAuthError((TAuthorizationException)value); } break; case SERVER_ERROR: if (value == null) { unsetServerError(); } else { setServerError((TInvocationException)value); } break; case DATE_ERROR: if (value == null) { unsetDateError(); } else { setDateError((TInvalidDateParam)value); } break; case NOT_FOUND: if (value == null) { unsetNotFound(); } else { setNotFound((TNotFoundException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case AUTH_ERROR: return getAuthError(); case SERVER_ERROR: return getServerError(); case DATE_ERROR: return getDateError(); case NOT_FOUND: return getNotFound(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case AUTH_ERROR: return isSetAuthError(); case SERVER_ERROR: return isSetServerError(); case DATE_ERROR: return isSetDateError(); case NOT_FOUND: return isSetNotFound(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof createLecture_result) return this.equals((createLecture_result)that); return false; } public boolean equals(createLecture_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_authError = true && this.isSetAuthError(); boolean that_present_authError = true && that.isSetAuthError(); if (this_present_authError || that_present_authError) { if (!(this_present_authError && that_present_authError)) return false; if (!this.authError.equals(that.authError)) return false; } boolean this_present_serverError = true && this.isSetServerError(); boolean that_present_serverError = true && that.isSetServerError(); if (this_present_serverError || that_present_serverError) { if (!(this_present_serverError && that_present_serverError)) return false; if (!this.serverError.equals(that.serverError)) return false; } boolean this_present_dateError = true && this.isSetDateError(); boolean that_present_dateError = true && that.isSetDateError(); if (this_present_dateError || that_present_dateError) { if (!(this_present_dateError && that_present_dateError)) return false; if (!this.dateError.equals(that.dateError)) return false; } boolean this_present_notFound = true && this.isSetNotFound(); boolean that_present_notFound = true && that.isSetNotFound(); if (this_present_notFound || that_present_notFound) { if (!(this_present_notFound && that_present_notFound)) return false; if (!this.notFound.equals(that.notFound)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287); if (isSetAuthError()) hashCode = hashCode * 8191 + authError.hashCode(); hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287); if (isSetServerError()) hashCode = hashCode * 8191 + serverError.hashCode(); hashCode = hashCode * 8191 + ((isSetDateError()) ? 131071 : 524287); if (isSetDateError()) hashCode = hashCode * 8191 + dateError.hashCode(); hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287); if (isSetNotFound()) hashCode = hashCode * 8191 + notFound.hashCode(); return hashCode; } @Override public int compareTo(createLecture_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), 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 = java.lang.Boolean.compare(isSetAuthError(), 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 = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError()); if (lastComparison != 0) { return lastComparison; } if (isSetServerError()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetDateError(), other.isSetDateError()); if (lastComparison != 0) { return lastComparison; } if (isSetDateError()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dateError, other.dateError); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetNotFound(), 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; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("createLecture_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("authError:"); if (this.authError == null) { sb.append("null"); } else { sb.append(this.authError); } first = false; if (!first) sb.append(", "); sb.append("serverError:"); if (this.serverError == null) { sb.append("null"); } else { sb.append(this.serverError); } first = false; if (!first) sb.append(", "); sb.append("dateError:"); if (this.dateError == null) { sb.append("null"); } else { sb.append(this.dateError); } first = false; if (!first) sb.append(", "); sb.append("notFound:"); if (this.notFound == null) { sb.append("null"); } else { sb.append(this.notFound); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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 org.apache.thrift.scheme.SchemeFactory { @Override public createLecture_resultStandardScheme getScheme() { return new createLecture_resultStandardScheme(); } } private static class createLecture_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, createLecture_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // AUTH_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // SERVER_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // DATE_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.dateError = new TInvalidDateParam(); struct.dateError.read(iprot); struct.setDateErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // NOT_FOUND if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, createLecture_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeString(struct.success); oprot.writeFieldEnd(); } if (struct.authError != null) { oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); struct.authError.write(oprot); oprot.writeFieldEnd(); } if (struct.serverError != null) { oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC); struct.serverError.write(oprot); oprot.writeFieldEnd(); } if (struct.dateError != null) { oprot.writeFieldBegin(DATE_ERROR_FIELD_DESC); struct.dateError.write(oprot); oprot.writeFieldEnd(); } if (struct.notFound != null) { oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC); struct.notFound.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class createLecture_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public createLecture_resultTupleScheme getScheme() { return new createLecture_resultTupleScheme(); } } private static class createLecture_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, createLecture_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetAuthError()) { optionals.set(1); } if (struct.isSetServerError()) { optionals.set(2); } if (struct.isSetDateError()) { optionals.set(3); } if (struct.isSetNotFound()) { optionals.set(4); } oprot.writeBitSet(optionals, 5); if (struct.isSetSuccess()) { oprot.writeString(struct.success); } if (struct.isSetAuthError()) { struct.authError.write(oprot); } if (struct.isSetServerError()) { struct.serverError.write(oprot); } if (struct.isSetDateError()) { struct.dateError.write(oprot); } if (struct.isSetNotFound()) { struct.notFound.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, createLecture_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(5); if (incoming.get(0)) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } if (incoming.get(2)) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } if (incoming.get(3)) { struct.dateError = new TInvalidDateParam(); struct.dateError.read(iprot); struct.setDateErrorIsSet(true); } if (incoming.get(4)) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new updateLecture_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new updateLecture_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required public @org.apache.thrift.annotation.Nullable java.lang.String lectureId; // required public @org.apache.thrift.annotation.Nullable 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 java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateLecture_args.class, metaDataMap); } public updateLecture_args() { } public updateLecture_args( java.lang.String userToken, java.lang.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); } } @Override public updateLecture_args deepCopy() { return new updateLecture_args(this); } @Override public void clear() { this.userToken = null; this.lectureId = null; this.lecture = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getUserToken() { return this.userToken; } public updateLecture_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.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; } } @org.apache.thrift.annotation.Nullable public java.lang.String getLectureId() { return this.lectureId; } public updateLecture_args setLectureId(@org.apache.thrift.annotation.Nullable java.lang.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; } } @org.apache.thrift.annotation.Nullable public LectureWrite getLecture() { return this.lecture; } public updateLecture_args setLecture(@org.apache.thrift.annotation.Nullable 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; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case USER_TOKEN: if (value == null) { unsetUserToken(); } else { setUserToken((java.lang.String)value); } break; case LECTURE_ID: if (value == null) { unsetLectureId(); } else { setLectureId((java.lang.String)value); } break; case LECTURE: if (value == null) { unsetLecture(); } else { setLecture((LectureWrite)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case USER_TOKEN: return getUserToken(); case LECTURE_ID: return getLectureId(); case LECTURE: return getLecture(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case USER_TOKEN: return isSetUserToken(); case LECTURE_ID: return isSetLectureId(); case LECTURE: return isSetLecture(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof updateLecture_args) return this.equals((updateLecture_args)that); return false; } public boolean equals(updateLecture_args that) { if (that == null) return false; if (this == that) return true; 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() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287); if (isSetUserToken()) hashCode = hashCode * 8191 + userToken.hashCode(); hashCode = hashCode * 8191 + ((isSetLectureId()) ? 131071 : 524287); if (isSetLectureId()) hashCode = hashCode * 8191 + lectureId.hashCode(); hashCode = hashCode * 8191 + ((isSetLecture()) ? 131071 : 524287); if (isSetLecture()) hashCode = hashCode * 8191 + lecture.hashCode(); return hashCode; } @Override public int compareTo(updateLecture_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetUserToken(), 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 = java.lang.Boolean.compare(isSetLectureId(), 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 = java.lang.Boolean.compare(isSetLecture(), 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; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory { @Override public updateLecture_argsStandardScheme getScheme() { return new updateLecture_argsStandardScheme(); } } private static class updateLecture_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override 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(); } @Override 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 org.apache.thrift.scheme.SchemeFactory { @Override public updateLecture_argsTupleScheme getScheme() { return new updateLecture_argsTupleScheme(); } } private static class updateLecture_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, updateLecture_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.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 { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.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); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField DATE_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("dateError", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new updateLecture_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new updateLecture_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // required public @org.apache.thrift.annotation.Nullable TInvalidDateParam dateError; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { AUTH_ERROR((short)1, "authError"), NOT_FOUND((short)2, "notFound"), SERVER_ERROR((short)3, "serverError"), DATE_ERROR((short)4, "dateError"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // AUTH_ERROR return AUTH_ERROR; case 2: // NOT_FOUND return NOT_FOUND; case 3: // SERVER_ERROR return SERVER_ERROR; case 4: // DATE_ERROR return DATE_ERROR; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class))); tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class))); tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class))); tmpMap.put(_Fields.DATE_ERROR, new org.apache.thrift.meta_data.FieldMetaData("dateError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvalidDateParam.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateLecture_result.class, metaDataMap); } public updateLecture_result() { } public updateLecture_result( TAuthorizationException authError, TNotFoundException notFound, TInvocationException serverError, TInvalidDateParam dateError) { this(); this.authError = authError; this.notFound = notFound; this.serverError = serverError; this.dateError = dateError; } /** * Performs a deep copy on other. */ public updateLecture_result(updateLecture_result other) { if (other.isSetAuthError()) { this.authError = new TAuthorizationException(other.authError); } if (other.isSetNotFound()) { this.notFound = new TNotFoundException(other.notFound); } if (other.isSetServerError()) { this.serverError = new TInvocationException(other.serverError); } if (other.isSetDateError()) { this.dateError = new TInvalidDateParam(other.dateError); } } @Override public updateLecture_result deepCopy() { return new updateLecture_result(this); } @Override public void clear() { this.authError = null; this.notFound = null; this.serverError = null; this.dateError = null; } @org.apache.thrift.annotation.Nullable public TAuthorizationException getAuthError() { return this.authError; } public updateLecture_result setAuthError(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TNotFoundException getNotFound() { return this.notFound; } public updateLecture_result setNotFound(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TInvocationException getServerError() { return this.serverError; } public updateLecture_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) { this.serverError = serverError; return this; } public void unsetServerError() { this.serverError = null; } /** Returns true if field serverError is set (has been assigned a value) and false otherwise */ public boolean isSetServerError() { return this.serverError != null; } public void setServerErrorIsSet(boolean value) { if (!value) { this.serverError = null; } } @org.apache.thrift.annotation.Nullable public TInvalidDateParam getDateError() { return this.dateError; } public updateLecture_result setDateError(@org.apache.thrift.annotation.Nullable TInvalidDateParam dateError) { this.dateError = dateError; return this; } public void unsetDateError() { this.dateError = null; } /** Returns true if field dateError is set (has been assigned a value) and false otherwise */ public boolean isSetDateError() { return this.dateError != null; } public void setDateErrorIsSet(boolean value) { if (!value) { this.dateError = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case AUTH_ERROR: if (value == null) { unsetAuthError(); } else { setAuthError((TAuthorizationException)value); } break; case NOT_FOUND: if (value == null) { unsetNotFound(); } else { setNotFound((TNotFoundException)value); } break; case SERVER_ERROR: if (value == null) { unsetServerError(); } else { setServerError((TInvocationException)value); } break; case DATE_ERROR: if (value == null) { unsetDateError(); } else { setDateError((TInvalidDateParam)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case AUTH_ERROR: return getAuthError(); case NOT_FOUND: return getNotFound(); case SERVER_ERROR: return getServerError(); case DATE_ERROR: return getDateError(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case AUTH_ERROR: return isSetAuthError(); case NOT_FOUND: return isSetNotFound(); case SERVER_ERROR: return isSetServerError(); case DATE_ERROR: return isSetDateError(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof updateLecture_result) return this.equals((updateLecture_result)that); return false; } public boolean equals(updateLecture_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_authError = true && this.isSetAuthError(); boolean that_present_authError = true && that.isSetAuthError(); if (this_present_authError || that_present_authError) { if (!(this_present_authError && that_present_authError)) return false; if (!this.authError.equals(that.authError)) return false; } boolean this_present_notFound = true && this.isSetNotFound(); boolean that_present_notFound = true && that.isSetNotFound(); if (this_present_notFound || that_present_notFound) { if (!(this_present_notFound && that_present_notFound)) return false; if (!this.notFound.equals(that.notFound)) return false; } boolean this_present_serverError = true && this.isSetServerError(); boolean that_present_serverError = true && that.isSetServerError(); if (this_present_serverError || that_present_serverError) { if (!(this_present_serverError && that_present_serverError)) return false; if (!this.serverError.equals(that.serverError)) return false; } boolean this_present_dateError = true && this.isSetDateError(); boolean that_present_dateError = true && that.isSetDateError(); if (this_present_dateError || that_present_dateError) { if (!(this_present_dateError && that_present_dateError)) return false; if (!this.dateError.equals(that.dateError)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287); if (isSetAuthError()) hashCode = hashCode * 8191 + authError.hashCode(); hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287); if (isSetNotFound()) hashCode = hashCode * 8191 + notFound.hashCode(); hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287); if (isSetServerError()) hashCode = hashCode * 8191 + serverError.hashCode(); hashCode = hashCode * 8191 + ((isSetDateError()) ? 131071 : 524287); if (isSetDateError()) hashCode = hashCode * 8191 + dateError.hashCode(); return hashCode; } @Override public int compareTo(updateLecture_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetAuthError(), 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 = java.lang.Boolean.compare(isSetNotFound(), other.isSetNotFound()); if (lastComparison != 0) { return lastComparison; } if (isSetNotFound()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError()); if (lastComparison != 0) { return lastComparison; } if (isSetServerError()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetDateError(), other.isSetDateError()); if (lastComparison != 0) { return lastComparison; } if (isSetDateError()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dateError, other.dateError); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("updateLecture_result("); boolean first = true; sb.append("authError:"); if (this.authError == null) { sb.append("null"); } else { sb.append(this.authError); } first = false; if (!first) sb.append(", "); sb.append("notFound:"); if (this.notFound == null) { sb.append("null"); } else { sb.append(this.notFound); } first = false; if (!first) sb.append(", "); sb.append("serverError:"); if (this.serverError == null) { sb.append("null"); } else { sb.append(this.serverError); } first = false; if (!first) sb.append(", "); sb.append("dateError:"); if (this.dateError == null) { sb.append("null"); } else { sb.append(this.dateError); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class updateLecture_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public updateLecture_resultStandardScheme getScheme() { return new updateLecture_resultStandardScheme(); } } private static class updateLecture_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, updateLecture_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // AUTH_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // NOT_FOUND if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // SERVER_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // DATE_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.dateError = new TInvalidDateParam(); struct.dateError.read(iprot); struct.setDateErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, updateLecture_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.authError != null) { oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); struct.authError.write(oprot); oprot.writeFieldEnd(); } if (struct.notFound != null) { oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC); struct.notFound.write(oprot); oprot.writeFieldEnd(); } if (struct.serverError != null) { oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC); struct.serverError.write(oprot); oprot.writeFieldEnd(); } if (struct.dateError != null) { oprot.writeFieldBegin(DATE_ERROR_FIELD_DESC); struct.dateError.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class updateLecture_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public updateLecture_resultTupleScheme getScheme() { return new updateLecture_resultTupleScheme(); } } private static class updateLecture_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, updateLecture_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetAuthError()) { optionals.set(0); } if (struct.isSetNotFound()) { optionals.set(1); } if (struct.isSetServerError()) { optionals.set(2); } if (struct.isSetDateError()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetAuthError()) { struct.authError.write(oprot); } if (struct.isSetNotFound()) { struct.notFound.write(oprot); } if (struct.isSetServerError()) { struct.serverError.write(oprot); } if (struct.isSetDateError()) { struct.dateError.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, updateLecture_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } if (incoming.get(1)) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } if (incoming.get(2)) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } if (incoming.get(3)) { struct.dateError = new TInvalidDateParam(); struct.dateError.read(iprot); struct.setDateErrorIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 org.apache.thrift.protocol.TField PAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("page", org.apache.thrift.protocol.TType.I32, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getLectureList_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getLectureList_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required public int page; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { USER_TOKEN((short)1, "userToken"), PAGE((short)2, "page"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // USER_TOKEN return USER_TOKEN; case 2: // PAGE return PAGE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final int __PAGE_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); tmpMap.put(_Fields.PAGE, new org.apache.thrift.meta_data.FieldMetaData("page", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureList_args.class, metaDataMap); } public getLectureList_args() { } public getLectureList_args( java.lang.String userToken, int page) { this(); this.userToken = userToken; this.page = page; setPageIsSet(true); } /** * Performs a deep copy on other. */ public getLectureList_args(getLectureList_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetUserToken()) { this.userToken = other.userToken; } this.page = other.page; } @Override public getLectureList_args deepCopy() { return new getLectureList_args(this); } @Override public void clear() { this.userToken = null; setPageIsSet(false); this.page = 0; } @org.apache.thrift.annotation.Nullable public java.lang.String getUserToken() { return this.userToken; } public getLectureList_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.String userToken) { this.userToken = userToken; return this; } public void unsetUserToken() { this.userToken = null; } /** Returns true if field userToken is set (has been assigned a value) and false otherwise */ public boolean isSetUserToken() { return this.userToken != null; } public void setUserTokenIsSet(boolean value) { if (!value) { this.userToken = null; } } public int getPage() { return this.page; } public getLectureList_args setPage(int page) { this.page = page; setPageIsSet(true); return this; } public void unsetPage() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PAGE_ISSET_ID); } /** Returns true if field page is set (has been assigned a value) and false otherwise */ public boolean isSetPage() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PAGE_ISSET_ID); } public void setPageIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PAGE_ISSET_ID, value); } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case USER_TOKEN: if (value == null) { unsetUserToken(); } else { setUserToken((java.lang.String)value); } break; case PAGE: if (value == null) { unsetPage(); } else { setPage((java.lang.Integer)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case USER_TOKEN: return getUserToken(); case PAGE: return getPage(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case USER_TOKEN: return isSetUserToken(); case PAGE: return isSetPage(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getLectureList_args) return this.equals((getLectureList_args)that); return false; } public boolean equals(getLectureList_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_userToken = true && this.isSetUserToken(); boolean that_present_userToken = true && that.isSetUserToken(); if (this_present_userToken || that_present_userToken) { if (!(this_present_userToken && that_present_userToken)) return false; if (!this.userToken.equals(that.userToken)) return false; } boolean this_present_page = true; boolean that_present_page = true; if (this_present_page || that_present_page) { if (!(this_present_page && that_present_page)) return false; if (this.page != that.page) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287); if (isSetUserToken()) hashCode = hashCode * 8191 + userToken.hashCode(); hashCode = hashCode * 8191 + page; return hashCode; } @Override public int compareTo(getLectureList_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetUserToken(), 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 = java.lang.Boolean.compare(isSetPage(), other.isSetPage()); if (lastComparison != 0) { return lastComparison; } if (isSetPage()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.page, other.page); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("getLectureList_args("); boolean first = true; sb.append("userToken:"); if (this.userToken == null) { sb.append("null"); } else { sb.append(this.userToken); } first = false; if (!first) sb.append(", "); sb.append("page:"); sb.append(this.page); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class getLectureList_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getLectureList_argsStandardScheme getScheme() { return new getLectureList_argsStandardScheme(); } } private static class getLectureList_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureList_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // USER_TOKEN if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // PAGE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.page = iprot.readI32(); struct.setPageIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureList_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.userToken != null) { oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC); oprot.writeString(struct.userToken); oprot.writeFieldEnd(); } oprot.writeFieldBegin(PAGE_FIELD_DESC); oprot.writeI32(struct.page); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getLectureList_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getLectureList_argsTupleScheme getScheme() { return new getLectureList_argsTupleScheme(); } } private static class getLectureList_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getLectureList_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetUserToken()) { optionals.set(0); } if (struct.isSetPage()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetUserToken()) { oprot.writeString(struct.userToken); } if (struct.isSetPage()) { oprot.writeI32(struct.page); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getLectureList_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); } if (incoming.get(1)) { struct.page = iprot.readI32(); struct.setPageIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getLectureList_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getLectureList_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.List success; // required public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), AUTH_ERROR((short)1, "authError"), SERVER_ERROR((short)2, "serverError"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // AUTH_ERROR return AUTH_ERROR; case 2: // SERVER_ERROR return SERVER_ERROR; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class))); tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureList_result.class, metaDataMap); } public getLectureList_result() { } public getLectureList_result( java.util.List success, TAuthorizationException authError, TInvocationException serverError) { this(); this.success = success; this.authError = authError; this.serverError = serverError; } /** * Performs a deep copy on other. */ public getLectureList_result(getLectureList_result other) { if (other.isSetSuccess()) { java.util.List __this__success = new java.util.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.isSetServerError()) { this.serverError = new TInvocationException(other.serverError); } } @Override public getLectureList_result deepCopy() { return new getLectureList_result(this); } @Override public void clear() { this.success = null; this.authError = null; this.serverError = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @org.apache.thrift.annotation.Nullable 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 java.util.ArrayList(); } this.success.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List getSuccess() { return this.success; } public getLectureList_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.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; } } @org.apache.thrift.annotation.Nullable public TAuthorizationException getAuthError() { return this.authError; } public getLectureList_result setAuthError(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TInvocationException getServerError() { return this.serverError; } public getLectureList_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) { this.serverError = serverError; return this; } public void unsetServerError() { this.serverError = null; } /** Returns true if field serverError is set (has been assigned a value) and false otherwise */ public boolean isSetServerError() { return this.serverError != null; } public void setServerErrorIsSet(boolean value) { if (!value) { this.serverError = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.util.List)value); } break; case AUTH_ERROR: if (value == null) { unsetAuthError(); } else { setAuthError((TAuthorizationException)value); } break; case SERVER_ERROR: if (value == null) { unsetServerError(); } else { setServerError((TInvocationException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case AUTH_ERROR: return getAuthError(); case SERVER_ERROR: return getServerError(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case AUTH_ERROR: return isSetAuthError(); case SERVER_ERROR: return isSetServerError(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getLectureList_result) return this.equals((getLectureList_result)that); return false; } public boolean equals(getLectureList_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_authError = true && this.isSetAuthError(); boolean that_present_authError = true && that.isSetAuthError(); if (this_present_authError || that_present_authError) { if (!(this_present_authError && that_present_authError)) return false; if (!this.authError.equals(that.authError)) return false; } boolean this_present_serverError = true && this.isSetServerError(); boolean that_present_serverError = true && that.isSetServerError(); if (this_present_serverError || that_present_serverError) { if (!(this_present_serverError && that_present_serverError)) return false; if (!this.serverError.equals(that.serverError)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287); if (isSetAuthError()) hashCode = hashCode * 8191 + authError.hashCode(); hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287); if (isSetServerError()) hashCode = hashCode * 8191 + serverError.hashCode(); return hashCode; } @Override public int compareTo(getLectureList_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), 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 = java.lang.Boolean.compare(isSetAuthError(), 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 = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError()); if (lastComparison != 0) { return lastComparison; } if (isSetServerError()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("getLectureList_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("authError:"); if (this.authError == null) { sb.append("null"); } else { sb.append(this.authError); } first = false; if (!first) sb.append(", "); sb.append("serverError:"); if (this.serverError == null) { sb.append("null"); } else { sb.append(this.serverError); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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 org.apache.thrift.scheme.SchemeFactory { @Override public getLectureList_resultStandardScheme getScheme() { return new getLectureList_resultStandardScheme(); } } private static class getLectureList_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override 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 _list390 = iprot.readListBegin(); struct.success = new java.util.ArrayList(_list390.size); @org.apache.thrift.annotation.Nullable LectureSummary _elem391; for (int _i392 = 0; _i392 < _list390.size; ++_i392) { _elem391 = new LectureSummary(); _elem391.read(iprot); struct.success.add(_elem391); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // AUTH_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // SERVER_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override 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 _iter393 : struct.success) { _iter393.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.authError != null) { oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); struct.authError.write(oprot); oprot.writeFieldEnd(); } if (struct.serverError != null) { oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC); struct.serverError.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getLectureList_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getLectureList_resultTupleScheme getScheme() { return new getLectureList_resultTupleScheme(); } } private static class getLectureList_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getLectureList_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetAuthError()) { optionals.set(1); } if (struct.isSetServerError()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (LectureSummary _iter394 : struct.success) { _iter394.write(oprot); } } } if (struct.isSetAuthError()) { struct.authError.write(oprot); } if (struct.isSetServerError()) { struct.serverError.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getLectureList_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list395 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.success = new java.util.ArrayList(_list395.size); @org.apache.thrift.annotation.Nullable LectureSummary _elem396; for (int _i397 = 0; _i397 < _list395.size; ++_i397) { _elem396 = new LectureSummary(); _elem396.read(iprot); struct.success.add(_elem396); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } if (incoming.get(2)) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getLectureDetails_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getLectureDetails_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required public @org.apache.thrift.annotation.Nullable java.lang.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 java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureDetails_args.class, metaDataMap); } public getLectureDetails_args() { } public getLectureDetails_args( java.lang.String userToken, java.lang.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; } } @Override public getLectureDetails_args deepCopy() { return new getLectureDetails_args(this); } @Override public void clear() { this.userToken = null; this.lectureId = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getUserToken() { return this.userToken; } public getLectureDetails_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.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; } } @org.apache.thrift.annotation.Nullable public java.lang.String getLectureId() { return this.lectureId; } public getLectureDetails_args setLectureId(@org.apache.thrift.annotation.Nullable java.lang.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; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case USER_TOKEN: if (value == null) { unsetUserToken(); } else { setUserToken((java.lang.String)value); } break; case LECTURE_ID: if (value == null) { unsetLectureId(); } else { setLectureId((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case USER_TOKEN: return getUserToken(); case LECTURE_ID: return getLectureId(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case USER_TOKEN: return isSetUserToken(); case LECTURE_ID: return isSetLectureId(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getLectureDetails_args) return this.equals((getLectureDetails_args)that); return false; } public boolean equals(getLectureDetails_args that) { if (that == null) return false; if (this == that) return true; 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() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287); if (isSetUserToken()) hashCode = hashCode * 8191 + userToken.hashCode(); hashCode = hashCode * 8191 + ((isSetLectureId()) ? 131071 : 524287); if (isSetLectureId()) hashCode = hashCode * 8191 + lectureId.hashCode(); return hashCode; } @Override public int compareTo(getLectureDetails_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetUserToken(), 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 = java.lang.Boolean.compare(isSetLectureId(), 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; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory { @Override public getLectureDetails_argsStandardScheme getScheme() { return new getLectureDetails_argsStandardScheme(); } } private static class getLectureDetails_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override 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(); } @Override 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 org.apache.thrift.scheme.SchemeFactory { @Override public getLectureDetails_argsTupleScheme getScheme() { return new getLectureDetails_argsTupleScheme(); } } private static class getLectureDetails_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getLectureDetails_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.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 { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.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); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getLectureDetails_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getLectureDetails_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable LectureRead success; // required public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), AUTH_ERROR((short)1, "authError"), NOT_FOUND((short)2, "notFound"), SERVER_ERROR((short)3, "serverError"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // AUTH_ERROR return AUTH_ERROR; case 2: // NOT_FOUND return NOT_FOUND; case 3: // SERVER_ERROR return SERVER_ERROR; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class))); tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class))); tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureDetails_result.class, metaDataMap); } public getLectureDetails_result() { } public getLectureDetails_result( LectureRead success, TAuthorizationException authError, TNotFoundException notFound, TInvocationException serverError) { this(); this.success = success; this.authError = authError; this.notFound = notFound; this.serverError = serverError; } /** * Performs a deep copy on 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); } if (other.isSetServerError()) { this.serverError = new TInvocationException(other.serverError); } } @Override public getLectureDetails_result deepCopy() { return new getLectureDetails_result(this); } @Override public void clear() { this.success = null; this.authError = null; this.notFound = null; this.serverError = null; } @org.apache.thrift.annotation.Nullable public LectureRead getSuccess() { return this.success; } public getLectureDetails_result setSuccess(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TAuthorizationException getAuthError() { return this.authError; } public getLectureDetails_result setAuthError(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TNotFoundException getNotFound() { return this.notFound; } public getLectureDetails_result setNotFound(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TInvocationException getServerError() { return this.serverError; } public getLectureDetails_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) { this.serverError = serverError; return this; } public void unsetServerError() { this.serverError = null; } /** Returns true if field serverError is set (has been assigned a value) and false otherwise */ public boolean isSetServerError() { return this.serverError != null; } public void setServerErrorIsSet(boolean value) { if (!value) { this.serverError = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((LectureRead)value); } break; case AUTH_ERROR: if (value == null) { unsetAuthError(); } else { setAuthError((TAuthorizationException)value); } break; case NOT_FOUND: if (value == null) { unsetNotFound(); } else { setNotFound((TNotFoundException)value); } break; case SERVER_ERROR: if (value == null) { unsetServerError(); } else { setServerError((TInvocationException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case AUTH_ERROR: return getAuthError(); case NOT_FOUND: return getNotFound(); case SERVER_ERROR: return getServerError(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case AUTH_ERROR: return isSetAuthError(); case NOT_FOUND: return isSetNotFound(); case SERVER_ERROR: return isSetServerError(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getLectureDetails_result) return this.equals((getLectureDetails_result)that); return false; } public boolean equals(getLectureDetails_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_authError = true && this.isSetAuthError(); boolean that_present_authError = true && that.isSetAuthError(); if (this_present_authError || that_present_authError) { if (!(this_present_authError && that_present_authError)) return false; if (!this.authError.equals(that.authError)) return false; } boolean this_present_notFound = true && this.isSetNotFound(); boolean that_present_notFound = true && that.isSetNotFound(); if (this_present_notFound || that_present_notFound) { if (!(this_present_notFound && that_present_notFound)) return false; if (!this.notFound.equals(that.notFound)) return false; } boolean this_present_serverError = true && this.isSetServerError(); boolean that_present_serverError = true && that.isSetServerError(); if (this_present_serverError || that_present_serverError) { if (!(this_present_serverError && that_present_serverError)) return false; if (!this.serverError.equals(that.serverError)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287); if (isSetAuthError()) hashCode = hashCode * 8191 + authError.hashCode(); hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287); if (isSetNotFound()) hashCode = hashCode * 8191 + notFound.hashCode(); hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287); if (isSetServerError()) hashCode = hashCode * 8191 + serverError.hashCode(); return hashCode; } @Override public int compareTo(getLectureDetails_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), 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 = java.lang.Boolean.compare(isSetAuthError(), 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 = java.lang.Boolean.compare(isSetNotFound(), other.isSetNotFound()); if (lastComparison != 0) { return lastComparison; } if (isSetNotFound()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError()); if (lastComparison != 0) { return lastComparison; } if (isSetServerError()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("getLectureDetails_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("authError:"); if (this.authError == null) { sb.append("null"); } else { sb.append(this.authError); } first = false; if (!first) sb.append(", "); sb.append("notFound:"); if (this.notFound == null) { sb.append("null"); } else { sb.append(this.notFound); } first = false; if (!first) sb.append(", "); sb.append("serverError:"); if (this.serverError == null) { sb.append("null"); } else { sb.append(this.serverError); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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 org.apache.thrift.scheme.SchemeFactory { @Override public getLectureDetails_resultStandardScheme getScheme() { return new getLectureDetails_resultStandardScheme(); } } private static class getLectureDetails_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureDetails_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new LectureRead(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // AUTH_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // NOT_FOUND if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // SERVER_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureDetails_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.authError != null) { oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); struct.authError.write(oprot); oprot.writeFieldEnd(); } if (struct.notFound != null) { oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC); struct.notFound.write(oprot); oprot.writeFieldEnd(); } if (struct.serverError != null) { oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC); struct.serverError.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getLectureDetails_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getLectureDetails_resultTupleScheme getScheme() { return new getLectureDetails_resultTupleScheme(); } } private static class getLectureDetails_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getLectureDetails_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetAuthError()) { optionals.set(1); } if (struct.isSetNotFound()) { optionals.set(2); } if (struct.isSetServerError()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetAuthError()) { struct.authError.write(oprot); } if (struct.isSetNotFound()) { struct.notFound.write(oprot); } if (struct.isSetServerError()) { struct.serverError.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getLectureDetails_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.success = new LectureRead(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } if (incoming.get(2)) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } if (incoming.get(3)) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new deleteLecture_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new deleteLecture_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required public @org.apache.thrift.annotation.Nullable java.lang.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 java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteLecture_args.class, metaDataMap); } public deleteLecture_args() { } public deleteLecture_args( java.lang.String userToken, java.lang.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; } } @Override public deleteLecture_args deepCopy() { return new deleteLecture_args(this); } @Override public void clear() { this.userToken = null; this.lectureId = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getUserToken() { return this.userToken; } public deleteLecture_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.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; } } @org.apache.thrift.annotation.Nullable public java.lang.String getLectureId() { return this.lectureId; } public deleteLecture_args setLectureId(@org.apache.thrift.annotation.Nullable java.lang.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; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case USER_TOKEN: if (value == null) { unsetUserToken(); } else { setUserToken((java.lang.String)value); } break; case LECTURE_ID: if (value == null) { unsetLectureId(); } else { setLectureId((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case USER_TOKEN: return getUserToken(); case LECTURE_ID: return getLectureId(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case USER_TOKEN: return isSetUserToken(); case LECTURE_ID: return isSetLectureId(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof deleteLecture_args) return this.equals((deleteLecture_args)that); return false; } public boolean equals(deleteLecture_args that) { if (that == null) return false; if (this == that) return true; 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() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287); if (isSetUserToken()) hashCode = hashCode * 8191 + userToken.hashCode(); hashCode = hashCode * 8191 + ((isSetLectureId()) ? 131071 : 524287); if (isSetLectureId()) hashCode = hashCode * 8191 + lectureId.hashCode(); return hashCode; } @Override public int compareTo(deleteLecture_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetUserToken(), 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 = java.lang.Boolean.compare(isSetLectureId(), 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; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory { @Override public deleteLecture_argsStandardScheme getScheme() { return new deleteLecture_argsStandardScheme(); } } private static class deleteLecture_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override 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(); } @Override 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 org.apache.thrift.scheme.SchemeFactory { @Override public deleteLecture_argsTupleScheme getScheme() { return new deleteLecture_argsTupleScheme(); } } private static class deleteLecture_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, deleteLecture_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.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 { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.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); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new deleteLecture_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new deleteLecture_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { AUTH_ERROR((short)1, "authError"), NOT_FOUND((short)2, "notFound"), SERVER_ERROR((short)3, "serverError"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // AUTH_ERROR return AUTH_ERROR; case 2: // NOT_FOUND return NOT_FOUND; case 3: // SERVER_ERROR return SERVER_ERROR; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class))); tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class))); tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteLecture_result.class, metaDataMap); } public deleteLecture_result() { } public deleteLecture_result( TAuthorizationException authError, TNotFoundException notFound, TInvocationException serverError) { this(); this.authError = authError; this.notFound = notFound; this.serverError = serverError; } /** * Performs a deep copy on other. */ public deleteLecture_result(deleteLecture_result other) { if (other.isSetAuthError()) { this.authError = new TAuthorizationException(other.authError); } if (other.isSetNotFound()) { this.notFound = new TNotFoundException(other.notFound); } if (other.isSetServerError()) { this.serverError = new TInvocationException(other.serverError); } } @Override public deleteLecture_result deepCopy() { return new deleteLecture_result(this); } @Override public void clear() { this.authError = null; this.notFound = null; this.serverError = null; } @org.apache.thrift.annotation.Nullable public TAuthorizationException getAuthError() { return this.authError; } public deleteLecture_result setAuthError(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TNotFoundException getNotFound() { return this.notFound; } public deleteLecture_result setNotFound(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TInvocationException getServerError() { return this.serverError; } public deleteLecture_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) { this.serverError = serverError; return this; } public void unsetServerError() { this.serverError = null; } /** Returns true if field serverError is set (has been assigned a value) and false otherwise */ public boolean isSetServerError() { return this.serverError != null; } public void setServerErrorIsSet(boolean value) { if (!value) { this.serverError = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case AUTH_ERROR: if (value == null) { unsetAuthError(); } else { setAuthError((TAuthorizationException)value); } break; case NOT_FOUND: if (value == null) { unsetNotFound(); } else { setNotFound((TNotFoundException)value); } break; case SERVER_ERROR: if (value == null) { unsetServerError(); } else { setServerError((TInvocationException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case AUTH_ERROR: return getAuthError(); case NOT_FOUND: return getNotFound(); case SERVER_ERROR: return getServerError(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case AUTH_ERROR: return isSetAuthError(); case NOT_FOUND: return isSetNotFound(); case SERVER_ERROR: return isSetServerError(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof deleteLecture_result) return this.equals((deleteLecture_result)that); return false; } public boolean equals(deleteLecture_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_authError = true && this.isSetAuthError(); boolean that_present_authError = true && that.isSetAuthError(); if (this_present_authError || that_present_authError) { if (!(this_present_authError && that_present_authError)) return false; if (!this.authError.equals(that.authError)) return false; } boolean this_present_notFound = true && this.isSetNotFound(); boolean that_present_notFound = true && that.isSetNotFound(); if (this_present_notFound || that_present_notFound) { if (!(this_present_notFound && that_present_notFound)) return false; if (!this.notFound.equals(that.notFound)) return false; } boolean this_present_serverError = true && this.isSetServerError(); boolean that_present_serverError = true && that.isSetServerError(); if (this_present_serverError || that_present_serverError) { if (!(this_present_serverError && that_present_serverError)) return false; if (!this.serverError.equals(that.serverError)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287); if (isSetAuthError()) hashCode = hashCode * 8191 + authError.hashCode(); hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287); if (isSetNotFound()) hashCode = hashCode * 8191 + notFound.hashCode(); hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287); if (isSetServerError()) hashCode = hashCode * 8191 + serverError.hashCode(); return hashCode; } @Override public int compareTo(deleteLecture_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetAuthError(), 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 = java.lang.Boolean.compare(isSetNotFound(), other.isSetNotFound()); if (lastComparison != 0) { return lastComparison; } if (isSetNotFound()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError()); if (lastComparison != 0) { return lastComparison; } if (isSetServerError()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("deleteLecture_result("); boolean first = true; sb.append("authError:"); if (this.authError == null) { sb.append("null"); } else { sb.append(this.authError); } first = false; if (!first) sb.append(", "); sb.append("notFound:"); if (this.notFound == null) { sb.append("null"); } else { sb.append(this.notFound); } first = false; if (!first) sb.append(", "); sb.append("serverError:"); if (this.serverError == null) { sb.append("null"); } else { sb.append(this.serverError); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class deleteLecture_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public deleteLecture_resultStandardScheme getScheme() { return new deleteLecture_resultStandardScheme(); } } private static class deleteLecture_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, deleteLecture_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // AUTH_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // NOT_FOUND if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // SERVER_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, deleteLecture_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.authError != null) { oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); struct.authError.write(oprot); oprot.writeFieldEnd(); } if (struct.notFound != null) { oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC); struct.notFound.write(oprot); oprot.writeFieldEnd(); } if (struct.serverError != null) { oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC); struct.serverError.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class deleteLecture_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public deleteLecture_resultTupleScheme getScheme() { return new deleteLecture_resultTupleScheme(); } } private static class deleteLecture_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, deleteLecture_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetAuthError()) { optionals.set(0); } if (struct.isSetNotFound()) { optionals.set(1); } if (struct.isSetServerError()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetAuthError()) { struct.authError.write(oprot); } if (struct.isSetNotFound()) { struct.notFound.write(oprot); } if (struct.isSetServerError()) { struct.serverError.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, deleteLecture_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } if (incoming.get(1)) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } if (incoming.get(2)) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new writeLecturePermissions_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new writeLecturePermissions_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required public @org.apache.thrift.annotation.Nullable java.lang.String lectureId; // required public @org.apache.thrift.annotation.Nullable java.util.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 java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(writeLecturePermissions_args.class, metaDataMap); } public writeLecturePermissions_args() { } public writeLecturePermissions_args( java.lang.String userToken, java.lang.String lectureId, java.util.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()) { java.util.Map __this__permissions = new java.util.HashMap(other.permissions.size()); for (java.util.Map.Entry other_element : other.permissions.entrySet()) { java.lang.String other_element_key = other_element.getKey(); LecturePermissions other_element_value = other_element.getValue(); java.lang.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; } } @Override public writeLecturePermissions_args deepCopy() { return new writeLecturePermissions_args(this); } @Override public void clear() { this.userToken = null; this.lectureId = null; this.permissions = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getUserToken() { return this.userToken; } public writeLecturePermissions_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.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; } } @org.apache.thrift.annotation.Nullable public java.lang.String getLectureId() { return this.lectureId; } public writeLecturePermissions_args setLectureId(@org.apache.thrift.annotation.Nullable java.lang.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(java.lang.String key, LecturePermissions val) { if (this.permissions == null) { this.permissions = new java.util.HashMap(); } this.permissions.put(key, val); } @org.apache.thrift.annotation.Nullable public java.util.Map getPermissions() { return this.permissions; } public writeLecturePermissions_args setPermissions(@org.apache.thrift.annotation.Nullable java.util.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; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case USER_TOKEN: if (value == null) { unsetUserToken(); } else { setUserToken((java.lang.String)value); } break; case LECTURE_ID: if (value == null) { unsetLectureId(); } else { setLectureId((java.lang.String)value); } break; case PERMISSIONS: if (value == null) { unsetPermissions(); } else { setPermissions((java.util.Map)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case USER_TOKEN: return getUserToken(); case LECTURE_ID: return getLectureId(); case PERMISSIONS: return getPermissions(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case USER_TOKEN: return isSetUserToken(); case LECTURE_ID: return isSetLectureId(); case PERMISSIONS: return isSetPermissions(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof writeLecturePermissions_args) return this.equals((writeLecturePermissions_args)that); return false; } public boolean equals(writeLecturePermissions_args that) { if (that == null) return false; if (this == that) return true; 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() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287); if (isSetUserToken()) hashCode = hashCode * 8191 + userToken.hashCode(); hashCode = hashCode * 8191 + ((isSetLectureId()) ? 131071 : 524287); if (isSetLectureId()) hashCode = hashCode * 8191 + lectureId.hashCode(); hashCode = hashCode * 8191 + ((isSetPermissions()) ? 131071 : 524287); if (isSetPermissions()) hashCode = hashCode * 8191 + permissions.hashCode(); return hashCode; } @Override public int compareTo(writeLecturePermissions_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetUserToken(), 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 = java.lang.Boolean.compare(isSetLectureId(), 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 = java.lang.Boolean.compare(isSetPermissions(), 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; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory { @Override public writeLecturePermissions_argsStandardScheme getScheme() { return new writeLecturePermissions_argsStandardScheme(); } } private static class writeLecturePermissions_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override 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 _map398 = iprot.readMapBegin(); struct.permissions = new java.util.HashMap(2*_map398.size); @org.apache.thrift.annotation.Nullable java.lang.String _key399; @org.apache.thrift.annotation.Nullable LecturePermissions _val400; for (int _i401 = 0; _i401 < _map398.size; ++_i401) { _key399 = iprot.readString(); _val400 = new LecturePermissions(); _val400.read(iprot); struct.permissions.put(_key399, _val400); } 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(); } @Override 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 (java.util.Map.Entry _iter402 : struct.permissions.entrySet()) { oprot.writeString(_iter402.getKey()); _iter402.getValue().write(oprot); } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class writeLecturePermissions_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public writeLecturePermissions_argsTupleScheme getScheme() { return new writeLecturePermissions_argsTupleScheme(); } } private static class writeLecturePermissions_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, writeLecturePermissions_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.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 (java.util.Map.Entry _iter403 : struct.permissions.entrySet()) { oprot.writeString(_iter403.getKey()); _iter403.getValue().write(oprot); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, writeLecturePermissions_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.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 _map404 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT); struct.permissions = new java.util.HashMap(2*_map404.size); @org.apache.thrift.annotation.Nullable java.lang.String _key405; @org.apache.thrift.annotation.Nullable LecturePermissions _val406; for (int _i407 = 0; _i407 < _map404.size; ++_i407) { _key405 = iprot.readString(); _val406 = new LecturePermissions(); _val406.read(iprot); struct.permissions.put(_key405, _val406); } } struct.setPermissionsIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new writeLecturePermissions_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new writeLecturePermissions_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { AUTH_ERROR((short)1, "authError"), NOT_FOUND((short)2, "notFound"), SERVER_ERROR((short)3, "serverError"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // AUTH_ERROR return AUTH_ERROR; case 2: // NOT_FOUND return NOT_FOUND; case 3: // SERVER_ERROR return SERVER_ERROR; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class))); tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class))); tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(writeLecturePermissions_result.class, metaDataMap); } public writeLecturePermissions_result() { } public writeLecturePermissions_result( TAuthorizationException authError, TNotFoundException notFound, TInvocationException serverError) { this(); this.authError = authError; this.notFound = notFound; this.serverError = serverError; } /** * Performs a deep copy on other. */ public writeLecturePermissions_result(writeLecturePermissions_result other) { if (other.isSetAuthError()) { this.authError = new TAuthorizationException(other.authError); } if (other.isSetNotFound()) { this.notFound = new TNotFoundException(other.notFound); } if (other.isSetServerError()) { this.serverError = new TInvocationException(other.serverError); } } @Override public writeLecturePermissions_result deepCopy() { return new writeLecturePermissions_result(this); } @Override public void clear() { this.authError = null; this.notFound = null; this.serverError = null; } @org.apache.thrift.annotation.Nullable public TAuthorizationException getAuthError() { return this.authError; } public writeLecturePermissions_result setAuthError(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TNotFoundException getNotFound() { return this.notFound; } public writeLecturePermissions_result setNotFound(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TInvocationException getServerError() { return this.serverError; } public writeLecturePermissions_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) { this.serverError = serverError; return this; } public void unsetServerError() { this.serverError = null; } /** Returns true if field serverError is set (has been assigned a value) and false otherwise */ public boolean isSetServerError() { return this.serverError != null; } public void setServerErrorIsSet(boolean value) { if (!value) { this.serverError = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case AUTH_ERROR: if (value == null) { unsetAuthError(); } else { setAuthError((TAuthorizationException)value); } break; case NOT_FOUND: if (value == null) { unsetNotFound(); } else { setNotFound((TNotFoundException)value); } break; case SERVER_ERROR: if (value == null) { unsetServerError(); } else { setServerError((TInvocationException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case AUTH_ERROR: return getAuthError(); case NOT_FOUND: return getNotFound(); case SERVER_ERROR: return getServerError(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case AUTH_ERROR: return isSetAuthError(); case NOT_FOUND: return isSetNotFound(); case SERVER_ERROR: return isSetServerError(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof writeLecturePermissions_result) return this.equals((writeLecturePermissions_result)that); return false; } public boolean equals(writeLecturePermissions_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_authError = true && this.isSetAuthError(); boolean that_present_authError = true && that.isSetAuthError(); if (this_present_authError || that_present_authError) { if (!(this_present_authError && that_present_authError)) return false; if (!this.authError.equals(that.authError)) return false; } boolean this_present_notFound = true && this.isSetNotFound(); boolean that_present_notFound = true && that.isSetNotFound(); if (this_present_notFound || that_present_notFound) { if (!(this_present_notFound && that_present_notFound)) return false; if (!this.notFound.equals(that.notFound)) return false; } boolean this_present_serverError = true && this.isSetServerError(); boolean that_present_serverError = true && that.isSetServerError(); if (this_present_serverError || that_present_serverError) { if (!(this_present_serverError && that_present_serverError)) return false; if (!this.serverError.equals(that.serverError)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287); if (isSetAuthError()) hashCode = hashCode * 8191 + authError.hashCode(); hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287); if (isSetNotFound()) hashCode = hashCode * 8191 + notFound.hashCode(); hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287); if (isSetServerError()) hashCode = hashCode * 8191 + serverError.hashCode(); return hashCode; } @Override public int compareTo(writeLecturePermissions_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetAuthError(), 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 = java.lang.Boolean.compare(isSetNotFound(), other.isSetNotFound()); if (lastComparison != 0) { return lastComparison; } if (isSetNotFound()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError()); if (lastComparison != 0) { return lastComparison; } if (isSetServerError()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("writeLecturePermissions_result("); boolean first = true; sb.append("authError:"); if (this.authError == null) { sb.append("null"); } else { sb.append(this.authError); } first = false; if (!first) sb.append(", "); sb.append("notFound:"); if (this.notFound == null) { sb.append("null"); } else { sb.append(this.notFound); } first = false; if (!first) sb.append(", "); sb.append("serverError:"); if (this.serverError == null) { sb.append("null"); } else { sb.append(this.serverError); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class writeLecturePermissions_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public writeLecturePermissions_resultStandardScheme getScheme() { return new writeLecturePermissions_resultStandardScheme(); } } private static class writeLecturePermissions_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, writeLecturePermissions_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // AUTH_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // NOT_FOUND if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // SERVER_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, writeLecturePermissions_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.authError != null) { oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); struct.authError.write(oprot); oprot.writeFieldEnd(); } if (struct.notFound != null) { oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC); struct.notFound.write(oprot); oprot.writeFieldEnd(); } if (struct.serverError != null) { oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC); struct.serverError.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class writeLecturePermissions_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public writeLecturePermissions_resultTupleScheme getScheme() { return new writeLecturePermissions_resultTupleScheme(); } } private static class writeLecturePermissions_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, writeLecturePermissions_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetAuthError()) { optionals.set(0); } if (struct.isSetNotFound()) { optionals.set(1); } if (struct.isSetServerError()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetAuthError()) { struct.authError.write(oprot); } if (struct.isSetNotFound()) { struct.notFound.write(oprot); } if (struct.isSetServerError()) { struct.serverError.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, writeLecturePermissions_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } if (incoming.get(1)) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } if (incoming.get(2)) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getLecturePermissions_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getLecturePermissions_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required public @org.apache.thrift.annotation.Nullable java.lang.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 java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLecturePermissions_args.class, metaDataMap); } public getLecturePermissions_args() { } public getLecturePermissions_args( java.lang.String userToken, java.lang.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; } } @Override public getLecturePermissions_args deepCopy() { return new getLecturePermissions_args(this); } @Override public void clear() { this.userToken = null; this.lectureId = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getUserToken() { return this.userToken; } public getLecturePermissions_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.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; } } @org.apache.thrift.annotation.Nullable public java.lang.String getLectureId() { return this.lectureId; } public getLecturePermissions_args setLectureId(@org.apache.thrift.annotation.Nullable java.lang.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; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case USER_TOKEN: if (value == null) { unsetUserToken(); } else { setUserToken((java.lang.String)value); } break; case LECTURE_ID: if (value == null) { unsetLectureId(); } else { setLectureId((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case USER_TOKEN: return getUserToken(); case LECTURE_ID: return getLectureId(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case USER_TOKEN: return isSetUserToken(); case LECTURE_ID: return isSetLectureId(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getLecturePermissions_args) return this.equals((getLecturePermissions_args)that); return false; } public boolean equals(getLecturePermissions_args that) { if (that == null) return false; if (this == that) return true; 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() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287); if (isSetUserToken()) hashCode = hashCode * 8191 + userToken.hashCode(); hashCode = hashCode * 8191 + ((isSetLectureId()) ? 131071 : 524287); if (isSetLectureId()) hashCode = hashCode * 8191 + lectureId.hashCode(); return hashCode; } @Override public int compareTo(getLecturePermissions_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetUserToken(), 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 = java.lang.Boolean.compare(isSetLectureId(), 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; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory { @Override public getLecturePermissions_argsStandardScheme getScheme() { return new getLecturePermissions_argsStandardScheme(); } } private static class getLecturePermissions_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override 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(); } @Override 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 org.apache.thrift.scheme.SchemeFactory { @Override public getLecturePermissions_argsTupleScheme getScheme() { return new getLecturePermissions_argsTupleScheme(); } } private static class getLecturePermissions_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getLecturePermissions_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.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 { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.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); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) 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 org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getLecturePermissions_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getLecturePermissions_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.Map success; // required public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), AUTH_ERROR((short)1, "authError"), NOT_FOUND((short)2, "notFound"), SERVER_ERROR((short)3, "serverError"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // AUTH_ERROR return AUTH_ERROR; case 2: // NOT_FOUND return NOT_FOUND; case 3: // SERVER_ERROR return SERVER_ERROR; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class))); tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class))); tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLecturePermissions_result.class, metaDataMap); } public getLecturePermissions_result() { } public getLecturePermissions_result( java.util.Map success, TAuthorizationException authError, TNotFoundException notFound, TInvocationException serverError) { this(); this.success = success; this.authError = authError; this.notFound = notFound; this.serverError = serverError; } /** * Performs a deep copy on other. */ public getLecturePermissions_result(getLecturePermissions_result other) { if (other.isSetSuccess()) { java.util.Map __this__success = new java.util.HashMap(other.success.size()); for (java.util.Map.Entry other_element : other.success.entrySet()) { java.lang.String other_element_key = other_element.getKey(); LecturePermissions other_element_value = other_element.getValue(); java.lang.String __this__success_copy_key = other_element_key; LecturePermissions __this__success_copy_value = new LecturePermissions(other_element_value); __this__success.put(__this__success_copy_key, __this__success_copy_value); } this.success = __this__success; } if (other.isSetAuthError()) { this.authError = new TAuthorizationException(other.authError); } if (other.isSetNotFound()) { this.notFound = new TNotFoundException(other.notFound); } if (other.isSetServerError()) { this.serverError = new TInvocationException(other.serverError); } } @Override public getLecturePermissions_result deepCopy() { return new getLecturePermissions_result(this); } @Override public void clear() { this.success = null; this.authError = null; this.notFound = null; this.serverError = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public void putToSuccess(java.lang.String key, LecturePermissions val) { if (this.success == null) { this.success = new java.util.HashMap(); } this.success.put(key, val); } @org.apache.thrift.annotation.Nullable public java.util.Map getSuccess() { return this.success; } public getLecturePermissions_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.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; } } @org.apache.thrift.annotation.Nullable public TAuthorizationException getAuthError() { return this.authError; } public getLecturePermissions_result setAuthError(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TNotFoundException getNotFound() { return this.notFound; } public getLecturePermissions_result setNotFound(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TInvocationException getServerError() { return this.serverError; } public getLecturePermissions_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) { this.serverError = serverError; return this; } public void unsetServerError() { this.serverError = null; } /** Returns true if field serverError is set (has been assigned a value) and false otherwise */ public boolean isSetServerError() { return this.serverError != null; } public void setServerErrorIsSet(boolean value) { if (!value) { this.serverError = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((java.util.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; case SERVER_ERROR: if (value == null) { unsetServerError(); } else { setServerError((TInvocationException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case AUTH_ERROR: return getAuthError(); case NOT_FOUND: return getNotFound(); case SERVER_ERROR: return getServerError(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case AUTH_ERROR: return isSetAuthError(); case NOT_FOUND: return isSetNotFound(); case SERVER_ERROR: return isSetServerError(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getLecturePermissions_result) return this.equals((getLecturePermissions_result)that); return false; } public boolean equals(getLecturePermissions_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_authError = true && this.isSetAuthError(); boolean that_present_authError = true && that.isSetAuthError(); if (this_present_authError || that_present_authError) { if (!(this_present_authError && that_present_authError)) return false; if (!this.authError.equals(that.authError)) return false; } boolean this_present_notFound = true && this.isSetNotFound(); boolean that_present_notFound = true && that.isSetNotFound(); if (this_present_notFound || that_present_notFound) { if (!(this_present_notFound && that_present_notFound)) return false; if (!this.notFound.equals(that.notFound)) return false; } boolean this_present_serverError = true && this.isSetServerError(); boolean that_present_serverError = true && that.isSetServerError(); if (this_present_serverError || that_present_serverError) { if (!(this_present_serverError && that_present_serverError)) return false; if (!this.serverError.equals(that.serverError)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287); if (isSetAuthError()) hashCode = hashCode * 8191 + authError.hashCode(); hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287); if (isSetNotFound()) hashCode = hashCode * 8191 + notFound.hashCode(); hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287); if (isSetServerError()) hashCode = hashCode * 8191 + serverError.hashCode(); return hashCode; } @Override public int compareTo(getLecturePermissions_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), 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 = java.lang.Boolean.compare(isSetAuthError(), 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 = java.lang.Boolean.compare(isSetNotFound(), other.isSetNotFound()); if (lastComparison != 0) { return lastComparison; } if (isSetNotFound()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError()); if (lastComparison != 0) { return lastComparison; } if (isSetServerError()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("getLecturePermissions_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("authError:"); if (this.authError == null) { sb.append("null"); } else { sb.append(this.authError); } first = false; if (!first) sb.append(", "); sb.append("notFound:"); if (this.notFound == null) { sb.append("null"); } else { sb.append(this.notFound); } first = false; if (!first) sb.append(", "); sb.append("serverError:"); if (this.serverError == null) { sb.append("null"); } else { sb.append(this.serverError); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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 org.apache.thrift.scheme.SchemeFactory { @Override public getLecturePermissions_resultStandardScheme getScheme() { return new getLecturePermissions_resultStandardScheme(); } } private static class getLecturePermissions_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override 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 _map408 = iprot.readMapBegin(); struct.success = new java.util.HashMap(2*_map408.size); @org.apache.thrift.annotation.Nullable java.lang.String _key409; @org.apache.thrift.annotation.Nullable LecturePermissions _val410; for (int _i411 = 0; _i411 < _map408.size; ++_i411) { _key409 = iprot.readString(); _val410 = new LecturePermissions(); _val410.read(iprot); struct.success.put(_key409, _val410); } iprot.readMapEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // AUTH_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // NOT_FOUND if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // SERVER_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override 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 (java.util.Map.Entry _iter412 : struct.success.entrySet()) { oprot.writeString(_iter412.getKey()); _iter412.getValue().write(oprot); } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } if (struct.authError != null) { oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); struct.authError.write(oprot); oprot.writeFieldEnd(); } if (struct.notFound != null) { oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC); struct.notFound.write(oprot); oprot.writeFieldEnd(); } if (struct.serverError != null) { oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC); struct.serverError.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getLecturePermissions_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getLecturePermissions_resultTupleScheme getScheme() { return new getLecturePermissions_resultTupleScheme(); } } private static class getLecturePermissions_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getLecturePermissions_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetAuthError()) { optionals.set(1); } if (struct.isSetNotFound()) { optionals.set(2); } if (struct.isSetServerError()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (java.util.Map.Entry _iter413 : struct.success.entrySet()) { oprot.writeString(_iter413.getKey()); _iter413.getValue().write(oprot); } } } if (struct.isSetAuthError()) { struct.authError.write(oprot); } if (struct.isSetNotFound()) { struct.notFound.write(oprot); } if (struct.isSetServerError()) { struct.serverError.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getLecturePermissions_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { { org.apache.thrift.protocol.TMap _map414 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT); struct.success = new java.util.HashMap(2*_map414.size); @org.apache.thrift.annotation.Nullable java.lang.String _key415; @org.apache.thrift.annotation.Nullable LecturePermissions _val416; for (int _i417 = 0; _i417 < _map414.size; ++_i417) { _key415 = iprot.readString(); _val416 = new LecturePermissions(); _val416.read(iprot); struct.success.put(_key415, _val416); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } if (incoming.get(2)) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } if (incoming.get(3)) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class setLectureOwner_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("setLectureOwner_args"); private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField LECTURE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureId", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField NEW_OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("newOwnerId", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setLectureOwner_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setLectureOwner_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required public @org.apache.thrift.annotation.Nullable java.lang.String lectureId; // required public @org.apache.thrift.annotation.Nullable java.lang.String newOwnerId; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { USER_TOKEN((short)1, "userToken"), LECTURE_ID((short)2, "lectureId"), NEW_OWNER_ID((short)3, "newOwnerId"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // USER_TOKEN return USER_TOKEN; case 2: // LECTURE_ID return LECTURE_ID; case 3: // NEW_OWNER_ID return NEW_OWNER_ID; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); tmpMap.put(_Fields.LECTURE_ID, new org.apache.thrift.meta_data.FieldMetaData("lectureId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); tmpMap.put(_Fields.NEW_OWNER_ID, new org.apache.thrift.meta_data.FieldMetaData("newOwnerId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setLectureOwner_args.class, metaDataMap); } public setLectureOwner_args() { } public setLectureOwner_args( java.lang.String userToken, java.lang.String lectureId, java.lang.String newOwnerId) { this(); this.userToken = userToken; this.lectureId = lectureId; this.newOwnerId = newOwnerId; } /** * Performs a deep copy on other. */ public setLectureOwner_args(setLectureOwner_args other) { if (other.isSetUserToken()) { this.userToken = other.userToken; } if (other.isSetLectureId()) { this.lectureId = other.lectureId; } if (other.isSetNewOwnerId()) { this.newOwnerId = other.newOwnerId; } } @Override public setLectureOwner_args deepCopy() { return new setLectureOwner_args(this); } @Override public void clear() { this.userToken = null; this.lectureId = null; this.newOwnerId = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getUserToken() { return this.userToken; } public setLectureOwner_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.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; } } @org.apache.thrift.annotation.Nullable public java.lang.String getLectureId() { return this.lectureId; } public setLectureOwner_args setLectureId(@org.apache.thrift.annotation.Nullable java.lang.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; } } @org.apache.thrift.annotation.Nullable public java.lang.String getNewOwnerId() { return this.newOwnerId; } public setLectureOwner_args setNewOwnerId(@org.apache.thrift.annotation.Nullable java.lang.String newOwnerId) { this.newOwnerId = newOwnerId; return this; } public void unsetNewOwnerId() { this.newOwnerId = null; } /** Returns true if field newOwnerId is set (has been assigned a value) and false otherwise */ public boolean isSetNewOwnerId() { return this.newOwnerId != null; } public void setNewOwnerIdIsSet(boolean value) { if (!value) { this.newOwnerId = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case USER_TOKEN: if (value == null) { unsetUserToken(); } else { setUserToken((java.lang.String)value); } break; case LECTURE_ID: if (value == null) { unsetLectureId(); } else { setLectureId((java.lang.String)value); } break; case NEW_OWNER_ID: if (value == null) { unsetNewOwnerId(); } else { setNewOwnerId((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case USER_TOKEN: return getUserToken(); case LECTURE_ID: return getLectureId(); case NEW_OWNER_ID: return getNewOwnerId(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case USER_TOKEN: return isSetUserToken(); case LECTURE_ID: return isSetLectureId(); case NEW_OWNER_ID: return isSetNewOwnerId(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof setLectureOwner_args) return this.equals((setLectureOwner_args)that); return false; } public boolean equals(setLectureOwner_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_userToken = true && this.isSetUserToken(); boolean that_present_userToken = true && that.isSetUserToken(); if (this_present_userToken || that_present_userToken) { if (!(this_present_userToken && that_present_userToken)) return false; if (!this.userToken.equals(that.userToken)) return false; } boolean this_present_lectureId = true && this.isSetLectureId(); boolean that_present_lectureId = true && that.isSetLectureId(); if (this_present_lectureId || that_present_lectureId) { if (!(this_present_lectureId && that_present_lectureId)) return false; if (!this.lectureId.equals(that.lectureId)) return false; } boolean this_present_newOwnerId = true && this.isSetNewOwnerId(); boolean that_present_newOwnerId = true && that.isSetNewOwnerId(); if (this_present_newOwnerId || that_present_newOwnerId) { if (!(this_present_newOwnerId && that_present_newOwnerId)) return false; if (!this.newOwnerId.equals(that.newOwnerId)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287); if (isSetUserToken()) hashCode = hashCode * 8191 + userToken.hashCode(); hashCode = hashCode * 8191 + ((isSetLectureId()) ? 131071 : 524287); if (isSetLectureId()) hashCode = hashCode * 8191 + lectureId.hashCode(); hashCode = hashCode * 8191 + ((isSetNewOwnerId()) ? 131071 : 524287); if (isSetNewOwnerId()) hashCode = hashCode * 8191 + newOwnerId.hashCode(); return hashCode; } @Override public int compareTo(setLectureOwner_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetUserToken(), 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 = java.lang.Boolean.compare(isSetLectureId(), 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 = java.lang.Boolean.compare(isSetNewOwnerId(), other.isSetNewOwnerId()); if (lastComparison != 0) { return lastComparison; } if (isSetNewOwnerId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.newOwnerId, other.newOwnerId); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("setLectureOwner_args("); boolean first = true; sb.append("userToken:"); if (this.userToken == null) { sb.append("null"); } else { sb.append(this.userToken); } first = false; if (!first) sb.append(", "); sb.append("lectureId:"); if (this.lectureId == null) { sb.append("null"); } else { sb.append(this.lectureId); } first = false; if (!first) sb.append(", "); sb.append("newOwnerId:"); if (this.newOwnerId == null) { sb.append("null"); } else { sb.append(this.newOwnerId); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class setLectureOwner_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public setLectureOwner_argsStandardScheme getScheme() { return new setLectureOwner_argsStandardScheme(); } } private static class setLectureOwner_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, setLectureOwner_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // USER_TOKEN if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // LECTURE_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.lectureId = iprot.readString(); struct.setLectureIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // NEW_OWNER_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.newOwnerId = iprot.readString(); struct.setNewOwnerIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, setLectureOwner_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.userToken != null) { oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC); oprot.writeString(struct.userToken); oprot.writeFieldEnd(); } if (struct.lectureId != null) { oprot.writeFieldBegin(LECTURE_ID_FIELD_DESC); oprot.writeString(struct.lectureId); oprot.writeFieldEnd(); } if (struct.newOwnerId != null) { oprot.writeFieldBegin(NEW_OWNER_ID_FIELD_DESC); oprot.writeString(struct.newOwnerId); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class setLectureOwner_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public setLectureOwner_argsTupleScheme getScheme() { return new setLectureOwner_argsTupleScheme(); } } private static class setLectureOwner_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, setLectureOwner_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetUserToken()) { optionals.set(0); } if (struct.isSetLectureId()) { optionals.set(1); } if (struct.isSetNewOwnerId()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetUserToken()) { oprot.writeString(struct.userToken); } if (struct.isSetLectureId()) { oprot.writeString(struct.lectureId); } if (struct.isSetNewOwnerId()) { oprot.writeString(struct.newOwnerId); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, setLectureOwner_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); } if (incoming.get(1)) { struct.lectureId = iprot.readString(); struct.setLectureIdIsSet(true); } if (incoming.get(2)) { struct.newOwnerId = iprot.readString(); struct.setNewOwnerIdIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class setLectureOwner_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("setLectureOwner_result"); private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setLectureOwner_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setLectureOwner_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { AUTH_ERROR((short)1, "authError"), NOT_FOUND((short)2, "notFound"), SERVER_ERROR((short)3, "serverError"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // AUTH_ERROR return AUTH_ERROR; case 2: // NOT_FOUND return NOT_FOUND; case 3: // SERVER_ERROR return SERVER_ERROR; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class))); tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class))); tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setLectureOwner_result.class, metaDataMap); } public setLectureOwner_result() { } public setLectureOwner_result( TAuthorizationException authError, TNotFoundException notFound, TInvocationException serverError) { this(); this.authError = authError; this.notFound = notFound; this.serverError = serverError; } /** * Performs a deep copy on other. */ public setLectureOwner_result(setLectureOwner_result other) { if (other.isSetAuthError()) { this.authError = new TAuthorizationException(other.authError); } if (other.isSetNotFound()) { this.notFound = new TNotFoundException(other.notFound); } if (other.isSetServerError()) { this.serverError = new TInvocationException(other.serverError); } } @Override public setLectureOwner_result deepCopy() { return new setLectureOwner_result(this); } @Override public void clear() { this.authError = null; this.notFound = null; this.serverError = null; } @org.apache.thrift.annotation.Nullable public TAuthorizationException getAuthError() { return this.authError; } public setLectureOwner_result setAuthError(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TNotFoundException getNotFound() { return this.notFound; } public setLectureOwner_result setNotFound(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TInvocationException getServerError() { return this.serverError; } public setLectureOwner_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) { this.serverError = serverError; return this; } public void unsetServerError() { this.serverError = null; } /** Returns true if field serverError is set (has been assigned a value) and false otherwise */ public boolean isSetServerError() { return this.serverError != null; } public void setServerErrorIsSet(boolean value) { if (!value) { this.serverError = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case AUTH_ERROR: if (value == null) { unsetAuthError(); } else { setAuthError((TAuthorizationException)value); } break; case NOT_FOUND: if (value == null) { unsetNotFound(); } else { setNotFound((TNotFoundException)value); } break; case SERVER_ERROR: if (value == null) { unsetServerError(); } else { setServerError((TInvocationException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case AUTH_ERROR: return getAuthError(); case NOT_FOUND: return getNotFound(); case SERVER_ERROR: return getServerError(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case AUTH_ERROR: return isSetAuthError(); case NOT_FOUND: return isSetNotFound(); case SERVER_ERROR: return isSetServerError(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof setLectureOwner_result) return this.equals((setLectureOwner_result)that); return false; } public boolean equals(setLectureOwner_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_authError = true && this.isSetAuthError(); boolean that_present_authError = true && that.isSetAuthError(); if (this_present_authError || that_present_authError) { if (!(this_present_authError && that_present_authError)) return false; if (!this.authError.equals(that.authError)) return false; } boolean this_present_notFound = true && this.isSetNotFound(); boolean that_present_notFound = true && that.isSetNotFound(); if (this_present_notFound || that_present_notFound) { if (!(this_present_notFound && that_present_notFound)) return false; if (!this.notFound.equals(that.notFound)) return false; } boolean this_present_serverError = true && this.isSetServerError(); boolean that_present_serverError = true && that.isSetServerError(); if (this_present_serverError || that_present_serverError) { if (!(this_present_serverError && that_present_serverError)) return false; if (!this.serverError.equals(that.serverError)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287); if (isSetAuthError()) hashCode = hashCode * 8191 + authError.hashCode(); hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287); if (isSetNotFound()) hashCode = hashCode * 8191 + notFound.hashCode(); hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287); if (isSetServerError()) hashCode = hashCode * 8191 + serverError.hashCode(); return hashCode; } @Override public int compareTo(setLectureOwner_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetAuthError(), 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 = java.lang.Boolean.compare(isSetNotFound(), other.isSetNotFound()); if (lastComparison != 0) { return lastComparison; } if (isSetNotFound()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError()); if (lastComparison != 0) { return lastComparison; } if (isSetServerError()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("setLectureOwner_result("); boolean first = true; sb.append("authError:"); if (this.authError == null) { sb.append("null"); } else { sb.append(this.authError); } first = false; if (!first) sb.append(", "); sb.append("notFound:"); if (this.notFound == null) { sb.append("null"); } else { sb.append(this.notFound); } first = false; if (!first) sb.append(", "); sb.append("serverError:"); if (this.serverError == null) { sb.append("null"); } else { sb.append(this.serverError); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class setLectureOwner_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public setLectureOwner_resultStandardScheme getScheme() { return new setLectureOwner_resultStandardScheme(); } } private static class setLectureOwner_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, setLectureOwner_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // AUTH_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // NOT_FOUND if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // SERVER_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, setLectureOwner_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.authError != null) { oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); struct.authError.write(oprot); oprot.writeFieldEnd(); } if (struct.notFound != null) { oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC); struct.notFound.write(oprot); oprot.writeFieldEnd(); } if (struct.serverError != null) { oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC); struct.serverError.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class setLectureOwner_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public setLectureOwner_resultTupleScheme getScheme() { return new setLectureOwner_resultTupleScheme(); } } private static class setLectureOwner_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, setLectureOwner_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetAuthError()) { optionals.set(0); } if (struct.isSetNotFound()) { optionals.set(1); } if (struct.isSetServerError()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetAuthError()) { struct.authError.write(oprot); } if (struct.isSetNotFound()) { struct.notFound.write(oprot); } if (struct.isSetServerError()) { struct.serverError.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, setLectureOwner_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } if (incoming.get(1)) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } if (incoming.get(2)) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class getPredefinedData_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("getPredefinedData_args"); private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getPredefinedData_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getPredefinedData_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.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 java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPredefinedData_args.class, metaDataMap); } public getPredefinedData_args() { } public getPredefinedData_args( java.lang.String userToken) { this(); this.userToken = userToken; } /** * Performs a deep copy on other. */ public getPredefinedData_args(getPredefinedData_args other) { if (other.isSetUserToken()) { this.userToken = other.userToken; } } @Override public getPredefinedData_args deepCopy() { return new getPredefinedData_args(this); } @Override public void clear() { this.userToken = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getUserToken() { return this.userToken; } public getPredefinedData_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.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; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case USER_TOKEN: if (value == null) { unsetUserToken(); } else { setUserToken((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case USER_TOKEN: return getUserToken(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case USER_TOKEN: return isSetUserToken(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getPredefinedData_args) return this.equals((getPredefinedData_args)that); return false; } public boolean equals(getPredefinedData_args that) { if (that == null) return false; if (this == that) return true; 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() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287); if (isSetUserToken()) hashCode = hashCode * 8191 + userToken.hashCode(); return hashCode; } @Override public int compareTo(getPredefinedData_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetUserToken(), 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; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("getPredefinedData_args("); boolean first = true; sb.append("userToken:"); if (this.userToken == null) { sb.append("null"); } else { sb.append(this.userToken); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class getPredefinedData_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getPredefinedData_argsStandardScheme getScheme() { return new getPredefinedData_argsStandardScheme(); } } private static class getPredefinedData_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, getPredefinedData_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // USER_TOKEN if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, getPredefinedData_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.userToken != null) { oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC); oprot.writeString(struct.userToken); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getPredefinedData_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getPredefinedData_argsTupleScheme getScheme() { return new getPredefinedData_argsTupleScheme(); } } private static class getPredefinedData_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getPredefinedData_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetUserToken()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetUserToken()) { oprot.writeString(struct.userToken); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getPredefinedData_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class getPredefinedData_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("getPredefinedData_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getPredefinedData_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getPredefinedData_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable PredefinedData success; // required public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), AUTH_ERROR((short)1, "authError"), SERVER_ERROR((short)2, "serverError"); private static final java.util.Map byName = new java.util.HashMap(); static { for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // AUTH_ERROR return AUTH_ERROR; case 2: // SERVER_ERROR return SERVER_ERROR; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ @org.apache.thrift.annotation.Nullable public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; private final java.lang.String _fieldName; _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @Override public short getThriftFieldId() { return _thriftId; } @Override public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PredefinedData.class))); tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class))); tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPredefinedData_result.class, metaDataMap); } public getPredefinedData_result() { } public getPredefinedData_result( PredefinedData success, TAuthorizationException authError, TInvocationException serverError) { this(); this.success = success; this.authError = authError; this.serverError = serverError; } /** * Performs a deep copy on other. */ public getPredefinedData_result(getPredefinedData_result other) { if (other.isSetSuccess()) { this.success = new PredefinedData(other.success); } if (other.isSetAuthError()) { this.authError = new TAuthorizationException(other.authError); } if (other.isSetServerError()) { this.serverError = new TInvocationException(other.serverError); } } @Override public getPredefinedData_result deepCopy() { return new getPredefinedData_result(this); } @Override public void clear() { this.success = null; this.authError = null; this.serverError = null; } @org.apache.thrift.annotation.Nullable public PredefinedData getSuccess() { return this.success; } public getPredefinedData_result setSuccess(@org.apache.thrift.annotation.Nullable PredefinedData success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TAuthorizationException getAuthError() { return this.authError; } public getPredefinedData_result setAuthError(@org.apache.thrift.annotation.Nullable 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; } } @org.apache.thrift.annotation.Nullable public TInvocationException getServerError() { return this.serverError; } public getPredefinedData_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) { this.serverError = serverError; return this; } public void unsetServerError() { this.serverError = null; } /** Returns true if field serverError is set (has been assigned a value) and false otherwise */ public boolean isSetServerError() { return this.serverError != null; } public void setServerErrorIsSet(boolean value) { if (!value) { this.serverError = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((PredefinedData)value); } break; case AUTH_ERROR: if (value == null) { unsetAuthError(); } else { setAuthError((TAuthorizationException)value); } break; case SERVER_ERROR: if (value == null) { unsetServerError(); } else { setServerError((TInvocationException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case AUTH_ERROR: return getAuthError(); case SERVER_ERROR: return getServerError(); } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case AUTH_ERROR: return isSetAuthError(); case SERVER_ERROR: return isSetServerError(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getPredefinedData_result) return this.equals((getPredefinedData_result)that); return false; } public boolean equals(getPredefinedData_result that) { if (that == null) return false; if (this == that) return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_authError = true && this.isSetAuthError(); boolean that_present_authError = true && that.isSetAuthError(); if (this_present_authError || that_present_authError) { if (!(this_present_authError && that_present_authError)) return false; if (!this.authError.equals(that.authError)) return false; } boolean this_present_serverError = true && this.isSetServerError(); boolean that_present_serverError = true && that.isSetServerError(); if (this_present_serverError || that_present_serverError) { if (!(this_present_serverError && that_present_serverError)) return false; if (!this.serverError.equals(that.serverError)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode(); hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287); if (isSetAuthError()) hashCode = hashCode * 8191 + authError.hashCode(); hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287); if (isSetServerError()) hashCode = hashCode * 8191 + serverError.hashCode(); return hashCode; } @Override public int compareTo(getPredefinedData_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSuccess(), 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 = java.lang.Boolean.compare(isSetAuthError(), 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 = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError()); if (lastComparison != 0) { return lastComparison; } if (isSetServerError()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError); if (lastComparison != 0) { return lastComparison; } } return 0; } @org.apache.thrift.annotation.Nullable @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("getPredefinedData_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("authError:"); if (this.authError == null) { sb.append("null"); } else { sb.append(this.authError); } first = false; if (!first) sb.append(", "); sb.append("serverError:"); if (this.serverError == null) { sb.append("null"); } else { sb.append(this.serverError); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class getPredefinedData_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getPredefinedData_resultStandardScheme getScheme() { return new getPredefinedData_resultStandardScheme(); } } private static class getPredefinedData_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, getPredefinedData_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new PredefinedData(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // AUTH_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // SERVER_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, getPredefinedData_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.authError != null) { oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); struct.authError.write(oprot); oprot.writeFieldEnd(); } if (struct.serverError != null) { oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC); struct.serverError.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getPredefinedData_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getPredefinedData_resultTupleScheme getScheme() { return new getPredefinedData_resultTupleScheme(); } } private static class getPredefinedData_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getPredefinedData_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetAuthError()) { optionals.set(1); } if (struct.isSetServerError()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetAuthError()) { struct.authError.write(oprot); } if (struct.isSetServerError()) { struct.serverError.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getPredefinedData_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.success = new PredefinedData(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } if (incoming.get(2)) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } } } private static S scheme(org.apache.thrift.protocol.TProtocol proto) { return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); } } }