From fb0d0f01d64e8378aae7a08f884df2025245aa4e Mon Sep 17 00:00:00 2001 From: Nils Schwabe Date: Mon, 30 Jun 2014 16:56:25 +0200 Subject: Change methods for new functionallity of Up-/Downloader class --- .../thrift/iface/AuthenticationError.java | 2 +- .../thrift/iface/AuthenticationException.java | 23 +- .../thrift/iface/AuthorizationError.java | 2 +- .../thrift/iface/AuthorizationException.java | 23 +- .../imagemaster/thrift/iface/FtpCredentials.java | 24 +- .../imagemaster/thrift/iface/ImageData.java | 69 +- .../imagemaster/thrift/iface/ImageDataError.java | 2 +- .../thrift/iface/ImageDataException.java | 23 +- .../imagemaster/thrift/iface/ImageServer.java | 2888 +++++--------------- .../thrift/iface/InvalidTokenException.java | 9 +- .../thrift/iface/ServerAuthenticationError.java | 2 +- .../iface/ServerAuthenticationException.java | 23 +- .../thrift/iface/ServerSessionData.java | 14 +- .../imagemaster/thrift/iface/SessionData.java | 24 +- .../openslx/imagemaster/thrift/iface/UserInfo.java | 29 +- 15 files changed, 863 insertions(+), 2294 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/AuthenticationError.java b/src/main/java/org/openslx/imagemaster/thrift/iface/AuthenticationError.java index 2fd9fcf..e2b2b89 100644 --- a/src/main/java/org/openslx/imagemaster/thrift/iface/AuthenticationError.java +++ b/src/main/java/org/openslx/imagemaster/thrift/iface/AuthenticationError.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.1) + * Autogenerated by Thrift Compiler (1.0.0-dev) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/AuthenticationException.java b/src/main/java/org/openslx/imagemaster/thrift/iface/AuthenticationException.java index 5efc66c..9dab4d2 100644 --- a/src/main/java/org/openslx/imagemaster/thrift/iface/AuthenticationException.java +++ b/src/main/java/org/openslx/imagemaster/thrift/iface/AuthenticationException.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.1) + * Autogenerated by Thrift Compiler (1.0.0-dev) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -29,9 +29,12 @@ import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (1.0.0-dev)", date = "2014-6-30") public class AuthenticationException extends TException 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("AuthenticationException"); @@ -302,7 +305,19 @@ public class AuthenticationException extends TException implements org.apache.th @Override public int hashCode() { - return 0; + List list = new ArrayList(); + + boolean present_number = true && (isSetNumber()); + list.add(present_number); + if (present_number) + list.add(number.getValue()); + + boolean present_message = true && (isSetMessage()); + list.add(present_message); + if (present_message) + list.add(message); + + return list.hashCode(); } @Override @@ -413,7 +428,7 @@ public class AuthenticationException extends TException implements org.apache.th switch (schemeField.id) { case 1: // NUMBER if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.number = AuthenticationError.findByValue(iprot.readI32()); + struct.number = org.openslx.imagemaster.thrift.iface.AuthenticationError.findByValue(iprot.readI32()); struct.setNumberIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); @@ -490,7 +505,7 @@ public class AuthenticationException extends TException implements org.apache.th TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.number = AuthenticationError.findByValue(iprot.readI32()); + struct.number = org.openslx.imagemaster.thrift.iface.AuthenticationError.findByValue(iprot.readI32()); struct.setNumberIsSet(true); } if (incoming.get(1)) { diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/AuthorizationError.java b/src/main/java/org/openslx/imagemaster/thrift/iface/AuthorizationError.java index a49ad92..7c23166 100644 --- a/src/main/java/org/openslx/imagemaster/thrift/iface/AuthorizationError.java +++ b/src/main/java/org/openslx/imagemaster/thrift/iface/AuthorizationError.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.1) + * Autogenerated by Thrift Compiler (1.0.0-dev) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/AuthorizationException.java b/src/main/java/org/openslx/imagemaster/thrift/iface/AuthorizationException.java index 5f798ac..5a8a640 100644 --- a/src/main/java/org/openslx/imagemaster/thrift/iface/AuthorizationException.java +++ b/src/main/java/org/openslx/imagemaster/thrift/iface/AuthorizationException.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.1) + * Autogenerated by Thrift Compiler (1.0.0-dev) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -29,9 +29,12 @@ import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (1.0.0-dev)", date = "2014-6-30") public class AuthorizationException extends TException 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("AuthorizationException"); @@ -302,7 +305,19 @@ public class AuthorizationException extends TException implements org.apache.thr @Override public int hashCode() { - return 0; + List list = new ArrayList(); + + boolean present_number = true && (isSetNumber()); + list.add(present_number); + if (present_number) + list.add(number.getValue()); + + boolean present_message = true && (isSetMessage()); + list.add(present_message); + if (present_message) + list.add(message); + + return list.hashCode(); } @Override @@ -413,7 +428,7 @@ public class AuthorizationException extends TException implements org.apache.thr switch (schemeField.id) { case 1: // NUMBER if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.number = AuthorizationError.findByValue(iprot.readI32()); + struct.number = org.openslx.imagemaster.thrift.iface.AuthorizationError.findByValue(iprot.readI32()); struct.setNumberIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); @@ -490,7 +505,7 @@ public class AuthorizationException extends TException implements org.apache.thr TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.number = AuthorizationError.findByValue(iprot.readI32()); + struct.number = org.openslx.imagemaster.thrift.iface.AuthorizationError.findByValue(iprot.readI32()); struct.setNumberIsSet(true); } if (incoming.get(1)) { diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/FtpCredentials.java b/src/main/java/org/openslx/imagemaster/thrift/iface/FtpCredentials.java index 7b74425..e14e77a 100644 --- a/src/main/java/org/openslx/imagemaster/thrift/iface/FtpCredentials.java +++ b/src/main/java/org/openslx/imagemaster/thrift/iface/FtpCredentials.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.1) + * Autogenerated by Thrift Compiler (1.0.0-dev) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -29,9 +29,12 @@ import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (1.0.0-dev)", date = "2014-6-30") public class FtpCredentials 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("FtpCredentials"); @@ -345,7 +348,24 @@ public class FtpCredentials implements org.apache.thrift.TBase list = new ArrayList(); + + boolean present_username = true && (isSetUsername()); + list.add(present_username); + if (present_username) + list.add(username); + + boolean present_password = true && (isSetPassword()); + list.add(present_password); + if (present_password) + list.add(password); + + boolean present_filename = true && (isSetFilename()); + list.add(present_filename); + if (present_filename) + list.add(filename); + + return list.hashCode(); } @Override diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/ImageData.java b/src/main/java/org/openslx/imagemaster/thrift/iface/ImageData.java index 7f2edd7..727cfdf 100644 --- a/src/main/java/org/openslx/imagemaster/thrift/iface/ImageData.java +++ b/src/main/java/org/openslx/imagemaster/thrift/iface/ImageData.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.1) + * Autogenerated by Thrift Compiler (1.0.0-dev) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -29,9 +29,12 @@ import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (1.0.0-dev)", date = "2014-6-30") public class ImageData 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("ImageData"); @@ -878,7 +881,69 @@ public class ImageData implements org.apache.thrift.TBase list = new ArrayList(); + + boolean present_uuid = true && (isSetUuid()); + list.add(present_uuid); + if (present_uuid) + list.add(uuid); + + boolean present_imageVersion = true; + list.add(present_imageVersion); + if (present_imageVersion) + list.add(imageVersion); + + boolean present_imageName = true && (isSetImageName()); + list.add(present_imageName); + if (present_imageName) + list.add(imageName); + + boolean present_imageCreateTime = true; + list.add(present_imageCreateTime); + if (present_imageCreateTime) + list.add(imageCreateTime); + + boolean present_imageUpdateTime = true; + list.add(present_imageUpdateTime); + if (present_imageUpdateTime) + list.add(imageUpdateTime); + + boolean present_imageOwner = true && (isSetImageOwner()); + list.add(present_imageOwner); + if (present_imageOwner) + list.add(imageOwner); + + boolean present_conentOperatingSystem = true && (isSetConentOperatingSystem()); + list.add(present_conentOperatingSystem); + if (present_conentOperatingSystem) + list.add(conentOperatingSystem); + + boolean present_statusIsValid = true; + list.add(present_statusIsValid); + if (present_statusIsValid) + list.add(statusIsValid); + + boolean present_statusIsDeleted = true; + list.add(present_statusIsDeleted); + if (present_statusIsDeleted) + list.add(statusIsDeleted); + + boolean present_imageShortDescription = true && (isSetImageShortDescription()); + list.add(present_imageShortDescription); + if (present_imageShortDescription) + list.add(imageShortDescription); + + boolean present_imageLongDescription = true && (isSetImageLongDescription()); + list.add(present_imageLongDescription); + if (present_imageLongDescription) + list.add(imageLongDescription); + + boolean present_fileSize = true; + list.add(present_fileSize); + if (present_fileSize) + list.add(fileSize); + + return list.hashCode(); } @Override diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/ImageDataError.java b/src/main/java/org/openslx/imagemaster/thrift/iface/ImageDataError.java index fdd7b81..949e081 100644 --- a/src/main/java/org/openslx/imagemaster/thrift/iface/ImageDataError.java +++ b/src/main/java/org/openslx/imagemaster/thrift/iface/ImageDataError.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.1) + * Autogenerated by Thrift Compiler (1.0.0-dev) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/ImageDataException.java b/src/main/java/org/openslx/imagemaster/thrift/iface/ImageDataException.java index a5ac923..62ce63b 100644 --- a/src/main/java/org/openslx/imagemaster/thrift/iface/ImageDataException.java +++ b/src/main/java/org/openslx/imagemaster/thrift/iface/ImageDataException.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.1) + * Autogenerated by Thrift Compiler (1.0.0-dev) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -29,9 +29,12 @@ import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (1.0.0-dev)", date = "2014-6-30") public class ImageDataException extends TException 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("ImageDataException"); @@ -302,7 +305,19 @@ public class ImageDataException extends TException implements org.apache.thrift. @Override public int hashCode() { - return 0; + List list = new ArrayList(); + + boolean present_number = true && (isSetNumber()); + list.add(present_number); + if (present_number) + list.add(number.getValue()); + + boolean present_message = true && (isSetMessage()); + list.add(present_message); + if (present_message) + list.add(message); + + return list.hashCode(); } @Override @@ -413,7 +428,7 @@ public class ImageDataException extends TException implements org.apache.thrift. switch (schemeField.id) { case 1: // NUMBER if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.number = ImageDataError.findByValue(iprot.readI32()); + struct.number = org.openslx.imagemaster.thrift.iface.ImageDataError.findByValue(iprot.readI32()); struct.setNumberIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); @@ -490,7 +505,7 @@ public class ImageDataException extends TException implements org.apache.thrift. TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.number = ImageDataError.findByValue(iprot.readI32()); + struct.number = org.openslx.imagemaster.thrift.iface.ImageDataError.findByValue(iprot.readI32()); struct.setNumberIsSet(true); } if (incoming.get(1)) { diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/ImageServer.java b/src/main/java/org/openslx/imagemaster/thrift/iface/ImageServer.java index 004e8ae..58a01db 100644 --- a/src/main/java/org/openslx/imagemaster/thrift/iface/ImageServer.java +++ b/src/main/java/org/openslx/imagemaster/thrift/iface/ImageServer.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.1) + * Autogenerated by Thrift Compiler (1.0.0-dev) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -29,9 +29,12 @@ import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (1.0.0-dev)", date = "2014-6-30") public class ImageServer { public interface Iface { @@ -46,13 +49,9 @@ public class ImageServer { public ServerSessionData serverAuthenticate(String organization, ByteBuffer challengeResponse) throws ServerAuthenticationException, org.apache.thrift.TException; - public FtpCredentials submitImage(String serverSessionId, ImageData imageDescription) throws AuthorizationException, ImageDataException, org.apache.thrift.TException; + public UploadInfos submitImage(String serverSessionId, ImageData imageDescription) throws AuthorizationException, ImageDataException, UploadException, org.apache.thrift.TException; - public boolean finishedUpload(String ftpUser, ImageData imageDescription) throws ImageDataException, org.apache.thrift.TException; - - public FtpCredentials getImage(String uuid, String serverSessionId) throws AuthorizationException, ImageDataException, org.apache.thrift.TException; - - public boolean finishedDownload(String ftpUser) throws org.apache.thrift.TException; + public DownloadInfos getImage(String uuid, String serverSessionId) throws AuthorizationException, ImageDataException, org.apache.thrift.TException; } @@ -70,12 +69,8 @@ public class ImageServer { public void submitImage(String serverSessionId, ImageData imageDescription, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void finishedUpload(String ftpUser, ImageData imageDescription, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void getImage(String uuid, String serverSessionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void finishedDownload(String ftpUser, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - } public static class Client extends org.apache.thrift.TServiceClient implements Iface { @@ -226,7 +221,7 @@ public class ImageServer { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "serverAuthenticate failed: unknown result"); } - public FtpCredentials submitImage(String serverSessionId, ImageData imageDescription) throws AuthorizationException, ImageDataException, org.apache.thrift.TException + public UploadInfos submitImage(String serverSessionId, ImageData imageDescription) throws AuthorizationException, ImageDataException, UploadException, org.apache.thrift.TException { send_submitImage(serverSessionId, imageDescription); return recv_submitImage(); @@ -240,7 +235,7 @@ public class ImageServer { sendBase("submitImage", args); } - public FtpCredentials recv_submitImage() throws AuthorizationException, ImageDataException, org.apache.thrift.TException + public UploadInfos recv_submitImage() throws AuthorizationException, ImageDataException, UploadException, org.apache.thrift.TException { submitImage_result result = new submitImage_result(); receiveBase(result, "submitImage"); @@ -253,37 +248,13 @@ public class ImageServer { if (result.failure2 != null) { throw result.failure2; } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "submitImage failed: unknown result"); - } - - public boolean finishedUpload(String ftpUser, ImageData imageDescription) throws ImageDataException, org.apache.thrift.TException - { - send_finishedUpload(ftpUser, imageDescription); - return recv_finishedUpload(); - } - - public void send_finishedUpload(String ftpUser, ImageData imageDescription) throws org.apache.thrift.TException - { - finishedUpload_args args = new finishedUpload_args(); - args.setFtpUser(ftpUser); - args.setImageDescription(imageDescription); - sendBase("finishedUpload", args); - } - - public boolean recv_finishedUpload() throws ImageDataException, org.apache.thrift.TException - { - finishedUpload_result result = new finishedUpload_result(); - receiveBase(result, "finishedUpload"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.failure != null) { - throw result.failure; + if (result.failure3 != null) { + throw result.failure3; } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "finishedUpload failed: unknown result"); + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "submitImage failed: unknown result"); } - public FtpCredentials getImage(String uuid, String serverSessionId) throws AuthorizationException, ImageDataException, org.apache.thrift.TException + public DownloadInfos getImage(String uuid, String serverSessionId) throws AuthorizationException, ImageDataException, org.apache.thrift.TException { send_getImage(uuid, serverSessionId); return recv_getImage(); @@ -297,7 +268,7 @@ public class ImageServer { sendBase("getImage", args); } - public FtpCredentials recv_getImage() throws AuthorizationException, ImageDataException, org.apache.thrift.TException + public DownloadInfos recv_getImage() throws AuthorizationException, ImageDataException, org.apache.thrift.TException { getImage_result result = new getImage_result(); receiveBase(result, "getImage"); @@ -313,29 +284,6 @@ public class ImageServer { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getImage failed: unknown result"); } - public boolean finishedDownload(String ftpUser) throws org.apache.thrift.TException - { - send_finishedDownload(ftpUser); - return recv_finishedDownload(); - } - - public void send_finishedDownload(String ftpUser) throws org.apache.thrift.TException - { - finishedDownload_args args = new finishedDownload_args(); - args.setFtpUser(ftpUser); - sendBase("finishedDownload", args); - } - - public boolean recv_finishedDownload() throws org.apache.thrift.TException - { - finishedDownload_result result = new finishedDownload_result(); - receiveBase(result, "finishedDownload"); - if (result.isSetSuccess()) { - return result.success; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "finishedDownload 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 { @@ -542,7 +490,7 @@ public class ImageServer { prot.writeMessageEnd(); } - public FtpCredentials getResult() throws AuthorizationException, ImageDataException, org.apache.thrift.TException { + public UploadInfos getResult() throws AuthorizationException, ImageDataException, UploadException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } @@ -552,41 +500,6 @@ public class ImageServer { } } - public void finishedUpload(String ftpUser, ImageData imageDescription, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - finishedUpload_call method_call = new finishedUpload_call(ftpUser, imageDescription, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class finishedUpload_call extends org.apache.thrift.async.TAsyncMethodCall { - private String ftpUser; - private ImageData imageDescription; - public finishedUpload_call(String ftpUser, ImageData imageDescription, 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.ftpUser = ftpUser; - this.imageDescription = imageDescription; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("finishedUpload", org.apache.thrift.protocol.TMessageType.CALL, 0)); - finishedUpload_args args = new finishedUpload_args(); - args.setFtpUser(ftpUser); - args.setImageDescription(imageDescription); - args.write(prot); - prot.writeMessageEnd(); - } - - public boolean getResult() throws ImageDataException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_finishedUpload(); - } - } - public void getImage(String uuid, String serverSessionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getImage_call method_call = new getImage_call(uuid, serverSessionId, resultHandler, this, ___protocolFactory, ___transport); @@ -612,7 +525,7 @@ public class ImageServer { prot.writeMessageEnd(); } - public FtpCredentials getResult() throws AuthorizationException, ImageDataException, org.apache.thrift.TException { + public DownloadInfos getResult() throws AuthorizationException, ImageDataException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } @@ -622,38 +535,6 @@ public class ImageServer { } } - public void finishedDownload(String ftpUser, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - finishedDownload_call method_call = new finishedDownload_call(ftpUser, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class finishedDownload_call extends org.apache.thrift.async.TAsyncMethodCall { - private String ftpUser; - public finishedDownload_call(String ftpUser, 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.ftpUser = ftpUser; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("finishedDownload", org.apache.thrift.protocol.TMessageType.CALL, 0)); - finishedDownload_args args = new finishedDownload_args(); - args.setFtpUser(ftpUser); - args.write(prot); - prot.writeMessageEnd(); - } - - public boolean getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_finishedDownload(); - } - } - } public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor { @@ -673,9 +554,7 @@ public class ImageServer { processMap.put("startServerAuthentication", new startServerAuthentication()); processMap.put("serverAuthenticate", new serverAuthenticate()); processMap.put("submitImage", new submitImage()); - processMap.put("finishedUpload", new finishedUpload()); processMap.put("getImage", new getImage()); - processMap.put("finishedDownload", new finishedDownload()); return processMap; } @@ -817,31 +696,8 @@ public class ImageServer { result.failure = failure; } catch (ImageDataException failure2) { result.failure2 = failure2; - } - return result; - } - } - - public static class finishedUpload extends org.apache.thrift.ProcessFunction { - public finishedUpload() { - super("finishedUpload"); - } - - public finishedUpload_args getEmptyArgsInstance() { - return new finishedUpload_args(); - } - - protected boolean isOneway() { - return false; - } - - public finishedUpload_result getResult(I iface, finishedUpload_args args) throws org.apache.thrift.TException { - finishedUpload_result result = new finishedUpload_result(); - try { - result.success = iface.finishedUpload(args.ftpUser, args.imageDescription); - result.setSuccessIsSet(true); - } catch (ImageDataException failure) { - result.failure = failure; + } catch (UploadException failure3) { + result.failure3 = failure3; } return result; } @@ -873,27 +729,6 @@ public class ImageServer { } } - public static class finishedDownload extends org.apache.thrift.ProcessFunction { - public finishedDownload() { - super("finishedDownload"); - } - - public finishedDownload_args getEmptyArgsInstance() { - return new finishedDownload_args(); - } - - protected boolean isOneway() { - return false; - } - - public finishedDownload_result getResult(I iface, finishedDownload_args args) throws org.apache.thrift.TException { - finishedDownload_result result = new finishedDownload_result(); - result.success = iface.finishedDownload(args.ftpUser); - result.setSuccessIsSet(true); - return result; - } - } - } public static class AsyncProcessor extends org.apache.thrift.TBaseAsyncProcessor { @@ -913,9 +748,7 @@ public class ImageServer { processMap.put("startServerAuthentication", new startServerAuthentication()); processMap.put("serverAuthenticate", new serverAuthenticate()); processMap.put("submitImage", new submitImage()); - processMap.put("finishedUpload", new finishedUpload()); processMap.put("getImage", new getImage()); - processMap.put("finishedDownload", new finishedDownload()); return processMap; } @@ -1199,7 +1032,7 @@ public class ImageServer { } } - public static class submitImage extends org.apache.thrift.AsyncProcessFunction { + public static class submitImage extends org.apache.thrift.AsyncProcessFunction { public submitImage() { super("submitImage"); } @@ -1208,10 +1041,10 @@ public class ImageServer { return new submitImage_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(FtpCredentials o) { + return new AsyncMethodCallback() { + public void onComplete(UploadInfos o) { submitImage_result result = new submitImage_result(); result.success = o; try { @@ -1236,62 +1069,9 @@ public class ImageServer { result.setFailure2IsSet(true); msg = result; } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, submitImage_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.submitImage(args.serverSessionId, args.imageDescription,resultHandler); - } - } - - public static class finishedUpload extends org.apache.thrift.AsyncProcessFunction { - public finishedUpload() { - super("finishedUpload"); - } - - public finishedUpload_args getEmptyArgsInstance() { - return new finishedUpload_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Boolean o) { - finishedUpload_result result = new finishedUpload_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - finishedUpload_result result = new finishedUpload_result(); - if (e instanceof ImageDataException) { - result.failure = (ImageDataException) e; - result.setFailureIsSet(true); + else if (e instanceof UploadException) { + result.failure3 = (UploadException) e; + result.setFailure3IsSet(true); msg = result; } else @@ -1314,12 +1094,12 @@ public class ImageServer { return false; } - public void start(I iface, finishedUpload_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.finishedUpload(args.ftpUser, args.imageDescription,resultHandler); + public void start(I iface, submitImage_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.submitImage(args.serverSessionId, args.imageDescription,resultHandler); } } - public static class getImage extends org.apache.thrift.AsyncProcessFunction { + public static class getImage extends org.apache.thrift.AsyncProcessFunction { public getImage() { super("getImage"); } @@ -1328,10 +1108,10 @@ public class ImageServer { return new getImage_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(FtpCredentials o) { + return new AsyncMethodCallback() { + public void onComplete(DownloadInfos o) { getImage_result result = new getImage_result(); result.success = o; try { @@ -1376,63 +1156,11 @@ public class ImageServer { return false; } - public void start(I iface, getImage_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + public void start(I iface, getImage_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { iface.getImage(args.uuid, args.serverSessionId,resultHandler); } } - public static class finishedDownload extends org.apache.thrift.AsyncProcessFunction { - public finishedDownload() { - super("finishedDownload"); - } - - public finishedDownload_args getEmptyArgsInstance() { - return new finishedDownload_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Boolean o) { - finishedDownload_result result = new finishedDownload_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - finishedDownload_result result = new finishedDownload_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, finishedDownload_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.finishedDownload(args.ftpUser,resultHandler); - } - } - } public static class ping_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { @@ -1565,7 +1293,9 @@ public class ImageServer { @Override public int hashCode() { - return 0; + List list = new ArrayList(); + + return list.hashCode(); } @Override @@ -1878,7 +1608,14 @@ public class ImageServer { @Override public int hashCode() { - return 0; + List list = new ArrayList(); + + boolean present_success = true; + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); } @Override @@ -2289,7 +2026,19 @@ public class ImageServer { @Override public int hashCode() { - return 0; + List list = new ArrayList(); + + boolean present_username = true && (isSetUsername()); + list.add(present_username); + if (present_username) + list.add(username); + + boolean present_password = true && (isSetPassword()); + list.add(present_password); + if (present_password) + list.add(password); + + return list.hashCode(); } @Override @@ -2743,7 +2492,19 @@ public class ImageServer { @Override public int hashCode() { - return 0; + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_failure = true && (isSetFailure()); + list.add(present_failure); + if (present_failure) + list.add(failure); + + return list.hashCode(); } @Override @@ -3145,7 +2906,14 @@ public class ImageServer { @Override public int hashCode() { - return 0; + List list = new ArrayList(); + + boolean present_token = true && (isSetToken()); + list.add(present_token); + if (present_token) + list.add(token); + + return list.hashCode(); } @Override @@ -3558,7 +3326,19 @@ public class ImageServer { @Override public int hashCode() { - return 0; + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_failure = true && (isSetFailure()); + list.add(present_failure); + if (present_failure) + list.add(failure); + + return list.hashCode(); } @Override @@ -3960,7 +3740,14 @@ public class ImageServer { @Override public int hashCode() { - return 0; + List list = new ArrayList(); + + boolean present_organization = true && (isSetOrganization()); + list.add(present_organization); + if (present_organization) + list.add(organization); + + return list.hashCode(); } @Override @@ -4373,7 +4160,19 @@ public class ImageServer { @Override public int hashCode() { - return 0; + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_failure = true && (isSetFailure()); + list.add(present_failure); + if (present_failure) + list.add(failure); + + return list.hashCode(); } @Override @@ -4684,7 +4483,6 @@ public class ImageServer { } if (other.isSetChallengeResponse()) { this.challengeResponse = org.apache.thrift.TBaseHelper.copyBinary(other.challengeResponse); -; } } @@ -4840,7 +4638,19 @@ public class ImageServer { @Override public int hashCode() { - return 0; + List list = new ArrayList(); + + boolean present_organization = true && (isSetOrganization()); + list.add(present_organization); + if (present_organization) + list.add(organization); + + boolean present_challengeResponse = true && (isSetChallengeResponse()); + list.add(present_challengeResponse); + if (present_challengeResponse) + list.add(challengeResponse); + + return list.hashCode(); } @Override @@ -5294,7 +5104,19 @@ public class ImageServer { @Override public int hashCode() { - return 0; + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_failure = true && (isSetFailure()); + list.add(present_failure); + if (present_failure) + list.add(failure); + + return list.hashCode(); } @Override @@ -5755,7 +5577,19 @@ public class ImageServer { @Override public int hashCode() { - return 0; + List list = new ArrayList(); + + boolean present_serverSessionId = true && (isSetServerSessionId()); + list.add(present_serverSessionId); + if (present_serverSessionId) + list.add(serverSessionId); + + boolean present_imageDescription = true && (isSetImageDescription()); + list.add(present_imageDescription); + if (present_imageDescription) + list.add(imageDescription); + + return list.hashCode(); } @Override @@ -5966,6 +5800,7 @@ public class ImageServer { private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField FAILURE2_FIELD_DESC = new org.apache.thrift.protocol.TField("failure2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final org.apache.thrift.protocol.TField FAILURE3_FIELD_DESC = new org.apache.thrift.protocol.TField("failure3", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -5973,15 +5808,17 @@ public class ImageServer { schemes.put(TupleScheme.class, new submitImage_resultTupleSchemeFactory()); } - public FtpCredentials success; // required + public UploadInfos success; // required public AuthorizationException failure; // required public ImageDataException failure2; // required + public UploadException 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"); + FAILURE2((short)2, "failure2"), + FAILURE3((short)3, "failure3"); private static final Map byName = new HashMap(); @@ -6002,6 +5839,8 @@ public class ImageServer { return FAILURE; case 2: // FAILURE2 return FAILURE2; + case 3: // FAILURE3 + return FAILURE3; default: return null; } @@ -6046,11 +5885,13 @@ public class ImageServer { static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FtpCredentials.class))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UploadInfos.class))); tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.FAILURE2, new org.apache.thrift.meta_data.FieldMetaData("failure2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.FAILURE3, new org.apache.thrift.meta_data.FieldMetaData("failure3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(submitImage_result.class, metaDataMap); } @@ -6059,14 +5900,16 @@ public class ImageServer { } public submitImage_result( - FtpCredentials success, + UploadInfos success, AuthorizationException failure, - ImageDataException failure2) + ImageDataException failure2, + UploadException failure3) { this(); this.success = success; this.failure = failure; this.failure2 = failure2; + this.failure3 = failure3; } /** @@ -6074,7 +5917,7 @@ public class ImageServer { */ public submitImage_result(submitImage_result other) { if (other.isSetSuccess()) { - this.success = new FtpCredentials(other.success); + this.success = new UploadInfos(other.success); } if (other.isSetFailure()) { this.failure = new AuthorizationException(other.failure); @@ -6082,6 +5925,9 @@ public class ImageServer { if (other.isSetFailure2()) { this.failure2 = new ImageDataException(other.failure2); } + if (other.isSetFailure3()) { + this.failure3 = new UploadException(other.failure3); + } } public submitImage_result deepCopy() { @@ -6093,13 +5939,14 @@ public class ImageServer { this.success = null; this.failure = null; this.failure2 = null; + this.failure3 = null; } - public FtpCredentials getSuccess() { + public UploadInfos getSuccess() { return this.success; } - public submitImage_result setSuccess(FtpCredentials success) { + public submitImage_result setSuccess(UploadInfos success) { this.success = success; return this; } @@ -6167,13 +6014,37 @@ public class ImageServer { } } + public UploadException getFailure3() { + return this.failure3; + } + + public submitImage_result setFailure3(UploadException failure3) { + this.failure3 = failure3; + return this; + } + + public void unsetFailure3() { + this.failure3 = null; + } + + /** Returns true if field failure3 is set (has been assigned a value) and false otherwise */ + public boolean isSetFailure3() { + return this.failure3 != null; + } + + public void setFailure3IsSet(boolean value) { + if (!value) { + this.failure3 = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { - setSuccess((FtpCredentials)value); + setSuccess((UploadInfos)value); } break; @@ -6193,8 +6064,16 @@ public class ImageServer { } break; - } - } + case FAILURE3: + if (value == null) { + unsetFailure3(); + } else { + setFailure3((UploadException)value); + } + break; + + } + } public Object getFieldValue(_Fields field) { switch (field) { @@ -6207,6 +6086,9 @@ public class ImageServer { case FAILURE2: return getFailure2(); + case FAILURE3: + return getFailure3(); + } throw new IllegalStateException(); } @@ -6224,6 +6106,8 @@ public class ImageServer { return isSetFailure(); case FAILURE2: return isSetFailure2(); + case FAILURE3: + return isSetFailure3(); } throw new IllegalStateException(); } @@ -6268,12 +6152,43 @@ public class ImageServer { 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() { - return 0; + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_failure = true && (isSetFailure()); + list.add(present_failure); + if (present_failure) + list.add(failure); + + boolean present_failure2 = true && (isSetFailure2()); + list.add(present_failure2); + if (present_failure2) + list.add(failure2); + + boolean present_failure3 = true && (isSetFailure3()); + list.add(present_failure3); + if (present_failure3) + list.add(failure3); + + return list.hashCode(); } @Override @@ -6314,6 +6229,16 @@ public class ImageServer { return lastComparison; } } + lastComparison = Boolean.valueOf(isSetFailure3()).compareTo(other.isSetFailure3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFailure3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure3, other.failure3); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -6357,6 +6282,14 @@ public class ImageServer { 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(); } @@ -6405,7 +6338,7 @@ public class ImageServer { switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new FtpCredentials(); + struct.success = new UploadInfos(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { @@ -6430,6 +6363,15 @@ public class ImageServer { 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 UploadException(); + 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); } @@ -6460,6 +6402,11 @@ public class ImageServer { 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(); } @@ -6487,7 +6434,10 @@ public class ImageServer { if (struct.isSetFailure2()) { optionals.set(2); } - oprot.writeBitSet(optionals, 3); + if (struct.isSetFailure3()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); if (struct.isSetSuccess()) { struct.success.write(oprot); } @@ -6497,14 +6447,17 @@ public class ImageServer { if (struct.isSetFailure2()) { struct.failure2.write(oprot); } + if (struct.isSetFailure3()) { + struct.failure3.write(oprot); + } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, submitImage_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); + BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { - struct.success = new FtpCredentials(); + struct.success = new UploadInfos(); struct.success.read(iprot); struct.setSuccessIsSet(true); } @@ -6518,30 +6471,35 @@ public class ImageServer { struct.failure2.read(iprot); struct.setFailure2IsSet(true); } + if (incoming.get(3)) { + struct.failure3 = new UploadException(); + struct.failure3.read(iprot); + struct.setFailure3IsSet(true); + } } } } - public static class finishedUpload_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("finishedUpload_args"); + public static class getImage_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("getImage_args"); - private static final org.apache.thrift.protocol.TField FTP_USER_FIELD_DESC = new org.apache.thrift.protocol.TField("ftpUser", 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 UUID_FIELD_DESC = new org.apache.thrift.protocol.TField("uuid", org.apache.thrift.protocol.TType.STRING, (short)1); + 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)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new finishedUpload_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new finishedUpload_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getImage_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getImage_argsTupleSchemeFactory()); } - public String ftpUser; // required - public ImageData imageDescription; // required + public String uuid; // required + public String serverSessionId; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - FTP_USER((short)1, "ftpUser"), - IMAGE_DESCRIPTION((short)2, "imageDescription"); + UUID((short)1, "uuid"), + SERVER_SESSION_ID((short)2, "serverSessionId"); private static final Map byName = new HashMap(); @@ -6556,10 +6514,10 @@ public class ImageServer { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // FTP_USER - return FTP_USER; - case 2: // IMAGE_DESCRIPTION - return IMAGE_DESCRIPTION; + case 1: // UUID + return UUID; + case 2: // SERVER_SESSION_ID + return SERVER_SESSION_ID; default: return null; } @@ -6603,111 +6561,111 @@ public class ImageServer { public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.FTP_USER, new org.apache.thrift.meta_data.FieldMetaData("ftpUser", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.UUID, new org.apache.thrift.meta_data.FieldMetaData("uuid", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); + 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))); - 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, ImageData.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(finishedUpload_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImage_args.class, metaDataMap); } - public finishedUpload_args() { + public getImage_args() { } - public finishedUpload_args( - String ftpUser, - ImageData imageDescription) + public getImage_args( + String uuid, + String serverSessionId) { this(); - this.ftpUser = ftpUser; - this.imageDescription = imageDescription; + this.uuid = uuid; + this.serverSessionId = serverSessionId; } /** * Performs a deep copy on other. */ - public finishedUpload_args(finishedUpload_args other) { - if (other.isSetFtpUser()) { - this.ftpUser = other.ftpUser; + public getImage_args(getImage_args other) { + if (other.isSetUuid()) { + this.uuid = other.uuid; } - if (other.isSetImageDescription()) { - this.imageDescription = new ImageData(other.imageDescription); + if (other.isSetServerSessionId()) { + this.serverSessionId = other.serverSessionId; } } - public finishedUpload_args deepCopy() { - return new finishedUpload_args(this); + public getImage_args deepCopy() { + return new getImage_args(this); } @Override public void clear() { - this.ftpUser = null; - this.imageDescription = null; + this.uuid = null; + this.serverSessionId = null; } - public String getFtpUser() { - return this.ftpUser; + public String getUuid() { + return this.uuid; } - public finishedUpload_args setFtpUser(String ftpUser) { - this.ftpUser = ftpUser; + public getImage_args setUuid(String uuid) { + this.uuid = uuid; return this; } - public void unsetFtpUser() { - this.ftpUser = null; + public void unsetUuid() { + this.uuid = null; } - /** Returns true if field ftpUser is set (has been assigned a value) and false otherwise */ - public boolean isSetFtpUser() { - return this.ftpUser != null; + /** Returns true if field uuid is set (has been assigned a value) and false otherwise */ + public boolean isSetUuid() { + return this.uuid != null; } - public void setFtpUserIsSet(boolean value) { + public void setUuidIsSet(boolean value) { if (!value) { - this.ftpUser = null; + this.uuid = null; } } - public ImageData getImageDescription() { - return this.imageDescription; + public String getServerSessionId() { + return this.serverSessionId; } - public finishedUpload_args setImageDescription(ImageData imageDescription) { - this.imageDescription = imageDescription; + public getImage_args setServerSessionId(String serverSessionId) { + this.serverSessionId = serverSessionId; return this; } - public void unsetImageDescription() { - this.imageDescription = null; + public void unsetServerSessionId() { + this.serverSessionId = null; } - /** Returns true if field imageDescription is set (has been assigned a value) and false otherwise */ - public boolean isSetImageDescription() { - return this.imageDescription != 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 setImageDescriptionIsSet(boolean value) { + public void setServerSessionIdIsSet(boolean value) { if (!value) { - this.imageDescription = null; + this.serverSessionId = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case FTP_USER: + case UUID: if (value == null) { - unsetFtpUser(); + unsetUuid(); } else { - setFtpUser((String)value); + setUuid((String)value); } break; - case IMAGE_DESCRIPTION: + case SERVER_SESSION_ID: if (value == null) { - unsetImageDescription(); + unsetServerSessionId(); } else { - setImageDescription((ImageData)value); + setServerSessionId((String)value); } break; @@ -6716,11 +6674,11 @@ public class ImageServer { public Object getFieldValue(_Fields field) { switch (field) { - case FTP_USER: - return getFtpUser(); + case UUID: + return getUuid(); - case IMAGE_DESCRIPTION: - return getImageDescription(); + case SERVER_SESSION_ID: + return getServerSessionId(); } throw new IllegalStateException(); @@ -6733,10 +6691,10 @@ public class ImageServer { } switch (field) { - case FTP_USER: - return isSetFtpUser(); - case IMAGE_DESCRIPTION: - return isSetImageDescription(); + case UUID: + return isSetUuid(); + case SERVER_SESSION_ID: + return isSetServerSessionId(); } throw new IllegalStateException(); } @@ -6745,30 +6703,30 @@ public class ImageServer { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof finishedUpload_args) - return this.equals((finishedUpload_args)that); + if (that instanceof getImage_args) + return this.equals((getImage_args)that); return false; } - public boolean equals(finishedUpload_args that) { + public boolean equals(getImage_args that) { if (that == null) return false; - boolean this_present_ftpUser = true && this.isSetFtpUser(); - boolean that_present_ftpUser = true && that.isSetFtpUser(); - if (this_present_ftpUser || that_present_ftpUser) { - if (!(this_present_ftpUser && that_present_ftpUser)) + boolean this_present_uuid = true && this.isSetUuid(); + boolean that_present_uuid = true && that.isSetUuid(); + if (this_present_uuid || that_present_uuid) { + if (!(this_present_uuid && that_present_uuid)) return false; - if (!this.ftpUser.equals(that.ftpUser)) + if (!this.uuid.equals(that.uuid)) 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)) + 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.imageDescription.equals(that.imageDescription)) + if (!this.serverSessionId.equals(that.serverSessionId)) return false; } @@ -6777,33 +6735,45 @@ public class ImageServer { @Override public int hashCode() { - return 0; + List list = new ArrayList(); + + boolean present_uuid = true && (isSetUuid()); + list.add(present_uuid); + if (present_uuid) + list.add(uuid); + + boolean present_serverSessionId = true && (isSetServerSessionId()); + list.add(present_serverSessionId); + if (present_serverSessionId) + list.add(serverSessionId); + + return list.hashCode(); } @Override - public int compareTo(finishedUpload_args other) { + public int compareTo(getImage_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetFtpUser()).compareTo(other.isSetFtpUser()); + lastComparison = Boolean.valueOf(isSetUuid()).compareTo(other.isSetUuid()); if (lastComparison != 0) { return lastComparison; } - if (isSetFtpUser()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ftpUser, other.ftpUser); + if (isSetUuid()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uuid, other.uuid); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetImageDescription()).compareTo(other.isSetImageDescription()); + lastComparison = Boolean.valueOf(isSetServerSessionId()).compareTo(other.isSetServerSessionId()); if (lastComparison != 0) { return lastComparison; } - if (isSetImageDescription()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageDescription, other.imageDescription); + if (isSetServerSessionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverSessionId, other.serverSessionId); if (lastComparison != 0) { return lastComparison; } @@ -6825,22 +6795,22 @@ public class ImageServer { @Override public String toString() { - StringBuilder sb = new StringBuilder("finishedUpload_args("); + StringBuilder sb = new StringBuilder("getImage_args("); boolean first = true; - sb.append("ftpUser:"); - if (this.ftpUser == null) { + sb.append("uuid:"); + if (this.uuid == null) { sb.append("null"); } else { - sb.append(this.ftpUser); + sb.append(this.uuid); } first = false; if (!first) sb.append(", "); - sb.append("imageDescription:"); - if (this.imageDescription == null) { + sb.append("serverSessionId:"); + if (this.serverSessionId == null) { sb.append("null"); } else { - sb.append(this.imageDescription); + sb.append(this.serverSessionId); } first = false; sb.append(")"); @@ -6850,9 +6820,6 @@ public class ImageServer { 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 { @@ -6871,15 +6838,15 @@ public class ImageServer { } } - private static class finishedUpload_argsStandardSchemeFactory implements SchemeFactory { - public finishedUpload_argsStandardScheme getScheme() { - return new finishedUpload_argsStandardScheme(); + private static class getImage_argsStandardSchemeFactory implements SchemeFactory { + public getImage_argsStandardScheme getScheme() { + return new getImage_argsStandardScheme(); } } - private static class finishedUpload_argsStandardScheme extends StandardScheme { + private static class getImage_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, finishedUpload_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getImage_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -6889,19 +6856,18 @@ public class ImageServer { break; } switch (schemeField.id) { - case 1: // FTP_USER + case 1: // UUID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.ftpUser = iprot.readString(); - struct.setFtpUserIsSet(true); + struct.uuid = iprot.readString(); + struct.setUuidIsSet(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 ImageData(); - struct.imageDescription.read(iprot); - struct.setImageDescriptionIsSet(true); + case 2: // 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); } @@ -6917,18 +6883,18 @@ public class ImageServer { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, finishedUpload_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getImage_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.ftpUser != null) { - oprot.writeFieldBegin(FTP_USER_FIELD_DESC); - oprot.writeString(struct.ftpUser); + if (struct.uuid != null) { + oprot.writeFieldBegin(UUID_FIELD_DESC); + oprot.writeString(struct.uuid); oprot.writeFieldEnd(); } - if (struct.imageDescription != null) { - oprot.writeFieldBegin(IMAGE_DESCRIPTION_FIELD_DESC); - struct.imageDescription.write(oprot); + if (struct.serverSessionId != null) { + oprot.writeFieldBegin(SERVER_SESSION_ID_FIELD_DESC); + oprot.writeString(struct.serverSessionId); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -6937,70 +6903,72 @@ public class ImageServer { } - private static class finishedUpload_argsTupleSchemeFactory implements SchemeFactory { - public finishedUpload_argsTupleScheme getScheme() { - return new finishedUpload_argsTupleScheme(); + private static class getImage_argsTupleSchemeFactory implements SchemeFactory { + public getImage_argsTupleScheme getScheme() { + return new getImage_argsTupleScheme(); } } - private static class finishedUpload_argsTupleScheme extends TupleScheme { + private static class getImage_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, finishedUpload_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getImage_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetFtpUser()) { + if (struct.isSetUuid()) { optionals.set(0); } - if (struct.isSetImageDescription()) { + if (struct.isSetServerSessionId()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); - if (struct.isSetFtpUser()) { - oprot.writeString(struct.ftpUser); + if (struct.isSetUuid()) { + oprot.writeString(struct.uuid); } - if (struct.isSetImageDescription()) { - struct.imageDescription.write(oprot); + if (struct.isSetServerSessionId()) { + oprot.writeString(struct.serverSessionId); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, finishedUpload_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getImage_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.ftpUser = iprot.readString(); - struct.setFtpUserIsSet(true); + struct.uuid = iprot.readString(); + struct.setUuidIsSet(true); } if (incoming.get(1)) { - struct.imageDescription = new ImageData(); - struct.imageDescription.read(iprot); - struct.setImageDescriptionIsSet(true); + struct.serverSessionId = iprot.readString(); + struct.setServerSessionIdIsSet(true); } } } } - public static class finishedUpload_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("finishedUpload_result"); + public static class getImage_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("getImage_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 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new finishedUpload_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new finishedUpload_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new getImage_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getImage_resultTupleSchemeFactory()); } - public boolean success; // required - public ImageDataException failure; // required + public DownloadInfos success; // required + public AuthorizationException failure; // required + public ImageDataException failure2; // required /** 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"); + FAILURE((short)1, "failure"), + FAILURE2((short)2, "failure2"); private static final Map byName = new HashMap(); @@ -7019,6 +6987,8 @@ public class ImageServer { return SUCCESS; case 1: // FAILURE return FAILURE; + case 2: // FAILURE2 + return FAILURE2; default: return null; } @@ -7059,82 +7029,88 @@ public class ImageServer { } // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DownloadInfos.class))); tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.FAILURE2, new org.apache.thrift.meta_data.FieldMetaData("failure2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(finishedUpload_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImage_result.class, metaDataMap); } - public finishedUpload_result() { + public getImage_result() { } - public finishedUpload_result( - boolean success, - ImageDataException failure) + public getImage_result( + DownloadInfos success, + AuthorizationException failure, + ImageDataException failure2) { this(); this.success = success; - setSuccessIsSet(true); this.failure = failure; + this.failure2 = failure2; } /** * Performs a deep copy on other. */ - public finishedUpload_result(finishedUpload_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; + public getImage_result(getImage_result other) { + if (other.isSetSuccess()) { + this.success = new DownloadInfos(other.success); + } if (other.isSetFailure()) { - this.failure = new ImageDataException(other.failure); + this.failure = new AuthorizationException(other.failure); + } + if (other.isSetFailure2()) { + this.failure2 = new ImageDataException(other.failure2); } } - public finishedUpload_result deepCopy() { - return new finishedUpload_result(this); + public getImage_result deepCopy() { + return new getImage_result(this); } @Override public void clear() { - setSuccessIsSet(false); - this.success = false; + this.success = null; this.failure = null; + this.failure2 = null; } - public boolean isSuccess() { + public DownloadInfos getSuccess() { return this.success; } - public finishedUpload_result setSuccess(boolean success) { + public getImage_result setSuccess(DownloadInfos success) { this.success = success; - setSuccessIsSet(true); return this; } public void unsetSuccess() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); + this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + return this.success != null; } public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + if (!value) { + this.success = null; + } } - public ImageDataException getFailure() { + public AuthorizationException getFailure() { return this.failure; } - public finishedUpload_result setFailure(ImageDataException failure) { + public getImage_result setFailure(AuthorizationException failure) { this.failure = failure; return this; } @@ -7154,13 +7130,37 @@ public class ImageServer { } } + public ImageDataException getFailure2() { + return this.failure2; + } + + public getImage_result setFailure2(ImageDataException failure2) { + this.failure2 = failure2; + return this; + } + + public void unsetFailure2() { + this.failure2 = null; + } + + /** Returns true if field failure2 is set (has been assigned a value) and false otherwise */ + public boolean isSetFailure2() { + return this.failure2 != null; + } + + public void setFailure2IsSet(boolean value) { + if (!value) { + this.failure2 = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { - setSuccess((Boolean)value); + setSuccess((DownloadInfos)value); } break; @@ -7168,7 +7168,15 @@ public class ImageServer { if (value == null) { unsetFailure(); } else { - setFailure((ImageDataException)value); + setFailure((AuthorizationException)value); + } + break; + + case FAILURE2: + if (value == null) { + unsetFailure2(); + } else { + setFailure2((ImageDataException)value); } break; @@ -7178,11 +7186,14 @@ public class ImageServer { public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: - return Boolean.valueOf(isSuccess()); + return getSuccess(); case FAILURE: return getFailure(); + case FAILURE2: + return getFailure2(); + } throw new IllegalStateException(); } @@ -7198,6 +7209,8 @@ public class ImageServer { return isSetSuccess(); case FAILURE: return isSetFailure(); + case FAILURE2: + return isSetFailure2(); } throw new IllegalStateException(); } @@ -7206,21 +7219,21 @@ public class ImageServer { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof finishedUpload_result) - return this.equals((finishedUpload_result)that); + if (that instanceof getImage_result) + return this.equals((getImage_result)that); return false; } - public boolean equals(finishedUpload_result that) { + public boolean equals(getImage_result that) { if (that == null) return false; - boolean this_present_success = true; - boolean that_present_success = 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 != that.success) + if (!this.success.equals(that.success)) return false; } @@ -7233,16 +7246,42 @@ public class ImageServer { 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; + } + return true; } @Override public int hashCode() { - return 0; + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + boolean present_failure = true && (isSetFailure()); + list.add(present_failure); + if (present_failure) + list.add(failure); + + boolean present_failure2 = true && (isSetFailure2()); + list.add(present_failure2); + if (present_failure2) + list.add(failure2); + + return list.hashCode(); } @Override - public int compareTo(finishedUpload_result other) { + public int compareTo(getImage_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -7269,6 +7308,16 @@ public class ImageServer { return lastComparison; } } + lastComparison = Boolean.valueOf(isSetFailure2()).compareTo(other.isSetFailure2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFailure2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure2, other.failure2); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -7286,11 +7335,15 @@ public class ImageServer { @Override public String toString() { - StringBuilder sb = new StringBuilder("finishedUpload_result("); + StringBuilder sb = new StringBuilder("getImage_result("); boolean first = true; sb.append("success:"); - sb.append(this.success); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } first = false; if (!first) sb.append(", "); sb.append("failure:"); @@ -7300,6 +7353,14 @@ public class ImageServer { 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; sb.append(")"); return sb.toString(); } @@ -7307,6 +7368,9 @@ public class ImageServer { 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 { @@ -7319,23 +7383,21 @@ public class ImageServer { private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } - private static class finishedUpload_resultStandardSchemeFactory implements SchemeFactory { - public finishedUpload_resultStandardScheme getScheme() { - return new finishedUpload_resultStandardScheme(); + private static class getImage_resultStandardSchemeFactory implements SchemeFactory { + public getImage_resultStandardScheme getScheme() { + return new getImage_resultStandardScheme(); } } - private static class finishedUpload_resultStandardScheme extends StandardScheme { + private static class getImage_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, finishedUpload_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, getImage_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -7346,8 +7408,9 @@ public class ImageServer { } switch (schemeField.id) { case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.success = iprot.readBool(); + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new DownloadInfos(); + struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); @@ -7355,13 +7418,22 @@ public class ImageServer { break; case 1: // FAILURE if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.failure = new ImageDataException(); + struct.failure = new AuthorizationException(); 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 ImageDataException(); + struct.failure2.read(iprot); + struct.setFailure2IsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -7373,13 +7445,13 @@ public class ImageServer { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, finishedUpload_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, getImage_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.isSetSuccess()) { + if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(struct.success); + struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.failure != null) { @@ -7387,22 +7459,27 @@ public class ImageServer { struct.failure.write(oprot); oprot.writeFieldEnd(); } + if (struct.failure2 != null) { + oprot.writeFieldBegin(FAILURE2_FIELD_DESC); + struct.failure2.write(oprot); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class finishedUpload_resultTupleSchemeFactory implements SchemeFactory { - public finishedUpload_resultTupleScheme getScheme() { - return new finishedUpload_resultTupleScheme(); + private static class getImage_resultTupleSchemeFactory implements SchemeFactory { + public getImage_resultTupleScheme getScheme() { + return new getImage_resultTupleScheme(); } } - private static class finishedUpload_resultTupleScheme extends TupleScheme { + private static class getImage_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, finishedUpload_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, getImage_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { @@ -7411,1752 +7488,39 @@ public class ImageServer { if (struct.isSetFailure()) { optionals.set(1); } - oprot.writeBitSet(optionals, 2); + if (struct.isSetFailure2()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); if (struct.isSetSuccess()) { - oprot.writeBool(struct.success); + struct.success.write(oprot); } if (struct.isSetFailure()) { struct.failure.write(oprot); } + if (struct.isSetFailure2()) { + struct.failure2.write(oprot); + } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, finishedUpload_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, getImage_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); + BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { - struct.success = iprot.readBool(); + struct.success = new DownloadInfos(); + struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { - struct.failure = new ImageDataException(); + struct.failure = new AuthorizationException(); struct.failure.read(iprot); struct.setFailureIsSet(true); } - } - } - - } - - public static class getImage_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("getImage_args"); - - private static final org.apache.thrift.protocol.TField UUID_FIELD_DESC = new org.apache.thrift.protocol.TField("uuid", org.apache.thrift.protocol.TType.STRING, (short)1); - 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)2); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new getImage_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getImage_argsTupleSchemeFactory()); - } - - public String uuid; // required - public String serverSessionId; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - UUID((short)1, "uuid"), - SERVER_SESSION_ID((short)2, "serverSessionId"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // UUID - return UUID; - case 2: // SERVER_SESSION_ID - return SERVER_SESSION_ID; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.UUID, new org.apache.thrift.meta_data.FieldMetaData("uuid", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); - 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))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImage_args.class, metaDataMap); - } - - public getImage_args() { - } - - public getImage_args( - String uuid, - String serverSessionId) - { - this(); - this.uuid = uuid; - this.serverSessionId = serverSessionId; - } - - /** - * Performs a deep copy on other. - */ - public getImage_args(getImage_args other) { - if (other.isSetUuid()) { - this.uuid = other.uuid; - } - if (other.isSetServerSessionId()) { - this.serverSessionId = other.serverSessionId; - } - } - - public getImage_args deepCopy() { - return new getImage_args(this); - } - - @Override - public void clear() { - this.uuid = null; - this.serverSessionId = null; - } - - public String getUuid() { - return this.uuid; - } - - public getImage_args setUuid(String uuid) { - this.uuid = uuid; - return this; - } - - public void unsetUuid() { - this.uuid = null; - } - - /** Returns true if field uuid is set (has been assigned a value) and false otherwise */ - public boolean isSetUuid() { - return this.uuid != null; - } - - public void setUuidIsSet(boolean value) { - if (!value) { - this.uuid = null; - } - } - - public String getServerSessionId() { - return this.serverSessionId; - } - - public getImage_args setServerSessionId(String serverSessionId) { - this.serverSessionId = serverSessionId; - return this; - } - - public void unsetServerSessionId() { - this.serverSessionId = null; - } - - /** Returns true if field serverSessionId is set (has been assigned a value) and false otherwise */ - public boolean isSetServerSessionId() { - return this.serverSessionId != null; - } - - public void setServerSessionIdIsSet(boolean value) { - if (!value) { - this.serverSessionId = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case UUID: - if (value == null) { - unsetUuid(); - } else { - setUuid((String)value); - } - break; - - case SERVER_SESSION_ID: - if (value == null) { - unsetServerSessionId(); - } else { - setServerSessionId((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case UUID: - return getUuid(); - - case SERVER_SESSION_ID: - return getServerSessionId(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case UUID: - return isSetUuid(); - case SERVER_SESSION_ID: - return isSetServerSessionId(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof getImage_args) - return this.equals((getImage_args)that); - return false; - } - - public boolean equals(getImage_args that) { - if (that == null) - return false; - - boolean this_present_uuid = true && this.isSetUuid(); - boolean that_present_uuid = true && that.isSetUuid(); - if (this_present_uuid || that_present_uuid) { - if (!(this_present_uuid && that_present_uuid)) - return false; - if (!this.uuid.equals(that.uuid)) - return false; - } - - boolean this_present_serverSessionId = true && this.isSetServerSessionId(); - boolean that_present_serverSessionId = true && that.isSetServerSessionId(); - if (this_present_serverSessionId || that_present_serverSessionId) { - if (!(this_present_serverSessionId && that_present_serverSessionId)) - return false; - if (!this.serverSessionId.equals(that.serverSessionId)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(getImage_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetUuid()).compareTo(other.isSetUuid()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetUuid()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uuid, other.uuid); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetServerSessionId()).compareTo(other.isSetServerSessionId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetServerSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverSessionId, other.serverSessionId); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("getImage_args("); - boolean first = true; - - sb.append("uuid:"); - if (this.uuid == null) { - sb.append("null"); - } else { - sb.append(this.uuid); - } - first = false; - if (!first) sb.append(", "); - sb.append("serverSessionId:"); - if (this.serverSessionId == null) { - sb.append("null"); - } else { - sb.append(this.serverSessionId); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class getImage_argsStandardSchemeFactory implements SchemeFactory { - public getImage_argsStandardScheme getScheme() { - return new getImage_argsStandardScheme(); - } - } - - private static class getImage_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, getImage_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: // UUID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.uuid = iprot.readString(); - struct.setUuidIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // SERVER_SESSION_ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.serverSessionId = iprot.readString(); - struct.setServerSessionIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, getImage_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.uuid != null) { - oprot.writeFieldBegin(UUID_FIELD_DESC); - oprot.writeString(struct.uuid); - oprot.writeFieldEnd(); - } - if (struct.serverSessionId != null) { - oprot.writeFieldBegin(SERVER_SESSION_ID_FIELD_DESC); - oprot.writeString(struct.serverSessionId); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getImage_argsTupleSchemeFactory implements SchemeFactory { - public getImage_argsTupleScheme getScheme() { - return new getImage_argsTupleScheme(); - } - } - - private static class getImage_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getImage_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetUuid()) { - optionals.set(0); - } - if (struct.isSetServerSessionId()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetUuid()) { - oprot.writeString(struct.uuid); - } - if (struct.isSetServerSessionId()) { - oprot.writeString(struct.serverSessionId); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getImage_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.uuid = iprot.readString(); - struct.setUuidIsSet(true); - } - if (incoming.get(1)) { - struct.serverSessionId = iprot.readString(); - struct.setServerSessionIdIsSet(true); - } - } - } - - } - - public static class getImage_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("getImage_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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new getImage_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getImage_resultTupleSchemeFactory()); - } - - public FtpCredentials success; // required - public AuthorizationException failure; // required - public ImageDataException failure2; // required - - /** 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"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // FAILURE - return FAILURE; - case 2: // FAILURE2 - return FAILURE2; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FtpCredentials.class))); - tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - tmpMap.put(_Fields.FAILURE2, new org.apache.thrift.meta_data.FieldMetaData("failure2", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImage_result.class, metaDataMap); - } - - public getImage_result() { - } - - public getImage_result( - FtpCredentials success, - AuthorizationException failure, - ImageDataException failure2) - { - this(); - this.success = success; - this.failure = failure; - this.failure2 = failure2; - } - - /** - * Performs a deep copy on other. - */ - public getImage_result(getImage_result other) { - if (other.isSetSuccess()) { - this.success = new FtpCredentials(other.success); - } - if (other.isSetFailure()) { - this.failure = new AuthorizationException(other.failure); - } - if (other.isSetFailure2()) { - this.failure2 = new ImageDataException(other.failure2); - } - } - - public getImage_result deepCopy() { - return new getImage_result(this); - } - - @Override - public void clear() { - this.success = null; - this.failure = null; - this.failure2 = null; - } - - public FtpCredentials getSuccess() { - return this.success; - } - - public getImage_result setSuccess(FtpCredentials success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public AuthorizationException getFailure() { - return this.failure; - } - - public getImage_result setFailure(AuthorizationException failure) { - this.failure = failure; - return this; - } - - public void unsetFailure() { - this.failure = null; - } - - /** Returns true if field failure is set (has been assigned a value) and false otherwise */ - public boolean isSetFailure() { - return this.failure != null; - } - - public void setFailureIsSet(boolean value) { - if (!value) { - this.failure = null; - } - } - - public ImageDataException getFailure2() { - return this.failure2; - } - - public getImage_result setFailure2(ImageDataException failure2) { - this.failure2 = failure2; - return this; - } - - public void unsetFailure2() { - this.failure2 = null; - } - - /** Returns true if field failure2 is set (has been assigned a value) and false otherwise */ - public boolean isSetFailure2() { - return this.failure2 != null; - } - - public void setFailure2IsSet(boolean value) { - if (!value) { - this.failure2 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((FtpCredentials)value); - } - break; - - case FAILURE: - if (value == null) { - unsetFailure(); - } else { - setFailure((AuthorizationException)value); - } - break; - - case FAILURE2: - if (value == null) { - unsetFailure2(); - } else { - setFailure2((ImageDataException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case FAILURE: - return getFailure(); - - case FAILURE2: - return getFailure2(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case FAILURE: - return isSetFailure(); - case FAILURE2: - return isSetFailure2(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof getImage_result) - return this.equals((getImage_result)that); - return false; - } - - public boolean equals(getImage_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_failure = true && this.isSetFailure(); - boolean that_present_failure = true && that.isSetFailure(); - if (this_present_failure || that_present_failure) { - if (!(this_present_failure && that_present_failure)) - return false; - if (!this.failure.equals(that.failure)) - return false; - } - - boolean this_present_failure2 = true && this.isSetFailure2(); - boolean that_present_failure2 = true && that.isSetFailure2(); - if (this_present_failure2 || that_present_failure2) { - if (!(this_present_failure2 && that_present_failure2)) - return false; - if (!this.failure2.equals(that.failure2)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(getImage_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetFailure()).compareTo(other.isSetFailure()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFailure()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, other.failure); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetFailure2()).compareTo(other.isSetFailure2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFailure2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure2, other.failure2); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("getImage_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; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class getImage_resultStandardSchemeFactory implements SchemeFactory { - public getImage_resultStandardScheme getScheme() { - return new getImage_resultStandardScheme(); - } - } - - private static class getImage_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, getImage_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 FtpCredentials(); - 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 AuthorizationException(); - 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 ImageDataException(); - struct.failure2.read(iprot); - struct.setFailure2IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, getImage_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(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getImage_resultTupleSchemeFactory implements SchemeFactory { - public getImage_resultTupleScheme getScheme() { - return new getImage_resultTupleScheme(); - } - } - - private static class getImage_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getImage_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - if (struct.isSetFailure()) { - optionals.set(1); - } - if (struct.isSetFailure2()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - if (struct.isSetFailure()) { - struct.failure.write(oprot); - } - if (struct.isSetFailure2()) { - struct.failure2.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getImage_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.success = new FtpCredentials(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.failure = new AuthorizationException(); - struct.failure.read(iprot); - struct.setFailureIsSet(true); - } - if (incoming.get(2)) { - struct.failure2 = new ImageDataException(); - struct.failure2.read(iprot); - struct.setFailure2IsSet(true); - } - } - } - - } - - public static class finishedDownload_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("finishedDownload_args"); - - private static final org.apache.thrift.protocol.TField FTP_USER_FIELD_DESC = new org.apache.thrift.protocol.TField("ftpUser", org.apache.thrift.protocol.TType.STRING, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new finishedDownload_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new finishedDownload_argsTupleSchemeFactory()); - } - - public String ftpUser; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - FTP_USER((short)1, "ftpUser"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // FTP_USER - return FTP_USER; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.FTP_USER, new org.apache.thrift.meta_data.FieldMetaData("ftpUser", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(finishedDownload_args.class, metaDataMap); - } - - public finishedDownload_args() { - } - - public finishedDownload_args( - String ftpUser) - { - this(); - this.ftpUser = ftpUser; - } - - /** - * Performs a deep copy on other. - */ - public finishedDownload_args(finishedDownload_args other) { - if (other.isSetFtpUser()) { - this.ftpUser = other.ftpUser; - } - } - - public finishedDownload_args deepCopy() { - return new finishedDownload_args(this); - } - - @Override - public void clear() { - this.ftpUser = null; - } - - public String getFtpUser() { - return this.ftpUser; - } - - public finishedDownload_args setFtpUser(String ftpUser) { - this.ftpUser = ftpUser; - return this; - } - - public void unsetFtpUser() { - this.ftpUser = null; - } - - /** Returns true if field ftpUser is set (has been assigned a value) and false otherwise */ - public boolean isSetFtpUser() { - return this.ftpUser != null; - } - - public void setFtpUserIsSet(boolean value) { - if (!value) { - this.ftpUser = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case FTP_USER: - if (value == null) { - unsetFtpUser(); - } else { - setFtpUser((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case FTP_USER: - return getFtpUser(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case FTP_USER: - return isSetFtpUser(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof finishedDownload_args) - return this.equals((finishedDownload_args)that); - return false; - } - - public boolean equals(finishedDownload_args that) { - if (that == null) - return false; - - boolean this_present_ftpUser = true && this.isSetFtpUser(); - boolean that_present_ftpUser = true && that.isSetFtpUser(); - if (this_present_ftpUser || that_present_ftpUser) { - if (!(this_present_ftpUser && that_present_ftpUser)) - return false; - if (!this.ftpUser.equals(that.ftpUser)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(finishedDownload_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetFtpUser()).compareTo(other.isSetFtpUser()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFtpUser()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ftpUser, other.ftpUser); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("finishedDownload_args("); - boolean first = true; - - sb.append("ftpUser:"); - if (this.ftpUser == null) { - sb.append("null"); - } else { - sb.append(this.ftpUser); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class finishedDownload_argsStandardSchemeFactory implements SchemeFactory { - public finishedDownload_argsStandardScheme getScheme() { - return new finishedDownload_argsStandardScheme(); - } - } - - private static class finishedDownload_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, finishedDownload_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: // FTP_USER - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.ftpUser = iprot.readString(); - struct.setFtpUserIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, finishedDownload_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.ftpUser != null) { - oprot.writeFieldBegin(FTP_USER_FIELD_DESC); - oprot.writeString(struct.ftpUser); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class finishedDownload_argsTupleSchemeFactory implements SchemeFactory { - public finishedDownload_argsTupleScheme getScheme() { - return new finishedDownload_argsTupleScheme(); - } - } - - private static class finishedDownload_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, finishedDownload_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetFtpUser()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetFtpUser()) { - oprot.writeString(struct.ftpUser); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, finishedDownload_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.ftpUser = iprot.readString(); - struct.setFtpUserIsSet(true); - } - } - } - - } - - public static class finishedDownload_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("finishedDownload_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new finishedDownload_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new finishedDownload_resultTupleSchemeFactory()); - } - - public boolean success; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - private byte __isset_bitfield = 0; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(finishedDownload_result.class, metaDataMap); - } - - public finishedDownload_result() { - } - - public finishedDownload_result( - boolean success) - { - this(); - this.success = success; - setSuccessIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public finishedDownload_result(finishedDownload_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - } - - public finishedDownload_result deepCopy() { - return new finishedDownload_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = false; - } - - public boolean isSuccess() { - return this.success; - } - - public finishedDownload_result setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); - return this; - } - - public void unsetSuccess() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return Boolean.valueOf(isSuccess()); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof finishedDownload_result) - return this.equals((finishedDownload_result)that); - return false; - } - - public boolean equals(finishedDownload_result that) { - if (that == null) - return false; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(finishedDownload_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("finishedDownload_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class finishedDownload_resultStandardSchemeFactory implements SchemeFactory { - public finishedDownload_resultStandardScheme getScheme() { - return new finishedDownload_resultStandardScheme(); - } - } - - private static class finishedDownload_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, finishedDownload_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, finishedDownload_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 finishedDownload_resultTupleSchemeFactory implements SchemeFactory { - public finishedDownload_resultTupleScheme getScheme() { - return new finishedDownload_resultTupleScheme(); - } - } - - private static class finishedDownload_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, finishedDownload_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - oprot.writeBool(struct.success); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, finishedDownload_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); + if (incoming.get(2)) { + struct.failure2 = new ImageDataException(); + struct.failure2.read(iprot); + struct.setFailure2IsSet(true); } } } diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/InvalidTokenException.java b/src/main/java/org/openslx/imagemaster/thrift/iface/InvalidTokenException.java index e163c4f..080937f 100644 --- a/src/main/java/org/openslx/imagemaster/thrift/iface/InvalidTokenException.java +++ b/src/main/java/org/openslx/imagemaster/thrift/iface/InvalidTokenException.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.1) + * Autogenerated by Thrift Compiler (1.0.0-dev) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -29,9 +29,12 @@ import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (1.0.0-dev)", date = "2014-6-30") public class InvalidTokenException extends TException 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("InvalidTokenException"); @@ -162,7 +165,9 @@ public class InvalidTokenException extends TException implements org.apache.thri @Override public int hashCode() { - return 0; + List list = new ArrayList(); + + return list.hashCode(); } @Override diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/ServerAuthenticationError.java b/src/main/java/org/openslx/imagemaster/thrift/iface/ServerAuthenticationError.java index f813d0d..83ba841 100644 --- a/src/main/java/org/openslx/imagemaster/thrift/iface/ServerAuthenticationError.java +++ b/src/main/java/org/openslx/imagemaster/thrift/iface/ServerAuthenticationError.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.1) + * Autogenerated by Thrift Compiler (1.0.0-dev) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/ServerAuthenticationException.java b/src/main/java/org/openslx/imagemaster/thrift/iface/ServerAuthenticationException.java index 69c29b7..1445628 100644 --- a/src/main/java/org/openslx/imagemaster/thrift/iface/ServerAuthenticationException.java +++ b/src/main/java/org/openslx/imagemaster/thrift/iface/ServerAuthenticationException.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.1) + * Autogenerated by Thrift Compiler (1.0.0-dev) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -29,9 +29,12 @@ import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (1.0.0-dev)", date = "2014-6-30") public class ServerAuthenticationException extends TException 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("ServerAuthenticationException"); @@ -302,7 +305,19 @@ public class ServerAuthenticationException extends TException implements org.apa @Override public int hashCode() { - return 0; + List list = new ArrayList(); + + boolean present_number = true && (isSetNumber()); + list.add(present_number); + if (present_number) + list.add(number.getValue()); + + boolean present_message = true && (isSetMessage()); + list.add(present_message); + if (present_message) + list.add(message); + + return list.hashCode(); } @Override @@ -413,7 +428,7 @@ public class ServerAuthenticationException extends TException implements org.apa switch (schemeField.id) { case 1: // NUMBER if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.number = ServerAuthenticationError.findByValue(iprot.readI32()); + struct.number = org.openslx.imagemaster.thrift.iface.ServerAuthenticationError.findByValue(iprot.readI32()); struct.setNumberIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); @@ -490,7 +505,7 @@ public class ServerAuthenticationException extends TException implements org.apa TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { - struct.number = ServerAuthenticationError.findByValue(iprot.readI32()); + struct.number = org.openslx.imagemaster.thrift.iface.ServerAuthenticationError.findByValue(iprot.readI32()); struct.setNumberIsSet(true); } if (incoming.get(1)) { diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/ServerSessionData.java b/src/main/java/org/openslx/imagemaster/thrift/iface/ServerSessionData.java index 8f8893a..63de741 100644 --- a/src/main/java/org/openslx/imagemaster/thrift/iface/ServerSessionData.java +++ b/src/main/java/org/openslx/imagemaster/thrift/iface/ServerSessionData.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.1) + * Autogenerated by Thrift Compiler (1.0.0-dev) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -29,9 +29,12 @@ import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (1.0.0-dev)", date = "2014-6-30") public class ServerSessionData 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("ServerSessionData"); @@ -227,7 +230,14 @@ public class ServerSessionData implements org.apache.thrift.TBase list = new ArrayList(); + + boolean present_sessionId = true && (isSetSessionId()); + list.add(present_sessionId); + if (present_sessionId) + list.add(sessionId); + + return list.hashCode(); } @Override diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/SessionData.java b/src/main/java/org/openslx/imagemaster/thrift/iface/SessionData.java index 711abeb..0383304 100644 --- a/src/main/java/org/openslx/imagemaster/thrift/iface/SessionData.java +++ b/src/main/java/org/openslx/imagemaster/thrift/iface/SessionData.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.1) + * Autogenerated by Thrift Compiler (1.0.0-dev) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -29,9 +29,12 @@ import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (1.0.0-dev)", date = "2014-6-30") public class SessionData 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("SessionData"); @@ -345,7 +348,24 @@ public class SessionData implements org.apache.thrift.TBase list = new ArrayList(); + + boolean present_sessionId = true && (isSetSessionId()); + list.add(present_sessionId); + if (present_sessionId) + list.add(sessionId); + + boolean present_authToken = true && (isSetAuthToken()); + list.add(present_authToken); + if (present_authToken) + list.add(authToken); + + boolean present_serverAddress = true && (isSetServerAddress()); + list.add(present_serverAddress); + if (present_serverAddress) + list.add(serverAddress); + + return list.hashCode(); } @Override diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/UserInfo.java b/src/main/java/org/openslx/imagemaster/thrift/iface/UserInfo.java index 67f9340..b53e98a 100644 --- a/src/main/java/org/openslx/imagemaster/thrift/iface/UserInfo.java +++ b/src/main/java/org/openslx/imagemaster/thrift/iface/UserInfo.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.1) + * Autogenerated by Thrift Compiler (1.0.0-dev) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -29,9 +29,12 @@ import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (1.0.0-dev)", date = "2014-6-30") public class UserInfo 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("UserInfo"); @@ -404,7 +407,29 @@ public class UserInfo implements org.apache.thrift.TBase list = new ArrayList(); + + boolean present_userId = true && (isSetUserId()); + list.add(present_userId); + if (present_userId) + list.add(userId); + + boolean present_firstName = true && (isSetFirstName()); + list.add(present_firstName); + if (present_firstName) + list.add(firstName); + + boolean present_lastName = true && (isSetLastName()); + list.add(present_lastName); + if (present_lastName) + list.add(lastName); + + boolean present_eMail = true && (isSetEMail()); + list.add(present_eMail); + if (present_eMail) + list.add(eMail); + + return list.hashCode(); } @Override -- cgit v1.2.3-55-g7522