/** * 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 = "2023-02-23") @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public class MasterServer { public interface Iface { public boolean ping() throws org.apache.thrift.TException; public SessionData authenticate(java.lang.String login, java.lang.String password) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException; public ClientSessionData localAccountLogin(java.lang.String login, java.lang.String password) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException; public void setUsedSatellite(java.lang.String sessionId, java.lang.String satelliteName) throws org.apache.thrift.TException; public java.util.List findUser(java.lang.String sessionId, java.lang.String organizationId, java.lang.String searchTerm) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException; public java.util.List getPublicImages(java.lang.String sessionId, int page) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException; public ImageDetailsRead getImageDetails(java.lang.String sessionId, java.lang.String imageBaseId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException; public UserInfo getUser(java.lang.String userToken, java.lang.String userId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException; public void invalidateSession(java.lang.String sessionId) throws TInvalidTokenException, org.apache.thrift.TException; public ClientSessionData getSessionFromAccessCode(java.lang.String accessCode) throws TNotFoundException, TAuthorizationException, org.apache.thrift.TException; public UserInfo getUserFromToken(java.lang.String token) throws TInvalidTokenException, org.apache.thrift.TException; public boolean isServerAuthenticated(java.lang.String serverSessionId) throws org.apache.thrift.TException; public java.nio.ByteBuffer startServerAuthentication(int satelliteId) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException; public ServerSessionData serverAuthenticate(int satelliteId, java.nio.ByteBuffer challengeResponse) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException; public ImagePublishData getImageData(java.lang.String serverSessionId, java.lang.String imageVersionId) throws TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException; public TransferInformation submitImage(java.lang.String userToken, ImagePublishData imageDescription, java.util.List blockHashes) throws TAuthorizationException, TInvocationException, TTransferRejectedException, org.apache.thrift.TException; public int registerSatellite(java.lang.String userToken, java.lang.String displayName, java.util.List addresses, java.lang.String modulus, java.lang.String exponent, java.nio.ByteBuffer certsha256) throws TInvocationException, org.apache.thrift.TException; public boolean updateSatellite(java.lang.String serverSessionId, java.lang.String displayName, java.util.List addresses) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException; public TransferInformation downloadImage(java.lang.String sessionId, java.lang.String imageVersionId) throws TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException; public java.util.List getOrganizations() throws TInvocationException, org.apache.thrift.TException; public java.util.List getOperatingSystems() throws TInvocationException, org.apache.thrift.TException; public java.util.List getVirtualizers() throws TInvocationException, org.apache.thrift.TException; public java.util.List getTags(long startDate) throws TInvocationException, org.apache.thrift.TException; public java.util.List getSoftware(long startDate) throws TInvocationException, org.apache.thrift.TException; public TransferStatus queryUploadStatus(java.lang.String uploadToken) throws TInvalidTokenException, org.apache.thrift.TException; } public interface AsyncIface { public void ping(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void authenticate(java.lang.String login, java.lang.String password, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void localAccountLogin(java.lang.String login, java.lang.String password, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void setUsedSatellite(java.lang.String sessionId, java.lang.String satelliteName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void findUser(java.lang.String sessionId, java.lang.String organizationId, java.lang.String searchTerm, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException; public void getPublicImages(java.lang.String sessionId, int page, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException; public void getImageDetails(java.lang.String sessionId, java.lang.String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getUser(java.lang.String userToken, java.lang.String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void invalidateSession(java.lang.String sessionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getSessionFromAccessCode(java.lang.String accessCode, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getUserFromToken(java.lang.String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void isServerAuthenticated(java.lang.String serverSessionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void startServerAuthentication(int satelliteId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void serverAuthenticate(int satelliteId, java.nio.ByteBuffer challengeResponse, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getImageData(java.lang.String serverSessionId, java.lang.String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void submitImage(java.lang.String userToken, ImagePublishData imageDescription, java.util.List blockHashes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void registerSatellite(java.lang.String userToken, java.lang.String displayName, java.util.List addresses, java.lang.String modulus, java.lang.String exponent, java.nio.ByteBuffer certsha256, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void updateSatellite(java.lang.String serverSessionId, java.lang.String displayName, java.util.List addresses, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void downloadImage(java.lang.String sessionId, java.lang.String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getOrganizations(org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException; public void getOperatingSystems(org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException; public void getVirtualizers(org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException; public void getTags(long startDate, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException; public void getSoftware(long startDate, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException; public void queryUploadStatus(java.lang.String uploadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; } public static class Client extends org.apache.thrift.TServiceClient implements Iface { public static class Factory implements org.apache.thrift.TServiceClientFactory { 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 boolean ping() throws org.apache.thrift.TException { send_ping(); return recv_ping(); } public void send_ping() throws org.apache.thrift.TException { ping_args args = new ping_args(); sendBase("ping", args); } public boolean recv_ping() throws org.apache.thrift.TException { ping_result result = new ping_result(); receiveBase(result, "ping"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "ping failed: unknown result"); } @Override public SessionData authenticate(java.lang.String login, java.lang.String password) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException { send_authenticate(login, password); return recv_authenticate(); } public void send_authenticate(java.lang.String login, java.lang.String password) throws org.apache.thrift.TException { authenticate_args args = new authenticate_args(); args.setLogin(login); args.setPassword(password); sendBase("authenticate", args); } public SessionData recv_authenticate() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException { authenticate_result result = new authenticate_result(); receiveBase(result, "authenticate"); if (result.isSetSuccess()) { return result.success; } if (result.failure != null) { throw result.failure; } if (result.error != null) { throw result.error; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "authenticate failed: unknown result"); } @Override public ClientSessionData localAccountLogin(java.lang.String login, java.lang.String password) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException { send_localAccountLogin(login, password); return recv_localAccountLogin(); } public void send_localAccountLogin(java.lang.String login, java.lang.String password) throws org.apache.thrift.TException { localAccountLogin_args args = new localAccountLogin_args(); args.setLogin(login); args.setPassword(password); sendBase("localAccountLogin", args); } public ClientSessionData recv_localAccountLogin() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException { localAccountLogin_result result = new localAccountLogin_result(); receiveBase(result, "localAccountLogin"); if (result.isSetSuccess()) { return result.success; } if (result.failure != null) { throw result.failure; } if (result.error != null) { throw result.error; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "localAccountLogin failed: unknown result"); } @Override public void setUsedSatellite(java.lang.String sessionId, java.lang.String satelliteName) throws org.apache.thrift.TException { send_setUsedSatellite(sessionId, satelliteName); recv_setUsedSatellite(); } public void send_setUsedSatellite(java.lang.String sessionId, java.lang.String satelliteName) throws org.apache.thrift.TException { setUsedSatellite_args args = new setUsedSatellite_args(); args.setSessionId(sessionId); args.setSatelliteName(satelliteName); sendBase("setUsedSatellite", args); } public void recv_setUsedSatellite() throws org.apache.thrift.TException { setUsedSatellite_result result = new setUsedSatellite_result(); receiveBase(result, "setUsedSatellite"); return; } @Override public java.util.List findUser(java.lang.String sessionId, java.lang.String organizationId, java.lang.String searchTerm) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException { send_findUser(sessionId, organizationId, searchTerm); return recv_findUser(); } public void send_findUser(java.lang.String sessionId, java.lang.String organizationId, java.lang.String searchTerm) throws org.apache.thrift.TException { findUser_args args = new findUser_args(); args.setSessionId(sessionId); args.setOrganizationId(organizationId); args.setSearchTerm(searchTerm); sendBase("findUser", args); } public java.util.List recv_findUser() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException { findUser_result result = new findUser_result(); receiveBase(result, "findUser"); if (result.isSetSuccess()) { return result.success; } if (result.failure != null) { throw result.failure; } if (result.error != null) { throw result.error; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "findUser failed: unknown result"); } @Override public java.util.List getPublicImages(java.lang.String sessionId, int page) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException { send_getPublicImages(sessionId, page); return recv_getPublicImages(); } public void send_getPublicImages(java.lang.String sessionId, int page) throws org.apache.thrift.TException { getPublicImages_args args = new getPublicImages_args(); args.setSessionId(sessionId); args.setPage(page); sendBase("getPublicImages", args); } public java.util.List recv_getPublicImages() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException { getPublicImages_result result = new getPublicImages_result(); receiveBase(result, "getPublicImages"); if (result.isSetSuccess()) { return result.success; } if (result.failure != null) { throw result.failure; } if (result.error != null) { throw result.error; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPublicImages failed: unknown result"); } @Override public ImageDetailsRead getImageDetails(java.lang.String sessionId, java.lang.String imageBaseId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { send_getImageDetails(sessionId, imageBaseId); return recv_getImageDetails(); } public void send_getImageDetails(java.lang.String sessionId, java.lang.String imageBaseId) throws org.apache.thrift.TException { getImageDetails_args args = new getImageDetails_args(); args.setSessionId(sessionId); args.setImageBaseId(imageBaseId); sendBase("getImageDetails", args); } public ImageDetailsRead recv_getImageDetails() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { getImageDetails_result result = new getImageDetails_result(); receiveBase(result, "getImageDetails"); if (result.isSetSuccess()) { return result.success; } if (result.authError != null) { throw result.authError; } if (result.notFound != null) { throw result.notFound; } if (result.serverError != null) { throw result.serverError; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getImageDetails failed: unknown result"); } @Override public UserInfo getUser(java.lang.String userToken, java.lang.String userId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { send_getUser(userToken, userId); return recv_getUser(); } public void send_getUser(java.lang.String userToken, java.lang.String userId) throws org.apache.thrift.TException { getUser_args args = new getUser_args(); args.setUserToken(userToken); args.setUserId(userId); sendBase("getUser", args); } public UserInfo recv_getUser() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException { getUser_result result = new getUser_result(); receiveBase(result, "getUser"); if (result.isSetSuccess()) { return result.success; } if (result.authError != null) { throw result.authError; } if (result.notFound != null) { throw result.notFound; } if (result.serverError != null) { throw result.serverError; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUser failed: unknown result"); } @Override public void invalidateSession(java.lang.String sessionId) throws TInvalidTokenException, org.apache.thrift.TException { send_invalidateSession(sessionId); recv_invalidateSession(); } public void send_invalidateSession(java.lang.String sessionId) throws org.apache.thrift.TException { invalidateSession_args args = new invalidateSession_args(); args.setSessionId(sessionId); sendBase("invalidateSession", args); } public void recv_invalidateSession() throws TInvalidTokenException, org.apache.thrift.TException { invalidateSession_result result = new invalidateSession_result(); receiveBase(result, "invalidateSession"); if (result.ex != null) { throw result.ex; } return; } @Override public ClientSessionData getSessionFromAccessCode(java.lang.String accessCode) throws TNotFoundException, TAuthorizationException, org.apache.thrift.TException { send_getSessionFromAccessCode(accessCode); return recv_getSessionFromAccessCode(); } public void send_getSessionFromAccessCode(java.lang.String accessCode) throws org.apache.thrift.TException { getSessionFromAccessCode_args args = new getSessionFromAccessCode_args(); args.setAccessCode(accessCode); sendBase("getSessionFromAccessCode", args); } public ClientSessionData recv_getSessionFromAccessCode() throws TNotFoundException, TAuthorizationException, org.apache.thrift.TException { getSessionFromAccessCode_result result = new getSessionFromAccessCode_result(); receiveBase(result, "getSessionFromAccessCode"); if (result.isSetSuccess()) { return result.success; } if (result.notFound != null) { throw result.notFound; } if (result.auth != null) { throw result.auth; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSessionFromAccessCode failed: unknown result"); } @Override public UserInfo getUserFromToken(java.lang.String token) throws TInvalidTokenException, org.apache.thrift.TException { send_getUserFromToken(token); return recv_getUserFromToken(); } public void send_getUserFromToken(java.lang.String token) throws org.apache.thrift.TException { getUserFromToken_args args = new getUserFromToken_args(); args.setToken(token); sendBase("getUserFromToken", args); } public UserInfo recv_getUserFromToken() throws TInvalidTokenException, org.apache.thrift.TException { getUserFromToken_result result = new getUserFromToken_result(); receiveBase(result, "getUserFromToken"); if (result.isSetSuccess()) { return result.success; } if (result.failure != null) { throw result.failure; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUserFromToken failed: unknown result"); } @Override public boolean isServerAuthenticated(java.lang.String serverSessionId) throws org.apache.thrift.TException { send_isServerAuthenticated(serverSessionId); return recv_isServerAuthenticated(); } public void send_isServerAuthenticated(java.lang.String serverSessionId) throws org.apache.thrift.TException { isServerAuthenticated_args args = new isServerAuthenticated_args(); args.setServerSessionId(serverSessionId); sendBase("isServerAuthenticated", args); } public boolean recv_isServerAuthenticated() throws org.apache.thrift.TException { isServerAuthenticated_result result = new isServerAuthenticated_result(); receiveBase(result, "isServerAuthenticated"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isServerAuthenticated failed: unknown result"); } @Override public java.nio.ByteBuffer startServerAuthentication(int satelliteId) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException { send_startServerAuthentication(satelliteId); return recv_startServerAuthentication(); } public void send_startServerAuthentication(int satelliteId) throws org.apache.thrift.TException { startServerAuthentication_args args = new startServerAuthentication_args(); args.setSatelliteId(satelliteId); sendBase("startServerAuthentication", args); } public java.nio.ByteBuffer recv_startServerAuthentication() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException { startServerAuthentication_result result = new startServerAuthentication_result(); receiveBase(result, "startServerAuthentication"); if (result.isSetSuccess()) { return result.success; } if (result.failure != null) { throw result.failure; } if (result.error != null) { throw result.error; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startServerAuthentication failed: unknown result"); } @Override public ServerSessionData serverAuthenticate(int satelliteId, java.nio.ByteBuffer challengeResponse) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException { send_serverAuthenticate(satelliteId, challengeResponse); return recv_serverAuthenticate(); } public void send_serverAuthenticate(int satelliteId, java.nio.ByteBuffer challengeResponse) throws org.apache.thrift.TException { serverAuthenticate_args args = new serverAuthenticate_args(); args.setSatelliteId(satelliteId); args.setChallengeResponse(challengeResponse); sendBase("serverAuthenticate", args); } public ServerSessionData recv_serverAuthenticate() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException { serverAuthenticate_result result = new serverAuthenticate_result(); receiveBase(result, "serverAuthenticate"); if (result.isSetSuccess()) { return result.success; } if (result.failure != null) { throw result.failure; } if (result.errr != null) { throw result.errr; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "serverAuthenticate failed: unknown result"); } @Override public ImagePublishData getImageData(java.lang.String serverSessionId, java.lang.String imageVersionId) throws TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException { send_getImageData(serverSessionId, imageVersionId); return recv_getImageData(); } public void send_getImageData(java.lang.String serverSessionId, java.lang.String imageVersionId) throws org.apache.thrift.TException { getImageData_args args = new getImageData_args(); args.setServerSessionId(serverSessionId); args.setImageVersionId(imageVersionId); sendBase("getImageData", args); } public ImagePublishData recv_getImageData() throws TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException { getImageData_result result = new getImageData_result(); receiveBase(result, "getImageData"); if (result.isSetSuccess()) { return result.success; } if (result.failure != null) { throw result.failure; } if (result.failure2 != null) { throw result.failure2; } if (result.f3 != null) { throw result.f3; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getImageData failed: unknown result"); } @Override public TransferInformation submitImage(java.lang.String userToken, ImagePublishData imageDescription, java.util.List blockHashes) throws TAuthorizationException, TInvocationException, TTransferRejectedException, org.apache.thrift.TException { send_submitImage(userToken, imageDescription, blockHashes); return recv_submitImage(); } public void send_submitImage(java.lang.String userToken, ImagePublishData imageDescription, java.util.List blockHashes) throws org.apache.thrift.TException { submitImage_args args = new submitImage_args(); args.setUserToken(userToken); args.setImageDescription(imageDescription); args.setBlockHashes(blockHashes); sendBase("submitImage", args); } public TransferInformation recv_submitImage() throws TAuthorizationException, TInvocationException, TTransferRejectedException, org.apache.thrift.TException { submitImage_result result = new submitImage_result(); receiveBase(result, "submitImage"); if (result.isSetSuccess()) { return result.success; } if (result.failure != null) { throw result.failure; } if (result.failure2 != null) { throw result.failure2; } if (result.failure3 != null) { throw result.failure3; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "submitImage failed: unknown result"); } @Override public int registerSatellite(java.lang.String userToken, java.lang.String displayName, java.util.List addresses, java.lang.String modulus, java.lang.String exponent, java.nio.ByteBuffer certsha256) throws TInvocationException, org.apache.thrift.TException { send_registerSatellite(userToken, displayName, addresses, modulus, exponent, certsha256); return recv_registerSatellite(); } public void send_registerSatellite(java.lang.String userToken, java.lang.String displayName, java.util.List addresses, java.lang.String modulus, java.lang.String exponent, java.nio.ByteBuffer certsha256) throws org.apache.thrift.TException { registerSatellite_args args = new registerSatellite_args(); args.setUserToken(userToken); args.setDisplayName(displayName); args.setAddresses(addresses); args.setModulus(modulus); args.setExponent(exponent); args.setCertsha256(certsha256); sendBase("registerSatellite", args); } public int recv_registerSatellite() throws TInvocationException, org.apache.thrift.TException { registerSatellite_result result = new registerSatellite_result(); receiveBase(result, "registerSatellite"); if (result.isSetSuccess()) { return result.success; } if (result.error != null) { throw result.error; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "registerSatellite failed: unknown result"); } @Override public boolean updateSatellite(java.lang.String serverSessionId, java.lang.String displayName, java.util.List addresses) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException { send_updateSatellite(serverSessionId, displayName, addresses); return recv_updateSatellite(); } public void send_updateSatellite(java.lang.String serverSessionId, java.lang.String displayName, java.util.List addresses) throws org.apache.thrift.TException { updateSatellite_args args = new updateSatellite_args(); args.setServerSessionId(serverSessionId); args.setDisplayName(displayName); args.setAddresses(addresses); sendBase("updateSatellite", args); } public boolean recv_updateSatellite() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException { updateSatellite_result result = new updateSatellite_result(); receiveBase(result, "updateSatellite"); if (result.isSetSuccess()) { return result.success; } if (result.failure != null) { throw result.failure; } if (result.error != null) { throw result.error; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateSatellite failed: unknown result"); } @Override public TransferInformation downloadImage(java.lang.String sessionId, java.lang.String imageVersionId) throws TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException { send_downloadImage(sessionId, imageVersionId); return recv_downloadImage(); } public void send_downloadImage(java.lang.String sessionId, java.lang.String imageVersionId) throws org.apache.thrift.TException { downloadImage_args args = new downloadImage_args(); args.setSessionId(sessionId); args.setImageVersionId(imageVersionId); sendBase("downloadImage", args); } public TransferInformation recv_downloadImage() throws TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException { downloadImage_result result = new downloadImage_result(); receiveBase(result, "downloadImage"); if (result.isSetSuccess()) { return result.success; } if (result.failure != null) { throw result.failure; } if (result.failure2 != null) { throw result.failure2; } if (result.f3 != null) { throw result.f3; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "downloadImage failed: unknown result"); } @Override public java.util.List getOrganizations() throws TInvocationException, org.apache.thrift.TException { send_getOrganizations(); return recv_getOrganizations(); } public void send_getOrganizations() throws org.apache.thrift.TException { getOrganizations_args args = new getOrganizations_args(); sendBase("getOrganizations", args); } public java.util.List recv_getOrganizations() throws TInvocationException, org.apache.thrift.TException { getOrganizations_result result = new getOrganizations_result(); receiveBase(result, "getOrganizations"); if (result.isSetSuccess()) { return result.success; } if (result.serverError != null) { throw result.serverError; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getOrganizations failed: unknown result"); } @Override public java.util.List getOperatingSystems() throws TInvocationException, org.apache.thrift.TException { send_getOperatingSystems(); return recv_getOperatingSystems(); } public void send_getOperatingSystems() throws org.apache.thrift.TException { getOperatingSystems_args args = new getOperatingSystems_args(); sendBase("getOperatingSystems", args); } public java.util.List recv_getOperatingSystems() throws TInvocationException, org.apache.thrift.TException { getOperatingSystems_result result = new getOperatingSystems_result(); receiveBase(result, "getOperatingSystems"); if (result.isSetSuccess()) { return result.success; } if (result.serverError != null) { throw result.serverError; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getOperatingSystems failed: unknown result"); } @Override public java.util.List getVirtualizers() throws TInvocationException, org.apache.thrift.TException { send_getVirtualizers(); return recv_getVirtualizers(); } public void send_getVirtualizers() throws org.apache.thrift.TException { getVirtualizers_args args = new getVirtualizers_args(); sendBase("getVirtualizers", args); } public java.util.List recv_getVirtualizers() throws TInvocationException, org.apache.thrift.TException { getVirtualizers_result result = new getVirtualizers_result(); receiveBase(result, "getVirtualizers"); if (result.isSetSuccess()) { return result.success; } if (result.serverError != null) { throw result.serverError; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getVirtualizers failed: unknown result"); } @Override public java.util.List getTags(long startDate) throws TInvocationException, org.apache.thrift.TException { send_getTags(startDate); return recv_getTags(); } public void send_getTags(long startDate) throws org.apache.thrift.TException { getTags_args args = new getTags_args(); args.setStartDate(startDate); sendBase("getTags", args); } public java.util.List recv_getTags() throws TInvocationException, org.apache.thrift.TException { getTags_result result = new getTags_result(); receiveBase(result, "getTags"); if (result.isSetSuccess()) { return result.success; } if (result.serverError != null) { throw result.serverError; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getTags failed: unknown result"); } @Override public java.util.List getSoftware(long startDate) throws TInvocationException, org.apache.thrift.TException { send_getSoftware(startDate); return recv_getSoftware(); } public void send_getSoftware(long startDate) throws org.apache.thrift.TException { getSoftware_args args = new getSoftware_args(); args.setStartDate(startDate); sendBase("getSoftware", args); } public java.util.List recv_getSoftware() throws TInvocationException, org.apache.thrift.TException { getSoftware_result result = new getSoftware_result(); receiveBase(result, "getSoftware"); if (result.isSetSuccess()) { return result.success; } if (result.serverError != null) { throw result.serverError; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSoftware failed: unknown result"); } @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"); } } 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 ping(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); ping_call method_call = new ping_call(resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class ping_call extends org.apache.thrift.async.TAsyncMethodCall { public ping_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("ping", org.apache.thrift.protocol.TMessageType.CALL, 0)); ping_args args = new ping_args(); args.write(prot); prot.writeMessageEnd(); } @Override public java.lang.Boolean 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_ping(); } } @Override public void authenticate(java.lang.String login, java.lang.String password, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); authenticate_call method_call = new authenticate_call(login, password, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class authenticate_call extends org.apache.thrift.async.TAsyncMethodCall { private java.lang.String login; private java.lang.String password; public authenticate_call(java.lang.String login, java.lang.String password, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.login = login; this.password = password; } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("authenticate", org.apache.thrift.protocol.TMessageType.CALL, 0)); authenticate_args args = new authenticate_args(); args.setLogin(login); args.setPassword(password); args.write(prot); prot.writeMessageEnd(); } @Override public SessionData 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_authenticate(); } } @Override public void localAccountLogin(java.lang.String login, java.lang.String password, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); localAccountLogin_call method_call = new localAccountLogin_call(login, password, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class localAccountLogin_call extends org.apache.thrift.async.TAsyncMethodCall { private java.lang.String login; private java.lang.String password; public localAccountLogin_call(java.lang.String login, java.lang.String password, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.login = login; this.password = password; } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("localAccountLogin", org.apache.thrift.protocol.TMessageType.CALL, 0)); localAccountLogin_args args = new localAccountLogin_args(); args.setLogin(login); args.setPassword(password); args.write(prot); prot.writeMessageEnd(); } @Override public ClientSessionData 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_localAccountLogin(); } } @Override public void setUsedSatellite(java.lang.String sessionId, java.lang.String satelliteName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); setUsedSatellite_call method_call = new setUsedSatellite_call(sessionId, satelliteName, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class setUsedSatellite_call extends org.apache.thrift.async.TAsyncMethodCall { private java.lang.String sessionId; private java.lang.String satelliteName; public setUsedSatellite_call(java.lang.String sessionId, java.lang.String satelliteName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.sessionId = sessionId; this.satelliteName = satelliteName; } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setUsedSatellite", org.apache.thrift.protocol.TMessageType.CALL, 0)); setUsedSatellite_args args = new setUsedSatellite_args(); args.setSessionId(sessionId); args.setSatelliteName(satelliteName); args.write(prot); prot.writeMessageEnd(); } @Override public Void 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); (new Client(prot)).recv_setUsedSatellite(); return null; } } @Override public void findUser(java.lang.String sessionId, java.lang.String organizationId, java.lang.String searchTerm, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException { checkReady(); findUser_call method_call = new findUser_call(sessionId, organizationId, searchTerm, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class findUser_call extends org.apache.thrift.async.TAsyncMethodCall> { private java.lang.String sessionId; private java.lang.String organizationId; private java.lang.String searchTerm; public findUser_call(java.lang.String sessionId, java.lang.String organizationId, java.lang.String searchTerm, org.apache.thrift.async.AsyncMethodCallback> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.sessionId = sessionId; this.organizationId = organizationId; this.searchTerm = searchTerm; } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("findUser", org.apache.thrift.protocol.TMessageType.CALL, 0)); findUser_args args = new findUser_args(); args.setSessionId(sessionId); args.setOrganizationId(organizationId); args.setSearchTerm(searchTerm); args.write(prot); prot.writeMessageEnd(); } @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_findUser(); } } @Override public void getPublicImages(java.lang.String sessionId, int page, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException { checkReady(); getPublicImages_call method_call = new getPublicImages_call(sessionId, page, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getPublicImages_call extends org.apache.thrift.async.TAsyncMethodCall> { private java.lang.String sessionId; private int page; public getPublicImages_call(java.lang.String sessionId, int page, org.apache.thrift.async.AsyncMethodCallback> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.sessionId = sessionId; this.page = page; } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPublicImages", org.apache.thrift.protocol.TMessageType.CALL, 0)); getPublicImages_args args = new getPublicImages_args(); args.setSessionId(sessionId); args.setPage(page); args.write(prot); prot.writeMessageEnd(); } @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_getPublicImages(); } } @Override public void getImageDetails(java.lang.String sessionId, java.lang.String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getImageDetails_call method_call = new getImageDetails_call(sessionId, imageBaseId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getImageDetails_call extends org.apache.thrift.async.TAsyncMethodCall { private java.lang.String sessionId; private java.lang.String imageBaseId; public getImageDetails_call(java.lang.String sessionId, 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.sessionId = sessionId; 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.setSessionId(sessionId); 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 getUser(java.lang.String userToken, java.lang.String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getUser_call method_call = new getUser_call(userToken, userId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getUser_call extends org.apache.thrift.async.TAsyncMethodCall { private java.lang.String userToken; private java.lang.String userId; public getUser_call(java.lang.String userToken, java.lang.String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.userToken = userToken; this.userId = userId; } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUser", org.apache.thrift.protocol.TMessageType.CALL, 0)); getUser_args args = new getUser_args(); args.setUserToken(userToken); args.setUserId(userId); args.write(prot); prot.writeMessageEnd(); } @Override public UserInfo 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_getUser(); } } @Override public void invalidateSession(java.lang.String sessionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); invalidateSession_call method_call = new invalidateSession_call(sessionId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class invalidateSession_call extends org.apache.thrift.async.TAsyncMethodCall { private java.lang.String sessionId; public invalidateSession_call(java.lang.String sessionId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.sessionId = sessionId; } @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.setSessionId(sessionId); 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 getSessionFromAccessCode(java.lang.String accessCode, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getSessionFromAccessCode_call method_call = new getSessionFromAccessCode_call(accessCode, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getSessionFromAccessCode_call extends org.apache.thrift.async.TAsyncMethodCall { private java.lang.String accessCode; public getSessionFromAccessCode_call(java.lang.String accessCode, 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.accessCode = accessCode; } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSessionFromAccessCode", org.apache.thrift.protocol.TMessageType.CALL, 0)); getSessionFromAccessCode_args args = new getSessionFromAccessCode_args(); args.setAccessCode(accessCode); args.write(prot); prot.writeMessageEnd(); } @Override public ClientSessionData getResult() throws TNotFoundException, TAuthorizationException, 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_getSessionFromAccessCode(); } } @Override public void getUserFromToken(java.lang.String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getUserFromToken_call method_call = new getUserFromToken_call(token, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getUserFromToken_call extends org.apache.thrift.async.TAsyncMethodCall { private java.lang.String token; public getUserFromToken_call(java.lang.String token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.token = token; } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUserFromToken", org.apache.thrift.protocol.TMessageType.CALL, 0)); getUserFromToken_args args = new getUserFromToken_args(); args.setToken(token); args.write(prot); prot.writeMessageEnd(); } @Override public UserInfo 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_getUserFromToken(); } } @Override public void isServerAuthenticated(java.lang.String serverSessionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); isServerAuthenticated_call method_call = new isServerAuthenticated_call(serverSessionId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class isServerAuthenticated_call extends org.apache.thrift.async.TAsyncMethodCall { private java.lang.String serverSessionId; public isServerAuthenticated_call(java.lang.String serverSessionId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.serverSessionId = serverSessionId; } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isServerAuthenticated", org.apache.thrift.protocol.TMessageType.CALL, 0)); isServerAuthenticated_args args = new isServerAuthenticated_args(); args.setServerSessionId(serverSessionId); args.write(prot); prot.writeMessageEnd(); } @Override public java.lang.Boolean 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_isServerAuthenticated(); } } @Override public void startServerAuthentication(int satelliteId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); startServerAuthentication_call method_call = new startServerAuthentication_call(satelliteId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class startServerAuthentication_call extends org.apache.thrift.async.TAsyncMethodCall { private int satelliteId; public startServerAuthentication_call(int satelliteId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.satelliteId = satelliteId; } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startServerAuthentication", org.apache.thrift.protocol.TMessageType.CALL, 0)); startServerAuthentication_args args = new startServerAuthentication_args(); args.setSatelliteId(satelliteId); args.write(prot); prot.writeMessageEnd(); } @Override public java.nio.ByteBuffer 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_startServerAuthentication(); } } @Override public void serverAuthenticate(int satelliteId, java.nio.ByteBuffer challengeResponse, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); serverAuthenticate_call method_call = new serverAuthenticate_call(satelliteId, challengeResponse, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class serverAuthenticate_call extends org.apache.thrift.async.TAsyncMethodCall { private int satelliteId; private java.nio.ByteBuffer challengeResponse; public serverAuthenticate_call(int satelliteId, java.nio.ByteBuffer challengeResponse, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.satelliteId = satelliteId; this.challengeResponse = challengeResponse; } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("serverAuthenticate", org.apache.thrift.protocol.TMessageType.CALL, 0)); serverAuthenticate_args args = new serverAuthenticate_args(); args.setSatelliteId(satelliteId); args.setChallengeResponse(challengeResponse); args.write(prot); prot.writeMessageEnd(); } @Override public ServerSessionData 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_serverAuthenticate(); } } @Override public void getImageData(java.lang.String serverSessionId, java.lang.String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getImageData_call method_call = new getImageData_call(serverSessionId, imageVersionId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getImageData_call extends org.apache.thrift.async.TAsyncMethodCall { private java.lang.String serverSessionId; private java.lang.String imageVersionId; public getImageData_call(java.lang.String serverSessionId, 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.serverSessionId = serverSessionId; 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("getImageData", org.apache.thrift.protocol.TMessageType.CALL, 0)); getImageData_args args = new getImageData_args(); args.setServerSessionId(serverSessionId); args.setImageVersionId(imageVersionId); args.write(prot); prot.writeMessageEnd(); } @Override public ImagePublishData getResult() throws 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_getImageData(); } } @Override public void submitImage(java.lang.String userToken, ImagePublishData imageDescription, java.util.List blockHashes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); submitImage_call method_call = new submitImage_call(userToken, imageDescription, blockHashes, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class submitImage_call extends org.apache.thrift.async.TAsyncMethodCall { private java.lang.String userToken; private ImagePublishData imageDescription; private java.util.List blockHashes; public submitImage_call(java.lang.String userToken, ImagePublishData imageDescription, java.util.List blockHashes, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.userToken = userToken; this.imageDescription = imageDescription; this.blockHashes = blockHashes; } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("submitImage", org.apache.thrift.protocol.TMessageType.CALL, 0)); submitImage_args args = new submitImage_args(); args.setUserToken(userToken); args.setImageDescription(imageDescription); args.setBlockHashes(blockHashes); args.write(prot); prot.writeMessageEnd(); } @Override public TransferInformation getResult() throws TAuthorizationException, 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_submitImage(); } } @Override public void registerSatellite(java.lang.String userToken, java.lang.String displayName, java.util.List addresses, java.lang.String modulus, java.lang.String exponent, java.nio.ByteBuffer certsha256, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); registerSatellite_call method_call = new registerSatellite_call(userToken, displayName, addresses, modulus, exponent, certsha256, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class registerSatellite_call extends org.apache.thrift.async.TAsyncMethodCall { private java.lang.String userToken; private java.lang.String displayName; private java.util.List addresses; private java.lang.String modulus; private java.lang.String exponent; private java.nio.ByteBuffer certsha256; public registerSatellite_call(java.lang.String userToken, java.lang.String displayName, java.util.List addresses, java.lang.String modulus, java.lang.String exponent, java.nio.ByteBuffer certsha256, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.userToken = userToken; this.displayName = displayName; this.addresses = addresses; this.modulus = modulus; this.exponent = exponent; this.certsha256 = certsha256; } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("registerSatellite", org.apache.thrift.protocol.TMessageType.CALL, 0)); registerSatellite_args args = new registerSatellite_args(); args.setUserToken(userToken); args.setDisplayName(displayName); args.setAddresses(addresses); args.setModulus(modulus); args.setExponent(exponent); args.setCertsha256(certsha256); args.write(prot); prot.writeMessageEnd(); } @Override public java.lang.Integer getResult() throws 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_registerSatellite(); } } @Override public void updateSatellite(java.lang.String serverSessionId, java.lang.String displayName, java.util.List addresses, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); updateSatellite_call method_call = new updateSatellite_call(serverSessionId, displayName, addresses, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class updateSatellite_call extends org.apache.thrift.async.TAsyncMethodCall { private java.lang.String serverSessionId; private java.lang.String displayName; private java.util.List addresses; public updateSatellite_call(java.lang.String serverSessionId, java.lang.String displayName, java.util.List addresses, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.serverSessionId = serverSessionId; this.displayName = displayName; this.addresses = addresses; } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateSatellite", org.apache.thrift.protocol.TMessageType.CALL, 0)); updateSatellite_args args = new updateSatellite_args(); args.setServerSessionId(serverSessionId); args.setDisplayName(displayName); args.setAddresses(addresses); args.write(prot); prot.writeMessageEnd(); } @Override public java.lang.Boolean 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_updateSatellite(); } } @Override public void downloadImage(java.lang.String sessionId, java.lang.String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); downloadImage_call method_call = new downloadImage_call(sessionId, imageVersionId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class downloadImage_call extends org.apache.thrift.async.TAsyncMethodCall { private java.lang.String sessionId; private java.lang.String imageVersionId; public downloadImage_call(java.lang.String sessionId, 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.sessionId = sessionId; 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("downloadImage", org.apache.thrift.protocol.TMessageType.CALL, 0)); downloadImage_args args = new downloadImage_args(); args.setSessionId(sessionId); args.setImageVersionId(imageVersionId); args.write(prot); prot.writeMessageEnd(); } @Override public TransferInformation getResult() throws 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_downloadImage(); } } @Override public void getOrganizations(org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException { checkReady(); getOrganizations_call method_call = new getOrganizations_call(resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getOrganizations_call extends org.apache.thrift.async.TAsyncMethodCall> { public getOrganizations_call(org.apache.thrift.async.AsyncMethodCallback> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getOrganizations", org.apache.thrift.protocol.TMessageType.CALL, 0)); getOrganizations_args args = new getOrganizations_args(); args.write(prot); prot.writeMessageEnd(); } @Override public java.util.List getResult() throws 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_getOrganizations(); } } @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 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_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 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_getVirtualizers(); } } @Override public void getTags(long startDate, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException { checkReady(); getTags_call method_call = new getTags_call(startDate, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getTags_call extends org.apache.thrift.async.TAsyncMethodCall> { private long startDate; public getTags_call(long startDate, org.apache.thrift.async.AsyncMethodCallback> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.startDate = startDate; } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getTags", org.apache.thrift.protocol.TMessageType.CALL, 0)); getTags_args args = new getTags_args(); args.setStartDate(startDate); args.write(prot); prot.writeMessageEnd(); } @Override public java.util.List getResult() throws 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_getTags(); } } @Override public void getSoftware(long startDate, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException { checkReady(); getSoftware_call method_call = new getSoftware_call(startDate, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getSoftware_call extends org.apache.thrift.async.TAsyncMethodCall> { private long startDate; public getSoftware_call(long startDate, org.apache.thrift.async.AsyncMethodCallback> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.startDate = startDate; } @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSoftware", org.apache.thrift.protocol.TMessageType.CALL, 0)); getSoftware_args args = new getSoftware_args(); args.setStartDate(startDate); args.write(prot); prot.writeMessageEnd(); } @Override public java.util.List getResult() throws 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_getSoftware(); } } @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(); } } } 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("ping", new ping()); processMap.put("authenticate", new authenticate()); processMap.put("localAccountLogin", new localAccountLogin()); processMap.put("setUsedSatellite", new setUsedSatellite()); processMap.put("findUser", new findUser()); processMap.put("getPublicImages", new getPublicImages()); processMap.put("getImageDetails", new getImageDetails()); processMap.put("getUser", new getUser()); processMap.put("invalidateSession", new invalidateSession()); processMap.put("getSessionFromAccessCode", new getSessionFromAccessCode()); processMap.put("getUserFromToken", new getUserFromToken()); processMap.put("isServerAuthenticated", new isServerAuthenticated()); processMap.put("startServerAuthentication", new startServerAuthentication()); processMap.put("serverAuthenticate", new serverAuthenticate()); processMap.put("getImageData", new getImageData()); processMap.put("submitImage", new submitImage()); processMap.put("registerSatellite", new registerSatellite()); processMap.put("updateSatellite", new updateSatellite()); processMap.put("downloadImage", new downloadImage()); processMap.put("getOrganizations", new getOrganizations()); processMap.put("getOperatingSystems", new getOperatingSystems()); processMap.put("getVirtualizers", new getVirtualizers()); processMap.put("getTags", new getTags()); processMap.put("getSoftware", new getSoftware()); processMap.put("queryUploadStatus", new queryUploadStatus()); return processMap; } public static class ping extends org.apache.thrift.ProcessFunction { public ping() { super("ping"); } @Override public ping_args getEmptyArgsInstance() { return new ping_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public ping_result getResult(I iface, ping_args args) throws org.apache.thrift.TException { ping_result result = new ping_result(); result.success = iface.ping(); result.setSuccessIsSet(true); return result; } } public static class authenticate extends org.apache.thrift.ProcessFunction { public authenticate() { super("authenticate"); } @Override public authenticate_args getEmptyArgsInstance() { return new authenticate_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public authenticate_result getResult(I iface, authenticate_args args) throws org.apache.thrift.TException { authenticate_result result = new authenticate_result(); try { result.success = iface.authenticate(args.login, args.password); } catch (TAuthorizationException failure) { result.failure = failure; } catch (TInvocationException error) { result.error = error; } return result; } } public static class localAccountLogin extends org.apache.thrift.ProcessFunction { public localAccountLogin() { super("localAccountLogin"); } @Override public localAccountLogin_args getEmptyArgsInstance() { return new localAccountLogin_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public localAccountLogin_result getResult(I iface, localAccountLogin_args args) throws org.apache.thrift.TException { localAccountLogin_result result = new localAccountLogin_result(); try { result.success = iface.localAccountLogin(args.login, args.password); } catch (TAuthorizationException failure) { result.failure = failure; } catch (TInvocationException error) { result.error = error; } return result; } } public static class setUsedSatellite extends org.apache.thrift.ProcessFunction { public setUsedSatellite() { super("setUsedSatellite"); } @Override public setUsedSatellite_args getEmptyArgsInstance() { return new setUsedSatellite_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public setUsedSatellite_result getResult(I iface, setUsedSatellite_args args) throws org.apache.thrift.TException { setUsedSatellite_result result = new setUsedSatellite_result(); iface.setUsedSatellite(args.sessionId, args.satelliteName); return result; } } public static class findUser extends org.apache.thrift.ProcessFunction { public findUser() { super("findUser"); } @Override public findUser_args getEmptyArgsInstance() { return new findUser_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public findUser_result getResult(I iface, findUser_args args) throws org.apache.thrift.TException { findUser_result result = new findUser_result(); try { result.success = iface.findUser(args.sessionId, args.organizationId, args.searchTerm); } catch (TAuthorizationException failure) { result.failure = failure; } catch (TInvocationException error) { result.error = error; } return result; } } public static class getPublicImages extends org.apache.thrift.ProcessFunction { public getPublicImages() { super("getPublicImages"); } @Override public getPublicImages_args getEmptyArgsInstance() { return new getPublicImages_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public getPublicImages_result getResult(I iface, getPublicImages_args args) throws org.apache.thrift.TException { getPublicImages_result result = new getPublicImages_result(); try { result.success = iface.getPublicImages(args.sessionId, args.page); } catch (TAuthorizationException failure) { result.failure = failure; } catch (TInvocationException error) { result.error = error; } return result; } } public static class getImageDetails 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.sessionId, args.imageBaseId); } catch (TAuthorizationException authError) { result.authError = authError; } catch (TNotFoundException notFound) { result.notFound = notFound; } catch (TInvocationException serverError) { result.serverError = serverError; } return result; } } public static class getUser extends org.apache.thrift.ProcessFunction { public getUser() { super("getUser"); } @Override public getUser_args getEmptyArgsInstance() { return new getUser_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public getUser_result getResult(I iface, getUser_args args) throws org.apache.thrift.TException { getUser_result result = new getUser_result(); try { result.success = iface.getUser(args.userToken, args.userId); } catch (TAuthorizationException authError) { result.authError = authError; } catch (TNotFoundException notFound) { result.notFound = notFound; } catch (TInvocationException serverError) { result.serverError = serverError; } return result; } } public static class invalidateSession 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.sessionId); } catch (TInvalidTokenException ex) { result.ex = ex; } return result; } } public static class getSessionFromAccessCode extends org.apache.thrift.ProcessFunction { public getSessionFromAccessCode() { super("getSessionFromAccessCode"); } @Override public getSessionFromAccessCode_args getEmptyArgsInstance() { return new getSessionFromAccessCode_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public getSessionFromAccessCode_result getResult(I iface, getSessionFromAccessCode_args args) throws org.apache.thrift.TException { getSessionFromAccessCode_result result = new getSessionFromAccessCode_result(); try { result.success = iface.getSessionFromAccessCode(args.accessCode); } catch (TNotFoundException notFound) { result.notFound = notFound; } catch (TAuthorizationException auth) { result.auth = auth; } return result; } } public static class getUserFromToken extends org.apache.thrift.ProcessFunction { public getUserFromToken() { super("getUserFromToken"); } @Override public getUserFromToken_args getEmptyArgsInstance() { return new getUserFromToken_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public getUserFromToken_result getResult(I iface, getUserFromToken_args args) throws org.apache.thrift.TException { getUserFromToken_result result = new getUserFromToken_result(); try { result.success = iface.getUserFromToken(args.token); } catch (TInvalidTokenException failure) { result.failure = failure; } return result; } } public static class isServerAuthenticated extends org.apache.thrift.ProcessFunction { public isServerAuthenticated() { super("isServerAuthenticated"); } @Override public isServerAuthenticated_args getEmptyArgsInstance() { return new isServerAuthenticated_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public isServerAuthenticated_result getResult(I iface, isServerAuthenticated_args args) throws org.apache.thrift.TException { isServerAuthenticated_result result = new isServerAuthenticated_result(); result.success = iface.isServerAuthenticated(args.serverSessionId); result.setSuccessIsSet(true); return result; } } public static class startServerAuthentication extends org.apache.thrift.ProcessFunction { public startServerAuthentication() { super("startServerAuthentication"); } @Override public startServerAuthentication_args getEmptyArgsInstance() { return new startServerAuthentication_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public startServerAuthentication_result getResult(I iface, startServerAuthentication_args args) throws org.apache.thrift.TException { startServerAuthentication_result result = new startServerAuthentication_result(); try { result.success = iface.startServerAuthentication(args.satelliteId); } catch (TAuthorizationException failure) { result.failure = failure; } catch (TInvocationException error) { result.error = error; } return result; } } public static class serverAuthenticate extends org.apache.thrift.ProcessFunction { public serverAuthenticate() { super("serverAuthenticate"); } @Override public serverAuthenticate_args getEmptyArgsInstance() { return new serverAuthenticate_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public serverAuthenticate_result getResult(I iface, serverAuthenticate_args args) throws org.apache.thrift.TException { serverAuthenticate_result result = new serverAuthenticate_result(); try { result.success = iface.serverAuthenticate(args.satelliteId, args.challengeResponse); } catch (TAuthorizationException failure) { result.failure = failure; } catch (TInvocationException errr) { result.errr = errr; } return result; } } public static class getImageData extends org.apache.thrift.ProcessFunction { public getImageData() { super("getImageData"); } @Override public getImageData_args getEmptyArgsInstance() { return new getImageData_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public getImageData_result getResult(I iface, getImageData_args args) throws org.apache.thrift.TException { getImageData_result result = new getImageData_result(); try { result.success = iface.getImageData(args.serverSessionId, args.imageVersionId); } catch (TAuthorizationException failure) { result.failure = failure; } catch (TInvocationException failure2) { result.failure2 = failure2; } catch (TNotFoundException f3) { result.f3 = f3; } return result; } } public static class submitImage extends org.apache.thrift.ProcessFunction { public submitImage() { super("submitImage"); } @Override public submitImage_args getEmptyArgsInstance() { return new submitImage_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public submitImage_result getResult(I iface, submitImage_args args) throws org.apache.thrift.TException { submitImage_result result = new submitImage_result(); try { result.success = iface.submitImage(args.userToken, args.imageDescription, args.blockHashes); } catch (TAuthorizationException failure) { result.failure = failure; } catch (TInvocationException failure2) { result.failure2 = failure2; } catch (TTransferRejectedException failure3) { result.failure3 = failure3; } return result; } } public static class registerSatellite extends org.apache.thrift.ProcessFunction { public registerSatellite() { super("registerSatellite"); } @Override public registerSatellite_args getEmptyArgsInstance() { return new registerSatellite_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public registerSatellite_result getResult(I iface, registerSatellite_args args) throws org.apache.thrift.TException { registerSatellite_result result = new registerSatellite_result(); try { result.success = iface.registerSatellite(args.userToken, args.displayName, args.addresses, args.modulus, args.exponent, args.certsha256); result.setSuccessIsSet(true); } catch (TInvocationException error) { result.error = error; } return result; } } public static class updateSatellite extends org.apache.thrift.ProcessFunction { public updateSatellite() { super("updateSatellite"); } @Override public updateSatellite_args getEmptyArgsInstance() { return new updateSatellite_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public updateSatellite_result getResult(I iface, updateSatellite_args args) throws org.apache.thrift.TException { updateSatellite_result result = new updateSatellite_result(); try { result.success = iface.updateSatellite(args.serverSessionId, args.displayName, args.addresses); result.setSuccessIsSet(true); } catch (TAuthorizationException failure) { result.failure = failure; } catch (TInvocationException error) { result.error = error; } return result; } } public static class downloadImage extends org.apache.thrift.ProcessFunction { public downloadImage() { super("downloadImage"); } @Override public downloadImage_args getEmptyArgsInstance() { return new downloadImage_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public downloadImage_result getResult(I iface, downloadImage_args args) throws org.apache.thrift.TException { downloadImage_result result = new downloadImage_result(); try { result.success = iface.downloadImage(args.sessionId, args.imageVersionId); } catch (TAuthorizationException failure) { result.failure = failure; } catch (TInvocationException failure2) { result.failure2 = failure2; } catch (TNotFoundException f3) { result.f3 = f3; } return result; } } public static class getOrganizations extends org.apache.thrift.ProcessFunction { public getOrganizations() { super("getOrganizations"); } @Override public getOrganizations_args getEmptyArgsInstance() { return new getOrganizations_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public getOrganizations_result getResult(I iface, getOrganizations_args args) throws org.apache.thrift.TException { getOrganizations_result result = new getOrganizations_result(); try { result.success = iface.getOrganizations(); } catch (TInvocationException serverError) { result.serverError = serverError; } return result; } } public static class getOperatingSystems 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(); try { result.success = iface.getOperatingSystems(); } catch (TInvocationException serverError) { result.serverError = serverError; } 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(); try { result.success = iface.getVirtualizers(); } catch (TInvocationException serverError) { result.serverError = serverError; } return result; } } public static class getTags extends org.apache.thrift.ProcessFunction { public getTags() { super("getTags"); } @Override public getTags_args getEmptyArgsInstance() { return new getTags_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public getTags_result getResult(I iface, getTags_args args) throws org.apache.thrift.TException { getTags_result result = new getTags_result(); try { result.success = iface.getTags(args.startDate); } catch (TInvocationException serverError) { result.serverError = serverError; } return result; } } public static class getSoftware extends org.apache.thrift.ProcessFunction { public getSoftware() { super("getSoftware"); } @Override public getSoftware_args getEmptyArgsInstance() { return new getSoftware_args(); } @Override protected boolean isOneway() { return false; } @Override protected boolean rethrowUnhandledExceptions() { return false; } @Override public getSoftware_result getResult(I iface, getSoftware_args args) throws org.apache.thrift.TException { getSoftware_result result = new getSoftware_result(); try { result.success = iface.getSoftware(args.startDate); } catch (TInvocationException serverError) { result.serverError = serverError; } return result; } } public static class queryUploadStatus 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 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("ping", new ping()); processMap.put("authenticate", new authenticate()); processMap.put("localAccountLogin", new localAccountLogin()); processMap.put("setUsedSatellite", new setUsedSatellite()); processMap.put("findUser", new findUser()); processMap.put("getPublicImages", new getPublicImages()); processMap.put("getImageDetails", new getImageDetails()); processMap.put("getUser", new getUser()); processMap.put("invalidateSession", new invalidateSession()); processMap.put("getSessionFromAccessCode", new getSessionFromAccessCode()); processMap.put("getUserFromToken", new getUserFromToken()); processMap.put("isServerAuthenticated", new isServerAuthenticated()); processMap.put("startServerAuthentication", new startServerAuthentication()); processMap.put("serverAuthenticate", new serverAuthenticate()); processMap.put("getImageData", new getImageData()); processMap.put("submitImage", new submitImage()); processMap.put("registerSatellite", new registerSatellite()); processMap.put("updateSatellite", new updateSatellite()); processMap.put("downloadImage", new downloadImage()); processMap.put("getOrganizations", new getOrganizations()); processMap.put("getOperatingSystems", new getOperatingSystems()); processMap.put("getVirtualizers", new getVirtualizers()); processMap.put("getTags", new getTags()); processMap.put("getSoftware", new getSoftware()); processMap.put("queryUploadStatus", new queryUploadStatus()); return processMap; } public static class ping extends org.apache.thrift.AsyncProcessFunction { public ping() { super("ping"); } @Override public ping_args getEmptyArgsInstance() { return new ping_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.Boolean o) { ping_result result = new ping_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } 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; ping_result result = new ping_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, ping_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.ping(resultHandler); } } public static class authenticate extends org.apache.thrift.AsyncProcessFunction { public authenticate() { super("authenticate"); } @Override public authenticate_args getEmptyArgsInstance() { return new authenticate_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(SessionData o) { authenticate_result result = new authenticate_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; authenticate_result result = new authenticate_result(); if (e instanceof TAuthorizationException) { result.failure = (TAuthorizationException) e; result.setFailureIsSet(true); msg = result; } else if (e instanceof TInvocationException) { result.error = (TInvocationException) e; result.setErrorIsSet(true); msg = result; } else 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, authenticate_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.authenticate(args.login, args.password,resultHandler); } } public static class localAccountLogin extends org.apache.thrift.AsyncProcessFunction { public localAccountLogin() { super("localAccountLogin"); } @Override public localAccountLogin_args getEmptyArgsInstance() { return new localAccountLogin_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(ClientSessionData o) { localAccountLogin_result result = new localAccountLogin_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; localAccountLogin_result result = new localAccountLogin_result(); if (e instanceof TAuthorizationException) { result.failure = (TAuthorizationException) e; result.setFailureIsSet(true); msg = result; } else if (e instanceof TInvocationException) { result.error = (TInvocationException) e; result.setErrorIsSet(true); msg = result; } else 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, localAccountLogin_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.localAccountLogin(args.login, args.password,resultHandler); } } public static class setUsedSatellite extends org.apache.thrift.AsyncProcessFunction { public setUsedSatellite() { super("setUsedSatellite"); } @Override public setUsedSatellite_args getEmptyArgsInstance() { return new setUsedSatellite_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) { setUsedSatellite_result result = new setUsedSatellite_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; setUsedSatellite_result result = new setUsedSatellite_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, setUsedSatellite_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.setUsedSatellite(args.sessionId, args.satelliteName,resultHandler); } } public static class findUser extends org.apache.thrift.AsyncProcessFunction> { public findUser() { super("findUser"); } @Override public findUser_args getEmptyArgsInstance() { return new findUser_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) { findUser_result result = new findUser_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; findUser_result result = new findUser_result(); if (e instanceof TAuthorizationException) { result.failure = (TAuthorizationException) e; result.setFailureIsSet(true); msg = result; } else if (e instanceof TInvocationException) { result.error = (TInvocationException) e; result.setErrorIsSet(true); msg = result; } else 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, findUser_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException { iface.findUser(args.sessionId, args.organizationId, args.searchTerm,resultHandler); } } public static class getPublicImages extends org.apache.thrift.AsyncProcessFunction> { public getPublicImages() { super("getPublicImages"); } @Override public getPublicImages_args getEmptyArgsInstance() { return new getPublicImages_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) { getPublicImages_result result = new getPublicImages_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; getPublicImages_result result = new getPublicImages_result(); if (e instanceof TAuthorizationException) { result.failure = (TAuthorizationException) e; result.setFailureIsSet(true); msg = result; } else if (e instanceof TInvocationException) { result.error = (TInvocationException) e; result.setErrorIsSet(true); msg = result; } else 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, getPublicImages_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException { iface.getPublicImages(args.sessionId, 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.sessionId, args.imageBaseId,resultHandler); } } public static class getUser extends org.apache.thrift.AsyncProcessFunction { public getUser() { super("getUser"); } @Override public getUser_args getEmptyArgsInstance() { return new getUser_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(UserInfo o) { getUser_result result = new getUser_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; getUser_result result = new getUser_result(); if (e instanceof TAuthorizationException) { result.authError = (TAuthorizationException) e; result.setAuthErrorIsSet(true); msg = result; } else if (e instanceof TNotFoundException) { result.notFound = (TNotFoundException) e; result.setNotFoundIsSet(true); msg = result; } else if (e instanceof TInvocationException) { result.serverError = (TInvocationException) e; result.setServerErrorIsSet(true); msg = result; } else 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, getUser_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.getUser(args.userToken, args.userId,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.sessionId,resultHandler); } } public static class getSessionFromAccessCode extends org.apache.thrift.AsyncProcessFunction { public getSessionFromAccessCode() { super("getSessionFromAccessCode"); } @Override public getSessionFromAccessCode_args getEmptyArgsInstance() { return new getSessionFromAccessCode_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(ClientSessionData o) { getSessionFromAccessCode_result result = new getSessionFromAccessCode_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; getSessionFromAccessCode_result result = new getSessionFromAccessCode_result(); if (e instanceof TNotFoundException) { result.notFound = (TNotFoundException) e; result.setNotFoundIsSet(true); msg = result; } else if (e instanceof TAuthorizationException) { result.auth = (TAuthorizationException) e; result.setAuthIsSet(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, getSessionFromAccessCode_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.getSessionFromAccessCode(args.accessCode,resultHandler); } } public static class getUserFromToken extends org.apache.thrift.AsyncProcessFunction { public getUserFromToken() { super("getUserFromToken"); } @Override public getUserFromToken_args getEmptyArgsInstance() { return new getUserFromToken_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(UserInfo o) { getUserFromToken_result result = new getUserFromToken_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; getUserFromToken_result result = new getUserFromToken_result(); if (e instanceof TInvalidTokenException) { result.failure = (TInvalidTokenException) e; result.setFailureIsSet(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, getUserFromToken_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.getUserFromToken(args.token,resultHandler); } } public static class isServerAuthenticated extends org.apache.thrift.AsyncProcessFunction { public isServerAuthenticated() { super("isServerAuthenticated"); } @Override public isServerAuthenticated_args getEmptyArgsInstance() { return new isServerAuthenticated_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.Boolean o) { isServerAuthenticated_result result = new isServerAuthenticated_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } 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; isServerAuthenticated_result result = new isServerAuthenticated_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, isServerAuthenticated_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.isServerAuthenticated(args.serverSessionId,resultHandler); } } public static class startServerAuthentication extends org.apache.thrift.AsyncProcessFunction { public startServerAuthentication() { super("startServerAuthentication"); } @Override public startServerAuthentication_args getEmptyArgsInstance() { return new startServerAuthentication_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) { startServerAuthentication_result result = new startServerAuthentication_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; startServerAuthentication_result result = new startServerAuthentication_result(); if (e instanceof TAuthorizationException) { result.failure = (TAuthorizationException) e; result.setFailureIsSet(true); msg = result; } else if (e instanceof TInvocationException) { result.error = (TInvocationException) e; result.setErrorIsSet(true); msg = result; } else 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, startServerAuthentication_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.startServerAuthentication(args.satelliteId,resultHandler); } } public static class serverAuthenticate extends org.apache.thrift.AsyncProcessFunction { public serverAuthenticate() { super("serverAuthenticate"); } @Override public serverAuthenticate_args getEmptyArgsInstance() { return new serverAuthenticate_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(ServerSessionData o) { serverAuthenticate_result result = new serverAuthenticate_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; serverAuthenticate_result result = new serverAuthenticate_result(); if (e instanceof TAuthorizationException) { result.failure = (TAuthorizationException) e; result.setFailureIsSet(true); msg = result; } else if (e instanceof TInvocationException) { result.errr = (TInvocationException) e; result.setErrrIsSet(true); msg = result; } else 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, serverAuthenticate_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.serverAuthenticate(args.satelliteId, args.challengeResponse,resultHandler); } } public static class getImageData extends org.apache.thrift.AsyncProcessFunction { public getImageData() { super("getImageData"); } @Override public getImageData_args getEmptyArgsInstance() { return new getImageData_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(ImagePublishData o) { getImageData_result result = new getImageData_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; getImageData_result result = new getImageData_result(); if (e instanceof TAuthorizationException) { result.failure = (TAuthorizationException) e; result.setFailureIsSet(true); msg = result; } else if (e instanceof TInvocationException) { result.failure2 = (TInvocationException) e; result.setFailure2IsSet(true); msg = result; } else if (e instanceof TNotFoundException) { result.f3 = (TNotFoundException) e; result.setF3IsSet(true); msg = result; } else 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, getImageData_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.getImageData(args.serverSessionId, args.imageVersionId,resultHandler); } } public static class submitImage extends org.apache.thrift.AsyncProcessFunction { public submitImage() { super("submitImage"); } @Override public submitImage_args getEmptyArgsInstance() { return new submitImage_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) { submitImage_result result = new submitImage_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; submitImage_result result = new submitImage_result(); if (e instanceof TAuthorizationException) { result.failure = (TAuthorizationException) e; result.setFailureIsSet(true); msg = result; } else if (e instanceof TInvocationException) { result.failure2 = (TInvocationException) e; result.setFailure2IsSet(true); msg = result; } else if (e instanceof TTransferRejectedException) { result.failure3 = (TTransferRejectedException) e; result.setFailure3IsSet(true); msg = result; } else 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, submitImage_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.submitImage(args.userToken, args.imageDescription, args.blockHashes,resultHandler); } } public static class registerSatellite extends org.apache.thrift.AsyncProcessFunction { public registerSatellite() { super("registerSatellite"); } @Override public registerSatellite_args getEmptyArgsInstance() { return new registerSatellite_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.Integer o) { registerSatellite_result result = new registerSatellite_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } 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; registerSatellite_result result = new registerSatellite_result(); 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, registerSatellite_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.registerSatellite(args.userToken, args.displayName, args.addresses, args.modulus, args.exponent, args.certsha256,resultHandler); } } public static class updateSatellite extends org.apache.thrift.AsyncProcessFunction { public updateSatellite() { super("updateSatellite"); } @Override public updateSatellite_args getEmptyArgsInstance() { return new updateSatellite_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.Boolean o) { updateSatellite_result result = new updateSatellite_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } 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; updateSatellite_result result = new updateSatellite_result(); if (e instanceof TAuthorizationException) { result.failure = (TAuthorizationException) e; result.setFailureIsSet(true); msg = result; } else if (e instanceof TInvocationException) { result.error = (TInvocationException) e; result.setErrorIsSet(true); msg = result; } else 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, updateSatellite_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.updateSatellite(args.serverSessionId, args.displayName, args.addresses,resultHandler); } } public static class downloadImage extends org.apache.thrift.AsyncProcessFunction { public downloadImage() { super("downloadImage"); } @Override public downloadImage_args getEmptyArgsInstance() { return new downloadImage_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) { downloadImage_result result = new downloadImage_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; downloadImage_result result = new downloadImage_result(); if (e instanceof TAuthorizationException) { result.failure = (TAuthorizationException) e; result.setFailureIsSet(true); msg = result; } else if (e instanceof TInvocationException) { result.failure2 = (TInvocationException) e; result.setFailure2IsSet(true); msg = result; } else if (e instanceof TNotFoundException) { result.f3 = (TNotFoundException) e; result.setF3IsSet(true); msg = result; } else 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, downloadImage_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.downloadImage(args.sessionId, args.imageVersionId,resultHandler); } } public static class getOrganizations extends org.apache.thrift.AsyncProcessFunction> { public getOrganizations() { super("getOrganizations"); } @Override public getOrganizations_args getEmptyArgsInstance() { return new getOrganizations_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) { getOrganizations_result result = new getOrganizations_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; getOrganizations_result result = new getOrganizations_result(); 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, getOrganizations_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException { iface.getOrganizations(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 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, 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 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, getVirtualizers_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException { iface.getVirtualizers(resultHandler); } } public static class getTags extends org.apache.thrift.AsyncProcessFunction> { public getTags() { super("getTags"); } @Override public getTags_args getEmptyArgsInstance() { return new getTags_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) { getTags_result result = new getTags_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; getTags_result result = new getTags_result(); 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, getTags_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException { iface.getTags(args.startDate,resultHandler); } } public static class getSoftware extends org.apache.thrift.AsyncProcessFunction> { public getSoftware() { super("getSoftware"); } @Override public getSoftware_args getEmptyArgsInstance() { return new getSoftware_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) { getSoftware_result result = new getSoftware_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; getSoftware_result result = new getSoftware_result(); 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, getSoftware_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException { iface.getSoftware(args.startDate,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); } } } @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class ping_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("ping_args"); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ping_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ping_argsTupleSchemeFactory(); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final 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(ping_args.class, metaDataMap); } public ping_args() { } /** * Performs a deep copy on other. */ public ping_args(ping_args other) { } @Override public ping_args deepCopy() { return new ping_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 ping_args) return this.equals((ping_args)that); return false; } public boolean equals(ping_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(ping_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("ping_args("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 ping_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public ping_argsStandardScheme getScheme() { return new ping_argsStandardScheme(); } } private static class ping_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, ping_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, ping_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class ping_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public ping_argsTupleScheme getScheme() { return new ping_argsTupleScheme(); } } private static class ping_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, ping_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, ping_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 ping_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("ping_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ping_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ping_resultTupleSchemeFactory(); public boolean success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final 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.BOOL))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ping_result.class, metaDataMap); } public ping_result() { } public ping_result( boolean success) { this(); this.success = success; setSuccessIsSet(true); } /** * Performs a deep copy on other. */ public ping_result(ping_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; } @Override public ping_result deepCopy() { return new ping_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; } public boolean isSuccess() { return this.success; } public ping_result setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bitfield = 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.Boolean)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return isSuccess(); } 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 ping_result) return this.equals((ping_result)that); return false; } public boolean equals(ping_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 + ((success) ? 131071 : 524287); return hashCode; } @Override public int compareTo(ping_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("ping_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 ping_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public ping_resultStandardScheme getScheme() { return new ping_resultStandardScheme(); } } private static class ping_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, ping_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, ping_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class ping_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public ping_resultTupleScheme getScheme() { return new ping_resultTupleScheme(); } } private static class ping_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, ping_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.writeBool(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, ping_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.readBool(); 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 authenticate_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("authenticate_args"); private static final org.apache.thrift.protocol.TField LOGIN_FIELD_DESC = new org.apache.thrift.protocol.TField("login", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("password", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new authenticate_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new authenticate_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String login; // required public @org.apache.thrift.annotation.Nullable java.lang.String password; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { LOGIN((short)1, "login"), PASSWORD((short)2, "password"); private static final 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: // LOGIN return LOGIN; case 2: // PASSWORD return PASSWORD; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new 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.LOGIN, new org.apache.thrift.meta_data.FieldMetaData("login", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PASSWORD, new org.apache.thrift.meta_data.FieldMetaData("password", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(authenticate_args.class, metaDataMap); } public authenticate_args() { } public authenticate_args( java.lang.String login, java.lang.String password) { this(); this.login = login; this.password = password; } /** * Performs a deep copy on other. */ public authenticate_args(authenticate_args other) { if (other.isSetLogin()) { this.login = other.login; } if (other.isSetPassword()) { this.password = other.password; } } @Override public authenticate_args deepCopy() { return new authenticate_args(this); } @Override public void clear() { this.login = null; this.password = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getLogin() { return this.login; } public authenticate_args setLogin(@org.apache.thrift.annotation.Nullable java.lang.String login) { this.login = login; return this; } public void unsetLogin() { this.login = null; } /** Returns true if field login is set (has been assigned a value) and false otherwise */ public boolean isSetLogin() { return this.login != null; } public void setLoginIsSet(boolean value) { if (!value) { this.login = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getPassword() { return this.password; } public authenticate_args setPassword(@org.apache.thrift.annotation.Nullable java.lang.String password) { this.password = password; return this; } public void unsetPassword() { this.password = null; } /** Returns true if field password is set (has been assigned a value) and false otherwise */ public boolean isSetPassword() { return this.password != null; } public void setPasswordIsSet(boolean value) { if (!value) { this.password = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case LOGIN: if (value == null) { unsetLogin(); } else { setLogin((java.lang.String)value); } break; case PASSWORD: if (value == null) { unsetPassword(); } else { setPassword((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case LOGIN: return getLogin(); case PASSWORD: return getPassword(); } 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 LOGIN: return isSetLogin(); case PASSWORD: return isSetPassword(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof authenticate_args) return this.equals((authenticate_args)that); return false; } public boolean equals(authenticate_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_login = true && this.isSetLogin(); boolean that_present_login = true && that.isSetLogin(); if (this_present_login || that_present_login) { if (!(this_present_login && that_present_login)) return false; if (!this.login.equals(that.login)) return false; } boolean this_present_password = true && this.isSetPassword(); boolean that_present_password = true && that.isSetPassword(); if (this_present_password || that_present_password) { if (!(this_present_password && that_present_password)) return false; if (!this.password.equals(that.password)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetLogin()) ? 131071 : 524287); if (isSetLogin()) hashCode = hashCode * 8191 + login.hashCode(); hashCode = hashCode * 8191 + ((isSetPassword()) ? 131071 : 524287); if (isSetPassword()) hashCode = hashCode * 8191 + password.hashCode(); return hashCode; } @Override public int compareTo(authenticate_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetLogin(), other.isSetLogin()); if (lastComparison != 0) { return lastComparison; } if (isSetLogin()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.login, other.login); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetPassword(), other.isSetPassword()); if (lastComparison != 0) { return lastComparison; } if (isSetPassword()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.password, other.password); if (lastComparison != 0) { return lastComparison; } } return 0; } @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("authenticate_args("); boolean first = true; sb.append("login:"); if (this.login == null) { sb.append("null"); } else { sb.append(this.login); } first = false; if (!first) sb.append(", "); sb.append("password:"); if (this.password == null) { sb.append("null"); } else { sb.append(this.password); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 authenticate_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public authenticate_argsStandardScheme getScheme() { return new authenticate_argsStandardScheme(); } } private static class authenticate_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, authenticate_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // LOGIN if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.login = iprot.readString(); struct.setLoginIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // PASSWORD if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.password = iprot.readString(); struct.setPasswordIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, authenticate_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.login != null) { oprot.writeFieldBegin(LOGIN_FIELD_DESC); oprot.writeString(struct.login); oprot.writeFieldEnd(); } if (struct.password != null) { oprot.writeFieldBegin(PASSWORD_FIELD_DESC); oprot.writeString(struct.password); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class authenticate_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public authenticate_argsTupleScheme getScheme() { return new authenticate_argsTupleScheme(); } } private static class authenticate_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, authenticate_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.isSetLogin()) { optionals.set(0); } if (struct.isSetPassword()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetLogin()) { oprot.writeString(struct.login); } if (struct.isSetPassword()) { oprot.writeString(struct.password); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, authenticate_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.login = iprot.readString(); struct.setLoginIsSet(true); } if (incoming.get(1)) { struct.password = iprot.readString(); struct.setPasswordIsSet(true); } } } 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 authenticate_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("authenticate_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("error", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new authenticate_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new authenticate_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable SessionData success; // required public @org.apache.thrift.annotation.Nullable TAuthorizationException failure; // 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"), FAILURE((short)1, "failure"), 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: // FAILURE return FAILURE; case 2: // ERROR return ERROR; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new 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, SessionData.class))); tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.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(authenticate_result.class, metaDataMap); } public authenticate_result() { } public authenticate_result( SessionData success, TAuthorizationException failure, TInvocationException error) { this(); this.success = success; this.failure = failure; this.error = error; } /** * Performs a deep copy on other. */ public authenticate_result(authenticate_result other) { if (other.isSetSuccess()) { this.success = new SessionData(other.success); } if (other.isSetFailure()) { this.failure = new TAuthorizationException(other.failure); } if (other.isSetError()) { this.error = new TInvocationException(other.error); } } @Override public authenticate_result deepCopy() { return new authenticate_result(this); } @Override public void clear() { this.success = null; this.failure = null; this.error = null; } @org.apache.thrift.annotation.Nullable public SessionData getSuccess() { return this.success; } public authenticate_result setSuccess(@org.apache.thrift.annotation.Nullable SessionData success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TAuthorizationException getFailure() { return this.failure; } public authenticate_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 getError() { return this.error; } public authenticate_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((SessionData)value); } break; case FAILURE: if (value == null) { unsetFailure(); } else { setFailure((TAuthorizationException)value); } break; case ERROR: if (value == null) { unsetError(); } else { setError((TInvocationException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case FAILURE: return getFailure(); 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 FAILURE: return isSetFailure(); case ERROR: return isSetError(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof authenticate_result) return this.equals((authenticate_result)that); return false; } public boolean equals(authenticate_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_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 + ((isSetFailure()) ? 131071 : 524287); if (isSetFailure()) hashCode = hashCode * 8191 + failure.hashCode(); hashCode = hashCode * 8191 + ((isSetError()) ? 131071 : 524287); if (isSetError()) hashCode = hashCode * 8191 + error.hashCode(); return hashCode; } @Override public int compareTo(authenticate_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(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("authenticate_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("failure:"); if (this.failure == null) { sb.append("null"); } else { sb.append(this.failure); } first = false; if (!first) sb.append(", "); sb.append("error:"); if (this.error == null) { sb.append("null"); } else { sb.append(this.error); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 authenticate_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public authenticate_resultStandardScheme getScheme() { return new authenticate_resultStandardScheme(); } } private static class authenticate_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, authenticate_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new SessionData(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // FAILURE if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.failure = new TAuthorizationException(); struct.failure.read(iprot); struct.setFailureIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.error = new TInvocationException(); struct.error.read(iprot); struct.setErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, authenticate_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.failure != null) { oprot.writeFieldBegin(FAILURE_FIELD_DESC); struct.failure.write(oprot); oprot.writeFieldEnd(); } if (struct.error != null) { oprot.writeFieldBegin(ERROR_FIELD_DESC); struct.error.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class authenticate_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public authenticate_resultTupleScheme getScheme() { return new authenticate_resultTupleScheme(); } } private static class authenticate_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, authenticate_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.isSetError()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetFailure()) { struct.failure.write(oprot); } if (struct.isSetError()) { struct.error.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, authenticate_result struct) throws org.apache.thrift.TException { 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 SessionData(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.failure = new TAuthorizationException(); struct.failure.read(iprot); struct.setFailureIsSet(true); } if (incoming.get(2)) { struct.error = new TInvocationException(); struct.error.read(iprot); struct.setErrorIsSet(true); } } } 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 localAccountLogin_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("localAccountLogin_args"); private static final org.apache.thrift.protocol.TField LOGIN_FIELD_DESC = new org.apache.thrift.protocol.TField("login", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("password", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new localAccountLogin_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new localAccountLogin_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String login; // required public @org.apache.thrift.annotation.Nullable java.lang.String password; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { LOGIN((short)1, "login"), PASSWORD((short)2, "password"); private static final 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: // LOGIN return LOGIN; case 2: // PASSWORD return PASSWORD; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new 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.LOGIN, new org.apache.thrift.meta_data.FieldMetaData("login", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PASSWORD, new org.apache.thrift.meta_data.FieldMetaData("password", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(localAccountLogin_args.class, metaDataMap); } public localAccountLogin_args() { } public localAccountLogin_args( java.lang.String login, java.lang.String password) { this(); this.login = login; this.password = password; } /** * Performs a deep copy on other. */ public localAccountLogin_args(localAccountLogin_args other) { if (other.isSetLogin()) { this.login = other.login; } if (other.isSetPassword()) { this.password = other.password; } } @Override public localAccountLogin_args deepCopy() { return new localAccountLogin_args(this); } @Override public void clear() { this.login = null; this.password = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getLogin() { return this.login; } public localAccountLogin_args setLogin(@org.apache.thrift.annotation.Nullable java.lang.String login) { this.login = login; return this; } public void unsetLogin() { this.login = null; } /** Returns true if field login is set (has been assigned a value) and false otherwise */ public boolean isSetLogin() { return this.login != null; } public void setLoginIsSet(boolean value) { if (!value) { this.login = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getPassword() { return this.password; } public localAccountLogin_args setPassword(@org.apache.thrift.annotation.Nullable java.lang.String password) { this.password = password; return this; } public void unsetPassword() { this.password = null; } /** Returns true if field password is set (has been assigned a value) and false otherwise */ public boolean isSetPassword() { return this.password != null; } public void setPasswordIsSet(boolean value) { if (!value) { this.password = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case LOGIN: if (value == null) { unsetLogin(); } else { setLogin((java.lang.String)value); } break; case PASSWORD: if (value == null) { unsetPassword(); } else { setPassword((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case LOGIN: return getLogin(); case PASSWORD: return getPassword(); } 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 LOGIN: return isSetLogin(); case PASSWORD: return isSetPassword(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof localAccountLogin_args) return this.equals((localAccountLogin_args)that); return false; } public boolean equals(localAccountLogin_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_login = true && this.isSetLogin(); boolean that_present_login = true && that.isSetLogin(); if (this_present_login || that_present_login) { if (!(this_present_login && that_present_login)) return false; if (!this.login.equals(that.login)) return false; } boolean this_present_password = true && this.isSetPassword(); boolean that_present_password = true && that.isSetPassword(); if (this_present_password || that_present_password) { if (!(this_present_password && that_present_password)) return false; if (!this.password.equals(that.password)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetLogin()) ? 131071 : 524287); if (isSetLogin()) hashCode = hashCode * 8191 + login.hashCode(); hashCode = hashCode * 8191 + ((isSetPassword()) ? 131071 : 524287); if (isSetPassword()) hashCode = hashCode * 8191 + password.hashCode(); return hashCode; } @Override public int compareTo(localAccountLogin_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetLogin(), other.isSetLogin()); if (lastComparison != 0) { return lastComparison; } if (isSetLogin()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.login, other.login); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetPassword(), other.isSetPassword()); if (lastComparison != 0) { return lastComparison; } if (isSetPassword()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.password, other.password); if (lastComparison != 0) { return lastComparison; } } return 0; } @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("localAccountLogin_args("); boolean first = true; sb.append("login:"); if (this.login == null) { sb.append("null"); } else { sb.append(this.login); } first = false; if (!first) sb.append(", "); sb.append("password:"); if (this.password == null) { sb.append("null"); } else { sb.append(this.password); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 localAccountLogin_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public localAccountLogin_argsStandardScheme getScheme() { return new localAccountLogin_argsStandardScheme(); } } private static class localAccountLogin_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, localAccountLogin_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // LOGIN if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.login = iprot.readString(); struct.setLoginIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // PASSWORD if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.password = iprot.readString(); struct.setPasswordIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, localAccountLogin_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.login != null) { oprot.writeFieldBegin(LOGIN_FIELD_DESC); oprot.writeString(struct.login); oprot.writeFieldEnd(); } if (struct.password != null) { oprot.writeFieldBegin(PASSWORD_FIELD_DESC); oprot.writeString(struct.password); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class localAccountLogin_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public localAccountLogin_argsTupleScheme getScheme() { return new localAccountLogin_argsTupleScheme(); } } private static class localAccountLogin_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, localAccountLogin_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.isSetLogin()) { optionals.set(0); } if (struct.isSetPassword()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetLogin()) { oprot.writeString(struct.login); } if (struct.isSetPassword()) { oprot.writeString(struct.password); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, localAccountLogin_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.login = iprot.readString(); struct.setLoginIsSet(true); } if (incoming.get(1)) { struct.password = iprot.readString(); struct.setPasswordIsSet(true); } } } 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 localAccountLogin_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("localAccountLogin_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("error", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new localAccountLogin_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new localAccountLogin_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable ClientSessionData success; // required public @org.apache.thrift.annotation.Nullable TAuthorizationException failure; // 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"), FAILURE((short)1, "failure"), 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: // FAILURE return FAILURE; case 2: // ERROR return ERROR; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new 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, ClientSessionData.class))); tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.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(localAccountLogin_result.class, metaDataMap); } public localAccountLogin_result() { } public localAccountLogin_result( ClientSessionData success, TAuthorizationException failure, TInvocationException error) { this(); this.success = success; this.failure = failure; this.error = error; } /** * Performs a deep copy on other. */ public localAccountLogin_result(localAccountLogin_result other) { if (other.isSetSuccess()) { this.success = new ClientSessionData(other.success); } if (other.isSetFailure()) { this.failure = new TAuthorizationException(other.failure); } if (other.isSetError()) { this.error = new TInvocationException(other.error); } } @Override public localAccountLogin_result deepCopy() { return new localAccountLogin_result(this); } @Override public void clear() { this.success = null; this.failure = null; this.error = null; } @org.apache.thrift.annotation.Nullable public ClientSessionData getSuccess() { return this.success; } public localAccountLogin_result setSuccess(@org.apache.thrift.annotation.Nullable ClientSessionData success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TAuthorizationException getFailure() { return this.failure; } public localAccountLogin_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 getError() { return this.error; } public localAccountLogin_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((ClientSessionData)value); } break; case FAILURE: if (value == null) { unsetFailure(); } else { setFailure((TAuthorizationException)value); } break; case ERROR: if (value == null) { unsetError(); } else { setError((TInvocationException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case FAILURE: return getFailure(); 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 FAILURE: return isSetFailure(); case ERROR: return isSetError(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof localAccountLogin_result) return this.equals((localAccountLogin_result)that); return false; } public boolean equals(localAccountLogin_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_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 + ((isSetFailure()) ? 131071 : 524287); if (isSetFailure()) hashCode = hashCode * 8191 + failure.hashCode(); hashCode = hashCode * 8191 + ((isSetError()) ? 131071 : 524287); if (isSetError()) hashCode = hashCode * 8191 + error.hashCode(); return hashCode; } @Override public int compareTo(localAccountLogin_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(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("localAccountLogin_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("failure:"); if (this.failure == null) { sb.append("null"); } else { sb.append(this.failure); } first = false; if (!first) sb.append(", "); sb.append("error:"); if (this.error == null) { sb.append("null"); } else { sb.append(this.error); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 localAccountLogin_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public localAccountLogin_resultStandardScheme getScheme() { return new localAccountLogin_resultStandardScheme(); } } private static class localAccountLogin_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, localAccountLogin_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new ClientSessionData(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // FAILURE if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.failure = new TAuthorizationException(); struct.failure.read(iprot); struct.setFailureIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.error = new TInvocationException(); struct.error.read(iprot); struct.setErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, localAccountLogin_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.failure != null) { oprot.writeFieldBegin(FAILURE_FIELD_DESC); struct.failure.write(oprot); oprot.writeFieldEnd(); } if (struct.error != null) { oprot.writeFieldBegin(ERROR_FIELD_DESC); struct.error.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class localAccountLogin_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public localAccountLogin_resultTupleScheme getScheme() { return new localAccountLogin_resultTupleScheme(); } } private static class localAccountLogin_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, localAccountLogin_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.isSetError()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetFailure()) { struct.failure.write(oprot); } if (struct.isSetError()) { struct.error.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, localAccountLogin_result struct) throws org.apache.thrift.TException { 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 ClientSessionData(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.failure = new TAuthorizationException(); struct.failure.read(iprot); struct.setFailureIsSet(true); } if (incoming.get(2)) { struct.error = new TInvocationException(); struct.error.read(iprot); struct.setErrorIsSet(true); } } } 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 setUsedSatellite_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("setUsedSatellite_args"); private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField SATELLITE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("satelliteName", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setUsedSatellite_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setUsedSatellite_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String sessionId; // required public @org.apache.thrift.annotation.Nullable java.lang.String satelliteName; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION_ID((short)1, "sessionId"), SATELLITE_NAME((short)2, "satelliteName"); private static final 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: // SESSION_ID return SESSION_ID; case 2: // SATELLITE_NAME return SATELLITE_NAME; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); tmpMap.put(_Fields.SATELLITE_NAME, new org.apache.thrift.meta_data.FieldMetaData("satelliteName", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setUsedSatellite_args.class, metaDataMap); } public setUsedSatellite_args() { } public setUsedSatellite_args( java.lang.String sessionId, java.lang.String satelliteName) { this(); this.sessionId = sessionId; this.satelliteName = satelliteName; } /** * Performs a deep copy on other. */ public setUsedSatellite_args(setUsedSatellite_args other) { if (other.isSetSessionId()) { this.sessionId = other.sessionId; } if (other.isSetSatelliteName()) { this.satelliteName = other.satelliteName; } } @Override public setUsedSatellite_args deepCopy() { return new setUsedSatellite_args(this); } @Override public void clear() { this.sessionId = null; this.satelliteName = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSessionId() { return this.sessionId; } public setUsedSatellite_args setSessionId(@org.apache.thrift.annotation.Nullable java.lang.String sessionId) { this.sessionId = sessionId; return this; } public void unsetSessionId() { this.sessionId = null; } /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ public boolean isSetSessionId() { return this.sessionId != null; } public void setSessionIdIsSet(boolean value) { if (!value) { this.sessionId = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getSatelliteName() { return this.satelliteName; } public setUsedSatellite_args setSatelliteName(@org.apache.thrift.annotation.Nullable java.lang.String satelliteName) { this.satelliteName = satelliteName; return this; } public void unsetSatelliteName() { this.satelliteName = null; } /** Returns true if field satelliteName is set (has been assigned a value) and false otherwise */ public boolean isSetSatelliteName() { return this.satelliteName != null; } public void setSatelliteNameIsSet(boolean value) { if (!value) { this.satelliteName = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION_ID: if (value == null) { unsetSessionId(); } else { setSessionId((java.lang.String)value); } break; case SATELLITE_NAME: if (value == null) { unsetSatelliteName(); } else { setSatelliteName((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION_ID: return getSessionId(); case SATELLITE_NAME: return getSatelliteName(); } 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 SESSION_ID: return isSetSessionId(); case SATELLITE_NAME: return isSetSatelliteName(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof setUsedSatellite_args) return this.equals((setUsedSatellite_args)that); return false; } public boolean equals(setUsedSatellite_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_sessionId = true && this.isSetSessionId(); boolean that_present_sessionId = true && that.isSetSessionId(); if (this_present_sessionId || that_present_sessionId) { if (!(this_present_sessionId && that_present_sessionId)) return false; if (!this.sessionId.equals(that.sessionId)) return false; } boolean this_present_satelliteName = true && this.isSetSatelliteName(); boolean that_present_satelliteName = true && that.isSetSatelliteName(); if (this_present_satelliteName || that_present_satelliteName) { if (!(this_present_satelliteName && that_present_satelliteName)) return false; if (!this.satelliteName.equals(that.satelliteName)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSessionId()) ? 131071 : 524287); if (isSetSessionId()) hashCode = hashCode * 8191 + sessionId.hashCode(); hashCode = hashCode * 8191 + ((isSetSatelliteName()) ? 131071 : 524287); if (isSetSatelliteName()) hashCode = hashCode * 8191 + satelliteName.hashCode(); return hashCode; } @Override public int compareTo(setUsedSatellite_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); if (lastComparison != 0) { return lastComparison; } if (isSetSessionId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetSatelliteName(), other.isSetSatelliteName()); if (lastComparison != 0) { return lastComparison; } if (isSetSatelliteName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.satelliteName, other.satelliteName); if (lastComparison != 0) { return lastComparison; } } return 0; } @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("setUsedSatellite_args("); boolean first = true; sb.append("sessionId:"); if (this.sessionId == null) { sb.append("null"); } else { sb.append(this.sessionId); } first = false; if (!first) sb.append(", "); sb.append("satelliteName:"); if (this.satelliteName == null) { sb.append("null"); } else { sb.append(this.satelliteName); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 setUsedSatellite_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public setUsedSatellite_argsStandardScheme getScheme() { return new setUsedSatellite_argsStandardScheme(); } } private static class setUsedSatellite_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, setUsedSatellite_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.sessionId = iprot.readString(); struct.setSessionIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // SATELLITE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.satelliteName = iprot.readString(); struct.setSatelliteNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, setUsedSatellite_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.sessionId != null) { oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); oprot.writeString(struct.sessionId); oprot.writeFieldEnd(); } if (struct.satelliteName != null) { oprot.writeFieldBegin(SATELLITE_NAME_FIELD_DESC); oprot.writeString(struct.satelliteName); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class setUsedSatellite_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public setUsedSatellite_argsTupleScheme getScheme() { return new setUsedSatellite_argsTupleScheme(); } } private static class setUsedSatellite_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, setUsedSatellite_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.isSetSessionId()) { optionals.set(0); } if (struct.isSetSatelliteName()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSessionId()) { oprot.writeString(struct.sessionId); } if (struct.isSetSatelliteName()) { oprot.writeString(struct.satelliteName); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, setUsedSatellite_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.sessionId = iprot.readString(); struct.setSessionIdIsSet(true); } if (incoming.get(1)) { struct.satelliteName = iprot.readString(); struct.setSatelliteNameIsSet(true); } } } 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 setUsedSatellite_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("setUsedSatellite_result"); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setUsedSatellite_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setUsedSatellite_resultTupleSchemeFactory(); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final 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(setUsedSatellite_result.class, metaDataMap); } public setUsedSatellite_result() { } /** * Performs a deep copy on other. */ public setUsedSatellite_result(setUsedSatellite_result other) { } @Override public setUsedSatellite_result deepCopy() { return new setUsedSatellite_result(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 setUsedSatellite_result) return this.equals((setUsedSatellite_result)that); return false; } public boolean equals(setUsedSatellite_result 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(setUsedSatellite_result 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); } 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("setUsedSatellite_result("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 setUsedSatellite_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public setUsedSatellite_resultStandardScheme getScheme() { return new setUsedSatellite_resultStandardScheme(); } } private static class setUsedSatellite_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, setUsedSatellite_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, setUsedSatellite_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class setUsedSatellite_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public setUsedSatellite_resultTupleScheme getScheme() { return new setUsedSatellite_resultTupleScheme(); } } private static class setUsedSatellite_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, setUsedSatellite_result 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, setUsedSatellite_result 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 findUser_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("findUser_args"); private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField ORGANIZATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("organizationId", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField SEARCH_TERM_FIELD_DESC = new org.apache.thrift.protocol.TField("searchTerm", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new findUser_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new findUser_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String sessionId; // required public @org.apache.thrift.annotation.Nullable java.lang.String organizationId; // required public @org.apache.thrift.annotation.Nullable java.lang.String searchTerm; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION_ID((short)1, "sessionId"), ORGANIZATION_ID((short)2, "organizationId"), SEARCH_TERM((short)3, "searchTerm"); private static final 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: // SESSION_ID return SESSION_ID; case 2: // ORGANIZATION_ID return ORGANIZATION_ID; case 3: // SEARCH_TERM return SEARCH_TERM; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); tmpMap.put(_Fields.ORGANIZATION_ID, new org.apache.thrift.meta_data.FieldMetaData("organizationId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.SEARCH_TERM, new org.apache.thrift.meta_data.FieldMetaData("searchTerm", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(findUser_args.class, metaDataMap); } public findUser_args() { } public findUser_args( java.lang.String sessionId, java.lang.String organizationId, java.lang.String searchTerm) { this(); this.sessionId = sessionId; this.organizationId = organizationId; this.searchTerm = searchTerm; } /** * Performs a deep copy on other. */ public findUser_args(findUser_args other) { if (other.isSetSessionId()) { this.sessionId = other.sessionId; } if (other.isSetOrganizationId()) { this.organizationId = other.organizationId; } if (other.isSetSearchTerm()) { this.searchTerm = other.searchTerm; } } @Override public findUser_args deepCopy() { return new findUser_args(this); } @Override public void clear() { this.sessionId = null; this.organizationId = null; this.searchTerm = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSessionId() { return this.sessionId; } public findUser_args setSessionId(@org.apache.thrift.annotation.Nullable java.lang.String sessionId) { this.sessionId = sessionId; return this; } public void unsetSessionId() { this.sessionId = null; } /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ public boolean isSetSessionId() { return this.sessionId != null; } public void setSessionIdIsSet(boolean value) { if (!value) { this.sessionId = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getOrganizationId() { return this.organizationId; } public findUser_args setOrganizationId(@org.apache.thrift.annotation.Nullable java.lang.String organizationId) { this.organizationId = organizationId; return this; } public void unsetOrganizationId() { this.organizationId = null; } /** Returns true if field organizationId is set (has been assigned a value) and false otherwise */ public boolean isSetOrganizationId() { return this.organizationId != null; } public void setOrganizationIdIsSet(boolean value) { if (!value) { this.organizationId = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getSearchTerm() { return this.searchTerm; } public findUser_args setSearchTerm(@org.apache.thrift.annotation.Nullable java.lang.String searchTerm) { this.searchTerm = searchTerm; return this; } public void unsetSearchTerm() { this.searchTerm = null; } /** Returns true if field searchTerm is set (has been assigned a value) and false otherwise */ public boolean isSetSearchTerm() { return this.searchTerm != null; } public void setSearchTermIsSet(boolean value) { if (!value) { this.searchTerm = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION_ID: if (value == null) { unsetSessionId(); } else { setSessionId((java.lang.String)value); } break; case ORGANIZATION_ID: if (value == null) { unsetOrganizationId(); } else { setOrganizationId((java.lang.String)value); } break; case SEARCH_TERM: if (value == null) { unsetSearchTerm(); } else { setSearchTerm((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION_ID: return getSessionId(); case ORGANIZATION_ID: return getOrganizationId(); case SEARCH_TERM: return getSearchTerm(); } 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 SESSION_ID: return isSetSessionId(); case ORGANIZATION_ID: return isSetOrganizationId(); case SEARCH_TERM: return isSetSearchTerm(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof findUser_args) return this.equals((findUser_args)that); return false; } public boolean equals(findUser_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_sessionId = true && this.isSetSessionId(); boolean that_present_sessionId = true && that.isSetSessionId(); if (this_present_sessionId || that_present_sessionId) { if (!(this_present_sessionId && that_present_sessionId)) return false; if (!this.sessionId.equals(that.sessionId)) return false; } boolean this_present_organizationId = true && this.isSetOrganizationId(); boolean that_present_organizationId = true && that.isSetOrganizationId(); if (this_present_organizationId || that_present_organizationId) { if (!(this_present_organizationId && that_present_organizationId)) return false; if (!this.organizationId.equals(that.organizationId)) return false; } boolean this_present_searchTerm = true && this.isSetSearchTerm(); boolean that_present_searchTerm = true && that.isSetSearchTerm(); if (this_present_searchTerm || that_present_searchTerm) { if (!(this_present_searchTerm && that_present_searchTerm)) return false; if (!this.searchTerm.equals(that.searchTerm)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSessionId()) ? 131071 : 524287); if (isSetSessionId()) hashCode = hashCode * 8191 + sessionId.hashCode(); hashCode = hashCode * 8191 + ((isSetOrganizationId()) ? 131071 : 524287); if (isSetOrganizationId()) hashCode = hashCode * 8191 + organizationId.hashCode(); hashCode = hashCode * 8191 + ((isSetSearchTerm()) ? 131071 : 524287); if (isSetSearchTerm()) hashCode = hashCode * 8191 + searchTerm.hashCode(); return hashCode; } @Override public int compareTo(findUser_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); if (lastComparison != 0) { return lastComparison; } if (isSetSessionId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetOrganizationId(), other.isSetOrganizationId()); if (lastComparison != 0) { return lastComparison; } if (isSetOrganizationId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.organizationId, other.organizationId); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetSearchTerm(), other.isSetSearchTerm()); if (lastComparison != 0) { return lastComparison; } if (isSetSearchTerm()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.searchTerm, other.searchTerm); if (lastComparison != 0) { return lastComparison; } } return 0; } @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("findUser_args("); boolean first = true; sb.append("sessionId:"); if (this.sessionId == null) { sb.append("null"); } else { sb.append(this.sessionId); } first = false; if (!first) sb.append(", "); sb.append("organizationId:"); if (this.organizationId == null) { sb.append("null"); } else { sb.append(this.organizationId); } first = false; if (!first) sb.append(", "); sb.append("searchTerm:"); if (this.searchTerm == null) { sb.append("null"); } else { sb.append(this.searchTerm); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 findUser_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public findUser_argsStandardScheme getScheme() { return new findUser_argsStandardScheme(); } } private static class findUser_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, findUser_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.sessionId = iprot.readString(); struct.setSessionIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // ORGANIZATION_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.organizationId = iprot.readString(); struct.setOrganizationIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // SEARCH_TERM if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.searchTerm = iprot.readString(); struct.setSearchTermIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, findUser_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.sessionId != null) { oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); oprot.writeString(struct.sessionId); oprot.writeFieldEnd(); } if (struct.organizationId != null) { oprot.writeFieldBegin(ORGANIZATION_ID_FIELD_DESC); oprot.writeString(struct.organizationId); oprot.writeFieldEnd(); } if (struct.searchTerm != null) { oprot.writeFieldBegin(SEARCH_TERM_FIELD_DESC); oprot.writeString(struct.searchTerm); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class findUser_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public findUser_argsTupleScheme getScheme() { return new findUser_argsTupleScheme(); } } private static class findUser_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, findUser_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.isSetSessionId()) { optionals.set(0); } if (struct.isSetOrganizationId()) { optionals.set(1); } if (struct.isSetSearchTerm()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSessionId()) { oprot.writeString(struct.sessionId); } if (struct.isSetOrganizationId()) { oprot.writeString(struct.organizationId); } if (struct.isSetSearchTerm()) { oprot.writeString(struct.searchTerm); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, findUser_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.sessionId = iprot.readString(); struct.setSessionIdIsSet(true); } if (incoming.get(1)) { struct.organizationId = iprot.readString(); struct.setOrganizationIdIsSet(true); } if (incoming.get(2)) { struct.searchTerm = iprot.readString(); struct.setSearchTermIsSet(true); } } } 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 findUser_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("findUser_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("error", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new findUser_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new findUser_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 error; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), FAILURE((short)1, "failure"), ERROR((short)2, "error"); private static final 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: // 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.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.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(findUser_result.class, metaDataMap); } public findUser_result() { } public findUser_result( java.util.List success, TAuthorizationException failure, TInvocationException error) { this(); this.success = success; this.failure = failure; this.error = error; } /** * Performs a deep copy on other. */ public findUser_result(findUser_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.isSetError()) { this.error = new TInvocationException(other.error); } } @Override public findUser_result deepCopy() { return new findUser_result(this); } @Override public void clear() { this.success = null; this.failure = null; this.error = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @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 findUser_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 findUser_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 getError() { return this.error; } public findUser_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.util.List)value); } break; case FAILURE: if (value == null) { unsetFailure(); } else { setFailure((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 FAILURE: return getFailure(); 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 FAILURE: return isSetFailure(); case ERROR: return isSetError(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof findUser_result) return this.equals((findUser_result)that); return false; } public boolean equals(findUser_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_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 + ((isSetFailure()) ? 131071 : 524287); if (isSetFailure()) hashCode = hashCode * 8191 + failure.hashCode(); hashCode = hashCode * 8191 + ((isSetError()) ? 131071 : 524287); if (isSetError()) hashCode = hashCode * 8191 + error.hashCode(); return hashCode; } @Override public int compareTo(findUser_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(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("findUser_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("failure:"); if (this.failure == null) { sb.append("null"); } else { sb.append(this.failure); } first = false; if (!first) sb.append(", "); sb.append("error:"); if (this.error == null) { sb.append("null"); } else { sb.append(this.error); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 findUser_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public findUser_resultStandardScheme getScheme() { return new findUser_resultStandardScheme(); } } private static class findUser_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, findUser_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list418 = iprot.readListBegin(); struct.success = new java.util.ArrayList(_list418.size); @org.apache.thrift.annotation.Nullable UserInfo _elem419; for (int _i420 = 0; _i420 < _list418.size; ++_i420) { _elem419 = new UserInfo(); _elem419.read(iprot); struct.success.add(_elem419); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // FAILURE if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.failure = new TAuthorizationException(); struct.failure.read(iprot); struct.setFailureIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.error = new TInvocationException(); struct.error.read(iprot); struct.setErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, findUser_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (UserInfo _iter421 : struct.success) { _iter421.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.failure != null) { oprot.writeFieldBegin(FAILURE_FIELD_DESC); struct.failure.write(oprot); oprot.writeFieldEnd(); } if (struct.error != null) { oprot.writeFieldBegin(ERROR_FIELD_DESC); struct.error.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class findUser_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public findUser_resultTupleScheme getScheme() { return new findUser_resultTupleScheme(); } } private static class findUser_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, findUser_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.isSetError()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (UserInfo _iter422 : struct.success) { _iter422.write(oprot); } } } if (struct.isSetFailure()) { struct.failure.write(oprot); } if (struct.isSetError()) { struct.error.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, findUser_result struct) throws org.apache.thrift.TException { 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 _list423 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.success = new java.util.ArrayList(_list423.size); @org.apache.thrift.annotation.Nullable UserInfo _elem424; for (int _i425 = 0; _i425 < _list423.size; ++_i425) { _elem424 = new UserInfo(); _elem424.read(iprot); struct.success.add(_elem424); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.failure = new TAuthorizationException(); struct.failure.read(iprot); struct.setFailureIsSet(true); } if (incoming.get(2)) { struct.error = new TInvocationException(); struct.error.read(iprot); struct.setErrorIsSet(true); } } } 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 getPublicImages_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("getPublicImages_args"); private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField PAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("page", org.apache.thrift.protocol.TType.I32, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getPublicImages_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getPublicImages_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String sessionId; // required public int page; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION_ID((short)1, "sessionId"), PAGE((short)2, "page"); private static final 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: // SESSION_ID return SESSION_ID; case 2: // PAGE return PAGE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); tmpMap.put(_Fields.PAGE, new org.apache.thrift.meta_data.FieldMetaData("page", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPublicImages_args.class, metaDataMap); } public getPublicImages_args() { } public getPublicImages_args( java.lang.String sessionId, int page) { this(); this.sessionId = sessionId; this.page = page; setPageIsSet(true); } /** * Performs a deep copy on other. */ public getPublicImages_args(getPublicImages_args other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetSessionId()) { this.sessionId = other.sessionId; } this.page = other.page; } @Override public getPublicImages_args deepCopy() { return new getPublicImages_args(this); } @Override public void clear() { this.sessionId = null; setPageIsSet(false); this.page = 0; } @org.apache.thrift.annotation.Nullable public java.lang.String getSessionId() { return this.sessionId; } public getPublicImages_args setSessionId(@org.apache.thrift.annotation.Nullable java.lang.String sessionId) { this.sessionId = sessionId; return this; } public void unsetSessionId() { this.sessionId = null; } /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ public boolean isSetSessionId() { return this.sessionId != null; } public void setSessionIdIsSet(boolean value) { if (!value) { this.sessionId = null; } } public int getPage() { return this.page; } public getPublicImages_args setPage(int page) { this.page = page; setPageIsSet(true); return this; } public void unsetPage() { __isset_bitfield = 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 SESSION_ID: if (value == null) { unsetSessionId(); } else { setSessionId((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 SESSION_ID: return getSessionId(); 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 SESSION_ID: return isSetSessionId(); case PAGE: return isSetPage(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getPublicImages_args) return this.equals((getPublicImages_args)that); return false; } public boolean equals(getPublicImages_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_sessionId = true && this.isSetSessionId(); boolean that_present_sessionId = true && that.isSetSessionId(); if (this_present_sessionId || that_present_sessionId) { if (!(this_present_sessionId && that_present_sessionId)) return false; if (!this.sessionId.equals(that.sessionId)) return false; } boolean this_present_page = true; boolean that_present_page = true; if (this_present_page || that_present_page) { if (!(this_present_page && that_present_page)) return false; if (this.page != that.page) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSessionId()) ? 131071 : 524287); if (isSetSessionId()) hashCode = hashCode * 8191 + sessionId.hashCode(); hashCode = hashCode * 8191 + page; return hashCode; } @Override public int compareTo(getPublicImages_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); if (lastComparison != 0) { return lastComparison; } if (isSetSessionId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); if (lastComparison != 0) { return lastComparison; } } lastComparison = 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("getPublicImages_args("); boolean first = true; sb.append("sessionId:"); if (this.sessionId == null) { sb.append("null"); } else { sb.append(this.sessionId); } first = false; if (!first) sb.append(", "); sb.append("page:"); sb.append(this.page); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 getPublicImages_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getPublicImages_argsStandardScheme getScheme() { return new getPublicImages_argsStandardScheme(); } } private static class getPublicImages_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, getPublicImages_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SESSION_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.sessionId = iprot.readString(); struct.setSessionIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // PAGE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.page = iprot.readI32(); struct.setPageIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, getPublicImages_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.sessionId != null) { oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); oprot.writeString(struct.sessionId); oprot.writeFieldEnd(); } oprot.writeFieldBegin(PAGE_FIELD_DESC); oprot.writeI32(struct.page); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getPublicImages_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getPublicImages_argsTupleScheme getScheme() { return new getPublicImages_argsTupleScheme(); } } private static class getPublicImages_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getPublicImages_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.isSetSessionId()) { optionals.set(0); } if (struct.isSetPage()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSessionId()) { oprot.writeString(struct.sessionId); } if (struct.isSetPage()) { oprot.writeI32(struct.page); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getPublicImages_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.sessionId = iprot.readString(); struct.setSessionIdIsSet(true); } if (incoming.get(1)) { struct.page = iprot.readI32(); struct.setPageIsSet(true); } } } 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 getPublicImages_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("getPublicImages_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("error", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getPublicImages_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getPublicImages_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 error; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), FAILURE((short)1, "failure"), ERROR((short)2, "error"); private static final 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: // 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.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ImageSummaryRead.class)))); tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.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(getPublicImages_result.class, metaDataMap); } public getPublicImages_result() { } public getPublicImages_result( java.util.List success, TAuthorizationException failure, TInvocationException error) { this(); this.success = success; this.failure = failure; this.error = error; } /** * Performs a deep copy on other. */ public getPublicImages_result(getPublicImages_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.isSetFailure()) { this.failure = new TAuthorizationException(other.failure); } if (other.isSetError()) { this.error = new TInvocationException(other.error); } } @Override public getPublicImages_result deepCopy() { return new getPublicImages_result(this); } @Override public void clear() { this.success = null; this.failure = null; this.error = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @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 getPublicImages_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 getPublicImages_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 getError() { return this.error; } public getPublicImages_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.util.List)value); } break; case FAILURE: if (value == null) { unsetFailure(); } else { setFailure((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 FAILURE: return getFailure(); 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 FAILURE: return isSetFailure(); case ERROR: return isSetError(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getPublicImages_result) return this.equals((getPublicImages_result)that); return false; } public boolean equals(getPublicImages_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_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 + ((isSetFailure()) ? 131071 : 524287); if (isSetFailure()) hashCode = hashCode * 8191 + failure.hashCode(); hashCode = hashCode * 8191 + ((isSetError()) ? 131071 : 524287); if (isSetError()) hashCode = hashCode * 8191 + error.hashCode(); return hashCode; } @Override public int compareTo(getPublicImages_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(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("getPublicImages_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("failure:"); if (this.failure == null) { sb.append("null"); } else { sb.append(this.failure); } first = false; if (!first) sb.append(", "); sb.append("error:"); if (this.error == null) { sb.append("null"); } else { sb.append(this.error); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 getPublicImages_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getPublicImages_resultStandardScheme getScheme() { return new getPublicImages_resultStandardScheme(); } } private static class getPublicImages_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, getPublicImages_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list426 = iprot.readListBegin(); struct.success = new java.util.ArrayList(_list426.size); @org.apache.thrift.annotation.Nullable ImageSummaryRead _elem427; for (int _i428 = 0; _i428 < _list426.size; ++_i428) { _elem427 = new ImageSummaryRead(); _elem427.read(iprot); struct.success.add(_elem427); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // FAILURE if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.failure = new TAuthorizationException(); struct.failure.read(iprot); struct.setFailureIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.error = new TInvocationException(); struct.error.read(iprot); struct.setErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, getPublicImages_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (ImageSummaryRead _iter429 : struct.success) { _iter429.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.failure != null) { oprot.writeFieldBegin(FAILURE_FIELD_DESC); struct.failure.write(oprot); oprot.writeFieldEnd(); } if (struct.error != null) { oprot.writeFieldBegin(ERROR_FIELD_DESC); struct.error.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getPublicImages_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getPublicImages_resultTupleScheme getScheme() { return new getPublicImages_resultTupleScheme(); } } private static class getPublicImages_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getPublicImages_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.isSetError()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (ImageSummaryRead _iter430 : struct.success) { _iter430.write(oprot); } } } if (struct.isSetFailure()) { struct.failure.write(oprot); } if (struct.isSetError()) { struct.error.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getPublicImages_result struct) throws org.apache.thrift.TException { 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 _list431 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.success = new java.util.ArrayList(_list431.size); @org.apache.thrift.annotation.Nullable ImageSummaryRead _elem432; for (int _i433 = 0; _i433 < _list431.size; ++_i433) { _elem432 = new ImageSummaryRead(); _elem432.read(iprot); struct.success.add(_elem432); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.failure = new TAuthorizationException(); struct.failure.read(iprot); struct.setFailureIsSet(true); } if (incoming.get(2)) { struct.error = new TInvocationException(); struct.error.read(iprot); struct.setErrorIsSet(true); } } } 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 SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField IMAGE_BASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageBaseId", org.apache.thrift.protocol.TType.STRING, (short)2); private static final 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 sessionId; // 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 { SESSION_ID((short)1, "sessionId"), 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: // SESSION_ID return SESSION_ID; case 2: // IMAGE_BASE_ID return IMAGE_BASE_ID; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); tmpMap.put(_Fields.IMAGE_BASE_ID, new org.apache.thrift.meta_data.FieldMetaData("imageBaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); metaDataMap = 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 sessionId, java.lang.String imageBaseId) { this(); this.sessionId = sessionId; this.imageBaseId = imageBaseId; } /** * Performs a deep copy on other. */ public getImageDetails_args(getImageDetails_args other) { if (other.isSetSessionId()) { this.sessionId = other.sessionId; } if (other.isSetImageBaseId()) { this.imageBaseId = other.imageBaseId; } } @Override public getImageDetails_args deepCopy() { return new getImageDetails_args(this); } @Override public void clear() { this.sessionId = null; this.imageBaseId = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSessionId() { return this.sessionId; } public getImageDetails_args setSessionId(@org.apache.thrift.annotation.Nullable java.lang.String sessionId) { this.sessionId = sessionId; return this; } public void unsetSessionId() { this.sessionId = null; } /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ public boolean isSetSessionId() { return this.sessionId != null; } public void setSessionIdIsSet(boolean value) { if (!value) { this.sessionId = null; } } @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 SESSION_ID: if (value == null) { unsetSessionId(); } else { setSessionId((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 SESSION_ID: return getSessionId(); 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 SESSION_ID: return isSetSessionId(); 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_sessionId = true && this.isSetSessionId(); boolean that_present_sessionId = true && that.isSetSessionId(); if (this_present_sessionId || that_present_sessionId) { if (!(this_present_sessionId && that_present_sessionId)) return false; if (!this.sessionId.equals(that.sessionId)) return false; } boolean this_present_imageBaseId = true && this.isSetImageBaseId(); boolean that_present_imageBaseId = true && that.isSetImageBaseId(); if (this_present_imageBaseId || that_present_imageBaseId) { if (!(this_present_imageBaseId && that_present_imageBaseId)) return false; if (!this.imageBaseId.equals(that.imageBaseId)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSessionId()) ? 131071 : 524287); if (isSetSessionId()) hashCode = hashCode * 8191 + sessionId.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(isSetSessionId(), other.isSetSessionId()); if (lastComparison != 0) { return lastComparison; } if (isSetSessionId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); if (lastComparison != 0) { return lastComparison; } } lastComparison = 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("sessionId:"); if (this.sessionId == null) { sb.append("null"); } else { sb.append(this.sessionId); } first = false; if (!first) sb.append(", "); sb.append("imageBaseId:"); if (this.imageBaseId == null) { sb.append("null"); } else { sb.append(this.imageBaseId); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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: // SESSION_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.sessionId = iprot.readString(); struct.setSessionIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // IMAGE_BASE_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.imageBaseId = iprot.readString(); struct.setImageBaseIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @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.sessionId != null) { oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); oprot.writeString(struct.sessionId); oprot.writeFieldEnd(); } if (struct.imageBaseId != null) { oprot.writeFieldBegin(IMAGE_BASE_ID_FIELD_DESC); oprot.writeString(struct.imageBaseId); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getImageDetails_argsTupleSchemeFactory implements 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.isSetSessionId()) { optionals.set(0); } if (struct.isSetImageBaseId()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSessionId()) { oprot.writeString(struct.sessionId); } if (struct.isSetImageBaseId()) { oprot.writeString(struct.imageBaseId); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getImageDetails_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.sessionId = iprot.readString(); struct.setSessionIdIsSet(true); } if (incoming.get(1)) { struct.imageBaseId = iprot.readString(); struct.setImageBaseIdIsSet(true); } } } 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 getUser_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("getUser_args"); private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getUser_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getUser_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required public @org.apache.thrift.annotation.Nullable java.lang.String userId; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { USER_TOKEN((short)1, "userToken"), USER_ID((short)2, "userId"); private static final 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: // USER_ID return USER_ID; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new 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.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUser_args.class, metaDataMap); } public getUser_args() { } public getUser_args( java.lang.String userToken, java.lang.String userId) { this(); this.userToken = userToken; this.userId = userId; } /** * Performs a deep copy on other. */ public getUser_args(getUser_args other) { if (other.isSetUserToken()) { this.userToken = other.userToken; } if (other.isSetUserId()) { this.userId = other.userId; } } @Override public getUser_args deepCopy() { return new getUser_args(this); } @Override public void clear() { this.userToken = null; this.userId = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getUserToken() { return this.userToken; } public getUser_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 getUserId() { return this.userId; } public getUser_args setUserId(@org.apache.thrift.annotation.Nullable java.lang.String userId) { this.userId = userId; return this; } public void unsetUserId() { this.userId = null; } /** Returns true if field userId is set (has been assigned a value) and false otherwise */ public boolean isSetUserId() { return this.userId != null; } public void setUserIdIsSet(boolean value) { if (!value) { this.userId = null; } } @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 USER_ID: if (value == null) { unsetUserId(); } else { setUserId((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 USER_ID: return getUserId(); } 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 USER_ID: return isSetUserId(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getUser_args) return this.equals((getUser_args)that); return false; } public boolean equals(getUser_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_userId = true && this.isSetUserId(); boolean that_present_userId = true && that.isSetUserId(); if (this_present_userId || that_present_userId) { if (!(this_present_userId && that_present_userId)) return false; if (!this.userId.equals(that.userId)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287); if (isSetUserToken()) hashCode = hashCode * 8191 + userToken.hashCode(); hashCode = hashCode * 8191 + ((isSetUserId()) ? 131071 : 524287); if (isSetUserId()) hashCode = hashCode * 8191 + userId.hashCode(); return hashCode; } @Override public int compareTo(getUser_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(isSetUserId(), other.isSetUserId()); if (lastComparison != 0) { return lastComparison; } if (isSetUserId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, other.userId); if (lastComparison != 0) { return lastComparison; } } return 0; } @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("getUser_args("); boolean first = true; sb.append("userToken:"); if (this.userToken == null) { sb.append("null"); } else { sb.append(this.userToken); } first = false; if (!first) sb.append(", "); sb.append("userId:"); if (this.userId == null) { sb.append("null"); } else { sb.append(this.userId); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 getUser_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getUser_argsStandardScheme getScheme() { return new getUser_argsStandardScheme(); } } private static class getUser_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, getUser_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // USER_TOKEN if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // USER_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.userId = iprot.readString(); struct.setUserIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, getUser_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.userToken != null) { oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC); oprot.writeString(struct.userToken); oprot.writeFieldEnd(); } if (struct.userId != null) { oprot.writeFieldBegin(USER_ID_FIELD_DESC); oprot.writeString(struct.userId); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getUser_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getUser_argsTupleScheme getScheme() { return new getUser_argsTupleScheme(); } } private static class getUser_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getUser_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.isSetUserId()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetUserToken()) { oprot.writeString(struct.userToken); } if (struct.isSetUserId()) { oprot.writeString(struct.userId); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getUser_args struct) throws org.apache.thrift.TException { 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.userId = iprot.readString(); struct.setUserIdIsSet(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 getUser_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("getUser_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getUser_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getUser_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable UserInfo 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, UserInfo.class))); tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.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(getUser_result.class, metaDataMap); } public getUser_result() { } public getUser_result( UserInfo success, TAuthorizationException authError, TNotFoundException notFound, TInvocationException serverError) { this(); this.success = success; this.authError = authError; this.notFound = notFound; this.serverError = serverError; } /** * Performs a deep copy on other. */ public getUser_result(getUser_result other) { if (other.isSetSuccess()) { this.success = new UserInfo(other.success); } if (other.isSetAuthError()) { this.authError = new TAuthorizationException(other.authError); } if (other.isSetNotFound()) { this.notFound = new TNotFoundException(other.notFound); } if (other.isSetServerError()) { this.serverError = new TInvocationException(other.serverError); } } @Override public getUser_result deepCopy() { return new getUser_result(this); } @Override public void clear() { this.success = null; this.authError = null; this.notFound = null; this.serverError = null; } @org.apache.thrift.annotation.Nullable public UserInfo getSuccess() { return this.success; } public getUser_result setSuccess(@org.apache.thrift.annotation.Nullable UserInfo success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TAuthorizationException getAuthError() { return this.authError; } public getUser_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 getUser_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 getUser_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((UserInfo)value); } break; case AUTH_ERROR: if (value == null) { unsetAuthError(); } else { setAuthError((TAuthorizationException)value); } break; case NOT_FOUND: if (value == null) { unsetNotFound(); } else { setNotFound((TNotFoundException)value); } break; case SERVER_ERROR: if (value == null) { unsetServerError(); } else { setServerError((TInvocationException)value); } break; } } @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 getUser_result) return this.equals((getUser_result)that); return false; } public boolean equals(getUser_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(getUser_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("getUser_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("authError:"); if (this.authError == null) { sb.append("null"); } else { sb.append(this.authError); } first = false; if (!first) sb.append(", "); sb.append("notFound:"); if (this.notFound == null) { sb.append("null"); } else { sb.append(this.notFound); } first = false; if (!first) sb.append(", "); sb.append("serverError:"); if (this.serverError == null) { sb.append("null"); } else { sb.append(this.serverError); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 getUser_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getUser_resultStandardScheme getScheme() { return new getUser_resultStandardScheme(); } } private static class getUser_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, getUser_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new UserInfo(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // AUTH_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // NOT_FOUND if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // SERVER_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, getUser_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.authError != null) { oprot.writeFieldBegin(AUTH_ERROR_FIELD_DESC); struct.authError.write(oprot); oprot.writeFieldEnd(); } if (struct.notFound != null) { oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC); struct.notFound.write(oprot); oprot.writeFieldEnd(); } if (struct.serverError != null) { oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC); struct.serverError.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getUser_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getUser_resultTupleScheme getScheme() { return new getUser_resultTupleScheme(); } } private static class getUser_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getUser_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, getUser_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 UserInfo(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.authError = new TAuthorizationException(); struct.authError.read(iprot); struct.setAuthErrorIsSet(true); } if (incoming.get(2)) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } if (incoming.get(3)) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } } } 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 SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.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 sessionId; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION_ID((short)1, "sessionId"); private static final 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: // SESSION_ID return SESSION_ID; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); metaDataMap = 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 sessionId) { this(); this.sessionId = sessionId; } /** * Performs a deep copy on other. */ public invalidateSession_args(invalidateSession_args other) { if (other.isSetSessionId()) { this.sessionId = other.sessionId; } } @Override public invalidateSession_args deepCopy() { return new invalidateSession_args(this); } @Override public void clear() { this.sessionId = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSessionId() { return this.sessionId; } public invalidateSession_args setSessionId(@org.apache.thrift.annotation.Nullable java.lang.String sessionId) { this.sessionId = sessionId; return this; } public void unsetSessionId() { this.sessionId = null; } /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ public boolean isSetSessionId() { return this.sessionId != null; } public void setSessionIdIsSet(boolean value) { if (!value) { this.sessionId = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SESSION_ID: if (value == null) { unsetSessionId(); } else { setSessionId((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SESSION_ID: return getSessionId(); } 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 SESSION_ID: return isSetSessionId(); } 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_sessionId = true && this.isSetSessionId(); boolean that_present_sessionId = true && that.isSetSessionId(); if (this_present_sessionId || that_present_sessionId) { if (!(this_present_sessionId && that_present_sessionId)) return false; if (!this.sessionId.equals(that.sessionId)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSessionId()) ? 131071 : 524287); if (isSetSessionId()) hashCode = hashCode * 8191 + sessionId.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(isSetSessionId(), other.isSetSessionId()); if (lastComparison != 0) { return lastComparison; } if (isSetSessionId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); if (lastComparison != 0) { return lastComparison; } } return 0; } @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("sessionId:"); if (this.sessionId == null) { sb.append("null"); } else { sb.append(this.sessionId); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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: // SESSION_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.sessionId = iprot.readString(); struct.setSessionIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @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.sessionId != null) { oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); oprot.writeString(struct.sessionId); 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.isSetSessionId()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSessionId()) { oprot.writeString(struct.sessionId); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, invalidateSession_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.sessionId = iprot.readString(); struct.setSessionIdIsSet(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 getSessionFromAccessCode_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("getSessionFromAccessCode_args"); private static final org.apache.thrift.protocol.TField ACCESS_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("accessCode", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getSessionFromAccessCode_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getSessionFromAccessCode_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String accessCode; // 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 { ACCESS_CODE((short)1, "accessCode"); 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: // ACCESS_CODE return ACCESS_CODE; default: return null; } } /** * Find the _Fields constant that matches 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.ACCESS_CODE, new org.apache.thrift.meta_data.FieldMetaData("accessCode", 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(getSessionFromAccessCode_args.class, metaDataMap); } public getSessionFromAccessCode_args() { } public getSessionFromAccessCode_args( java.lang.String accessCode) { this(); this.accessCode = accessCode; } /** * Performs a deep copy on other. */ public getSessionFromAccessCode_args(getSessionFromAccessCode_args other) { if (other.isSetAccessCode()) { this.accessCode = other.accessCode; } } @Override public getSessionFromAccessCode_args deepCopy() { return new getSessionFromAccessCode_args(this); } @Override public void clear() { this.accessCode = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getAccessCode() { return this.accessCode; } public getSessionFromAccessCode_args setAccessCode(@org.apache.thrift.annotation.Nullable java.lang.String accessCode) { this.accessCode = accessCode; return this; } public void unsetAccessCode() { this.accessCode = null; } /** Returns true if field accessCode is set (has been assigned a value) and false otherwise */ public boolean isSetAccessCode() { return this.accessCode != null; } public void setAccessCodeIsSet(boolean value) { if (!value) { this.accessCode = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case ACCESS_CODE: if (value == null) { unsetAccessCode(); } else { setAccessCode((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case ACCESS_CODE: return getAccessCode(); } 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 ACCESS_CODE: return isSetAccessCode(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getSessionFromAccessCode_args) return this.equals((getSessionFromAccessCode_args)that); return false; } public boolean equals(getSessionFromAccessCode_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_accessCode = true && this.isSetAccessCode(); boolean that_present_accessCode = true && that.isSetAccessCode(); if (this_present_accessCode || that_present_accessCode) { if (!(this_present_accessCode && that_present_accessCode)) return false; if (!this.accessCode.equals(that.accessCode)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetAccessCode()) ? 131071 : 524287); if (isSetAccessCode()) hashCode = hashCode * 8191 + accessCode.hashCode(); return hashCode; } @Override public int compareTo(getSessionFromAccessCode_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetAccessCode(), other.isSetAccessCode()); if (lastComparison != 0) { return lastComparison; } if (isSetAccessCode()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.accessCode, other.accessCode); 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("getSessionFromAccessCode_args("); boolean first = true; sb.append("accessCode:"); if (this.accessCode == null) { sb.append("null"); } else { sb.append(this.accessCode); } 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 getSessionFromAccessCode_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getSessionFromAccessCode_argsStandardScheme getScheme() { return new getSessionFromAccessCode_argsStandardScheme(); } } private static class getSessionFromAccessCode_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, getSessionFromAccessCode_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: // ACCESS_CODE if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.accessCode = iprot.readString(); struct.setAccessCodeIsSet(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, getSessionFromAccessCode_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.accessCode != null) { oprot.writeFieldBegin(ACCESS_CODE_FIELD_DESC); oprot.writeString(struct.accessCode); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getSessionFromAccessCode_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getSessionFromAccessCode_argsTupleScheme getScheme() { return new getSessionFromAccessCode_argsTupleScheme(); } } private static class getSessionFromAccessCode_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getSessionFromAccessCode_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.isSetAccessCode()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetAccessCode()) { oprot.writeString(struct.accessCode); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getSessionFromAccessCode_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.accessCode = iprot.readString(); struct.setAccessCodeIsSet(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 getSessionFromAccessCode_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("getSessionFromAccessCode_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 NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField AUTH_FIELD_DESC = new org.apache.thrift.protocol.TField("auth", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getSessionFromAccessCode_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getSessionFromAccessCode_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable ClientSessionData success; // required public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required public @org.apache.thrift.annotation.Nullable TAuthorizationException auth; // 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"), NOT_FOUND((short)1, "notFound"), AUTH((short)2, "auth"); 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: // NOT_FOUND return NOT_FOUND; case 2: // AUTH return AUTH; default: return null; } } /** * Find the _Fields constant that matches 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, ClientSessionData.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.AUTH, new org.apache.thrift.meta_data.FieldMetaData("auth", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSessionFromAccessCode_result.class, metaDataMap); } public getSessionFromAccessCode_result() { } public getSessionFromAccessCode_result( ClientSessionData success, TNotFoundException notFound, TAuthorizationException auth) { this(); this.success = success; this.notFound = notFound; this.auth = auth; } /** * Performs a deep copy on other. */ public getSessionFromAccessCode_result(getSessionFromAccessCode_result other) { if (other.isSetSuccess()) { this.success = new ClientSessionData(other.success); } if (other.isSetNotFound()) { this.notFound = new TNotFoundException(other.notFound); } if (other.isSetAuth()) { this.auth = new TAuthorizationException(other.auth); } } @Override public getSessionFromAccessCode_result deepCopy() { return new getSessionFromAccessCode_result(this); } @Override public void clear() { this.success = null; this.notFound = null; this.auth = null; } @org.apache.thrift.annotation.Nullable public ClientSessionData getSuccess() { return this.success; } public getSessionFromAccessCode_result setSuccess(@org.apache.thrift.annotation.Nullable ClientSessionData success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TNotFoundException getNotFound() { return this.notFound; } public getSessionFromAccessCode_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 TAuthorizationException getAuth() { return this.auth; } public getSessionFromAccessCode_result setAuth(@org.apache.thrift.annotation.Nullable TAuthorizationException auth) { this.auth = auth; return this; } public void unsetAuth() { this.auth = null; } /** Returns true if field auth is set (has been assigned a value) and false otherwise */ public boolean isSetAuth() { return this.auth != null; } public void setAuthIsSet(boolean value) { if (!value) { this.auth = 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((ClientSessionData)value); } break; case NOT_FOUND: if (value == null) { unsetNotFound(); } else { setNotFound((TNotFoundException)value); } break; case AUTH: if (value == null) { unsetAuth(); } else { setAuth((TAuthorizationException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case NOT_FOUND: return getNotFound(); case AUTH: return getAuth(); } 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 NOT_FOUND: return isSetNotFound(); case AUTH: return isSetAuth(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getSessionFromAccessCode_result) return this.equals((getSessionFromAccessCode_result)that); return false; } public boolean equals(getSessionFromAccessCode_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_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_auth = true && this.isSetAuth(); boolean that_present_auth = true && that.isSetAuth(); if (this_present_auth || that_present_auth) { if (!(this_present_auth && that_present_auth)) return false; if (!this.auth.equals(that.auth)) 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 + ((isSetNotFound()) ? 131071 : 524287); if (isSetNotFound()) hashCode = hashCode * 8191 + notFound.hashCode(); hashCode = hashCode * 8191 + ((isSetAuth()) ? 131071 : 524287); if (isSetAuth()) hashCode = hashCode * 8191 + auth.hashCode(); return hashCode; } @Override public int compareTo(getSessionFromAccessCode_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(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(isSetAuth(), other.isSetAuth()); if (lastComparison != 0) { return lastComparison; } if (isSetAuth()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.auth, other.auth); 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("getSessionFromAccessCode_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("notFound:"); if (this.notFound == null) { sb.append("null"); } else { sb.append(this.notFound); } first = false; if (!first) sb.append(", "); sb.append("auth:"); if (this.auth == null) { sb.append("null"); } else { sb.append(this.auth); } 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 getSessionFromAccessCode_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getSessionFromAccessCode_resultStandardScheme getScheme() { return new getSessionFromAccessCode_resultStandardScheme(); } } private static class getSessionFromAccessCode_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, getSessionFromAccessCode_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new ClientSessionData(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // 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 2: // AUTH if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.auth = new TAuthorizationException(); struct.auth.read(iprot); struct.setAuthIsSet(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, getSessionFromAccessCode_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.notFound != null) { oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC); struct.notFound.write(oprot); oprot.writeFieldEnd(); } if (struct.auth != null) { oprot.writeFieldBegin(AUTH_FIELD_DESC); struct.auth.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getSessionFromAccessCode_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getSessionFromAccessCode_resultTupleScheme getScheme() { return new getSessionFromAccessCode_resultTupleScheme(); } } private static class getSessionFromAccessCode_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getSessionFromAccessCode_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.isSetNotFound()) { optionals.set(1); } if (struct.isSetAuth()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetNotFound()) { struct.notFound.write(oprot); } if (struct.isSetAuth()) { struct.auth.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getSessionFromAccessCode_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 ClientSessionData(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.notFound = new TNotFoundException(); struct.notFound.read(iprot); struct.setNotFoundIsSet(true); } if (incoming.get(2)) { struct.auth = new TAuthorizationException(); struct.auth.read(iprot); struct.setAuthIsSet(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 getUserFromToken_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("getUserFromToken_args"); private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getUserFromToken_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getUserFromToken_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String token; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { TOKEN((short)1, "token"); private static final 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: // TOKEN return TOKEN; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new 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.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserFromToken_args.class, metaDataMap); } public getUserFromToken_args() { } public getUserFromToken_args( java.lang.String token) { this(); this.token = token; } /** * Performs a deep copy on other. */ public getUserFromToken_args(getUserFromToken_args other) { if (other.isSetToken()) { this.token = other.token; } } @Override public getUserFromToken_args deepCopy() { return new getUserFromToken_args(this); } @Override public void clear() { this.token = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getToken() { return this.token; } public getUserFromToken_args setToken(@org.apache.thrift.annotation.Nullable java.lang.String token) { this.token = token; return this; } public void unsetToken() { this.token = null; } /** Returns true if field token is set (has been assigned a value) and false otherwise */ public boolean isSetToken() { return this.token != null; } public void setTokenIsSet(boolean value) { if (!value) { this.token = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case TOKEN: if (value == null) { unsetToken(); } else { setToken((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case TOKEN: return getToken(); } 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 TOKEN: return isSetToken(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getUserFromToken_args) return this.equals((getUserFromToken_args)that); return false; } public boolean equals(getUserFromToken_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_token = true && this.isSetToken(); boolean that_present_token = true && that.isSetToken(); if (this_present_token || that_present_token) { if (!(this_present_token && that_present_token)) return false; if (!this.token.equals(that.token)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetToken()) ? 131071 : 524287); if (isSetToken()) hashCode = hashCode * 8191 + token.hashCode(); return hashCode; } @Override public int compareTo(getUserFromToken_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetToken(), other.isSetToken()); if (lastComparison != 0) { return lastComparison; } if (isSetToken()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token); if (lastComparison != 0) { return lastComparison; } } return 0; } @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("getUserFromToken_args("); boolean first = true; sb.append("token:"); if (this.token == null) { sb.append("null"); } else { sb.append(this.token); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 getUserFromToken_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getUserFromToken_argsStandardScheme getScheme() { return new getUserFromToken_argsStandardScheme(); } } private static class getUserFromToken_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, getUserFromToken_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // TOKEN if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.token = iprot.readString(); struct.setTokenIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, getUserFromToken_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.token != null) { oprot.writeFieldBegin(TOKEN_FIELD_DESC); oprot.writeString(struct.token); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getUserFromToken_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getUserFromToken_argsTupleScheme getScheme() { return new getUserFromToken_argsTupleScheme(); } } private static class getUserFromToken_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getUserFromToken_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.isSetToken()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetToken()) { oprot.writeString(struct.token); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getUserFromToken_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.token = iprot.readString(); struct.setTokenIsSet(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 getUserFromToken_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("getUserFromToken_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getUserFromToken_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getUserFromToken_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable UserInfo success; // required public @org.apache.thrift.annotation.Nullable TInvalidTokenException failure; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), FAILURE((short)1, "failure"); private static final 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; default: return null; } } /** * Find the _Fields constant that matches 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, 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, TInvalidTokenException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserFromToken_result.class, metaDataMap); } public getUserFromToken_result() { } public getUserFromToken_result( UserInfo success, TInvalidTokenException failure) { this(); this.success = success; this.failure = failure; } /** * Performs a deep copy on other. */ public getUserFromToken_result(getUserFromToken_result other) { if (other.isSetSuccess()) { this.success = new UserInfo(other.success); } if (other.isSetFailure()) { this.failure = new TInvalidTokenException(other.failure); } } @Override public getUserFromToken_result deepCopy() { return new getUserFromToken_result(this); } @Override public void clear() { this.success = null; this.failure = null; } @org.apache.thrift.annotation.Nullable public UserInfo getSuccess() { return this.success; } public getUserFromToken_result setSuccess(@org.apache.thrift.annotation.Nullable UserInfo success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TInvalidTokenException getFailure() { return this.failure; } public getUserFromToken_result setFailure(@org.apache.thrift.annotation.Nullable TInvalidTokenException failure) { this.failure = failure; return this; } public void unsetFailure() { this.failure = null; } /** Returns true if field failure is set (has been assigned a value) and false otherwise */ public boolean isSetFailure() { return this.failure != null; } public void setFailureIsSet(boolean value) { if (!value) { this.failure = null; } } @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((UserInfo)value); } break; case FAILURE: if (value == null) { unsetFailure(); } else { setFailure((TInvalidTokenException)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(); } 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(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getUserFromToken_result) return this.equals((getUserFromToken_result)that); return false; } public boolean equals(getUserFromToken_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; } 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(); return hashCode; } @Override public int compareTo(getUserFromToken_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; } } 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("getUserFromToken_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("failure:"); if (this.failure == null) { sb.append("null"); } else { sb.append(this.failure); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 getUserFromToken_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getUserFromToken_resultStandardScheme getScheme() { return new getUserFromToken_resultStandardScheme(); } } private static class getUserFromToken_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, getUserFromToken_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new UserInfo(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // FAILURE if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.failure = new TInvalidTokenException(); struct.failure.read(iprot); struct.setFailureIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, getUserFromToken_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.failure != null) { oprot.writeFieldBegin(FAILURE_FIELD_DESC); struct.failure.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getUserFromToken_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getUserFromToken_resultTupleScheme getScheme() { return new getUserFromToken_resultTupleScheme(); } } private static class getUserFromToken_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getUserFromToken_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); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetFailure()) { struct.failure.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getUserFromToken_result struct) throws org.apache.thrift.TException { 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 UserInfo(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.failure = new TInvalidTokenException(); struct.failure.read(iprot); struct.setFailureIsSet(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 isServerAuthenticated_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("isServerAuthenticated_args"); private static final org.apache.thrift.protocol.TField SERVER_SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("serverSessionId", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new isServerAuthenticated_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new isServerAuthenticated_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String serverSessionId; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SERVER_SESSION_ID((short)1, "serverSessionId"); private static final 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: // SERVER_SESSION_ID return SERVER_SESSION_ID; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new 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.SERVER_SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("serverSessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isServerAuthenticated_args.class, metaDataMap); } public isServerAuthenticated_args() { } public isServerAuthenticated_args( java.lang.String serverSessionId) { this(); this.serverSessionId = serverSessionId; } /** * Performs a deep copy on other. */ public isServerAuthenticated_args(isServerAuthenticated_args other) { if (other.isSetServerSessionId()) { this.serverSessionId = other.serverSessionId; } } @Override public isServerAuthenticated_args deepCopy() { return new isServerAuthenticated_args(this); } @Override public void clear() { this.serverSessionId = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getServerSessionId() { return this.serverSessionId; } public isServerAuthenticated_args setServerSessionId(@org.apache.thrift.annotation.Nullable java.lang.String serverSessionId) { this.serverSessionId = serverSessionId; return this; } public void unsetServerSessionId() { this.serverSessionId = null; } /** Returns true if field serverSessionId is set (has been assigned a value) and false otherwise */ public boolean isSetServerSessionId() { return this.serverSessionId != null; } public void setServerSessionIdIsSet(boolean value) { if (!value) { this.serverSessionId = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SERVER_SESSION_ID: if (value == null) { unsetServerSessionId(); } else { setServerSessionId((java.lang.String)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SERVER_SESSION_ID: return getServerSessionId(); } 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 SERVER_SESSION_ID: return isSetServerSessionId(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof isServerAuthenticated_args) return this.equals((isServerAuthenticated_args)that); return false; } public boolean equals(isServerAuthenticated_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_serverSessionId = true && this.isSetServerSessionId(); boolean that_present_serverSessionId = true && that.isSetServerSessionId(); if (this_present_serverSessionId || that_present_serverSessionId) { if (!(this_present_serverSessionId && that_present_serverSessionId)) return false; if (!this.serverSessionId.equals(that.serverSessionId)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetServerSessionId()) ? 131071 : 524287); if (isSetServerSessionId()) hashCode = hashCode * 8191 + serverSessionId.hashCode(); return hashCode; } @Override public int compareTo(isServerAuthenticated_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetServerSessionId(), other.isSetServerSessionId()); if (lastComparison != 0) { return lastComparison; } if (isSetServerSessionId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverSessionId, other.serverSessionId); if (lastComparison != 0) { return lastComparison; } } return 0; } @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("isServerAuthenticated_args("); boolean first = true; sb.append("serverSessionId:"); if (this.serverSessionId == null) { sb.append("null"); } else { sb.append(this.serverSessionId); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 isServerAuthenticated_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public isServerAuthenticated_argsStandardScheme getScheme() { return new isServerAuthenticated_argsStandardScheme(); } } private static class isServerAuthenticated_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, isServerAuthenticated_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SERVER_SESSION_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.serverSessionId = iprot.readString(); struct.setServerSessionIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, isServerAuthenticated_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.serverSessionId != null) { oprot.writeFieldBegin(SERVER_SESSION_ID_FIELD_DESC); oprot.writeString(struct.serverSessionId); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class isServerAuthenticated_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public isServerAuthenticated_argsTupleScheme getScheme() { return new isServerAuthenticated_argsTupleScheme(); } } private static class isServerAuthenticated_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, isServerAuthenticated_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.isSetServerSessionId()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetServerSessionId()) { oprot.writeString(struct.serverSessionId); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, isServerAuthenticated_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.serverSessionId = iprot.readString(); struct.setServerSessionIdIsSet(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 isServerAuthenticated_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("isServerAuthenticated_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new isServerAuthenticated_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new isServerAuthenticated_resultTupleSchemeFactory(); public boolean success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final 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.BOOL))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isServerAuthenticated_result.class, metaDataMap); } public isServerAuthenticated_result() { } public isServerAuthenticated_result( boolean success) { this(); this.success = success; setSuccessIsSet(true); } /** * Performs a deep copy on other. */ public isServerAuthenticated_result(isServerAuthenticated_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; } @Override public isServerAuthenticated_result deepCopy() { return new isServerAuthenticated_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; } public boolean isSuccess() { return this.success; } public isServerAuthenticated_result setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bitfield = 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.Boolean)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return isSuccess(); } 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 isServerAuthenticated_result) return this.equals((isServerAuthenticated_result)that); return false; } public boolean equals(isServerAuthenticated_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 + ((success) ? 131071 : 524287); return hashCode; } @Override public int compareTo(isServerAuthenticated_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("isServerAuthenticated_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 isServerAuthenticated_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public isServerAuthenticated_resultStandardScheme getScheme() { return new isServerAuthenticated_resultStandardScheme(); } } private static class isServerAuthenticated_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, isServerAuthenticated_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, isServerAuthenticated_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class isServerAuthenticated_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public isServerAuthenticated_resultTupleScheme getScheme() { return new isServerAuthenticated_resultTupleScheme(); } } private static class isServerAuthenticated_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, isServerAuthenticated_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.writeBool(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, isServerAuthenticated_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.readBool(); 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 startServerAuthentication_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("startServerAuthentication_args"); private static final org.apache.thrift.protocol.TField SATELLITE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("satelliteId", org.apache.thrift.protocol.TType.I32, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new startServerAuthentication_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new startServerAuthentication_argsTupleSchemeFactory(); public int satelliteId; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SATELLITE_ID((short)1, "satelliteId"); private static final 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: // SATELLITE_ID return SATELLITE_ID; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new 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 __SATELLITEID_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.SATELLITE_ID, new org.apache.thrift.meta_data.FieldMetaData("satelliteId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startServerAuthentication_args.class, metaDataMap); } public startServerAuthentication_args() { } public startServerAuthentication_args( int satelliteId) { this(); this.satelliteId = satelliteId; setSatelliteIdIsSet(true); } /** * Performs a deep copy on other. */ public startServerAuthentication_args(startServerAuthentication_args other) { __isset_bitfield = other.__isset_bitfield; this.satelliteId = other.satelliteId; } @Override public startServerAuthentication_args deepCopy() { return new startServerAuthentication_args(this); } @Override public void clear() { setSatelliteIdIsSet(false); this.satelliteId = 0; } public int getSatelliteId() { return this.satelliteId; } public startServerAuthentication_args setSatelliteId(int satelliteId) { this.satelliteId = satelliteId; setSatelliteIdIsSet(true); return this; } public void unsetSatelliteId() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SATELLITEID_ISSET_ID); } /** Returns true if field satelliteId is set (has been assigned a value) and false otherwise */ public boolean isSetSatelliteId() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SATELLITEID_ISSET_ID); } public void setSatelliteIdIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SATELLITEID_ISSET_ID, value); } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SATELLITE_ID: if (value == null) { unsetSatelliteId(); } else { setSatelliteId((java.lang.Integer)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SATELLITE_ID: return getSatelliteId(); } 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 SATELLITE_ID: return isSetSatelliteId(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof startServerAuthentication_args) return this.equals((startServerAuthentication_args)that); return false; } public boolean equals(startServerAuthentication_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_satelliteId = true; boolean that_present_satelliteId = true; if (this_present_satelliteId || that_present_satelliteId) { if (!(this_present_satelliteId && that_present_satelliteId)) return false; if (this.satelliteId != that.satelliteId) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + satelliteId; return hashCode; } @Override public int compareTo(startServerAuthentication_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSatelliteId(), other.isSetSatelliteId()); if (lastComparison != 0) { return lastComparison; } if (isSetSatelliteId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.satelliteId, other.satelliteId); if (lastComparison != 0) { return lastComparison; } } return 0; } @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("startServerAuthentication_args("); boolean first = true; sb.append("satelliteId:"); sb.append(this.satelliteId); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 startServerAuthentication_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public startServerAuthentication_argsStandardScheme getScheme() { return new startServerAuthentication_argsStandardScheme(); } } private static class startServerAuthentication_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, startServerAuthentication_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SATELLITE_ID if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.satelliteId = iprot.readI32(); struct.setSatelliteIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, startServerAuthentication_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(SATELLITE_ID_FIELD_DESC); oprot.writeI32(struct.satelliteId); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class startServerAuthentication_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public startServerAuthentication_argsTupleScheme getScheme() { return new startServerAuthentication_argsTupleScheme(); } } private static class startServerAuthentication_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, startServerAuthentication_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.isSetSatelliteId()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSatelliteId()) { oprot.writeI32(struct.satelliteId); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, startServerAuthentication_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.satelliteId = iprot.readI32(); struct.setSatelliteIdIsSet(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 startServerAuthentication_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("startServerAuthentication_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("error", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new startServerAuthentication_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new startServerAuthentication_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer success; // required public @org.apache.thrift.annotation.Nullable TAuthorizationException failure; // 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"), FAILURE((short)1, "failure"), 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: // FAILURE return FAILURE; case 2: // ERROR return ERROR; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new 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.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.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(startServerAuthentication_result.class, metaDataMap); } public startServerAuthentication_result() { } public startServerAuthentication_result( java.nio.ByteBuffer success, TAuthorizationException failure, TInvocationException error) { this(); this.success = org.apache.thrift.TBaseHelper.copyBinary(success); this.failure = failure; this.error = error; } /** * Performs a deep copy on other. */ public startServerAuthentication_result(startServerAuthentication_result other) { if (other.isSetSuccess()) { this.success = org.apache.thrift.TBaseHelper.copyBinary(other.success); } if (other.isSetFailure()) { this.failure = new TAuthorizationException(other.failure); } if (other.isSetError()) { this.error = new TInvocationException(other.error); } } @Override public startServerAuthentication_result deepCopy() { return new startServerAuthentication_result(this); } @Override public void clear() { this.success = null; this.failure = null; this.error = null; } public byte[] getSuccess() { setSuccess(org.apache.thrift.TBaseHelper.rightSize(success)); return success == null ? null : success.array(); } public java.nio.ByteBuffer bufferForSuccess() { return org.apache.thrift.TBaseHelper.copyBinary(success); } public startServerAuthentication_result setSuccess(byte[] success) { this.success = success == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(success.clone()); return this; } public startServerAuthentication_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 getFailure() { return this.failure; } public startServerAuthentication_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 getError() { return this.error; } public startServerAuthentication_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 { if (value instanceof byte[]) { setSuccess((byte[])value); } else { setSuccess((java.nio.ByteBuffer)value); } } break; case FAILURE: if (value == null) { unsetFailure(); } else { setFailure((TAuthorizationException)value); } break; case ERROR: if (value == null) { unsetError(); } else { setError((TInvocationException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case FAILURE: return getFailure(); 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 FAILURE: return isSetFailure(); case ERROR: return isSetError(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof startServerAuthentication_result) return this.equals((startServerAuthentication_result)that); return false; } public boolean equals(startServerAuthentication_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_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 + ((isSetFailure()) ? 131071 : 524287); if (isSetFailure()) hashCode = hashCode * 8191 + failure.hashCode(); hashCode = hashCode * 8191 + ((isSetError()) ? 131071 : 524287); if (isSetError()) hashCode = hashCode * 8191 + error.hashCode(); return hashCode; } @Override public int compareTo(startServerAuthentication_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(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("startServerAuthentication_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { org.apache.thrift.TBaseHelper.toString(this.success, sb); } first = false; if (!first) sb.append(", "); sb.append("failure:"); if (this.failure == null) { sb.append("null"); } else { sb.append(this.failure); } first = false; if (!first) sb.append(", "); sb.append("error:"); if (this.error == null) { sb.append("null"); } else { sb.append(this.error); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 startServerAuthentication_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public startServerAuthentication_resultStandardScheme getScheme() { return new startServerAuthentication_resultStandardScheme(); } } private static class startServerAuthentication_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, startServerAuthentication_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.success = iprot.readBinary(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // FAILURE if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.failure = new TAuthorizationException(); struct.failure.read(iprot); struct.setFailureIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.error = new TInvocationException(); struct.error.read(iprot); struct.setErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, startServerAuthentication_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBinary(struct.success); oprot.writeFieldEnd(); } if (struct.failure != null) { oprot.writeFieldBegin(FAILURE_FIELD_DESC); struct.failure.write(oprot); oprot.writeFieldEnd(); } if (struct.error != null) { oprot.writeFieldBegin(ERROR_FIELD_DESC); struct.error.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class startServerAuthentication_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public startServerAuthentication_resultTupleScheme getScheme() { return new startServerAuthentication_resultTupleScheme(); } } private static class startServerAuthentication_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, startServerAuthentication_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.isSetError()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { oprot.writeBinary(struct.success); } if (struct.isSetFailure()) { struct.failure.write(oprot); } if (struct.isSetError()) { struct.error.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, startServerAuthentication_result struct) throws org.apache.thrift.TException { 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.readBinary(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.failure = new TAuthorizationException(); struct.failure.read(iprot); struct.setFailureIsSet(true); } if (incoming.get(2)) { struct.error = new TInvocationException(); struct.error.read(iprot); struct.setErrorIsSet(true); } } } 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 serverAuthenticate_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("serverAuthenticate_args"); private static final org.apache.thrift.protocol.TField SATELLITE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("satelliteId", org.apache.thrift.protocol.TType.I32, (short)1); private static final org.apache.thrift.protocol.TField CHALLENGE_RESPONSE_FIELD_DESC = new org.apache.thrift.protocol.TField("challengeResponse", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new serverAuthenticate_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new serverAuthenticate_argsTupleSchemeFactory(); public int satelliteId; // required public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer challengeResponse; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SATELLITE_ID((short)1, "satelliteId"), CHALLENGE_RESPONSE((short)2, "challengeResponse"); private static final 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: // SATELLITE_ID return SATELLITE_ID; case 2: // CHALLENGE_RESPONSE return CHALLENGE_RESPONSE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new 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 __SATELLITEID_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.SATELLITE_ID, new org.apache.thrift.meta_data.FieldMetaData("satelliteId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.CHALLENGE_RESPONSE, new org.apache.thrift.meta_data.FieldMetaData("challengeResponse", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(serverAuthenticate_args.class, metaDataMap); } public serverAuthenticate_args() { } public serverAuthenticate_args( int satelliteId, java.nio.ByteBuffer challengeResponse) { this(); this.satelliteId = satelliteId; setSatelliteIdIsSet(true); this.challengeResponse = org.apache.thrift.TBaseHelper.copyBinary(challengeResponse); } /** * Performs a deep copy on other. */ public serverAuthenticate_args(serverAuthenticate_args other) { __isset_bitfield = other.__isset_bitfield; this.satelliteId = other.satelliteId; if (other.isSetChallengeResponse()) { this.challengeResponse = org.apache.thrift.TBaseHelper.copyBinary(other.challengeResponse); } } @Override public serverAuthenticate_args deepCopy() { return new serverAuthenticate_args(this); } @Override public void clear() { setSatelliteIdIsSet(false); this.satelliteId = 0; this.challengeResponse = null; } public int getSatelliteId() { return this.satelliteId; } public serverAuthenticate_args setSatelliteId(int satelliteId) { this.satelliteId = satelliteId; setSatelliteIdIsSet(true); return this; } public void unsetSatelliteId() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SATELLITEID_ISSET_ID); } /** Returns true if field satelliteId is set (has been assigned a value) and false otherwise */ public boolean isSetSatelliteId() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SATELLITEID_ISSET_ID); } public void setSatelliteIdIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SATELLITEID_ISSET_ID, value); } public byte[] getChallengeResponse() { setChallengeResponse(org.apache.thrift.TBaseHelper.rightSize(challengeResponse)); return challengeResponse == null ? null : challengeResponse.array(); } public java.nio.ByteBuffer bufferForChallengeResponse() { return org.apache.thrift.TBaseHelper.copyBinary(challengeResponse); } public serverAuthenticate_args setChallengeResponse(byte[] challengeResponse) { this.challengeResponse = challengeResponse == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(challengeResponse.clone()); return this; } public serverAuthenticate_args setChallengeResponse(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer challengeResponse) { this.challengeResponse = org.apache.thrift.TBaseHelper.copyBinary(challengeResponse); return this; } public void unsetChallengeResponse() { this.challengeResponse = null; } /** Returns true if field challengeResponse is set (has been assigned a value) and false otherwise */ public boolean isSetChallengeResponse() { return this.challengeResponse != null; } public void setChallengeResponseIsSet(boolean value) { if (!value) { this.challengeResponse = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SATELLITE_ID: if (value == null) { unsetSatelliteId(); } else { setSatelliteId((java.lang.Integer)value); } break; case CHALLENGE_RESPONSE: if (value == null) { unsetChallengeResponse(); } else { if (value instanceof byte[]) { setChallengeResponse((byte[])value); } else { setChallengeResponse((java.nio.ByteBuffer)value); } } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SATELLITE_ID: return getSatelliteId(); case CHALLENGE_RESPONSE: return getChallengeResponse(); } 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 SATELLITE_ID: return isSetSatelliteId(); case CHALLENGE_RESPONSE: return isSetChallengeResponse(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof serverAuthenticate_args) return this.equals((serverAuthenticate_args)that); return false; } public boolean equals(serverAuthenticate_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_satelliteId = true; boolean that_present_satelliteId = true; if (this_present_satelliteId || that_present_satelliteId) { if (!(this_present_satelliteId && that_present_satelliteId)) return false; if (this.satelliteId != that.satelliteId) return false; } boolean this_present_challengeResponse = true && this.isSetChallengeResponse(); boolean that_present_challengeResponse = true && that.isSetChallengeResponse(); if (this_present_challengeResponse || that_present_challengeResponse) { if (!(this_present_challengeResponse && that_present_challengeResponse)) return false; if (!this.challengeResponse.equals(that.challengeResponse)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + satelliteId; hashCode = hashCode * 8191 + ((isSetChallengeResponse()) ? 131071 : 524287); if (isSetChallengeResponse()) hashCode = hashCode * 8191 + challengeResponse.hashCode(); return hashCode; } @Override public int compareTo(serverAuthenticate_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSatelliteId(), other.isSetSatelliteId()); if (lastComparison != 0) { return lastComparison; } if (isSetSatelliteId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.satelliteId, other.satelliteId); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetChallengeResponse(), other.isSetChallengeResponse()); if (lastComparison != 0) { return lastComparison; } if (isSetChallengeResponse()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.challengeResponse, other.challengeResponse); if (lastComparison != 0) { return lastComparison; } } return 0; } @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("serverAuthenticate_args("); boolean first = true; sb.append("satelliteId:"); sb.append(this.satelliteId); first = false; if (!first) sb.append(", "); sb.append("challengeResponse:"); if (this.challengeResponse == null) { sb.append("null"); } else { org.apache.thrift.TBaseHelper.toString(this.challengeResponse, sb); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 serverAuthenticate_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public serverAuthenticate_argsStandardScheme getScheme() { return new serverAuthenticate_argsStandardScheme(); } } private static class serverAuthenticate_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, serverAuthenticate_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SATELLITE_ID if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.satelliteId = iprot.readI32(); struct.setSatelliteIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // CHALLENGE_RESPONSE if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.challengeResponse = iprot.readBinary(); struct.setChallengeResponseIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, serverAuthenticate_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(SATELLITE_ID_FIELD_DESC); oprot.writeI32(struct.satelliteId); oprot.writeFieldEnd(); if (struct.challengeResponse != null) { oprot.writeFieldBegin(CHALLENGE_RESPONSE_FIELD_DESC); oprot.writeBinary(struct.challengeResponse); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class serverAuthenticate_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public serverAuthenticate_argsTupleScheme getScheme() { return new serverAuthenticate_argsTupleScheme(); } } private static class serverAuthenticate_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, serverAuthenticate_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.isSetSatelliteId()) { optionals.set(0); } if (struct.isSetChallengeResponse()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSatelliteId()) { oprot.writeI32(struct.satelliteId); } if (struct.isSetChallengeResponse()) { oprot.writeBinary(struct.challengeResponse); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, serverAuthenticate_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.satelliteId = iprot.readI32(); struct.setSatelliteIdIsSet(true); } if (incoming.get(1)) { struct.challengeResponse = iprot.readBinary(); struct.setChallengeResponseIsSet(true); } } } 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 serverAuthenticate_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("serverAuthenticate_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField ERRR_FIELD_DESC = new org.apache.thrift.protocol.TField("errr", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new serverAuthenticate_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new serverAuthenticate_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable ServerSessionData success; // required public @org.apache.thrift.annotation.Nullable TAuthorizationException failure; // required public @org.apache.thrift.annotation.Nullable TInvocationException errr; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), FAILURE((short)1, "failure"), ERRR((short)2, "errr"); private static final 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: // ERRR return ERRR; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new 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, ServerSessionData.class))); tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class))); tmpMap.put(_Fields.ERRR, new org.apache.thrift.meta_data.FieldMetaData("errr", 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(serverAuthenticate_result.class, metaDataMap); } public serverAuthenticate_result() { } public serverAuthenticate_result( ServerSessionData success, TAuthorizationException failure, TInvocationException errr) { this(); this.success = success; this.failure = failure; this.errr = errr; } /** * Performs a deep copy on other. */ public serverAuthenticate_result(serverAuthenticate_result other) { if (other.isSetSuccess()) { this.success = new ServerSessionData(other.success); } if (other.isSetFailure()) { this.failure = new TAuthorizationException(other.failure); } if (other.isSetErrr()) { this.errr = new TInvocationException(other.errr); } } @Override public serverAuthenticate_result deepCopy() { return new serverAuthenticate_result(this); } @Override public void clear() { this.success = null; this.failure = null; this.errr = null; } @org.apache.thrift.annotation.Nullable public ServerSessionData getSuccess() { return this.success; } public serverAuthenticate_result setSuccess(@org.apache.thrift.annotation.Nullable ServerSessionData success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TAuthorizationException getFailure() { return this.failure; } public serverAuthenticate_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 getErrr() { return this.errr; } public serverAuthenticate_result setErrr(@org.apache.thrift.annotation.Nullable TInvocationException errr) { this.errr = errr; return this; } public void unsetErrr() { this.errr = null; } /** Returns true if field errr is set (has been assigned a value) and false otherwise */ public boolean isSetErrr() { return this.errr != null; } public void setErrrIsSet(boolean value) { if (!value) { this.errr = null; } } @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((ServerSessionData)value); } break; case FAILURE: if (value == null) { unsetFailure(); } else { setFailure((TAuthorizationException)value); } break; case ERRR: if (value == null) { unsetErrr(); } else { setErrr((TInvocationException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case FAILURE: return getFailure(); case ERRR: return getErrr(); } 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 ERRR: return isSetErrr(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof serverAuthenticate_result) return this.equals((serverAuthenticate_result)that); return false; } public boolean equals(serverAuthenticate_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_errr = true && this.isSetErrr(); boolean that_present_errr = true && that.isSetErrr(); if (this_present_errr || that_present_errr) { if (!(this_present_errr && that_present_errr)) return false; if (!this.errr.equals(that.errr)) return false; } return true; } @Override public int hashCode() { 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 + ((isSetErrr()) ? 131071 : 524287); if (isSetErrr()) hashCode = hashCode * 8191 + errr.hashCode(); return hashCode; } @Override public int compareTo(serverAuthenticate_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(isSetErrr(), other.isSetErrr()); if (lastComparison != 0) { return lastComparison; } if (isSetErrr()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errr, other.errr); if (lastComparison != 0) { return lastComparison; } } return 0; } @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("serverAuthenticate_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("failure:"); if (this.failure == null) { sb.append("null"); } else { sb.append(this.failure); } first = false; if (!first) sb.append(", "); sb.append("errr:"); if (this.errr == null) { sb.append("null"); } else { sb.append(this.errr); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 serverAuthenticate_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public serverAuthenticate_resultStandardScheme getScheme() { return new serverAuthenticate_resultStandardScheme(); } } private static class serverAuthenticate_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, serverAuthenticate_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new ServerSessionData(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // FAILURE if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.failure = new TAuthorizationException(); struct.failure.read(iprot); struct.setFailureIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // ERRR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.errr = new TInvocationException(); struct.errr.read(iprot); struct.setErrrIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, serverAuthenticate_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.failure != null) { oprot.writeFieldBegin(FAILURE_FIELD_DESC); struct.failure.write(oprot); oprot.writeFieldEnd(); } if (struct.errr != null) { oprot.writeFieldBegin(ERRR_FIELD_DESC); struct.errr.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class serverAuthenticate_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public serverAuthenticate_resultTupleScheme getScheme() { return new serverAuthenticate_resultTupleScheme(); } } private static class serverAuthenticate_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, serverAuthenticate_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.isSetErrr()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetFailure()) { struct.failure.write(oprot); } if (struct.isSetErrr()) { struct.errr.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, serverAuthenticate_result struct) throws org.apache.thrift.TException { 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 ServerSessionData(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.failure = new TAuthorizationException(); struct.failure.read(iprot); struct.setFailureIsSet(true); } if (incoming.get(2)) { struct.errr = new TInvocationException(); struct.errr.read(iprot); struct.setErrrIsSet(true); } } } 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 getImageData_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("getImageData_args"); private static final org.apache.thrift.protocol.TField SERVER_SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("serverSessionId", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField IMAGE_VERSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageVersionId", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getImageData_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getImageData_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String serverSessionId; // 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 { SERVER_SESSION_ID((short)1, "serverSessionId"), 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: // SERVER_SESSION_ID return SERVER_SESSION_ID; case 2: // IMAGE_VERSION_ID return IMAGE_VERSION_ID; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new 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.SERVER_SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("serverSessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); tmpMap.put(_Fields.IMAGE_VERSION_ID, new org.apache.thrift.meta_data.FieldMetaData("imageVersionId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageData_args.class, metaDataMap); } public getImageData_args() { } public getImageData_args( java.lang.String serverSessionId, java.lang.String imageVersionId) { this(); this.serverSessionId = serverSessionId; this.imageVersionId = imageVersionId; } /** * Performs a deep copy on other. */ public getImageData_args(getImageData_args other) { if (other.isSetServerSessionId()) { this.serverSessionId = other.serverSessionId; } if (other.isSetImageVersionId()) { this.imageVersionId = other.imageVersionId; } } @Override public getImageData_args deepCopy() { return new getImageData_args(this); } @Override public void clear() { this.serverSessionId = null; this.imageVersionId = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getServerSessionId() { return this.serverSessionId; } public getImageData_args setServerSessionId(@org.apache.thrift.annotation.Nullable java.lang.String serverSessionId) { this.serverSessionId = serverSessionId; return this; } public void unsetServerSessionId() { this.serverSessionId = null; } /** Returns true if field serverSessionId is set (has been assigned a value) and false otherwise */ public boolean isSetServerSessionId() { return this.serverSessionId != null; } public void setServerSessionIdIsSet(boolean value) { if (!value) { this.serverSessionId = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getImageVersionId() { return this.imageVersionId; } public getImageData_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 SERVER_SESSION_ID: if (value == null) { unsetServerSessionId(); } else { setServerSessionId((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 SERVER_SESSION_ID: return getServerSessionId(); 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 SERVER_SESSION_ID: return isSetServerSessionId(); case IMAGE_VERSION_ID: return isSetImageVersionId(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getImageData_args) return this.equals((getImageData_args)that); return false; } public boolean equals(getImageData_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_serverSessionId = true && this.isSetServerSessionId(); boolean that_present_serverSessionId = true && that.isSetServerSessionId(); if (this_present_serverSessionId || that_present_serverSessionId) { if (!(this_present_serverSessionId && that_present_serverSessionId)) return false; if (!this.serverSessionId.equals(that.serverSessionId)) return false; } boolean this_present_imageVersionId = true && this.isSetImageVersionId(); boolean that_present_imageVersionId = true && that.isSetImageVersionId(); if (this_present_imageVersionId || that_present_imageVersionId) { if (!(this_present_imageVersionId && that_present_imageVersionId)) return false; if (!this.imageVersionId.equals(that.imageVersionId)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetServerSessionId()) ? 131071 : 524287); if (isSetServerSessionId()) hashCode = hashCode * 8191 + serverSessionId.hashCode(); hashCode = hashCode * 8191 + ((isSetImageVersionId()) ? 131071 : 524287); if (isSetImageVersionId()) hashCode = hashCode * 8191 + imageVersionId.hashCode(); return hashCode; } @Override public int compareTo(getImageData_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetServerSessionId(), other.isSetServerSessionId()); if (lastComparison != 0) { return lastComparison; } if (isSetServerSessionId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverSessionId, other.serverSessionId); if (lastComparison != 0) { return lastComparison; } } lastComparison = 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("getImageData_args("); boolean first = true; sb.append("serverSessionId:"); if (this.serverSessionId == null) { sb.append("null"); } else { sb.append(this.serverSessionId); } first = false; if (!first) sb.append(", "); sb.append("imageVersionId:"); if (this.imageVersionId == null) { sb.append("null"); } else { sb.append(this.imageVersionId); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 getImageData_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getImageData_argsStandardScheme getScheme() { return new getImageData_argsStandardScheme(); } } private static class getImageData_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, getImageData_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SERVER_SESSION_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.serverSessionId = iprot.readString(); struct.setServerSessionIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // IMAGE_VERSION_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.imageVersionId = iprot.readString(); struct.setImageVersionIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, getImageData_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.serverSessionId != null) { oprot.writeFieldBegin(SERVER_SESSION_ID_FIELD_DESC); oprot.writeString(struct.serverSessionId); oprot.writeFieldEnd(); } if (struct.imageVersionId != null) { oprot.writeFieldBegin(IMAGE_VERSION_ID_FIELD_DESC); oprot.writeString(struct.imageVersionId); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getImageData_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getImageData_argsTupleScheme getScheme() { return new getImageData_argsTupleScheme(); } } private static class getImageData_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getImageData_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.isSetServerSessionId()) { optionals.set(0); } if (struct.isSetImageVersionId()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetServerSessionId()) { oprot.writeString(struct.serverSessionId); } if (struct.isSetImageVersionId()) { oprot.writeString(struct.imageVersionId); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getImageData_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.serverSessionId = iprot.readString(); struct.setServerSessionIdIsSet(true); } if (incoming.get(1)) { struct.imageVersionId = iprot.readString(); struct.setImageVersionIdIsSet(true); } } } 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 getImageData_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("getImageData_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField FAILURE2_FIELD_DESC = new org.apache.thrift.protocol.TField("failure2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField F3_FIELD_DESC = new org.apache.thrift.protocol.TField("f3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getImageData_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getImageData_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable ImagePublishData success; // required public @org.apache.thrift.annotation.Nullable TAuthorizationException failure; // required public @org.apache.thrift.annotation.Nullable TInvocationException failure2; // required public @org.apache.thrift.annotation.Nullable TNotFoundException f3; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), FAILURE((short)1, "failure"), FAILURE2((short)2, "failure2"), F3((short)3, "f3"); private static final 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: // FAILURE2 return FAILURE2; case 3: // F3 return F3; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new 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, ImagePublishData.class))); tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class))); tmpMap.put(_Fields.FAILURE2, new org.apache.thrift.meta_data.FieldMetaData("failure2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class))); tmpMap.put(_Fields.F3, new org.apache.thrift.meta_data.FieldMetaData("f3", 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(getImageData_result.class, metaDataMap); } public getImageData_result() { } public getImageData_result( ImagePublishData success, TAuthorizationException failure, TInvocationException failure2, TNotFoundException f3) { this(); this.success = success; this.failure = failure; this.failure2 = failure2; this.f3 = f3; } /** * Performs a deep copy on other. */ public getImageData_result(getImageData_result other) { if (other.isSetSuccess()) { this.success = new ImagePublishData(other.success); } if (other.isSetFailure()) { this.failure = new TAuthorizationException(other.failure); } if (other.isSetFailure2()) { this.failure2 = new TInvocationException(other.failure2); } if (other.isSetF3()) { this.f3 = new TNotFoundException(other.f3); } } @Override public getImageData_result deepCopy() { return new getImageData_result(this); } @Override public void clear() { this.success = null; this.failure = null; this.failure2 = null; this.f3 = null; } @org.apache.thrift.annotation.Nullable public ImagePublishData getSuccess() { return this.success; } public getImageData_result setSuccess(@org.apache.thrift.annotation.Nullable ImagePublishData success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } @org.apache.thrift.annotation.Nullable public TAuthorizationException getFailure() { return this.failure; } public getImageData_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 getFailure2() { return this.failure2; } public getImageData_result setFailure2(@org.apache.thrift.annotation.Nullable TInvocationException failure2) { this.failure2 = failure2; return this; } public void unsetFailure2() { this.failure2 = null; } /** Returns true if field failure2 is set (has been assigned a value) and false otherwise */ public boolean isSetFailure2() { return this.failure2 != null; } public void setFailure2IsSet(boolean value) { if (!value) { this.failure2 = null; } } @org.apache.thrift.annotation.Nullable public TNotFoundException getF3() { return this.f3; } public getImageData_result setF3(@org.apache.thrift.annotation.Nullable TNotFoundException f3) { this.f3 = f3; return this; } public void unsetF3() { this.f3 = null; } /** Returns true if field f3 is set (has been assigned a value) and false otherwise */ public boolean isSetF3() { return this.f3 != null; } public void setF3IsSet(boolean value) { if (!value) { this.f3 = null; } } @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((ImagePublishData)value); } break; case FAILURE: if (value == null) { unsetFailure(); } else { setFailure((TAuthorizationException)value); } break; case FAILURE2: if (value == null) { unsetFailure2(); } else { setFailure2((TInvocationException)value); } break; case F3: if (value == null) { unsetF3(); } else { setF3((TNotFoundException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case FAILURE: return getFailure(); case FAILURE2: return getFailure2(); case F3: return getF3(); } 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 FAILURE2: return isSetFailure2(); case F3: return isSetF3(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getImageData_result) return this.equals((getImageData_result)that); return false; } public boolean equals(getImageData_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_failure2 = true && this.isSetFailure2(); boolean that_present_failure2 = true && that.isSetFailure2(); if (this_present_failure2 || that_present_failure2) { if (!(this_present_failure2 && that_present_failure2)) return false; if (!this.failure2.equals(that.failure2)) return false; } boolean this_present_f3 = true && this.isSetF3(); boolean that_present_f3 = true && that.isSetF3(); if (this_present_f3 || that_present_f3) { if (!(this_present_f3 && that_present_f3)) return false; if (!this.f3.equals(that.f3)) return false; } return true; } @Override public int hashCode() { 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 + ((isSetFailure2()) ? 131071 : 524287); if (isSetFailure2()) hashCode = hashCode * 8191 + failure2.hashCode(); hashCode = hashCode * 8191 + ((isSetF3()) ? 131071 : 524287); if (isSetF3()) hashCode = hashCode * 8191 + f3.hashCode(); return hashCode; } @Override public int compareTo(getImageData_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(isSetFailure2(), other.isSetFailure2()); if (lastComparison != 0) { return lastComparison; } if (isSetFailure2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure2, other.failure2); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetF3(), other.isSetF3()); if (lastComparison != 0) { return lastComparison; } if (isSetF3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.f3, other.f3); if (lastComparison != 0) { return lastComparison; } } return 0; } @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("getImageData_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("failure:"); if (this.failure == null) { sb.append("null"); } else { sb.append(this.failure); } first = false; if (!first) sb.append(", "); sb.append("failure2:"); if (this.failure2 == null) { sb.append("null"); } else { sb.append(this.failure2); } first = false; if (!first) sb.append(", "); sb.append("f3:"); if (this.f3 == null) { sb.append("null"); } else { sb.append(this.f3); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 getImageData_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getImageData_resultStandardScheme getScheme() { return new getImageData_resultStandardScheme(); } } private static class getImageData_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, getImageData_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new ImagePublishData(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // FAILURE if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.failure = new TAuthorizationException(); struct.failure.read(iprot); struct.setFailureIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // FAILURE2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.failure2 = new TInvocationException(); struct.failure2.read(iprot); struct.setFailure2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // F3 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.f3 = new TNotFoundException(); struct.f3.read(iprot); struct.setF3IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, getImageData_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.failure != null) { oprot.writeFieldBegin(FAILURE_FIELD_DESC); struct.failure.write(oprot); oprot.writeFieldEnd(); } if (struct.failure2 != null) { oprot.writeFieldBegin(FAILURE2_FIELD_DESC); struct.failure2.write(oprot); oprot.writeFieldEnd(); } if (struct.f3 != null) { oprot.writeFieldBegin(F3_FIELD_DESC); struct.f3.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getImageData_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getImageData_resultTupleScheme getScheme() { return new getImageData_resultTupleScheme(); } } private static class getImageData_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getImageData_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.isSetFailure2()) { optionals.set(2); } if (struct.isSetF3()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetFailure()) { struct.failure.write(oprot); } if (struct.isSetFailure2()) { struct.failure2.write(oprot); } if (struct.isSetF3()) { struct.f3.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getImageData_result struct) throws org.apache.thrift.TException { 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 ImagePublishData(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.failure = new TAuthorizationException(); struct.failure.read(iprot); struct.setFailureIsSet(true); } if (incoming.get(2)) { struct.failure2 = new TInvocationException(); struct.failure2.read(iprot); struct.setFailure2IsSet(true); } if (incoming.get(3)) { struct.f3 = new TNotFoundException(); struct.f3.read(iprot); struct.setF3IsSet(true); } } } 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 submitImage_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("submitImage_args"); private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField IMAGE_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("imageDescription", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField BLOCK_HASHES_FIELD_DESC = new org.apache.thrift.protocol.TField("blockHashes", org.apache.thrift.protocol.TType.LIST, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new submitImage_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new submitImage_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required public @org.apache.thrift.annotation.Nullable ImagePublishData imageDescription; // required public @org.apache.thrift.annotation.Nullable java.util.List blockHashes; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { USER_TOKEN((short)1, "userToken"), IMAGE_DESCRIPTION((short)2, "imageDescription"), BLOCK_HASHES((short)3, "blockHashes"); 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_DESCRIPTION return IMAGE_DESCRIPTION; case 3: // BLOCK_HASHES return BLOCK_HASHES; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new 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_DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("imageDescription", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ImagePublishData.class))); tmpMap.put(_Fields.BLOCK_HASHES, new org.apache.thrift.meta_data.FieldMetaData("blockHashes", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(submitImage_args.class, metaDataMap); } public submitImage_args() { } public submitImage_args( java.lang.String userToken, ImagePublishData imageDescription, java.util.List blockHashes) { this(); this.userToken = userToken; this.imageDescription = imageDescription; this.blockHashes = blockHashes; } /** * Performs a deep copy on other. */ public submitImage_args(submitImage_args other) { if (other.isSetUserToken()) { this.userToken = other.userToken; } if (other.isSetImageDescription()) { this.imageDescription = new ImagePublishData(other.imageDescription); } if (other.isSetBlockHashes()) { java.util.List __this__blockHashes = new java.util.ArrayList(other.blockHashes); this.blockHashes = __this__blockHashes; } } @Override public submitImage_args deepCopy() { return new submitImage_args(this); } @Override public void clear() { this.userToken = null; this.imageDescription = null; this.blockHashes = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getUserToken() { return this.userToken; } public submitImage_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 ImagePublishData getImageDescription() { return this.imageDescription; } public submitImage_args setImageDescription(@org.apache.thrift.annotation.Nullable ImagePublishData imageDescription) { this.imageDescription = imageDescription; return this; } public void unsetImageDescription() { this.imageDescription = null; } /** Returns true if field imageDescription is set (has been assigned a value) and false otherwise */ public boolean isSetImageDescription() { return this.imageDescription != null; } public void setImageDescriptionIsSet(boolean value) { if (!value) { this.imageDescription = null; } } public int getBlockHashesSize() { return (this.blockHashes == null) ? 0 : this.blockHashes.size(); } @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 submitImage_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; } } @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_DESCRIPTION: if (value == null) { unsetImageDescription(); } else { setImageDescription((ImagePublishData)value); } break; case BLOCK_HASHES: if (value == null) { unsetBlockHashes(); } else { setBlockHashes((java.util.List)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case USER_TOKEN: return getUserToken(); case IMAGE_DESCRIPTION: return getImageDescription(); case BLOCK_HASHES: return getBlockHashes(); } 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_DESCRIPTION: return isSetImageDescription(); case BLOCK_HASHES: return isSetBlockHashes(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof submitImage_args) return this.equals((submitImage_args)that); return false; } public boolean equals(submitImage_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_imageDescription = true && this.isSetImageDescription(); boolean that_present_imageDescription = true && that.isSetImageDescription(); if (this_present_imageDescription || that_present_imageDescription) { if (!(this_present_imageDescription && that_present_imageDescription)) return false; if (!this.imageDescription.equals(that.imageDescription)) return false; } boolean this_present_blockHashes = true && this.isSetBlockHashes(); boolean that_present_blockHashes = true && that.isSetBlockHashes(); if (this_present_blockHashes || that_present_blockHashes) { if (!(this_present_blockHashes && that_present_blockHashes)) return false; if (!this.blockHashes.equals(that.blockHashes)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287); if (isSetUserToken()) hashCode = hashCode * 8191 + userToken.hashCode(); hashCode = hashCode * 8191 + ((isSetImageDescription()) ? 131071 : 524287); if (isSetImageDescription()) hashCode = hashCode * 8191 + imageDescription.hashCode(); hashCode = hashCode * 8191 + ((isSetBlockHashes()) ? 131071 : 524287); if (isSetBlockHashes()) hashCode = hashCode * 8191 + blockHashes.hashCode(); return hashCode; } @Override public int compareTo(submitImage_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(isSetImageDescription(), other.isSetImageDescription()); if (lastComparison != 0) { return lastComparison; } if (isSetImageDescription()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageDescription, other.imageDescription); if (lastComparison != 0) { return lastComparison; } } lastComparison = 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; } } 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("submitImage_args("); boolean first = true; sb.append("userToken:"); if (this.userToken == null) { sb.append("null"); } else { sb.append(this.userToken); } first = false; if (!first) sb.append(", "); sb.append("imageDescription:"); if (this.imageDescription == null) { sb.append("null"); } else { sb.append(this.imageDescription); } first = false; if (!first) sb.append(", "); sb.append("blockHashes:"); if (this.blockHashes == null) { sb.append("null"); } else { org.apache.thrift.TBaseHelper.toString(this.blockHashes, sb); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (imageDescription != null) { imageDescription.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 submitImage_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public submitImage_argsStandardScheme getScheme() { return new submitImage_argsStandardScheme(); } } private static class submitImage_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, submitImage_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // USER_TOKEN if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // IMAGE_DESCRIPTION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.imageDescription = new ImagePublishData(); struct.imageDescription.read(iprot); struct.setImageDescriptionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // BLOCK_HASHES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list434 = iprot.readListBegin(); struct.blockHashes = new java.util.ArrayList(_list434.size); @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem435; for (int _i436 = 0; _i436 < _list434.size; ++_i436) { _elem435 = iprot.readBinary(); struct.blockHashes.add(_elem435); } iprot.readListEnd(); } struct.setBlockHashesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, submitImage_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.userToken != null) { oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC); oprot.writeString(struct.userToken); oprot.writeFieldEnd(); } if (struct.imageDescription != null) { oprot.writeFieldBegin(IMAGE_DESCRIPTION_FIELD_DESC); struct.imageDescription.write(oprot); oprot.writeFieldEnd(); } if (struct.blockHashes != null) { oprot.writeFieldBegin(BLOCK_HASHES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.blockHashes.size())); for (java.nio.ByteBuffer _iter437 : struct.blockHashes) { oprot.writeBinary(_iter437); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class submitImage_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public submitImage_argsTupleScheme getScheme() { return new submitImage_argsTupleScheme(); } } private static class submitImage_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, submitImage_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.isSetImageDescription()) { optionals.set(1); } if (struct.isSetBlockHashes()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetUserToken()) { oprot.writeString(struct.userToken); } if (struct.isSetImageDescription()) { struct.imageDescription.write(oprot); } if (struct.isSetBlockHashes()) { { oprot.writeI32(struct.blockHashes.size()); for (java.nio.ByteBuffer _iter438 : struct.blockHashes) { oprot.writeBinary(_iter438); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, submitImage_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.imageDescription = new ImagePublishData(); struct.imageDescription.read(iprot); struct.setImageDescriptionIsSet(true); } if (incoming.get(2)) { { org.apache.thrift.protocol.TList _list439 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); struct.blockHashes = new java.util.ArrayList(_list439.size); @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem440; for (int _i441 = 0; _i441 < _list439.size; ++_i441) { _elem440 = iprot.readBinary(); struct.blockHashes.add(_elem440); } } struct.setBlockHashesIsSet(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 submitImage_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("submitImage_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField FAILURE2_FIELD_DESC = new org.apache.thrift.protocol.TField("failure2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField FAILURE3_FIELD_DESC = new org.apache.thrift.protocol.TField("failure3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new submitImage_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new submitImage_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TransferInformation success; // required public @org.apache.thrift.annotation.Nullable TAuthorizationException failure; // required public @org.apache.thrift.annotation.Nullable TInvocationException failure2; // required public @org.apache.thrift.annotation.Nullable TTransferRejectedException failure3; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), FAILURE((short)1, "failure"), FAILURE2((short)2, "failure2"), FAILURE3((short)3, "failure3"); private static final 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: // FAILURE2 return FAILURE2; case 3: // FAILURE3 return FAILURE3; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new 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.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.FAILURE2, new org.apache.thrift.meta_data.FieldMetaData("failure2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class))); tmpMap.put(_Fields.FAILURE3, new org.apache.thrift.meta_data.FieldMetaData("failure3", 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(submitImage_result.class, metaDataMap); } public submitImage_result() { } public submitImage_result( TransferInformation success, TAuthorizationException failure, TInvocationException failure2, TTransferRejectedException failure3) { this(); this.success = success; this.failure = failure; this.failure2 = failure2; this.failure3 = failure3; } /** * Performs a deep copy on other. */ public submitImage_result(submitImage_result other) { if (other.isSetSuccess()) { this.success = new TransferInformation(other.success); } if (other.isSetFailure()) { this.failure = new TAuthorizationException(other.failure); } if (other.isSetFailure2()) { this.failure2 = new TInvocationException(other.failure2); } if (other.isSetFailure3()) { this.failure3 = new TTransferRejectedException(other.failure3); } } @Override public submitImage_result deepCopy() { return new submitImage_result(this); } @Override public void clear() { this.success = null; this.failure = null; this.failure2 = null; this.failure3 = null; } @org.apache.thrift.annotation.Nullable public TransferInformation getSuccess() { return this.success; } public submitImage_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 TAuthorizationException getFailure() { return this.failure; } public submitImage_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 getFailure2() { return this.failure2; } public submitImage_result setFailure2(@org.apache.thrift.annotation.Nullable TInvocationException failure2) { this.failure2 = failure2; return this; } public void unsetFailure2() { this.failure2 = null; } /** Returns true if field failure2 is set (has been assigned a value) and false otherwise */ public boolean isSetFailure2() { return this.failure2 != null; } public void setFailure2IsSet(boolean value) { if (!value) { this.failure2 = null; } } @org.apache.thrift.annotation.Nullable public TTransferRejectedException getFailure3() { return this.failure3; } public submitImage_result setFailure3(@org.apache.thrift.annotation.Nullable TTransferRejectedException failure3) { this.failure3 = failure3; return this; } public void unsetFailure3() { this.failure3 = null; } /** Returns true if field failure3 is set (has been assigned a value) and false otherwise */ public boolean isSetFailure3() { return this.failure3 != null; } public void setFailure3IsSet(boolean value) { if (!value) { this.failure3 = null; } } @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 FAILURE: if (value == null) { unsetFailure(); } else { setFailure((TAuthorizationException)value); } break; case FAILURE2: if (value == null) { unsetFailure2(); } else { setFailure2((TInvocationException)value); } break; case FAILURE3: if (value == null) { unsetFailure3(); } else { setFailure3((TTransferRejectedException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case FAILURE: return getFailure(); case FAILURE2: return getFailure2(); case FAILURE3: return getFailure3(); } 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 FAILURE2: return isSetFailure2(); case FAILURE3: return isSetFailure3(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof submitImage_result) return this.equals((submitImage_result)that); return false; } public boolean equals(submitImage_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_failure2 = true && this.isSetFailure2(); boolean that_present_failure2 = true && that.isSetFailure2(); if (this_present_failure2 || that_present_failure2) { if (!(this_present_failure2 && that_present_failure2)) return false; if (!this.failure2.equals(that.failure2)) return false; } boolean this_present_failure3 = true && this.isSetFailure3(); boolean that_present_failure3 = true && that.isSetFailure3(); if (this_present_failure3 || that_present_failure3) { if (!(this_present_failure3 && that_present_failure3)) return false; if (!this.failure3.equals(that.failure3)) return false; } return true; } @Override public int hashCode() { 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 + ((isSetFailure2()) ? 131071 : 524287); if (isSetFailure2()) hashCode = hashCode * 8191 + failure2.hashCode(); hashCode = hashCode * 8191 + ((isSetFailure3()) ? 131071 : 524287); if (isSetFailure3()) hashCode = hashCode * 8191 + failure3.hashCode(); return hashCode; } @Override public int compareTo(submitImage_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(isSetFailure2(), other.isSetFailure2()); if (lastComparison != 0) { return lastComparison; } if (isSetFailure2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure2, other.failure2); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetFailure3(), other.isSetFailure3()); if (lastComparison != 0) { return lastComparison; } if (isSetFailure3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure3, other.failure3); if (lastComparison != 0) { return lastComparison; } } return 0; } @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("submitImage_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("failure:"); if (this.failure == null) { sb.append("null"); } else { sb.append(this.failure); } first = false; if (!first) sb.append(", "); sb.append("failure2:"); if (this.failure2 == null) { sb.append("null"); } else { sb.append(this.failure2); } first = false; if (!first) sb.append(", "); sb.append("failure3:"); if (this.failure3 == null) { sb.append("null"); } else { sb.append(this.failure3); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 submitImage_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public submitImage_resultStandardScheme getScheme() { return new submitImage_resultStandardScheme(); } } private static class submitImage_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, submitImage_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new TransferInformation(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // FAILURE if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.failure = new TAuthorizationException(); struct.failure.read(iprot); struct.setFailureIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // FAILURE2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.failure2 = new TInvocationException(); struct.failure2.read(iprot); struct.setFailure2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // FAILURE3 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.failure3 = new TTransferRejectedException(); struct.failure3.read(iprot); struct.setFailure3IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, submitImage_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.failure != null) { oprot.writeFieldBegin(FAILURE_FIELD_DESC); struct.failure.write(oprot); oprot.writeFieldEnd(); } if (struct.failure2 != null) { oprot.writeFieldBegin(FAILURE2_FIELD_DESC); struct.failure2.write(oprot); oprot.writeFieldEnd(); } if (struct.failure3 != null) { oprot.writeFieldBegin(FAILURE3_FIELD_DESC); struct.failure3.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class submitImage_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public submitImage_resultTupleScheme getScheme() { return new submitImage_resultTupleScheme(); } } private static class submitImage_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, submitImage_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.isSetFailure2()) { optionals.set(2); } if (struct.isSetFailure3()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetFailure()) { struct.failure.write(oprot); } if (struct.isSetFailure2()) { struct.failure2.write(oprot); } if (struct.isSetFailure3()) { struct.failure3.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, submitImage_result struct) throws org.apache.thrift.TException { 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 TransferInformation(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.failure = new TAuthorizationException(); struct.failure.read(iprot); struct.setFailureIsSet(true); } if (incoming.get(2)) { struct.failure2 = new TInvocationException(); struct.failure2.read(iprot); struct.setFailure2IsSet(true); } if (incoming.get(3)) { struct.failure3 = new TTransferRejectedException(); struct.failure3.read(iprot); struct.setFailure3IsSet(true); } } } 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 registerSatellite_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("registerSatellite_args"); private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)6); private static final org.apache.thrift.protocol.TField DISPLAY_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("displayName", org.apache.thrift.protocol.TType.STRING, (short)5); private static final org.apache.thrift.protocol.TField ADDRESSES_FIELD_DESC = new org.apache.thrift.protocol.TField("addresses", org.apache.thrift.protocol.TType.LIST, (short)2); private static final org.apache.thrift.protocol.TField MODULUS_FIELD_DESC = new org.apache.thrift.protocol.TField("modulus", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField EXPONENT_FIELD_DESC = new org.apache.thrift.protocol.TField("exponent", org.apache.thrift.protocol.TType.STRING, (short)4); private static final org.apache.thrift.protocol.TField CERTSHA256_FIELD_DESC = new org.apache.thrift.protocol.TField("certsha256", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new registerSatellite_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new registerSatellite_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required public @org.apache.thrift.annotation.Nullable java.lang.String displayName; // required public @org.apache.thrift.annotation.Nullable java.util.List addresses; // required public @org.apache.thrift.annotation.Nullable java.lang.String modulus; // required public @org.apache.thrift.annotation.Nullable java.lang.String exponent; // required public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer certsha256; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { USER_TOKEN((short)6, "userToken"), DISPLAY_NAME((short)5, "displayName"), ADDRESSES((short)2, "addresses"), MODULUS((short)3, "modulus"), EXPONENT((short)4, "exponent"), CERTSHA256((short)1, "certsha256"); private static final 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 6: // USER_TOKEN return USER_TOKEN; case 5: // DISPLAY_NAME return DISPLAY_NAME; case 2: // ADDRESSES return ADDRESSES; case 3: // MODULUS return MODULUS; case 4: // EXPONENT return EXPONENT; case 1: // CERTSHA256 return CERTSHA256; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new 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.DISPLAY_NAME, new org.apache.thrift.meta_data.FieldMetaData("displayName", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.ADDRESSES, new org.apache.thrift.meta_data.FieldMetaData("addresses", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); tmpMap.put(_Fields.MODULUS, new org.apache.thrift.meta_data.FieldMetaData("modulus", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.EXPONENT, new org.apache.thrift.meta_data.FieldMetaData("exponent", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.CERTSHA256, new org.apache.thrift.meta_data.FieldMetaData("certsha256", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(registerSatellite_args.class, metaDataMap); } public registerSatellite_args() { } public registerSatellite_args( java.lang.String userToken, java.lang.String displayName, java.util.List addresses, java.lang.String modulus, java.lang.String exponent, java.nio.ByteBuffer certsha256) { this(); this.userToken = userToken; this.displayName = displayName; this.addresses = addresses; this.modulus = modulus; this.exponent = exponent; this.certsha256 = org.apache.thrift.TBaseHelper.copyBinary(certsha256); } /** * Performs a deep copy on other. */ public registerSatellite_args(registerSatellite_args other) { if (other.isSetUserToken()) { this.userToken = other.userToken; } if (other.isSetDisplayName()) { this.displayName = other.displayName; } if (other.isSetAddresses()) { java.util.List __this__addresses = new java.util.ArrayList(other.addresses); this.addresses = __this__addresses; } if (other.isSetModulus()) { this.modulus = other.modulus; } if (other.isSetExponent()) { this.exponent = other.exponent; } if (other.isSetCertsha256()) { this.certsha256 = org.apache.thrift.TBaseHelper.copyBinary(other.certsha256); } } @Override public registerSatellite_args deepCopy() { return new registerSatellite_args(this); } @Override public void clear() { this.userToken = null; this.displayName = null; this.addresses = null; this.modulus = null; this.exponent = null; this.certsha256 = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getUserToken() { return this.userToken; } public registerSatellite_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 getDisplayName() { return this.displayName; } public registerSatellite_args setDisplayName(@org.apache.thrift.annotation.Nullable java.lang.String displayName) { this.displayName = displayName; return this; } public void unsetDisplayName() { this.displayName = null; } /** Returns true if field displayName is set (has been assigned a value) and false otherwise */ public boolean isSetDisplayName() { return this.displayName != null; } public void setDisplayNameIsSet(boolean value) { if (!value) { this.displayName = null; } } public int getAddressesSize() { return (this.addresses == null) ? 0 : this.addresses.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator getAddressesIterator() { return (this.addresses == null) ? null : this.addresses.iterator(); } public void addToAddresses(java.lang.String elem) { if (this.addresses == null) { this.addresses = new java.util.ArrayList(); } this.addresses.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List getAddresses() { return this.addresses; } public registerSatellite_args setAddresses(@org.apache.thrift.annotation.Nullable java.util.List addresses) { this.addresses = addresses; return this; } public void unsetAddresses() { this.addresses = null; } /** Returns true if field addresses is set (has been assigned a value) and false otherwise */ public boolean isSetAddresses() { return this.addresses != null; } public void setAddressesIsSet(boolean value) { if (!value) { this.addresses = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getModulus() { return this.modulus; } public registerSatellite_args setModulus(@org.apache.thrift.annotation.Nullable java.lang.String modulus) { this.modulus = modulus; return this; } public void unsetModulus() { this.modulus = null; } /** Returns true if field modulus is set (has been assigned a value) and false otherwise */ public boolean isSetModulus() { return this.modulus != null; } public void setModulusIsSet(boolean value) { if (!value) { this.modulus = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getExponent() { return this.exponent; } public registerSatellite_args setExponent(@org.apache.thrift.annotation.Nullable java.lang.String exponent) { this.exponent = exponent; return this; } public void unsetExponent() { this.exponent = null; } /** Returns true if field exponent is set (has been assigned a value) and false otherwise */ public boolean isSetExponent() { return this.exponent != null; } public void setExponentIsSet(boolean value) { if (!value) { this.exponent = null; } } public byte[] getCertsha256() { setCertsha256(org.apache.thrift.TBaseHelper.rightSize(certsha256)); return certsha256 == null ? null : certsha256.array(); } public java.nio.ByteBuffer bufferForCertsha256() { return org.apache.thrift.TBaseHelper.copyBinary(certsha256); } public registerSatellite_args setCertsha256(byte[] certsha256) { this.certsha256 = certsha256 == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(certsha256.clone()); return this; } public registerSatellite_args setCertsha256(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer certsha256) { this.certsha256 = org.apache.thrift.TBaseHelper.copyBinary(certsha256); return this; } public void unsetCertsha256() { this.certsha256 = null; } /** Returns true if field certsha256 is set (has been assigned a value) and false otherwise */ public boolean isSetCertsha256() { return this.certsha256 != null; } public void setCertsha256IsSet(boolean value) { if (!value) { this.certsha256 = null; } } @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 DISPLAY_NAME: if (value == null) { unsetDisplayName(); } else { setDisplayName((java.lang.String)value); } break; case ADDRESSES: if (value == null) { unsetAddresses(); } else { setAddresses((java.util.List)value); } break; case MODULUS: if (value == null) { unsetModulus(); } else { setModulus((java.lang.String)value); } break; case EXPONENT: if (value == null) { unsetExponent(); } else { setExponent((java.lang.String)value); } break; case CERTSHA256: if (value == null) { unsetCertsha256(); } else { if (value instanceof byte[]) { setCertsha256((byte[])value); } else { setCertsha256((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 DISPLAY_NAME: return getDisplayName(); case ADDRESSES: return getAddresses(); case MODULUS: return getModulus(); case EXPONENT: return getExponent(); case CERTSHA256: return getCertsha256(); } 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 DISPLAY_NAME: return isSetDisplayName(); case ADDRESSES: return isSetAddresses(); case MODULUS: return isSetModulus(); case EXPONENT: return isSetExponent(); case CERTSHA256: return isSetCertsha256(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof registerSatellite_args) return this.equals((registerSatellite_args)that); return false; } public boolean equals(registerSatellite_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_displayName = true && this.isSetDisplayName(); boolean that_present_displayName = true && that.isSetDisplayName(); if (this_present_displayName || that_present_displayName) { if (!(this_present_displayName && that_present_displayName)) return false; if (!this.displayName.equals(that.displayName)) return false; } boolean this_present_addresses = true && this.isSetAddresses(); boolean that_present_addresses = true && that.isSetAddresses(); if (this_present_addresses || that_present_addresses) { if (!(this_present_addresses && that_present_addresses)) return false; if (!this.addresses.equals(that.addresses)) return false; } boolean this_present_modulus = true && this.isSetModulus(); boolean that_present_modulus = true && that.isSetModulus(); if (this_present_modulus || that_present_modulus) { if (!(this_present_modulus && that_present_modulus)) return false; if (!this.modulus.equals(that.modulus)) return false; } boolean this_present_exponent = true && this.isSetExponent(); boolean that_present_exponent = true && that.isSetExponent(); if (this_present_exponent || that_present_exponent) { if (!(this_present_exponent && that_present_exponent)) return false; if (!this.exponent.equals(that.exponent)) return false; } boolean this_present_certsha256 = true && this.isSetCertsha256(); boolean that_present_certsha256 = true && that.isSetCertsha256(); if (this_present_certsha256 || that_present_certsha256) { if (!(this_present_certsha256 && that_present_certsha256)) return false; if (!this.certsha256.equals(that.certsha256)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287); if (isSetUserToken()) hashCode = hashCode * 8191 + userToken.hashCode(); hashCode = hashCode * 8191 + ((isSetDisplayName()) ? 131071 : 524287); if (isSetDisplayName()) hashCode = hashCode * 8191 + displayName.hashCode(); hashCode = hashCode * 8191 + ((isSetAddresses()) ? 131071 : 524287); if (isSetAddresses()) hashCode = hashCode * 8191 + addresses.hashCode(); hashCode = hashCode * 8191 + ((isSetModulus()) ? 131071 : 524287); if (isSetModulus()) hashCode = hashCode * 8191 + modulus.hashCode(); hashCode = hashCode * 8191 + ((isSetExponent()) ? 131071 : 524287); if (isSetExponent()) hashCode = hashCode * 8191 + exponent.hashCode(); hashCode = hashCode * 8191 + ((isSetCertsha256()) ? 131071 : 524287); if (isSetCertsha256()) hashCode = hashCode * 8191 + certsha256.hashCode(); return hashCode; } @Override public int compareTo(registerSatellite_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(isSetDisplayName(), other.isSetDisplayName()); if (lastComparison != 0) { return lastComparison; } if (isSetDisplayName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.displayName, other.displayName); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetAddresses(), other.isSetAddresses()); if (lastComparison != 0) { return lastComparison; } if (isSetAddresses()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.addresses, other.addresses); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetModulus(), other.isSetModulus()); if (lastComparison != 0) { return lastComparison; } if (isSetModulus()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.modulus, other.modulus); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetExponent(), other.isSetExponent()); if (lastComparison != 0) { return lastComparison; } if (isSetExponent()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.exponent, other.exponent); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetCertsha256(), other.isSetCertsha256()); if (lastComparison != 0) { return lastComparison; } if (isSetCertsha256()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.certsha256, other.certsha256); if (lastComparison != 0) { return lastComparison; } } return 0; } @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("registerSatellite_args("); boolean first = true; sb.append("userToken:"); if (this.userToken == null) { sb.append("null"); } else { sb.append(this.userToken); } first = false; if (!first) sb.append(", "); sb.append("displayName:"); if (this.displayName == null) { sb.append("null"); } else { sb.append(this.displayName); } first = false; if (!first) sb.append(", "); sb.append("addresses:"); if (this.addresses == null) { sb.append("null"); } else { sb.append(this.addresses); } first = false; if (!first) sb.append(", "); sb.append("modulus:"); if (this.modulus == null) { sb.append("null"); } else { sb.append(this.modulus); } first = false; if (!first) sb.append(", "); sb.append("exponent:"); if (this.exponent == null) { sb.append("null"); } else { sb.append(this.exponent); } first = false; if (!first) sb.append(", "); sb.append("certsha256:"); if (this.certsha256 == null) { sb.append("null"); } else { org.apache.thrift.TBaseHelper.toString(this.certsha256, sb); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 registerSatellite_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public registerSatellite_argsStandardScheme getScheme() { return new registerSatellite_argsStandardScheme(); } } private static class registerSatellite_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, registerSatellite_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 6: // USER_TOKEN if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // DISPLAY_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.displayName = iprot.readString(); struct.setDisplayNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // ADDRESSES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list442 = iprot.readListBegin(); struct.addresses = new java.util.ArrayList(_list442.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem443; for (int _i444 = 0; _i444 < _list442.size; ++_i444) { _elem443 = iprot.readString(); struct.addresses.add(_elem443); } iprot.readListEnd(); } struct.setAddressesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // MODULUS if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.modulus = iprot.readString(); struct.setModulusIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // EXPONENT if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.exponent = iprot.readString(); struct.setExponentIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // CERTSHA256 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.certsha256 = iprot.readBinary(); struct.setCertsha256IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, registerSatellite_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.certsha256 != null) { oprot.writeFieldBegin(CERTSHA256_FIELD_DESC); oprot.writeBinary(struct.certsha256); oprot.writeFieldEnd(); } if (struct.addresses != null) { oprot.writeFieldBegin(ADDRESSES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.addresses.size())); for (java.lang.String _iter445 : struct.addresses) { oprot.writeString(_iter445); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.modulus != null) { oprot.writeFieldBegin(MODULUS_FIELD_DESC); oprot.writeString(struct.modulus); oprot.writeFieldEnd(); } if (struct.exponent != null) { oprot.writeFieldBegin(EXPONENT_FIELD_DESC); oprot.writeString(struct.exponent); oprot.writeFieldEnd(); } if (struct.displayName != null) { oprot.writeFieldBegin(DISPLAY_NAME_FIELD_DESC); oprot.writeString(struct.displayName); oprot.writeFieldEnd(); } if (struct.userToken != null) { oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC); oprot.writeString(struct.userToken); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class registerSatellite_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public registerSatellite_argsTupleScheme getScheme() { return new registerSatellite_argsTupleScheme(); } } private static class registerSatellite_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, registerSatellite_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.isSetDisplayName()) { optionals.set(1); } if (struct.isSetAddresses()) { optionals.set(2); } if (struct.isSetModulus()) { optionals.set(3); } if (struct.isSetExponent()) { optionals.set(4); } if (struct.isSetCertsha256()) { optionals.set(5); } oprot.writeBitSet(optionals, 6); if (struct.isSetUserToken()) { oprot.writeString(struct.userToken); } if (struct.isSetDisplayName()) { oprot.writeString(struct.displayName); } if (struct.isSetAddresses()) { { oprot.writeI32(struct.addresses.size()); for (java.lang.String _iter446 : struct.addresses) { oprot.writeString(_iter446); } } } if (struct.isSetModulus()) { oprot.writeString(struct.modulus); } if (struct.isSetExponent()) { oprot.writeString(struct.exponent); } if (struct.isSetCertsha256()) { oprot.writeBinary(struct.certsha256); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, registerSatellite_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(6); if (incoming.get(0)) { struct.userToken = iprot.readString(); struct.setUserTokenIsSet(true); } if (incoming.get(1)) { struct.displayName = iprot.readString(); struct.setDisplayNameIsSet(true); } if (incoming.get(2)) { { org.apache.thrift.protocol.TList _list447 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); struct.addresses = new java.util.ArrayList(_list447.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem448; for (int _i449 = 0; _i449 < _list447.size; ++_i449) { _elem448 = iprot.readString(); struct.addresses.add(_elem448); } } struct.setAddressesIsSet(true); } if (incoming.get(3)) { struct.modulus = iprot.readString(); struct.setModulusIsSet(true); } if (incoming.get(4)) { struct.exponent = iprot.readString(); struct.setExponentIsSet(true); } if (incoming.get(5)) { struct.certsha256 = iprot.readBinary(); struct.setCertsha256IsSet(true); } } } 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 registerSatellite_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("registerSatellite_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); private static final org.apache.thrift.protocol.TField ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("error", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new registerSatellite_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new registerSatellite_resultTupleSchemeFactory(); public int success; // 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"), ERROR((short)1, "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: // 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 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.I32))); 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(registerSatellite_result.class, metaDataMap); } public registerSatellite_result() { } public registerSatellite_result( int success, TInvocationException error) { this(); this.success = success; setSuccessIsSet(true); this.error = error; } /** * Performs a deep copy on other. */ public registerSatellite_result(registerSatellite_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetError()) { this.error = new TInvocationException(other.error); } } @Override public registerSatellite_result deepCopy() { return new registerSatellite_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = 0; this.error = null; } public int getSuccess() { return this.success; } public registerSatellite_result setSuccess(int success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bitfield = 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); } @org.apache.thrift.annotation.Nullable public TInvocationException getError() { return this.error; } public registerSatellite_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.Integer)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 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 ERROR: return isSetError(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof registerSatellite_result) return this.equals((registerSatellite_result)that); return false; } public boolean equals(registerSatellite_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; } 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 + success; hashCode = hashCode * 8191 + ((isSetError()) ? 131071 : 524287); if (isSetError()) hashCode = hashCode * 8191 + error.hashCode(); return hashCode; } @Override public int compareTo(registerSatellite_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(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("registerSatellite_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("error:"); if (this.error == null) { sb.append("null"); } else { sb.append(this.error); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 registerSatellite_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public registerSatellite_resultStandardScheme getScheme() { return new registerSatellite_resultStandardScheme(); } } private static class registerSatellite_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, registerSatellite_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.success = iprot.readI32(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.error = new TInvocationException(); struct.error.read(iprot); struct.setErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, registerSatellite_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeI32(struct.success); oprot.writeFieldEnd(); } if (struct.error != null) { oprot.writeFieldBegin(ERROR_FIELD_DESC); struct.error.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class registerSatellite_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public registerSatellite_resultTupleScheme getScheme() { return new registerSatellite_resultTupleScheme(); } } private static class registerSatellite_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, registerSatellite_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.isSetError()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { oprot.writeI32(struct.success); } if (struct.isSetError()) { struct.error.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, registerSatellite_result struct) throws org.apache.thrift.TException { 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 = iprot.readI32(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { 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 updateSatellite_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("updateSatellite_args"); private static final org.apache.thrift.protocol.TField SERVER_SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("serverSessionId", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField DISPLAY_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("displayName", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField ADDRESSES_FIELD_DESC = new org.apache.thrift.protocol.TField("addresses", org.apache.thrift.protocol.TType.LIST, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new updateSatellite_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new updateSatellite_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String serverSessionId; // required public @org.apache.thrift.annotation.Nullable java.lang.String displayName; // required public @org.apache.thrift.annotation.Nullable java.util.List addresses; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SERVER_SESSION_ID((short)1, "serverSessionId"), DISPLAY_NAME((short)2, "displayName"), ADDRESSES((short)3, "addresses"); private static final 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: // SERVER_SESSION_ID return SERVER_SESSION_ID; case 2: // DISPLAY_NAME return DISPLAY_NAME; case 3: // ADDRESSES return ADDRESSES; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new 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.SERVER_SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("serverSessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); tmpMap.put(_Fields.DISPLAY_NAME, new org.apache.thrift.meta_data.FieldMetaData("displayName", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.ADDRESSES, new org.apache.thrift.meta_data.FieldMetaData("addresses", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateSatellite_args.class, metaDataMap); } public updateSatellite_args() { } public updateSatellite_args( java.lang.String serverSessionId, java.lang.String displayName, java.util.List addresses) { this(); this.serverSessionId = serverSessionId; this.displayName = displayName; this.addresses = addresses; } /** * Performs a deep copy on other. */ public updateSatellite_args(updateSatellite_args other) { if (other.isSetServerSessionId()) { this.serverSessionId = other.serverSessionId; } if (other.isSetDisplayName()) { this.displayName = other.displayName; } if (other.isSetAddresses()) { java.util.List __this__addresses = new java.util.ArrayList(other.addresses); this.addresses = __this__addresses; } } @Override public updateSatellite_args deepCopy() { return new updateSatellite_args(this); } @Override public void clear() { this.serverSessionId = null; this.displayName = null; this.addresses = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getServerSessionId() { return this.serverSessionId; } public updateSatellite_args setServerSessionId(@org.apache.thrift.annotation.Nullable java.lang.String serverSessionId) { this.serverSessionId = serverSessionId; return this; } public void unsetServerSessionId() { this.serverSessionId = null; } /** Returns true if field serverSessionId is set (has been assigned a value) and false otherwise */ public boolean isSetServerSessionId() { return this.serverSessionId != null; } public void setServerSessionIdIsSet(boolean value) { if (!value) { this.serverSessionId = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getDisplayName() { return this.displayName; } public updateSatellite_args setDisplayName(@org.apache.thrift.annotation.Nullable java.lang.String displayName) { this.displayName = displayName; return this; } public void unsetDisplayName() { this.displayName = null; } /** Returns true if field displayName is set (has been assigned a value) and false otherwise */ public boolean isSetDisplayName() { return this.displayName != null; } public void setDisplayNameIsSet(boolean value) { if (!value) { this.displayName = null; } } public int getAddressesSize() { return (this.addresses == null) ? 0 : this.addresses.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator getAddressesIterator() { return (this.addresses == null) ? null : this.addresses.iterator(); } public void addToAddresses(java.lang.String elem) { if (this.addresses == null) { this.addresses = new java.util.ArrayList(); } this.addresses.add(elem); } @org.apache.thrift.annotation.Nullable public java.util.List getAddresses() { return this.addresses; } public updateSatellite_args setAddresses(@org.apache.thrift.annotation.Nullable java.util.List addresses) { this.addresses = addresses; return this; } public void unsetAddresses() { this.addresses = null; } /** Returns true if field addresses is set (has been assigned a value) and false otherwise */ public boolean isSetAddresses() { return this.addresses != null; } public void setAddressesIsSet(boolean value) { if (!value) { this.addresses = null; } } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SERVER_SESSION_ID: if (value == null) { unsetServerSessionId(); } else { setServerSessionId((java.lang.String)value); } break; case DISPLAY_NAME: if (value == null) { unsetDisplayName(); } else { setDisplayName((java.lang.String)value); } break; case ADDRESSES: if (value == null) { unsetAddresses(); } else { setAddresses((java.util.List)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SERVER_SESSION_ID: return getServerSessionId(); case DISPLAY_NAME: return getDisplayName(); case ADDRESSES: return getAddresses(); } 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 SERVER_SESSION_ID: return isSetServerSessionId(); case DISPLAY_NAME: return isSetDisplayName(); case ADDRESSES: return isSetAddresses(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof updateSatellite_args) return this.equals((updateSatellite_args)that); return false; } public boolean equals(updateSatellite_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_serverSessionId = true && this.isSetServerSessionId(); boolean that_present_serverSessionId = true && that.isSetServerSessionId(); if (this_present_serverSessionId || that_present_serverSessionId) { if (!(this_present_serverSessionId && that_present_serverSessionId)) return false; if (!this.serverSessionId.equals(that.serverSessionId)) return false; } boolean this_present_displayName = true && this.isSetDisplayName(); boolean that_present_displayName = true && that.isSetDisplayName(); if (this_present_displayName || that_present_displayName) { if (!(this_present_displayName && that_present_displayName)) return false; if (!this.displayName.equals(that.displayName)) return false; } boolean this_present_addresses = true && this.isSetAddresses(); boolean that_present_addresses = true && that.isSetAddresses(); if (this_present_addresses || that_present_addresses) { if (!(this_present_addresses && that_present_addresses)) return false; if (!this.addresses.equals(that.addresses)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetServerSessionId()) ? 131071 : 524287); if (isSetServerSessionId()) hashCode = hashCode * 8191 + serverSessionId.hashCode(); hashCode = hashCode * 8191 + ((isSetDisplayName()) ? 131071 : 524287); if (isSetDisplayName()) hashCode = hashCode * 8191 + displayName.hashCode(); hashCode = hashCode * 8191 + ((isSetAddresses()) ? 131071 : 524287); if (isSetAddresses()) hashCode = hashCode * 8191 + addresses.hashCode(); return hashCode; } @Override public int compareTo(updateSatellite_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetServerSessionId(), other.isSetServerSessionId()); if (lastComparison != 0) { return lastComparison; } if (isSetServerSessionId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverSessionId, other.serverSessionId); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetDisplayName(), other.isSetDisplayName()); if (lastComparison != 0) { return lastComparison; } if (isSetDisplayName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.displayName, other.displayName); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetAddresses(), other.isSetAddresses()); if (lastComparison != 0) { return lastComparison; } if (isSetAddresses()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.addresses, other.addresses); if (lastComparison != 0) { return lastComparison; } } return 0; } @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("updateSatellite_args("); boolean first = true; sb.append("serverSessionId:"); if (this.serverSessionId == null) { sb.append("null"); } else { sb.append(this.serverSessionId); } first = false; if (!first) sb.append(", "); sb.append("displayName:"); if (this.displayName == null) { sb.append("null"); } else { sb.append(this.displayName); } first = false; if (!first) sb.append(", "); sb.append("addresses:"); if (this.addresses == null) { sb.append("null"); } else { sb.append(this.addresses); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 updateSatellite_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public updateSatellite_argsStandardScheme getScheme() { return new updateSatellite_argsStandardScheme(); } } private static class updateSatellite_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, updateSatellite_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // SERVER_SESSION_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.serverSessionId = iprot.readString(); struct.setServerSessionIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // DISPLAY_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.displayName = iprot.readString(); struct.setDisplayNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // ADDRESSES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list450 = iprot.readListBegin(); struct.addresses = new java.util.ArrayList(_list450.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem451; for (int _i452 = 0; _i452 < _list450.size; ++_i452) { _elem451 = iprot.readString(); struct.addresses.add(_elem451); } iprot.readListEnd(); } struct.setAddressesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, updateSatellite_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.serverSessionId != null) { oprot.writeFieldBegin(SERVER_SESSION_ID_FIELD_DESC); oprot.writeString(struct.serverSessionId); oprot.writeFieldEnd(); } if (struct.displayName != null) { oprot.writeFieldBegin(DISPLAY_NAME_FIELD_DESC); oprot.writeString(struct.displayName); oprot.writeFieldEnd(); } if (struct.addresses != null) { oprot.writeFieldBegin(ADDRESSES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.addresses.size())); for (java.lang.String _iter453 : struct.addresses) { oprot.writeString(_iter453); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class updateSatellite_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public updateSatellite_argsTupleScheme getScheme() { return new updateSatellite_argsTupleScheme(); } } private static class updateSatellite_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, updateSatellite_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.isSetServerSessionId()) { optionals.set(0); } if (struct.isSetDisplayName()) { optionals.set(1); } if (struct.isSetAddresses()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetServerSessionId()) { oprot.writeString(struct.serverSessionId); } if (struct.isSetDisplayName()) { oprot.writeString(struct.displayName); } if (struct.isSetAddresses()) { { oprot.writeI32(struct.addresses.size()); for (java.lang.String _iter454 : struct.addresses) { oprot.writeString(_iter454); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, updateSatellite_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.serverSessionId = iprot.readString(); struct.setServerSessionIdIsSet(true); } if (incoming.get(1)) { struct.displayName = iprot.readString(); struct.setDisplayNameIsSet(true); } if (incoming.get(2)) { { org.apache.thrift.protocol.TList _list455 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); struct.addresses = new java.util.ArrayList(_list455.size); @org.apache.thrift.annotation.Nullable java.lang.String _elem456; for (int _i457 = 0; _i457 < _list455.size; ++_i457) { _elem456 = iprot.readString(); struct.addresses.add(_elem456); } } struct.setAddressesIsSet(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 updateSatellite_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("updateSatellite_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("error", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new updateSatellite_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new updateSatellite_resultTupleSchemeFactory(); public boolean success; // required public @org.apache.thrift.annotation.Nullable TAuthorizationException failure; // 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"), FAILURE((short)1, "failure"), 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: // FAILURE return FAILURE; case 2: // ERROR return ERROR; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new 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.BOOL))); 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.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(updateSatellite_result.class, metaDataMap); } public updateSatellite_result() { } public updateSatellite_result( boolean success, TAuthorizationException failure, TInvocationException error) { this(); this.success = success; setSuccessIsSet(true); this.failure = failure; this.error = error; } /** * Performs a deep copy on other. */ public updateSatellite_result(updateSatellite_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetFailure()) { this.failure = new TAuthorizationException(other.failure); } if (other.isSetError()) { this.error = new TInvocationException(other.error); } } @Override public updateSatellite_result deepCopy() { return new updateSatellite_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; this.failure = null; this.error = null; } public boolean isSuccess() { return this.success; } public updateSatellite_result setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bitfield = 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); } @org.apache.thrift.annotation.Nullable public TAuthorizationException getFailure() { return this.failure; } public updateSatellite_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 getError() { return this.error; } public updateSatellite_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.Boolean)value); } break; case FAILURE: if (value == null) { unsetFailure(); } else { setFailure((TAuthorizationException)value); } break; case ERROR: if (value == null) { unsetError(); } else { setError((TInvocationException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return isSuccess(); case FAILURE: return getFailure(); 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 FAILURE: return isSetFailure(); case ERROR: return isSetError(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof updateSatellite_result) return this.equals((updateSatellite_result)that); return false; } public boolean equals(updateSatellite_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; } boolean this_present_failure = true && this.isSetFailure(); boolean that_present_failure = true && that.isSetFailure(); if (this_present_failure || that_present_failure) { if (!(this_present_failure && that_present_failure)) return false; if (!this.failure.equals(that.failure)) return false; } boolean this_present_error = true && this.isSetError(); boolean that_present_error = true && that.isSetError(); if (this_present_error || that_present_error) { if (!(this_present_error && that_present_error)) return false; if (!this.error.equals(that.error)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((success) ? 131071 : 524287); hashCode = hashCode * 8191 + ((isSetFailure()) ? 131071 : 524287); if (isSetFailure()) hashCode = hashCode * 8191 + failure.hashCode(); hashCode = hashCode * 8191 + ((isSetError()) ? 131071 : 524287); if (isSetError()) hashCode = hashCode * 8191 + error.hashCode(); return hashCode; } @Override public int compareTo(updateSatellite_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(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("updateSatellite_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("failure:"); if (this.failure == null) { sb.append("null"); } else { sb.append(this.failure); } first = false; if (!first) sb.append(", "); sb.append("error:"); if (this.error == null) { sb.append("null"); } else { sb.append(this.error); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 updateSatellite_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public updateSatellite_resultStandardScheme getScheme() { return new updateSatellite_resultStandardScheme(); } } private static class updateSatellite_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, updateSatellite_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // FAILURE if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.failure = new TAuthorizationException(); struct.failure.read(iprot); struct.setFailureIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.error = new TInvocationException(); struct.error.read(iprot); struct.setErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, updateSatellite_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); } if (struct.failure != null) { oprot.writeFieldBegin(FAILURE_FIELD_DESC); struct.failure.write(oprot); oprot.writeFieldEnd(); } if (struct.error != null) { oprot.writeFieldBegin(ERROR_FIELD_DESC); struct.error.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class updateSatellite_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public updateSatellite_resultTupleScheme getScheme() { return new updateSatellite_resultTupleScheme(); } } private static class updateSatellite_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, updateSatellite_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.isSetError()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { oprot.writeBool(struct.success); } if (struct.isSetFailure()) { struct.failure.write(oprot); } if (struct.isSetError()) { struct.error.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, updateSatellite_result struct) throws org.apache.thrift.TException { 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.readBool(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.failure = new TAuthorizationException(); struct.failure.read(iprot); struct.setFailureIsSet(true); } if (incoming.get(2)) { struct.error = new TInvocationException(); struct.error.read(iprot); struct.setErrorIsSet(true); } } } 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 downloadImage_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("downloadImage_args"); private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField IMAGE_VERSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageVersionId", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new downloadImage_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new downloadImage_argsTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.lang.String sessionId; // 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 { SESSION_ID((short)2, "sessionId"), IMAGE_VERSION_ID((short)1, "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 2: // SESSION_ID return SESSION_ID; case 1: // IMAGE_VERSION_ID return IMAGE_VERSION_ID; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); tmpMap.put(_Fields.IMAGE_VERSION_ID, new org.apache.thrift.meta_data.FieldMetaData("imageVersionId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(downloadImage_args.class, metaDataMap); } public downloadImage_args() { } public downloadImage_args( java.lang.String sessionId, java.lang.String imageVersionId) { this(); this.sessionId = sessionId; this.imageVersionId = imageVersionId; } /** * Performs a deep copy on other. */ public downloadImage_args(downloadImage_args other) { if (other.isSetSessionId()) { this.sessionId = other.sessionId; } if (other.isSetImageVersionId()) { this.imageVersionId = other.imageVersionId; } } @Override public downloadImage_args deepCopy() { return new downloadImage_args(this); } @Override public void clear() { this.sessionId = null; this.imageVersionId = null; } @org.apache.thrift.annotation.Nullable public java.lang.String getSessionId() { return this.sessionId; } public downloadImage_args setSessionId(@org.apache.thrift.annotation.Nullable java.lang.String sessionId) { this.sessionId = sessionId; return this; } public void unsetSessionId() { this.sessionId = null; } /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */ public boolean isSetSessionId() { return this.sessionId != null; } public void setSessionIdIsSet(boolean value) { if (!value) { this.sessionId = null; } } @org.apache.thrift.annotation.Nullable public java.lang.String getImageVersionId() { return this.imageVersionId; } public downloadImage_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 SESSION_ID: if (value == null) { unsetSessionId(); } else { setSessionId((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 SESSION_ID: return getSessionId(); 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 SESSION_ID: return isSetSessionId(); case IMAGE_VERSION_ID: return isSetImageVersionId(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof downloadImage_args) return this.equals((downloadImage_args)that); return false; } public boolean equals(downloadImage_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_sessionId = true && this.isSetSessionId(); boolean that_present_sessionId = true && that.isSetSessionId(); if (this_present_sessionId || that_present_sessionId) { if (!(this_present_sessionId && that_present_sessionId)) return false; if (!this.sessionId.equals(that.sessionId)) return false; } boolean this_present_imageVersionId = true && this.isSetImageVersionId(); boolean that_present_imageVersionId = true && that.isSetImageVersionId(); if (this_present_imageVersionId || that_present_imageVersionId) { if (!(this_present_imageVersionId && that_present_imageVersionId)) return false; if (!this.imageVersionId.equals(that.imageVersionId)) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetSessionId()) ? 131071 : 524287); if (isSetSessionId()) hashCode = hashCode * 8191 + sessionId.hashCode(); hashCode = hashCode * 8191 + ((isSetImageVersionId()) ? 131071 : 524287); if (isSetImageVersionId()) hashCode = hashCode * 8191 + imageVersionId.hashCode(); return hashCode; } @Override public int compareTo(downloadImage_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId()); if (lastComparison != 0) { return lastComparison; } if (isSetSessionId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); if (lastComparison != 0) { return lastComparison; } } lastComparison = 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("downloadImage_args("); boolean first = true; sb.append("sessionId:"); if (this.sessionId == null) { sb.append("null"); } else { sb.append(this.sessionId); } first = false; if (!first) sb.append(", "); sb.append("imageVersionId:"); if (this.imageVersionId == null) { sb.append("null"); } else { sb.append(this.imageVersionId); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 downloadImage_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public downloadImage_argsStandardScheme getScheme() { return new downloadImage_argsStandardScheme(); } } private static class downloadImage_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, downloadImage_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 2: // SESSION_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.sessionId = iprot.readString(); struct.setSessionIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // IMAGE_VERSION_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.imageVersionId = iprot.readString(); struct.setImageVersionIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, downloadImage_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.imageVersionId != null) { oprot.writeFieldBegin(IMAGE_VERSION_ID_FIELD_DESC); oprot.writeString(struct.imageVersionId); oprot.writeFieldEnd(); } if (struct.sessionId != null) { oprot.writeFieldBegin(SESSION_ID_FIELD_DESC); oprot.writeString(struct.sessionId); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class downloadImage_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public downloadImage_argsTupleScheme getScheme() { return new downloadImage_argsTupleScheme(); } } private static class downloadImage_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, downloadImage_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.isSetSessionId()) { optionals.set(0); } if (struct.isSetImageVersionId()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSessionId()) { oprot.writeString(struct.sessionId); } if (struct.isSetImageVersionId()) { oprot.writeString(struct.imageVersionId); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, downloadImage_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.sessionId = iprot.readString(); struct.setSessionIdIsSet(true); } if (incoming.get(1)) { struct.imageVersionId = iprot.readString(); struct.setImageVersionIdIsSet(true); } } } 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 downloadImage_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("downloadImage_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField FAILURE2_FIELD_DESC = new org.apache.thrift.protocol.TField("failure2", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField F3_FIELD_DESC = new org.apache.thrift.protocol.TField("f3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new downloadImage_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new downloadImage_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable TransferInformation success; // required public @org.apache.thrift.annotation.Nullable TAuthorizationException failure; // required public @org.apache.thrift.annotation.Nullable TInvocationException failure2; // required public @org.apache.thrift.annotation.Nullable TNotFoundException f3; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), FAILURE((short)1, "failure"), FAILURE2((short)2, "failure2"), F3((short)3, "f3"); private static final 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: // FAILURE2 return FAILURE2; case 3: // F3 return F3; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new 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.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.FAILURE2, new org.apache.thrift.meta_data.FieldMetaData("failure2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class))); tmpMap.put(_Fields.F3, new org.apache.thrift.meta_data.FieldMetaData("f3", 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(downloadImage_result.class, metaDataMap); } public downloadImage_result() { } public downloadImage_result( TransferInformation success, TAuthorizationException failure, TInvocationException failure2, TNotFoundException f3) { this(); this.success = success; this.failure = failure; this.failure2 = failure2; this.f3 = f3; } /** * Performs a deep copy on other. */ public downloadImage_result(downloadImage_result other) { if (other.isSetSuccess()) { this.success = new TransferInformation(other.success); } if (other.isSetFailure()) { this.failure = new TAuthorizationException(other.failure); } if (other.isSetFailure2()) { this.failure2 = new TInvocationException(other.failure2); } if (other.isSetF3()) { this.f3 = new TNotFoundException(other.f3); } } @Override public downloadImage_result deepCopy() { return new downloadImage_result(this); } @Override public void clear() { this.success = null; this.failure = null; this.failure2 = null; this.f3 = null; } @org.apache.thrift.annotation.Nullable public TransferInformation getSuccess() { return this.success; } public downloadImage_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 TAuthorizationException getFailure() { return this.failure; } public downloadImage_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 getFailure2() { return this.failure2; } public downloadImage_result setFailure2(@org.apache.thrift.annotation.Nullable TInvocationException failure2) { this.failure2 = failure2; return this; } public void unsetFailure2() { this.failure2 = null; } /** Returns true if field failure2 is set (has been assigned a value) and false otherwise */ public boolean isSetFailure2() { return this.failure2 != null; } public void setFailure2IsSet(boolean value) { if (!value) { this.failure2 = null; } } @org.apache.thrift.annotation.Nullable public TNotFoundException getF3() { return this.f3; } public downloadImage_result setF3(@org.apache.thrift.annotation.Nullable TNotFoundException f3) { this.f3 = f3; return this; } public void unsetF3() { this.f3 = null; } /** Returns true if field f3 is set (has been assigned a value) and false otherwise */ public boolean isSetF3() { return this.f3 != null; } public void setF3IsSet(boolean value) { if (!value) { this.f3 = null; } } @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 FAILURE: if (value == null) { unsetFailure(); } else { setFailure((TAuthorizationException)value); } break; case FAILURE2: if (value == null) { unsetFailure2(); } else { setFailure2((TInvocationException)value); } break; case F3: if (value == null) { unsetF3(); } else { setF3((TNotFoundException)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case FAILURE: return getFailure(); case FAILURE2: return getFailure2(); case F3: return getF3(); } 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 FAILURE2: return isSetFailure2(); case F3: return isSetF3(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof downloadImage_result) return this.equals((downloadImage_result)that); return false; } public boolean equals(downloadImage_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_failure2 = true && this.isSetFailure2(); boolean that_present_failure2 = true && that.isSetFailure2(); if (this_present_failure2 || that_present_failure2) { if (!(this_present_failure2 && that_present_failure2)) return false; if (!this.failure2.equals(that.failure2)) return false; } boolean this_present_f3 = true && this.isSetF3(); boolean that_present_f3 = true && that.isSetF3(); if (this_present_f3 || that_present_f3) { if (!(this_present_f3 && that_present_f3)) return false; if (!this.f3.equals(that.f3)) return false; } return true; } @Override public int hashCode() { 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 + ((isSetFailure2()) ? 131071 : 524287); if (isSetFailure2()) hashCode = hashCode * 8191 + failure2.hashCode(); hashCode = hashCode * 8191 + ((isSetF3()) ? 131071 : 524287); if (isSetF3()) hashCode = hashCode * 8191 + f3.hashCode(); return hashCode; } @Override public int compareTo(downloadImage_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(isSetFailure2(), other.isSetFailure2()); if (lastComparison != 0) { return lastComparison; } if (isSetFailure2()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure2, other.failure2); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.compare(isSetF3(), other.isSetF3()); if (lastComparison != 0) { return lastComparison; } if (isSetF3()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.f3, other.f3); if (lastComparison != 0) { return lastComparison; } } return 0; } @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("downloadImage_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("failure:"); if (this.failure == null) { sb.append("null"); } else { sb.append(this.failure); } first = false; if (!first) sb.append(", "); sb.append("failure2:"); if (this.failure2 == null) { sb.append("null"); } else { sb.append(this.failure2); } first = false; if (!first) sb.append(", "); sb.append("f3:"); if (this.f3 == null) { sb.append("null"); } else { sb.append(this.f3); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 downloadImage_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public downloadImage_resultStandardScheme getScheme() { return new downloadImage_resultStandardScheme(); } } private static class downloadImage_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, downloadImage_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new TransferInformation(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // FAILURE if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.failure = new TAuthorizationException(); struct.failure.read(iprot); struct.setFailureIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // FAILURE2 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.failure2 = new TInvocationException(); struct.failure2.read(iprot); struct.setFailure2IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // F3 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.f3 = new TNotFoundException(); struct.f3.read(iprot); struct.setF3IsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, downloadImage_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.failure != null) { oprot.writeFieldBegin(FAILURE_FIELD_DESC); struct.failure.write(oprot); oprot.writeFieldEnd(); } if (struct.failure2 != null) { oprot.writeFieldBegin(FAILURE2_FIELD_DESC); struct.failure2.write(oprot); oprot.writeFieldEnd(); } if (struct.f3 != null) { oprot.writeFieldBegin(F3_FIELD_DESC); struct.f3.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class downloadImage_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public downloadImage_resultTupleScheme getScheme() { return new downloadImage_resultTupleScheme(); } } private static class downloadImage_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, downloadImage_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.isSetFailure2()) { optionals.set(2); } if (struct.isSetF3()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetFailure()) { struct.failure.write(oprot); } if (struct.isSetFailure2()) { struct.failure2.write(oprot); } if (struct.isSetF3()) { struct.f3.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, downloadImage_result struct) throws org.apache.thrift.TException { 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 TransferInformation(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.failure = new TAuthorizationException(); struct.failure.read(iprot); struct.setFailureIsSet(true); } if (incoming.get(2)) { struct.failure2 = new TInvocationException(); struct.failure2.read(iprot); struct.setFailure2IsSet(true); } if (incoming.get(3)) { struct.f3 = new TNotFoundException(); struct.f3.read(iprot); struct.setF3IsSet(true); } } } 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 getOrganizations_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("getOrganizations_args"); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getOrganizations_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getOrganizations_argsTupleSchemeFactory(); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final 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(getOrganizations_args.class, metaDataMap); } public getOrganizations_args() { } /** * Performs a deep copy on other. */ public getOrganizations_args(getOrganizations_args other) { } @Override public getOrganizations_args deepCopy() { return new getOrganizations_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 getOrganizations_args) return this.equals((getOrganizations_args)that); return false; } public boolean equals(getOrganizations_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(getOrganizations_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("getOrganizations_args("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 getOrganizations_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getOrganizations_argsStandardScheme getScheme() { return new getOrganizations_argsStandardScheme(); } } private static class getOrganizations_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, getOrganizations_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, getOrganizations_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getOrganizations_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getOrganizations_argsTupleScheme getScheme() { return new getOrganizations_argsTupleScheme(); } } private static class getOrganizations_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getOrganizations_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, getOrganizations_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 getOrganizations_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("getOrganizations_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getOrganizations_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getOrganizations_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.List success; // 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"), SERVER_ERROR((short)1, "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: // 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, Organization.class)))); tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getOrganizations_result.class, metaDataMap); } public getOrganizations_result() { } public getOrganizations_result( java.util.List success, TInvocationException serverError) { this(); this.success = success; this.serverError = serverError; } /** * Performs a deep copy on other. */ public getOrganizations_result(getOrganizations_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; } if (other.isSetServerError()) { this.serverError = new TInvocationException(other.serverError); } } @Override public getOrganizations_result deepCopy() { return new getOrganizations_result(this); } @Override public void clear() { this.success = null; this.serverError = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @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 getOrganizations_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 TInvocationException getServerError() { return this.serverError; } public getOrganizations_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 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 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 SERVER_ERROR: return isSetServerError(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getOrganizations_result) return this.equals((getOrganizations_result)that); return false; } public boolean equals(getOrganizations_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_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 + ((isSetServerError()) ? 131071 : 524287); if (isSetServerError()) hashCode = hashCode * 8191 + serverError.hashCode(); return hashCode; } @Override public int compareTo(getOrganizations_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(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("getOrganizations_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("serverError:"); if (this.serverError == null) { sb.append("null"); } else { sb.append(this.serverError); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 getOrganizations_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getOrganizations_resultStandardScheme getScheme() { return new getOrganizations_resultStandardScheme(); } } private static class getOrganizations_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, getOrganizations_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list458 = iprot.readListBegin(); struct.success = new java.util.ArrayList(_list458.size); @org.apache.thrift.annotation.Nullable Organization _elem459; for (int _i460 = 0; _i460 < _list458.size; ++_i460) { _elem459 = new Organization(); _elem459.read(iprot); struct.success.add(_elem459); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // SERVER_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, getOrganizations_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (Organization _iter461 : struct.success) { _iter461.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.serverError != null) { oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC); struct.serverError.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getOrganizations_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getOrganizations_resultTupleScheme getScheme() { return new getOrganizations_resultTupleScheme(); } } private static class getOrganizations_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getOrganizations_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.isSetServerError()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (Organization _iter462 : struct.success) { _iter462.write(oprot); } } } if (struct.isSetServerError()) { struct.serverError.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getOrganizations_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list463 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.success = new java.util.ArrayList(_list463.size); @org.apache.thrift.annotation.Nullable Organization _elem464; for (int _i465 = 0; _i465 < _list463.size; ++_i465) { _elem464 = new Organization(); _elem464.read(iprot); struct.success.add(_elem464); } } struct.setSuccessIsSet(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.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)1); 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 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"), SERVER_ERROR((short)1, "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: // 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, OperatingSystem.class)))); tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.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, TInvocationException serverError) { this(); this.success = success; this.serverError = serverError; } /** * 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; } if (other.isSetServerError()) { this.serverError = new TInvocationException(other.serverError); } } @Override public getOperatingSystems_result deepCopy() { return new getOperatingSystems_result(this); } @Override public void clear() { this.success = null; this.serverError = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @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; } } @org.apache.thrift.annotation.Nullable public TInvocationException getServerError() { return this.serverError; } public getOperatingSystems_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 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 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 SERVER_ERROR: return isSetServerError(); } 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; } 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 + ((isSetServerError()) ? 131071 : 524287); if (isSetServerError()) hashCode = hashCode * 8191 + serverError.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; } } 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("getOperatingSystems_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("serverError:"); if (this.serverError == null) { sb.append("null"); } else { sb.append(this.serverError); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 _list466 = iprot.readListBegin(); struct.success = new java.util.ArrayList(_list466.size); @org.apache.thrift.annotation.Nullable OperatingSystem _elem467; for (int _i468 = 0; _i468 < _list466.size; ++_i468) { _elem467 = new OperatingSystem(); _elem467.read(iprot); struct.success.add(_elem467); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // SERVER_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @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 _iter469 : struct.success) { _iter469.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.serverError != null) { oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC); struct.serverError.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getOperatingSystems_resultTupleSchemeFactory implements 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); } if (struct.isSetServerError()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (OperatingSystem _iter470 : struct.success) { _iter470.write(oprot); } } } if (struct.isSetServerError()) { struct.serverError.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getOperatingSystems_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list471 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.success = new java.util.ArrayList(_list471.size); @org.apache.thrift.annotation.Nullable OperatingSystem _elem472; for (int _i473 = 0; _i473 < _list471.size; ++_i473) { _elem472 = new OperatingSystem(); _elem472.read(iprot); struct.success.add(_elem472); } } struct.setSuccessIsSet(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 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.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)1); 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 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"), SERVER_ERROR((short)1, "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: // 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, Virtualizer.class)))); tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.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, TInvocationException serverError) { this(); this.success = success; this.serverError = serverError; } /** * 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; } if (other.isSetServerError()) { this.serverError = new TInvocationException(other.serverError); } } @Override public getVirtualizers_result deepCopy() { return new getVirtualizers_result(this); } @Override public void clear() { this.success = null; this.serverError = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @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; } } @org.apache.thrift.annotation.Nullable public TInvocationException getServerError() { return this.serverError; } public getVirtualizers_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 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 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 SERVER_ERROR: return isSetServerError(); } 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; } 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 + ((isSetServerError()) ? 131071 : 524287); if (isSetServerError()) hashCode = hashCode * 8191 + serverError.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; } } 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("getVirtualizers_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("serverError:"); if (this.serverError == null) { sb.append("null"); } else { sb.append(this.serverError); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 _list474 = iprot.readListBegin(); struct.success = new java.util.ArrayList(_list474.size); @org.apache.thrift.annotation.Nullable Virtualizer _elem475; for (int _i476 = 0; _i476 < _list474.size; ++_i476) { _elem475 = new Virtualizer(); _elem475.read(iprot); struct.success.add(_elem475); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // SERVER_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @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 _iter477 : struct.success) { _iter477.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.serverError != null) { oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC); struct.serverError.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getVirtualizers_resultTupleSchemeFactory implements 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); } if (struct.isSetServerError()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (Virtualizer _iter478 : struct.success) { _iter478.write(oprot); } } } if (struct.isSetServerError()) { struct.serverError.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getVirtualizers_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list479 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.success = new java.util.ArrayList(_list479.size); @org.apache.thrift.annotation.Nullable Virtualizer _elem480; for (int _i481 = 0; _i481 < _list479.size; ++_i481) { _elem480 = new Virtualizer(); _elem480.read(iprot); struct.success.add(_elem480); } } struct.setSuccessIsSet(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 getTags_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("getTags_args"); private static final org.apache.thrift.protocol.TField START_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("startDate", org.apache.thrift.protocol.TType.I64, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getTags_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getTags_argsTupleSchemeFactory(); public long startDate; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { START_DATE((short)1, "startDate"); private static final 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: // START_DATE return START_DATE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new 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 __STARTDATE_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.START_DATE, new org.apache.thrift.meta_data.FieldMetaData("startDate", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp"))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTags_args.class, metaDataMap); } public getTags_args() { } public getTags_args( long startDate) { this(); this.startDate = startDate; setStartDateIsSet(true); } /** * Performs a deep copy on other. */ public getTags_args(getTags_args other) { __isset_bitfield = other.__isset_bitfield; this.startDate = other.startDate; } @Override public getTags_args deepCopy() { return new getTags_args(this); } @Override public void clear() { setStartDateIsSet(false); this.startDate = 0; } public long getStartDate() { return this.startDate; } public getTags_args setStartDate(long startDate) { this.startDate = startDate; setStartDateIsSet(true); return this; } public void unsetStartDate() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STARTDATE_ISSET_ID); } /** Returns true if field startDate is set (has been assigned a value) and false otherwise */ public boolean isSetStartDate() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STARTDATE_ISSET_ID); } public void setStartDateIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STARTDATE_ISSET_ID, value); } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case START_DATE: if (value == null) { unsetStartDate(); } else { setStartDate((java.lang.Long)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case START_DATE: return getStartDate(); } 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 START_DATE: return isSetStartDate(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getTags_args) return this.equals((getTags_args)that); return false; } public boolean equals(getTags_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_startDate = true; boolean that_present_startDate = true; if (this_present_startDate || that_present_startDate) { if (!(this_present_startDate && that_present_startDate)) return false; if (this.startDate != that.startDate) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(startDate); return hashCode; } @Override public int compareTo(getTags_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetStartDate(), other.isSetStartDate()); if (lastComparison != 0) { return lastComparison; } if (isSetStartDate()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startDate, other.startDate); if (lastComparison != 0) { return lastComparison; } } return 0; } @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("getTags_args("); boolean first = true; sb.append("startDate:"); sb.append(this.startDate); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 getTags_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getTags_argsStandardScheme getScheme() { return new getTags_argsStandardScheme(); } } private static class getTags_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, getTags_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // START_DATE if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.startDate = iprot.readI64(); struct.setStartDateIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, getTags_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(START_DATE_FIELD_DESC); oprot.writeI64(struct.startDate); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getTags_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getTags_argsTupleScheme getScheme() { return new getTags_argsTupleScheme(); } } private static class getTags_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getTags_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.isSetStartDate()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetStartDate()) { oprot.writeI64(struct.startDate); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getTags_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.startDate = iprot.readI64(); struct.setStartDateIsSet(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 getTags_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("getTags_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getTags_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getTags_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.List success; // 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"), SERVER_ERROR((short)1, "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: // 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, MasterTag.class)))); tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTags_result.class, metaDataMap); } public getTags_result() { } public getTags_result( java.util.List success, TInvocationException serverError) { this(); this.success = success; this.serverError = serverError; } /** * Performs a deep copy on other. */ public getTags_result(getTags_result other) { if (other.isSetSuccess()) { java.util.List __this__success = new java.util.ArrayList(other.success.size()); for (MasterTag other_element : other.success) { __this__success.add(new MasterTag(other_element)); } this.success = __this__success; } if (other.isSetServerError()) { this.serverError = new TInvocationException(other.serverError); } } @Override public getTags_result deepCopy() { return new getTags_result(this); } @Override public void clear() { this.success = null; this.serverError = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(MasterTag 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 getTags_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 TInvocationException getServerError() { return this.serverError; } public getTags_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 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 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 SERVER_ERROR: return isSetServerError(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getTags_result) return this.equals((getTags_result)that); return false; } public boolean equals(getTags_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_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 + ((isSetServerError()) ? 131071 : 524287); if (isSetServerError()) hashCode = hashCode * 8191 + serverError.hashCode(); return hashCode; } @Override public int compareTo(getTags_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(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("getTags_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("serverError:"); if (this.serverError == null) { sb.append("null"); } else { sb.append(this.serverError); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 getTags_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getTags_resultStandardScheme getScheme() { return new getTags_resultStandardScheme(); } } private static class getTags_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, getTags_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list482 = iprot.readListBegin(); struct.success = new java.util.ArrayList(_list482.size); @org.apache.thrift.annotation.Nullable MasterTag _elem483; for (int _i484 = 0; _i484 < _list482.size; ++_i484) { _elem483 = new MasterTag(); _elem483.read(iprot); struct.success.add(_elem483); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // SERVER_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, getTags_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (MasterTag _iter485 : struct.success) { _iter485.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.serverError != null) { oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC); struct.serverError.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getTags_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getTags_resultTupleScheme getScheme() { return new getTags_resultTupleScheme(); } } private static class getTags_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getTags_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.isSetServerError()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (MasterTag _iter486 : struct.success) { _iter486.write(oprot); } } } if (struct.isSetServerError()) { struct.serverError.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getTags_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list487 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.success = new java.util.ArrayList(_list487.size); @org.apache.thrift.annotation.Nullable MasterTag _elem488; for (int _i489 = 0; _i489 < _list487.size; ++_i489) { _elem488 = new MasterTag(); _elem488.read(iprot); struct.success.add(_elem488); } } struct.setSuccessIsSet(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 getSoftware_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("getSoftware_args"); private static final org.apache.thrift.protocol.TField START_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("startDate", org.apache.thrift.protocol.TType.I64, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getSoftware_argsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getSoftware_argsTupleSchemeFactory(); public long startDate; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { START_DATE((short)1, "startDate"); private static final 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: // START_DATE return START_DATE; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new 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 __STARTDATE_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.START_DATE, new org.apache.thrift.meta_data.FieldMetaData("startDate", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp"))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSoftware_args.class, metaDataMap); } public getSoftware_args() { } public getSoftware_args( long startDate) { this(); this.startDate = startDate; setStartDateIsSet(true); } /** * Performs a deep copy on other. */ public getSoftware_args(getSoftware_args other) { __isset_bitfield = other.__isset_bitfield; this.startDate = other.startDate; } @Override public getSoftware_args deepCopy() { return new getSoftware_args(this); } @Override public void clear() { setStartDateIsSet(false); this.startDate = 0; } public long getStartDate() { return this.startDate; } public getSoftware_args setStartDate(long startDate) { this.startDate = startDate; setStartDateIsSet(true); return this; } public void unsetStartDate() { __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STARTDATE_ISSET_ID); } /** Returns true if field startDate is set (has been assigned a value) and false otherwise */ public boolean isSetStartDate() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STARTDATE_ISSET_ID); } public void setStartDateIsSet(boolean value) { __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STARTDATE_ISSET_ID, value); } @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case START_DATE: if (value == null) { unsetStartDate(); } else { setStartDate((java.lang.Long)value); } break; } } @org.apache.thrift.annotation.Nullable @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case START_DATE: return getStartDate(); } 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 START_DATE: return isSetStartDate(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getSoftware_args) return this.equals((getSoftware_args)that); return false; } public boolean equals(getSoftware_args that) { if (that == null) return false; if (this == that) return true; boolean this_present_startDate = true; boolean that_present_startDate = true; if (this_present_startDate || that_present_startDate) { if (!(this_present_startDate && that_present_startDate)) return false; if (this.startDate != that.startDate) return false; } return true; } @Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(startDate); return hashCode; } @Override public int compareTo(getSoftware_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.compare(isSetStartDate(), other.isSetStartDate()); if (lastComparison != 0) { return lastComparison; } if (isSetStartDate()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startDate, other.startDate); if (lastComparison != 0) { return lastComparison; } } return 0; } @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("getSoftware_args("); boolean first = true; sb.append("startDate:"); sb.append(this.startDate); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 getSoftware_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getSoftware_argsStandardScheme getScheme() { return new getSoftware_argsStandardScheme(); } } private static class getSoftware_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, getSoftware_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // START_DATE if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.startDate = iprot.readI64(); struct.setStartDateIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, getSoftware_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(START_DATE_FIELD_DESC); oprot.writeI64(struct.startDate); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getSoftware_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getSoftware_argsTupleScheme getScheme() { return new getSoftware_argsTupleScheme(); } } private static class getSoftware_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getSoftware_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.isSetStartDate()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetStartDate()) { oprot.writeI64(struct.startDate); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getSoftware_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.startDate = iprot.readI64(); struct.setStartDateIsSet(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 getSoftware_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("getSoftware_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getSoftware_resultStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getSoftware_resultTupleSchemeFactory(); public @org.apache.thrift.annotation.Nullable java.util.List success; // 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"), SERVER_ERROR((short)1, "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: // 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, MasterSoftware.class)))); tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSoftware_result.class, metaDataMap); } public getSoftware_result() { } public getSoftware_result( java.util.List success, TInvocationException serverError) { this(); this.success = success; this.serverError = serverError; } /** * Performs a deep copy on other. */ public getSoftware_result(getSoftware_result other) { if (other.isSetSuccess()) { java.util.List __this__success = new java.util.ArrayList(other.success.size()); for (MasterSoftware other_element : other.success) { __this__success.add(new MasterSoftware(other_element)); } this.success = __this__success; } if (other.isSetServerError()) { this.serverError = new TInvocationException(other.serverError); } } @Override public getSoftware_result deepCopy() { return new getSoftware_result(this); } @Override public void clear() { this.success = null; this.serverError = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @org.apache.thrift.annotation.Nullable public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(MasterSoftware 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 getSoftware_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 TInvocationException getServerError() { return this.serverError; } public getSoftware_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 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 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 SERVER_ERROR: return isSetServerError(); } throw new java.lang.IllegalStateException(); } @Override public boolean equals(java.lang.Object that) { if (that instanceof getSoftware_result) return this.equals((getSoftware_result)that); return false; } public boolean equals(getSoftware_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_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 + ((isSetServerError()) ? 131071 : 524287); if (isSetServerError()) hashCode = hashCode * 8191 + serverError.hashCode(); return hashCode; } @Override public int compareTo(getSoftware_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(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("getSoftware_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("serverError:"); if (this.serverError == null) { sb.append("null"); } else { sb.append(this.serverError); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 getSoftware_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getSoftware_resultStandardScheme getScheme() { return new getSoftware_resultStandardScheme(); } } private static class getSoftware_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { @Override public void read(org.apache.thrift.protocol.TProtocol iprot, getSoftware_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list490 = iprot.readListBegin(); struct.success = new java.util.ArrayList(_list490.size); @org.apache.thrift.annotation.Nullable MasterSoftware _elem491; for (int _i492 = 0; _i492 < _list490.size; ++_i492) { _elem491 = new MasterSoftware(); _elem491.read(iprot); struct.success.add(_elem491); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // SERVER_ERROR if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.serverError = new TInvocationException(); struct.serverError.read(iprot); struct.setServerErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @Override public void write(org.apache.thrift.protocol.TProtocol oprot, getSoftware_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (MasterSoftware _iter493 : struct.success) { _iter493.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.serverError != null) { oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC); struct.serverError.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getSoftware_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { @Override public getSoftware_resultTupleScheme getScheme() { return new getSoftware_resultTupleScheme(); } } private static class getSoftware_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getSoftware_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.isSetServerError()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (MasterSoftware _iter494 : struct.success) { _iter494.write(oprot); } } } if (struct.isSetServerError()) { struct.serverError.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getSoftware_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list495 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); struct.success = new java.util.ArrayList(_list495.size); @org.apache.thrift.annotation.Nullable MasterSoftware _elem496; for (int _i497 = 0; _i497 < _list495.size; ++_i497) { _elem496 = new MasterSoftware(); _elem496.read(iprot); struct.success.add(_elem496); } } struct.setSuccessIsSet(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 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(); } } }